auto-git:

[change] src/entities/entity-instances.ts
 [change] src/runtime-three/runtime-host.ts
This commit is contained in:
2026-04-22 17:53:56 +02:00
parent d7910979fe
commit ce9e495fab
2 changed files with 40 additions and 10 deletions

View File

@@ -1614,12 +1614,6 @@ export class RuntimeHost {
opacity: nightBackgroundOverlay.opacity,
environmentIntensity: nightBackgroundOverlay.environmentIntensity
};
const environmentState = resolveWorldEnvironmentState(
resolvedWorld.background,
backgroundTexture,
backgroundOverlayState,
this.environmentBlendCache
);
const celestialBodiesState = resolveWorldCelestialBodiesState(
this.currentWorld.showCelestialBodies,
resolvedWorld.sunLight,
@@ -1631,6 +1625,14 @@ export class RuntimeHost {
resolvedTime,
this.runtimeScene.time
);
if (this.currentWorld.background.mode === "shader") {
this.shaderSkyEnvironmentCache?.syncPhaseTextures(
resolveWorldShaderSkyEnvironmentPhaseStates(
this.currentWorld,
this.runtimeScene.time
)
);
}
this.worldBackgroundRenderer.update(
resolvedWorld.background,
@@ -1639,6 +1641,14 @@ export class RuntimeHost {
celestialBodiesState,
shaderSkyState
);
const environmentState = resolveWorldEnvironmentState(
resolvedWorld.background,
backgroundTexture,
backgroundOverlayState,
this.environmentBlendCache,
shaderSkyState,
this.shaderSkyEnvironmentCache
);
this.scene.background = null;
this.scene.environment = environmentState.texture;
this.scene.environmentIntensity = environmentState.intensity;