Skip to content

Commit

Permalink
hotfix starfield crash (#127) (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored May 22, 2024
2 parents 37ffc65 + 893f618 commit 0600a73
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 0600a73

Please sign in to comment.