Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

how to choose how many image sequences in a spritesheet for animating a sprite?

$
0
0

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


Viewing all articles
Browse latest Browse all 3978

Trending Articles