()
| 163 | let program: Program; |
| 164 | |
| 165 | function resize() { |
| 166 | renderer.setSize(container.offsetWidth, container.offsetHeight); |
| 167 | if (program) { |
| 168 | program.uniforms.iResolution.value = [ |
| 169 | gl.canvas.width, |
| 170 | gl.canvas.height, |
| 171 | gl.canvas.width / gl.canvas.height, |
| 172 | ]; |
| 173 | } |
| 174 | } |
| 175 | window.addEventListener("resize", resize); |
| 176 | resize(); |
| 177 |