ILTP Posted January 31, 2022 Share Posted January 31, 2022 Hi, I am building an app where we would like to distort images. I can make it work for a SimplePlane doing: _img.verticesBuffer.update(_vertices); but I can't do that with AnimatedSprite. Any clue how to do something like that, so I define the number of vertices and then being able to update them? Quote Link to comment Share on other sites More sharing options...
Exca Posted February 2, 2022 Share Posted February 2, 2022 AnimatedSprite is not a mesh and it has no separate vertices. Easiest way would be to create your own mesh similar to SimplePlane and add AnimatedSprite functionality to it. So basically create your own mesh that updates the texture similarly as how AnimatedSprite does. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 3, 2022 Share Posted February 3, 2022 (edited) Here's the class that can be used for any object that has texture, not only sprite : https://github.com/pixijs/pixi-heaven/blob/master/src/animation/AnimationState.ts Here's how to use it: https://github.com/pixijs/pixi-heaven#animation Hope you know how to do Meshes Edited February 3, 2022 by ivan.popelyshev 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.