hotfix starfield crash (#127) (#128)

This commit is contained in:
Vitaly 2024-05-23 00:55:39 +03:00 committed by GitHub
commit 0600a730e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -323,7 +323,7 @@ class StarField {
const clock = new THREE.Clock();
this.points.onBeforeRender = (renderer, scene, camera) => {
this.points!.position.copy(camera.position)
this.points?.position.copy?.(camera.position)
material.uniforms.time.value = clock.getElapsedTime() * speed
}
}