()
| 464 | updateCameraPosition(); |
| 465 | |
| 466 | const onWindowResize = () => { |
| 467 | const width = window.innerWidth; |
| 468 | const height = window.innerHeight; |
| 469 | |
| 470 | camera.aspect = width / height; |
| 471 | camera.updateProjectionMatrix(); |
| 472 | renderer.setSize(width, height); |
| 473 | |
| 474 | if (material.uniforms) { |
| 475 | material.uniforms.u_resolution.value.set(width, height); |
| 476 | } |
| 477 | |
| 478 | updateCameraPosition(); |
| 479 | |
| 480 | createHighResBackgroundTexture(width, height).then(texture => { |
| 481 | scene.background = texture; |
| 482 | if (material.uniforms && material.uniforms.u_background) { |
| 483 | material.uniforms.u_background.value = texture; |
| 484 | } |
| 485 | }); |
| 486 | }; |
| 487 | |
| 488 | window.addEventListener('resize', onWindowResize); |
| 489 |
nothing calls this directly
no test coverage detected