()
| 155 | this.clock.start(); |
| 156 | } |
| 157 | resize() { |
| 158 | if (!this.container) return; |
| 159 | const rect = this.container.getBoundingClientRect(); |
| 160 | this.width = Math.max(1, Math.floor(rect.width)); |
| 161 | this.height = Math.max(1, Math.floor(rect.height)); |
| 162 | this.aspect = this.width / this.height; |
| 163 | if (this.renderer) |
| 164 | this.renderer.setSize(this.width, this.height, false); |
| 165 | } |
| 166 | update() { |
| 167 | if (!this.clock) return; |
| 168 | this.delta = this.clock.getDelta(); |