MCPcopy Create free account
hub / github.com/melonjs/melonJS / addAnimation

Method addAnimation

packages/melonjs/src/renderable/sprite.js:519–521  ·  view source on GitHub ↗

* add an animation * For fixed-sized cell sprite sheet, the index list must follow the * logic as per the following example : * * @param {string} name - animation id * @param {number[]|string[]|object[]} index - list of sprite index or name

(name, index, animationspeed)

Source from the content-addressed store, hash-verified

517 * this.setCurrentAnimation("stand");
518 */
519 addAnimation(name, index, animationspeed) {
520 return this._frameAnim.addAnimation(name, index, animationspeed);
521 }
522
523 /**
524 * set the current animation

Callers 10

constructorMethod · 0.95
makeSpriteFunction · 0.95
onResetEventMethod · 0.95
getRenderableMethod · 0.45
sprite3d.spec.jsFile · 0.45
makeFunction · 0.45
sprite.spec.jsFile · 0.45
texture.spec.jsFile · 0.45

Calls

no outgoing calls

Tested by 2

makeSpriteFunction · 0.76
makeFunction · 0.36