MCPcopy
hub / github.com/spritejs/spritejs / step

Method step

benchmark/js/animator-dev.js:179–191  ·  view source on GitHub ↗
(timestamp)

Source from the content-addressed store, hash-verified

177
178 return new Promise(((resolve, reject) => {
179 function step(timestamp) {
180 startTime = startTime || timestamp
181 const p = Math.min(1.0, (timestamp - startTime) / duration)
182
183 update.call(self, easing ? easing(p) : p, p)
184
185 if(p < 1.0) {
186 return false
187 }
188
189 resolve(startTime + duration)
190 return true
191 }
192
193 FrameManager.add(step)
194

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected