diff --git a/packages/frontend/src/pages/room.vue b/packages/frontend/src/pages/room.vue
index b3cad6f755..397687a422 100644
--- a/packages/frontend/src/pages/room.vue
+++ b/packages/frontend/src/pages/room.vue
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- {{ engine.selected.value.objectId }}
+ {{ engine.selected.value.objectDef.name }}
diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts
index 838ef54f27..379e89f2c2 100644
--- a/packages/frontend/src/utility/room/engine.ts
+++ b/packages/frontend/src/utility/room/engine.ts
@@ -82,6 +82,7 @@ type GetOptionsSchemaValues = {
type ObjectDef = {
id: string;
+ name: string;
options: {
schema: OpSc;
default: GetOptionsSchemaValues;
@@ -174,6 +175,8 @@ export class RoomEngine {
objectId: string;
objectMesh: BABYLON.Mesh;
objectInstance: RoomObjectInstance;
+ objectState: RoomStateObject;
+ objectDef: ObjectDef;
} | null>(null);
private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
private roomCollisionMeshes: BABYLON.AbstractMesh[] = [];
@@ -544,10 +547,13 @@ export class RoomEngine {
for (const om of mesh.getChildMeshes()) {
om.renderOutline = true;
}
+ const state = this.roomState.installedObjects.find(o => o.id === objectId)!;
this.selected.value = {
objectId,
objectMesh: mesh,
objectInstance: this.objectInstances.get(objectId)!,
+ objectState: state,
+ objectDef: getObjectDef(state.type),
};
}
}
diff --git a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts
index 1d164c9b4e..bbfb958075 100644
--- a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts
+++ b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts
@@ -9,6 +9,7 @@ import { get7segMeshesOfCurrentTime } from '../utility.js';
export const tabletopDigitalClock = defineObject({
id: 'tabletopDigitalClock',
+ name: 'Tabletop Digital Clock',
options: {
schema: {
bodyStyle: {