unintellisense

Members
  • Content count

    8
  • Joined

  • Last visited

  1. Not sure whether I should create a brand new topic for this, so I apologize if I should have. I noticed with the latest preview, that the original PG (and my own project started getting the following error, it seems to occur anytime the scale is set to zero: Uncaught Error: Can't invert matrix, near null determinant at Matrix2D.invertToRef (babylon.canvas2d.js:185) at Function.Matrix2D.Invert (babylon.canvas2d.js:144) at Rectangle2D.Prim2DBase.updateCachedStates (babylon.canvas2d.js:9136) at WorldSpaceCanvas2D.Prim2DBase.updateCachedStatesOf (babylon.canvas2d.js:8950) at WorldSpaceCanvas2D.Group2D._prepareGroupRender (babylon.canvas2d.js:11599) at WorldSpaceCanvas2D.Canvas2D._updateCanvasState (babylon.canvas2d.js:17734) at WorldSpaceCanvas2D.Canvas2D._render (babylon.canvas2d.js:17745) at e.callback (babylon.canvas2d.js:16554) at e.notifyObservers (babylon.js:2) at i.render (babylon.js:12) If I change the initial scale to .001 or something, the error no longer occurs. http://www.babylonjs-playground.com/#W9SZY#6 Other than that, really good! The various scaling / positioning I am doing on world as well as local canvas's are all working as expected. Great work.
  2. I'm sorry a long time user of BJS is unhappy with the Typescript direction. But I'm also sorry to hear that core contributors to BJS are getting bummed out from negative feedback, that sucks. However I will say personally that the fact that BJS is written in Typescript (let alone having decent typings, using TS during my day job I am always excited when a npm module I learn about has @types ) was a huge attraction for me. I won't try to evangelize anyone who isn't sold on it, but I love the development experience and the safety it affords. I am not quite to the point where I feel like I can contribute meaningfully to BJS (mainly because my 3D skills are poor), but I know that Typescript lets those who are sold on it be much more productive and produce better code as a result. Anyway, my $0.02. Thanks again to everyone who makes BJS possible.
  3. Maybe this hasn't made it into the preview or the PG, or possibly I am using designSize wrong. But are these working right @Nockawa? http://babylonjs-playground.com/#2GDFI4 using position http://babylonjs-playground.com/#2GDFI4#1 using marginalignment Also I put a backgroundFill in, as I thought the idea of designSize was to grow/scale to fit the canvas. Sorry if I should have created another thread, but this seemed on topic.
  4. You the man, PG works as expected, as well as my own project when I take latest. Thanks again!
  5. Hello, I have a couple scenes where I scale up some WorldSpaceCanvas instances with some simple UI. I recently took the latest preview release and noticed that children are offset strangely until the canvas reaches its full scale. I made a PG which should demonstrate what I am talking about: http://www.babylonjs-playground.com/#W9SZY#2 It's most obvious with the title, but it happens with anything which isn't very close to 0,0, it seems. Thanks for a great framework!
  6. Thanks, but the idea was to be able to tell in my scene callbacks if I'm over the rect (so that I exit early instead of interacting with the scene beneath my canvas). The actual interaction with the element in this case was just for debugging/demo purposes.
  7. Looks like I can achieve what I want using the actualPosition/actualSize of the Prim2DBase. http://www.babylonjs-playground.com/#1885OI#8 Not sure if I misunderstand what the .boundingInfo BoundingInfo2D property is supposed to be used for. If I inspect the center for the boundingInfo it is nowhere near the actualPosition? http://www.babylonjs-playground.com/#1885OI#9 Anyway, guess I have a way forward.
  8. Hello, I am trying to work out how I can use scene.pointerX/scene.pointerY to determine when my cursor is over a specific canvas2D rectangle. I made a small playground to show what I am trying to do. http://www.babylonjs-playground.com/#1885OI#6 The intention is for it to only toggle the box's color when clicking over it, but you can see that doesn't happen. What I really want this for is so that I can use a full size ScreenSpaceCanvas2D and be able to return early from my scene pointer actions if it is over specific rectangles. I tried scaling down the screen canvas to the size of the actual menu, but then I ran into the issue of scaling the menu properly in a way that behaves the same way the margin values do for a rectangle. Anyway, a bit new to Babylon.js, any help is appreciated.