hit2501 Posted December 15, 2015 Share Posted December 15, 2015 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. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted December 15, 2015 Share Posted December 15, 2015 hello, If you want to delete a sprite from the scene: Pin01.dispose(); But I may have misunderstood what you mean by 'unload' Quote Link to comment Share on other sites More sharing options...
hit2501 Posted December 16, 2015 Author Share Posted December 16, 2015 Thank Dad72 that´s what I was looking for but for popup01 nice. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.