-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
The Environment component contains hardcoded defaults to app.scene properties. This should be more generic as any changes to the engine defaults will require downstream changes. Meaning that adding and removing the component would not return to the initial state. Ideally the defaults could be inferred from the engine directly.
react/packages/lib/src/components/Environment.tsx
Lines 136 to 153 in 777b88c
| /** | |
| * We have hardcoded the default values for the scene and sky in order to reset them | |
| * | |
| * This isn't perfect as any changes the the engine defaults will break this. | |
| * TODO: Find a better way to reset the scene and sky. | |
| */ | |
| app.scene.exposure = 1; | |
| app.scene.skyboxRotation = new Quat().setFromEulerAngles(0, 0, 0); | |
| app.scene.sky.node.setLocalScale(1, 1, 1); | |
| app.scene.sky.node.setLocalPosition(0, 0, 0); | |
| app.scene.sky.center.set(0, 0.05, 0); | |
| app.scene.sky.type = SKYTYPE_INFINITE; | |
| app.scene.sky.depthWrite = false; | |
| app.scene.skyboxMip = 0; | |
| app.scene.skyboxLuminance = 0; | |
| app.scene.skyboxIntensity = 1; | |
| app.scene.skyboxHighlightMultiplier = 1; |