Skip to content

Commit 8d8f015

Browse files
mvaligurskyMartin Valigurskywilleastcott
authored
[Fix] Fixed gsplat shader effect to handle limit to a camera (#8117)
* [Fix] Fixed gsplat shader effect to handle limit to a camera * Apply suggestions from code review Co-authored-by: Will Eastcott <[email protected]> --------- Co-authored-by: Martin Valigursky <[email protected]> Co-authored-by: Will Eastcott <[email protected]>
1 parent d87cca6 commit 8d8f015

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/esm/gsplat/gsplat-shader-effect.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,10 @@ class GsplatShaderEffect extends Script {
198198

199199
// Determine which cameras to target
200200
let targetCameras;
201-
if (this.camera && this.camera.camera) {
201+
const cam = this.camera?.camera?.camera;
202+
if (cam) {
202203
// Specific camera specified via attribute
203-
targetCameras = [this.camera.camera];
204+
targetCameras = [cam];
204205
} else {
205206
// All cameras in the composition
206207
targetCameras = composition.cameras.map(cameraComponent => cameraComponent.camera);

0 commit comments

Comments
 (0)