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

Function resizeCanvas

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

Source from the content-addressed store, hash-verified

694 }
695
696 function resizeCanvas() {
697 let width = scaleByPixelRatio(canvas.clientWidth);
698 let height = scaleByPixelRatio(canvas.clientHeight);
699 if (canvas.width !== width || canvas.height !== height) {
700 canvas.width = width;
701 canvas.height = height;
702 return true;
703 }
704 return false;
705 }
706
707 function updateColors(dt) {
708 colorUpdateTimer += dt * config.COLOR_UPDATE_SPEED;

Callers 1

updateFrameFunction · 0.70

Calls 1

scaleByPixelRatioFunction · 0.70

Tested by

no test coverage detected