MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / handleResize

Function handleResize

assets/js/block_ninja.js:2020–2030  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2018 let width, height;
2019
2020 function handleResize() {
2021 const w = window.innerWidth;
2022 const h = window.innerHeight;
2023 viewScale = h / 1000;
2024 width = w / viewScale;
2025 height = h / viewScale;
2026 canvas.width = w * dpr;
2027 canvas.height = h * dpr;
2028 canvas.style.width = w + 'px';
2029 canvas.style.height = h + 'px';
2030 }
2031
2032 // Set initial size
2033 handleResize();

Callers 1

setupCanvasesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected