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

Function resize

src/content/Backgrounds/Lightfall/Lightfall.jsx:258–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256 meshRef.current = mesh;
257
258 const resize = () => {
259 const rect = container.getBoundingClientRect();
260 renderer.setSize(rect.width, rect.height);
261 uniforms.iResolution.value = [gl.drawingBufferWidth, gl.drawingBufferHeight, 1];
262 };
263
264 resize();
265 const ro = new ResizeObserver(resize);

Callers 1

LightfallFunction · 0.70

Calls 1

setSizeMethod · 0.45

Tested by

no test coverage detected