MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / callAnimationCallbacks

Function callAnimationCallbacks

packages/core/animation-frame/index.ts:32–45  ·  view source on GitHub ↗
(thisFrameCbs: AnimationFrameCallbacks, frameTime: number)

Source from the content-addressed store, hash-verified

30}
31
32function callAnimationCallbacks(thisFrameCbs: AnimationFrameCallbacks, frameTime: number): void {
33 inAnimationFrame = true;
34 for (const animationId in thisFrameCbs) {
35 if (thisFrameCbs[animationId]) {
36 try {
37 thisFrameCbs[animationId](frameTime);
38 } catch (err) {
39 const msg = err ? err.stack || err : err;
40 Trace.write(`Error in requestAnimationFrame: ${msg}`, Trace.categories.Error, Trace.messageType.error);
41 }
42 }
43 }
44 inAnimationFrame = false;
45}
46
47function doCurrentFrame() {
48 // if we're not getting accurate frame times

Callers 2

doCurrentFrameFunction · 0.85
doFrameFunction · 0.85

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected