tasumta Posted March 31, 2020 Share Posted March 31, 2020 here's the example from the documentain PIXI.Loader.shared.add("assets/spritesheet.json").load(setup); function setup() { let sheet = PIXI.Loader.shared.resources["assets/spritesheet.json"].spritesheet; animatedSprite = new PIXI.AnimatedSprite(sheet.animations["image_sequence"]); ... } but I have a lot of image sequences some for walking some for jumping, but if I follow this example all the animations will be shown at once, so how to choose how many images? THANKS Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 31, 2020 Share Posted March 31, 2020 Hello and welcome to the forums! Animations are just array of `PIXI.Texture` ' s, you can make your own easily from `textures` in spritesheet itself. If you need to adjust speed, remove some frames, add timers to frames - you have to look in AnimatedSprite source. AnimatedSprite is baseline class for animations, it can work in production only in basic cases. Usually people override its methods to make more features. Documentation is fine but , its not enough, and , AnimatedSprite itself is not rocket science - you can just look in the sources! As for how to solve your particular issue - my experience is not enough to understand what are you asking for. You can wait for someone else, or you can try to describe it better, make a demo, or you can just read the sources. https://github.com/pixijs/pixi.js/blob/dev/packages/sprite-animated/src/AnimatedSprite.ts tasumta 1 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.