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

Method play

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

* Play (and optionally switch to) an animation, identical to Sprite#play. * @param {string} [name] - animation id to play; omit to resume * @param {string|Function|object} [options] - loop / chain / completion behavior * @returns {Sprite3d} Reference to this object for method chaining

(name, options)

Source from the content-addressed store, hash-verified

442 * @returns {Sprite3d} Reference to this object for method chaining
443 */
444 play(name, options) {
445 this.animationpause = false;
446 if (name !== undefined) {
447 this.setCurrentAnimation(name, options);
448 }
449 return this;
450 }
451
452 /**
453 * Pause the current animation, freezing the current frame (see {@link Sprite#pause}).

Callers

nothing calls this directly

Calls 1

setCurrentAnimationMethod · 0.95

Tested by

no test coverage detected