From ce7af6a308eada02ba54ffc808d824788ee58cb2 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 17 Feb 2026 13:27:25 +0900 Subject: [PATCH] wip --- packages/frontend/src/pages/room.vue | 2 +- packages/frontend/src/utility/room/engine.ts | 4 ++-- .../src/utility/room/objects/tabletopDigitalClock.ts | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/room.vue b/packages/frontend/src/pages/room.vue index 6dea979c7f..6e6947411d 100644 --- a/packages/frontend/src/pages/room.vue +++ b/packages/frontend/src/pages/room.vue @@ -473,7 +473,7 @@ function toggleEditMode() { } function addObject() { - engine.value?.addObject('mug'); + engine.value?.addObject('tabletopDigitalClock'); canvas.value!.focus(); } diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index 42ec757679..dc13534ddb 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -1078,7 +1078,7 @@ export class RoomEngine { id: id, type, position: new BABYLON.Vector3(0, 0, 0), - rotation: new BABYLON.Vector3(0, 0, 0), + rotation: new BABYLON.Vector3(0, Math.PI, 0), options: def.defaultOptions, }); @@ -1093,7 +1093,7 @@ export class RoomEngine { objectType: type, mesh: root, originalDiffOfPosition: new BABYLON.Vector3(0, 0, 0), - originalDiffOfRotationY: 0, + originalDiffOfRotationY: Math.PI, distance: distance, rotation: 0, ghost: ghost, diff --git a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts index de69f545f2..9d01665fab 100644 --- a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts +++ b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts @@ -46,11 +46,17 @@ export const tabletopDigitalClock = defineObject({ '4g': root.getChildMeshes().find(m => m.name.includes('__TIME_7SEG_4G__')), }; + const colonMeshes = root.getChildMeshes().filter(m => m.name.includes('__TIME_7SEG_COLON__')); + const onMeshes = get7segMeshesOfCurrentTime(meshes); for (const mesh of Object.values(meshes)) { mesh.isVisible = onMeshes.includes(mesh); } + + for (const mesh of colonMeshes) { + mesh.isVisible = Date.now() % 2000 < 1000; + } }, 1000)); }, interactions: {},