MCPcopy
hub / github.com/KilledByAPixel/LittleJS / pingPong

Method pingPong

plugins/tweenSystem.js:142–147  ·  view source on GitHub ↗

Like `loop`, but swap `start` and `end` between iterations so the value * bounces back and forth. `pingPong()` with no argument bounces forever. * * Mutually exclusive with `loop`; calling either replaces the other, and * calling `then` after either clears the loop (last call

(count = Infinity)

Source from the content-addressed store, hash-verified

140 * @returns {Tween}
141 * @memberof TweenSystem */
142 pingPong(count = Infinity)
143 {
144 this.loopRemaining = count;
145 this.thenCallback = () => pingPongContinuation(this);
146 return this;
147 }
148
149 /** Pause this tween. While paused, tweenUpdate skips it.
150 * @memberof TweenSystem */

Callers 3

tween.test.mjsFile · 0.80
gameInitFunction · 0.80
gameInitFunction · 0.80

Calls 1

pingPongContinuationFunction · 0.85

Tested by

no test coverage detected