unintellisense

Members
  • Content count

    13
  • Joined

  • Last visited

  1. Looks like it gets exacerbated when a high width/height are passed to createForMesh. http://www.babylonjs-playground.com/#ZI9AK7#14
  2. Here is a PG to demonstrate the issue: http://www.babylonjs-playground.com/#ZI9AK7#13 If you click above the actual button you'll see events getting registered, but they certainly are not lining up with the actual button position. Seems like it happens anytime the width or height are set, even if its the direct descendant of the AdvancedDynamicTexture. This used to work, only noticed it on my project when I refreshed from preview the other day.
  3. Hi, I notice that when using texture mode and a button, the default scaling animation is not reversed if the mouse is not released over the button: http://www.babylonjs-playground.com/#ZI9AK7#7 Try clicking down on the button and moving the cursor before releasing. In my own project it behaves a bit differently, I actually have to release it over something over than the canvas to reproduce. Thanks for the great library in general and BABYLON.GUI in particular lately
  4. Done, thanks.
  5. This is a very minor issue, but it also has a very minor fix I think. When building a TS project which includes the latest preview babylon.js typings, with the strictNullCheck:true flag set, the following error happens during compilation: lib/babylon.d.ts(674,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'crossOrigin' must be of type 'string | null', but here has type 'string'. The Typescript provided lib.d.ts defines crossOrigin as 'string | null' as the error suggests. Admittedly I am not sure of the build process used for BJS, But I think that this line https://github.com/BabylonJS/Babylon.js/blob/92ab030b50fc277904a823be642755d3f0fef006/src/babylon.mixins.ts#L155 just needs to be changed to match the lib.d.ts shape ( string | null ). I've never contributed to this project, but can create a PR if you want.
  6. 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.
  7. 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.
  8. 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.
  9. You the man, PG works as expected, as well as my own project when I take latest. Thanks again!
  10. 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!
  11. 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.
  12. 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.
  13. 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.