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

Method setCurrentAnimation

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

* Select the active animation, identical to Sprite#setCurrentAnimation. * @param {string} name - animation id * @param {string|Function|object} [resetAnim] - loop / chain / completion behavior * @param {boolean} [preserve_dt=false] * @returns {Sprite3d} Reference to this object for m

(name, resetAnim, preserve_dt = false)

Source from the content-addressed store, hash-verified

374 * @returns {Sprite3d} Reference to this object for method chaining
375 */
376 setCurrentAnimation(name, resetAnim, preserve_dt = false) {
377 this._frameAnim.setCurrentAnimation(name, resetAnim, preserve_dt);
378 return this;
379 }
380
381 /**
382 * Reverse the given (or current) animation in place (see {@link Sprite#reverseAnimation}).

Callers 4

constructorMethod · 0.95
playMethod · 0.95
makeAnimatedFunction · 0.95
createGameFunction · 0.95

Calls

no outgoing calls

Tested by 1

makeAnimatedFunction · 0.76