Skip to content

Commit 73b4007

Browse files
mvaligurskyMartin Valigursky
andauthored
[Fix] Glb loader example - enable lights that are by default disabled (playcanvas#3443)
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
1 parent cfd9334 commit 73b4007

File tree

1 file changed

+6
-0
lines changed
  • examples/src/examples/loaders

1 file changed

+6
-0
lines changed

examples/src/examples/loaders/glb.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class GLBExample extends Example {
3333
component.aspectRatioMode = pc.ASPECT_AUTO;
3434
});
3535

36+
// enable all lights from the glb
37+
const lightComponents: Array<pc.LightComponent> = entity.findComponents("light");
38+
lightComponents.forEach((component) => {
39+
component.enabled = true;
40+
});
41+
3642
let time = 0;
3743
let activeCamera = 0;
3844
app.on("update", function (dt) {

0 commit comments

Comments
 (0)