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

Method rewind

packages/melonjs/src/renderable/frameAnimation.js:334–339  ·  view source on GitHub ↗

* reset the current animation to its first frame (the frame-animation half of * Sprite#stop — the host still handles any video / pause concerns).

()

Source from the content-addressed store, hash-verified

332 * {@link Sprite#stop} — the host still handles any video / pause concerns).
333 */
334 rewind() {
335 this.resetTimer();
336 if (this.current.name !== undefined && this.current.length > 0) {
337 this.setAnimationFrame(0);
338 }
339 }
340
341 /**
342 * advance the frame animation by `dt` milliseconds, stepping frames, looping

Callers 2

stopMethod · 0.80
stopMethod · 0.80

Calls 2

resetTimerMethod · 0.95
setAnimationFrameMethod · 0.95

Tested by

no test coverage detected