Jump to content

need OnPickOutTrigger...


MasterK
 Share

Recommended Posts

http://www.babylonjs-playground.com/#G1QID#7

(You might need to clear browser cache, first.  New mods in playground version of BJS, so don't use BJS from browser cache) 

Yep, there's #1...  sprite goes normal if a held-pick pointer is moved off-of the sprite.  And, it doesn't need any Scene-based events.  It's all kept on-board the spriteManager.  Good good good.  

For this scenario, the onPickOutTrigger in lines 38-42 would never trigger (it's overridden / superseded ), so I NOP'd it.
   (For the youngsters, NOP = no op = remarked-out). 
Lines 45-49 provide the pointer-out functionality, of course.  Easy.

Thanks Deltakosh!  It was VERY nice of you to make these special-case mods for us!  Now we have everything we need for sprite-based buttons.  Sorry for long-winding MasterK's initial post, but the whole issue sparked my interest.  And, there was quite a crop of mis-comms along the way, eh?  *nod*  I explain so well that I don't explain very well.  :)  I'm working on it.

I don't know when/where folks will use webGL animated sprite buttons... vs. animated HTML-element buttons... vs. conventional 3D mesh buttons.  I guess we'll wait and watch.  Personally, if I had my choice of GUI methods... it would be pure BJS mesh... with a little button float-bounce.  Wizball, anyone?  There's no room for a secret compartment with an old shoe in it... on the back-side of a sprite.  But a box?  You bet.  Fly around to the back panel of the solid mesh button, open the little door, and there's a VR city inside there!  You won't see a sprite store a city.  heh

MasterK's Quest... completed!   Phew!  I didn't code a thing, and I'm all pooped-out!  :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...