Jump to content

How to quit, unload or remove sprites?


hit2501
 Share

Recommended Posts

Hi.

 

I use this code to show a sprite (popup) when mouse is over a mesh(pin01):

Pin01.actionManager.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPointerOverTrigger, function () {                        popup01 = new BABYLON.SpriteManager("popup", "images/popup.jpg", 2000, 400, scene);                        popup01 = new BABYLON.Sprite("popup01", popup01);                        popup01.position = pin01.position;                        popup01.size = 7;                    }));   

And works fine but what I want is unload the sprite when mouse is out the mesh.

 

What is the function to do that?

 

Thanks.

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...