Phaser 3 Animation Snippets

Sprite sheet load
Description:loads a sprite sheet
Example:this.load.spritesheet('key', 'path', { frameWidth: width, frameHeight: height});

get frame names
Description:get the frame names of a sprite sheet
Example:var textureFrames = this.textures.get('key').getFrameNames();

create an animation
Description:create an animation
Example:this.anims.create({ key: 'animationName', frames: [ { key: 'key1',:frame:frame1 }, { key: 'key2',:frame:frame2 }, ], frameRate: rate, repeat: -1 });

Play an animation
Description:play an animation
Example:sprite.play('animationName');

get frame numbers
Description:generate frame numbers from a sprite sheet. Will return an object such as: { key: 'char',frame:1 }, { key: 'char',frame:2 },
Example: var frameNames= this.anims.generateFrameNumbers('key');