Wingnut Posted May 7, 2017 Share Posted May 7, 2017 Hi gang. In this playground... play around with mousewheel unzooming... until rect2d is tiny dot. Play with mousewheel there, while small. Keep playing... in/out... until... Error: Can't invert matrix, near null determinant babylon.canvas2d.js:185:23 Extra stackdump data... Matrix2D.prototype.invertToRef https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:185:23 Matrix2D.Invert https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:144:13 Prim2DBase.prototype.updateCachedStates https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:9337:48 Prim2DBase.prototype.updateCachedStatesOf https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:9144:17 Group2D.prototype._prepareGroupRender https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:11928:17 Canvas2D.prototype._updateCanvasState https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:18228:13 Canvas2D.prototype._render https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:18239:13 Canvas2D/_this._afterRenderObserver< https://preview.babylonjs.com/canvas2D/babylon.canvas2d.js:17036:25 e.prototype.notifyObservers https://preview.babylonjs.com/babylon.js:2:30355 The error kills the canvas2d and the prims. They vanish... leaving the user saying "woah, dude", or something similarly profound. I tortured the poor .scale property (for the mainRect... in the renderLoop) and made it barf. Rectangular barf! Just passing it along. (eww) I almost made a Trello card on @Nockawa's Canvas2D Trello site, but they wanted me to JOIN something, and I couldn't handle all that added responsibility. :/ Quote Link to comment Share on other sites More sharing options...
AlbertTJames Posted May 7, 2017 Share Posted May 7, 2017 Edit: probably unrelated issue. Sorry for the spam. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 8, 2017 Author Share Posted May 8, 2017 Hi ATJ! Your words are NEVER spam. I always enjoy reading your comments, no matter where you put them. But, yeah, Nockawa and other Canvas2D superheroes might not see your issue, here. Feel free to start a new Q&A or Bugs thread, of course. As you likely know, Canvas2D is still in-development - work in progress. I think some positioning/origin changes happened to the primitives about 3 months ago. I think Nockawa talks about those things... in some threads in Announcements sub-forum. You probably knew all that, already. Good to see you again... hope you're well. AlbertTJames 1 Quote Link to comment Share on other sites More sharing options...
adam Posted May 8, 2017 Share Posted May 8, 2017 This should probably be Epsilon rather than 0: https://github.com/BabylonJS/Babylon.js/blob/master/canvas2D/src/Engine/babylon.prim2dBase.ts#L2319 http://www.babylonjs-playground.com/#2WHFP1#3 Wingnut and AlbertTJames 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 8, 2017 Author Share Posted May 8, 2017 Adam, you're just a God! sigh. I wish I had a brain like yours. Yep... when we get near zero or near poles... a guy should instantly think 'Epsilon' (micro-value). Thanks Adam! Well done. adam 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.