MCPcopy Create free account
hub / github.com/SpringRoll/SpringRoll / update

Method update

src/localization/captions/Caption.js:56–64  ·  view source on GitHub ↗

* Updates content based on time passed. * This should be called every frame that the caption is active. * * @param {Number} deltaTime - Time in seconds since last frame. * @memberof Caption

(deltaTime)

Source from the content-addressed store, hash-verified

54 * @memberof Caption
55 */
56 update(deltaTime) {
57 const time = this.time + deltaTime * 1000;
58 if (time === this.time) {
59 return;
60 }
61
62 this.updateState(time, this.time);
63 this.time = time;
64 }
65
66 /**
67 * Handles calling callbacks and updating caption's current state.

Callers 2

Captions.spec.jsFile · 0.45

Calls 1

updateStateMethod · 0.95

Tested by

no test coverage detected