Nockawa

Members
  • Content count

    516
  • Joined

  • Last visited

  • Days Won

    26

Nockawa last won the day on January 13

Nockawa had the most liked content!

3 Followers

About Nockawa

  • Rank
    Advanced Member
  • Birthday 06/19/1976

Contact Methods

  • Website URL
    http://www.loicbaumann.fr
  • Twitter
    loicbaumann

Profile Information

  • Gender
    Male
  • Location
    Paris Area
  • Interests
    Programming, Lego Technic

Recent Profile Visitors

1,102 profile views
  1. I suggest you to spend some time here: http://doc.babylonjs.com/overviews/Canvas2D_Home There's a lot of content. 1) try to understand what's different from yours 2) see the doc about positioning and some PG in the bottom of the overview home page also demonstrate it 4) it should be the way I told, if you set skipNextObservable, the 3D Scene shouldn't receive the pointer event, it was specifically designed for this purpose you may want to take a look at attachControl's implementation to see how onPrePointerObservable and onPointerObservable are triggered. Canvas2D's architecture uses onPrePointerObservable, to get a change to cancel onPointerObservable if the user wants to.
  2. @ller I'm progressing, WorldAABB computation/update is done, partitioning is done, intersection of AABB is done. Now I need to make the different intersection algorithm between primitive types, because any kind of prim can intersect any other kind, well, there's in theory a lot of different cases right there already. I think I may rely on a mix of: TypeA versus TypeB TypeA's auto generated triangleList versus TypeB's auto generated triangleList (to reduce the overall cases count).
  3. 1) this should work, maybe there was a regression lately, I'll check more in depth, but this PG:http://babylonjs-playground.com/#1BKDEO#22 is working and looks like I can get the over/out events, anyway, check this PG it may help you in the meantime. 2) the result can't be good if you're using a 4pt font. I've used a 12pt (the minimum acceptable I think) so I've set the unitScaleFactor to 45: http://www.babylonjs-playground.com/#1JIN1S#7 3) event are bubbling, you have to always check for the relatedTarget property to know where it comes from, that way you can ignore the text. otherwise you can set "isPickable: false" at text creation time it will disable interaction if I remember well. 4) really!? I thought the default behavior when the event would go through and also in 3D world and you had to set "skipNextObservable = true" in the event handler of the 2D Canvas to be sure it won't fallback in the 3D Scene, please make a quick PG that demonstrate the issue so I can debug it. 5) There's already an Ellipse2D prim, I think you can made circles with that!
  4. Indeed, I should update the overview documentation to let people know of this now... I also accept PR!
  5. canvas2d

    you should use "actualSize", but it won't change the fact that you're right, if you query this property right away you won't get a proper value, the canvas has to be rendered at least once for the correct value to be fetched. this is something that I should fix because it's no longer acceptable. in this case it should be "lazy evaluation" instead of "late binding" (which is not the more accurate term to use, well most accurate would be "real bugged" )
  6. canvas2d

    MasterK asked for the designSize feature, basically it allow him to do a game with a predefined screen/canvas resolution (the designSize) then the rendered canvas will adapt to the real canvas/screen's resolution. still no percentage. With 2D Engine pixel is always the unit. when you start dealing with percentage it's more about GUI...
  7. canvas2d

    you can't use percentage for x/y/pos. these area number based properties so it's in pixel. but if you rely on positioning instead of absolute position, which means using alignment and marging, you should be able to express your offsets in percentage another way to achieve something "responsive", would be to use the designSize when you create the canvas. you set a "ideal/design" size, then you rely on absolute position (x/y/pos) and size for your prim, then I will take care of "scaling everything" in order to keep the proportions you asked for... it may be a little hard to understand, but just create a canvas with a designSize of 500,500 then position everything according to this size, then run you PG and resize the window
  8. Look at the PG's code, there's one Cube which is animated to demonstrate that the offset is working correctly when the trackedNode is rotating/scaling. Sometimes you won't see the canvas because the plane on which it's displayed is simply culled.
  9. canvas2d

    @Wingnut the bug is fixed and pushed. @Deltakosh please update the PG.
  10. canvas2d

    That, my friend, is a bug you just found! thank you ! After some investigation looks like an auto sized Text2D doesn't update its BoundingInfo2D correctly which prevent it from being accurately picked during intersection test. I'm digging and (I hope) will fix it quickly!
  11. canvas2d

    Before answering your question, I just want to be sure that you're aware that due to event bubbling you may get an event triggered by the Text2D prim that is raised in the Rect2D prim, to know which Prim triggered the event you have to use the relatedTarget property in PrimitivePointerInfo object. #1 this may related to what I just say above, Over/Out are bubbling, which means if you set an Observer on the Rect2D and the event occurs on the Text2D: you will be notified of Text2D related events. Enter/Leave are not bubbling, so in the same situation you won't be notified. #2 Well in your case everything is pickable so isContainer's value doesn't matter. #3 If you set isContainer = true and isPickable = false on the Rect2D, you won't have events for the Text2D, I will stop looking for event to raise as soon as I meet the Rect2D. #3b no, isContainer is really a very specific case, one I couldn't ignore, I don't remember the use case exactly but MasterK really made his point when his expressed the need to have this behavior, so I developed it. But most of the time you can ignore it. It's not mouse because these events are supposed to be raised is you have a touch screen or a screen compatible with a stylus.
  12. @royibernthal the feature's done, the PG is updated, you can find a sample here: http://babylonjs-playground.com/#1KYG17#1 I hope it fits your needs
  13. @ller I'm starting to work on the feature now. I don't know how long it will take because I may be tempted to implement a very efficient partitioning algo (or at least not a dumb O(n²) ). I'm in brainstorming phase right now...
  14. canvas2d

    @Wingnut the PG is updated you should give a new try to the pointerEvent, it should be ok hopefully.
  15. Hello, The best thing to do in such case is create a playground that reproduces the issue. By the way, you can set levelVisible = false to hide a given primitive, setting its opacity to 0 will unfortunately...still render it... while levelVisible won't.