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

Method addAnimation

packages/melonjs/src/renderable/sprite3d.js:365–367  ·  view source on GitHub ↗

* Add an animation, identical to Sprite#addAnimation. * @param {string} name - animation id * @param {number[]|string[]|object[]} index - frame indices / names (see Sprite#addAnimation) * @param {number} [animationspeed] - cycling speed in ms * @returns {number} number of fra

(name, index, animationspeed)

Source from the content-addressed store, hash-verified

363 * @returns {number} number of frames added
364 */
365 addAnimation(name, index, animationspeed) {
366 return this._frameAnim.addAnimation(name, index, animationspeed);
367 }
368
369 /**
370 * Select the active animation, identical to {@link Sprite#setCurrentAnimation}.

Callers 3

constructorMethod · 0.95
makeAnimatedFunction · 0.95
createGameFunction · 0.95

Calls

no outgoing calls

Tested by 1

makeAnimatedFunction · 0.76