From ba4d495b428495537abaa12c6dbc08be5cd92199 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:19:33 +0900 Subject: [PATCH] Update engine.ts --- packages/frontend/src/utility/room/engine.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index 760d2eb883..4c92dd78d9 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -443,14 +443,21 @@ export class RoomEngine { new BoundingBoxRenderer(this.scene); } + const skybox = BABYLON.MeshBuilder.CreateBox('skybox', { size: 100000/*cm*/ }, this.scene); + const skyboxMat = new BABYLON.StandardMaterial('skyboxMat', this.scene); + skyboxMat.backFaceCulling = false; + skyboxMat.disableLighting = true; + skybox.material = skyboxMat; + skybox.infiniteDistance = true; + this.time = TIME_MAP[new Date().getHours() as keyof typeof TIME_MAP]; if (this.time === 0) { - this.scene.clearColor = new BABYLON.Color4(0.7, 0.9, 1.0, 0); + skyboxMat.emissiveColor = new BABYLON.Color3(0.7, 0.9, 1.0); } else if (this.time === 1) { - this.scene.clearColor = new BABYLON.Color4(0.8, 0.5, 0.3, 0); + skyboxMat.emissiveColor = new BABYLON.Color3(0.8, 0.5, 0.3); } else { - this.scene.clearColor = new BABYLON.Color4(0.05, 0.05, 0.2, 0); + skyboxMat.emissiveColor = new BABYLON.Color3(0.05, 0.05, 0.2); } this.scene.ambientColor = new BABYLON.Color3(1.0, 0.9, 0.8); @@ -699,7 +706,7 @@ export class RoomEngine { public async init() { await this.loadRoomModel(); - //await this.loadEnvModel(); + await this.loadEnvModel(); await Promise.all(this.roomState.installedObjects.map(o => this.loadObject({ id: o.id, type: o.type,