brentstrandy Posted June 26, 2018 Share Posted June 26, 2018 I'm able to load an SVG file containing a single image. Is it possible to load an SVG that contains multiple images? Is it possible to animate multiple SVG files? Link to comment Share on other sites More sharing options...
brentstrandy Posted July 11, 2018 Author Share Posted July 11, 2018 ANSWER: Load the SVG as a spritesheet this.load.spritesheet( 'avatar', 'images/avatar_animations.svg', { frameWidth: 89, frameHeight: 184, endFrame: 10 } ); And later in code you can do this: let avatarImage = this.add.sprite(200, 200, 'avatar'); // Assuming you've added a jump animation.... avatarImage.anims.play('jump'); Link to comment Share on other sites More sharing options...
prob Posted July 12, 2018 Share Posted July 12, 2018 Thanks for this info. Are you creating the sprite sheet manually? Link to comment Share on other sites More sharing options...
Recommended Posts