Skip to content

Commit

Permalink
hotfix starfield crash (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored May 22, 2024
1 parent bb85512 commit 893f618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prismarine-viewer/viewer/lib/worldrendererThree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 893f618

Please sign in to comment.