()
| 82 | |
| 83 | }, |
| 84 | onWindowResize () { |
| 85 | const { camera, renderer } = this |
| 86 | const height = document.getElementById(this.id).clientHeight; |
| 87 | const width = document.getElementById(this.id).clientWidth; |
| 88 | camera.aspect = width / height |
| 89 | camera.updateProjectionMatrix(); |
| 90 | |
| 91 | renderer.setSize(width, height); |
| 92 | this.render(); |
| 93 | |
| 94 | }, |
| 95 | animation () { |
| 96 | const { camera, controls, scene } = this |
| 97 | TWEEN.update(); |