lin Posted March 17, 2017 Share Posted March 17, 2017 What is the method of pixiJS to delete the square? Quote Link to comment Share on other sites More sharing options...
colourclash Posted March 17, 2017 Share Posted March 17, 2017 The clear method might be what you're looking for:http://pixijs.download/release/docs/PIXI.Graphics.html#clear Quote Link to comment Share on other sites More sharing options...
Taz Posted March 17, 2017 Share Posted March 17, 2017 It depends on how you created it and on what you mean by delete. Judging from the screenshot you posted, it looks like you could just add the square once, then update its position: "square.position.y -= 100;" If it's the exact same square, like in the picture, and you just want to move it, then there's no reason to clear and redraw the same square in your code. Quote Link to comment Share on other sites More sharing options...
lin Posted March 21, 2017 Author Share Posted March 21, 2017 thank you 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.