Modify viewport host to handle authoring display mode
This commit is contained in:
@@ -515,6 +515,13 @@ export class ViewportHost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const world = this.currentWorld;
|
const world = this.currentWorld;
|
||||||
|
const rendererSettings =
|
||||||
|
this.displayMode === "authoring"
|
||||||
|
? {
|
||||||
|
...cloneAdvancedRenderingSettings(world.advancedRendering),
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
: world.advancedRendering;
|
||||||
this.ambientLight.color.set(world.ambientLight.colorHex);
|
this.ambientLight.color.set(world.ambientLight.colorHex);
|
||||||
this.ambientLight.intensity = world.ambientLight.intensity;
|
this.ambientLight.intensity = world.ambientLight.intensity;
|
||||||
this.sunLight.color.set(world.sunLight.colorHex);
|
this.sunLight.color.set(world.sunLight.colorHex);
|
||||||
@@ -536,8 +543,8 @@ export class ViewportHost {
|
|||||||
this.scene.environmentIntensity = 1;
|
this.scene.environmentIntensity = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
configureAdvancedRenderingRenderer(this.renderer, world.advancedRendering);
|
configureAdvancedRenderingRenderer(this.renderer, rendererSettings);
|
||||||
this.syncAdvancedRenderingComposer(world.advancedRendering);
|
this.syncAdvancedRenderingComposer(rendererSettings);
|
||||||
this.applyShadowState();
|
this.applyShadowState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user