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

Method interp

plugins/tweenSystem.js:201–207  ·  view source on GitHub ↗

Compute the interpolated value at the given remaining `life`. * At life === duration the result is `start`; at life === 0 it is `end`. * @param {number} life * @returns {number} * @memberof TweenSystem

(life)

Source from the content-addressed store, hash-verified

199 * @returns {number}
200 * @memberof TweenSystem */
201 interp(life)
202 {
203 const x = this.ease((this.duration - life) / this.duration);
204 if (isLerpable(this.start))
205 return this.start.lerp(this.end, x);
206 return this.start + (this.end - this.start) * x;
207 }
208
209 /** Remove this tween from the active list and prevent any pending then-callback.
210 * @memberof TweenSystem */

Callers 6

constructorMethod · 0.95
restartMethod · 0.95
getValueMethod · 0.95
loopContinuationFunction · 0.80
pingPongContinuationFunction · 0.80
tweenUpdateFunction · 0.80

Calls 2

isLerpableFunction · 0.85
lerpMethod · 0.45

Tested by

no test coverage detected