MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / calcDeltaTime

Function calcDeltaTime

src/content/Animations/SplashCursor/SplashCursor.jsx:692–698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

690 }
691
692 function calcDeltaTime() {
693 let now = Date.now();
694 let dt = (now - lastUpdateTime) / 1000;
695 dt = Math.min(dt, 0.016666);
696 lastUpdateTime = now;
697 return dt;
698 }
699
700 function resizeCanvas() {
701 let width = scaleByPixelRatio(canvas.clientWidth);

Callers 1

updateFrameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected