MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / resize

Function resize

components/liquid-chrome.tsx:135–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133 const mesh = new Mesh(gl, { geometry, program });
134
135 function resize() {
136 const scale = 1;
137 renderer.setSize(
138 container.offsetWidth * scale,
139 container.offsetHeight * scale
140 );
141 const resUniform = program.uniforms.uResolution.value as Float32Array;
142 resUniform[0] = gl.canvas.width;
143 resUniform[1] = gl.canvas.height;
144 resUniform[2] = gl.canvas.width / gl.canvas.height;
145 }
146 window.addEventListener("resize", resize);
147 resize();
148

Callers 1

LiquidChromeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected