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

Function calcDeltaTime

src/tailwind/Animations/SplashCursor/SplashCursor.jsx:688–694  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

updateFrameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected