From b8f8ac031c1f456a7d45c22212081479b4cfe121 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Mon, 11 May 2026 20:40:21 +0900 Subject: [PATCH] wip --- packages/frontend/src/world/room/engine.ts | 8 ++++++++ packages/frontend/src/world/room/objects/laptopPc.ts | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/world/room/engine.ts b/packages/frontend/src/world/room/engine.ts index 4c92f10ab3..a54ead8f32 100644 --- a/packages/frontend/src/world/room/engine.ts +++ b/packages/frontend/src/world/room/engine.ts @@ -392,6 +392,11 @@ export class RoomEngine extends EventEmitter { // 不具合のもと //this.scene.blockMaterialDirtyMechanism = true; + const box = BABYLON.MeshBuilder.CreateBox('', { size: cm(10) }, this.scene); + window.setInterval(() => { + box.position = new BABYLON.Vector3(0, Math.random() * cm(10), 0); + }, 10); + this.startRenderLoop(); await this.scene.whenReadyAsync(); @@ -1664,7 +1669,10 @@ export class RoomEngine extends EventEmitter { const entity = this.objectEntities.get(objectId); if (entity == null) return; + + this.sr.disableSnapshotRendering(); entity.instance.onOptionsUpdated?.([key, value]); + this.sr.enableSnapshotRendering(); } public updateEnvOptions(options: RoomState['env']['options']) { diff --git a/packages/frontend/src/world/room/objects/laptopPc.ts b/packages/frontend/src/world/room/objects/laptopPc.ts index 204145ebc7..8bf48e18f4 100644 --- a/packages/frontend/src/world/room/objects/laptopPc.ts +++ b/packages/frontend/src/world/room/objects/laptopPc.ts @@ -131,13 +131,11 @@ export const laptopPc = defineObject({ const applyBodyColor = () => { const [r, g, b] = options.bodyColor; bodyMaterial.albedoColor = new BABYLON.Color3(r, g, b); - sr.reset(); }; const applyBezelColor = () => { const [r, g, b] = options.bezelColor; bezelMaterial.albedoColor = new BABYLON.Color3(r, g, b); - sr.reset(); }; applyBodyColor(); @@ -153,7 +151,6 @@ export const laptopPc = defineObject({ light.intensity = (2 * options.screenBrightness) * WORLD_SCALE * WORLD_SCALE; } model.updated(); - sr.updateMesh(hutaNode.getChildMeshes()); }; applyOpenAngle();