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

Function resizeCanvas

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

Source from the content-addressed store, hash-verified

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

Callers 1

updateFrameFunction · 0.70

Calls 1

scaleByPixelRatioFunction · 0.70

Tested by

no test coverage detected