diff --git a/packages/frontend/src/utility/room/engine.ts b/packages/frontend/src/utility/room/engine.ts index 7f20230b07..ef86ddf72e 100644 --- a/packages/frontend/src/utility/room/engine.ts +++ b/packages/frontend/src/utility/room/engine.ts @@ -82,8 +82,10 @@ type GetOptionsSchemaValues = { type ObjectDef = { id: string; - optionsSchema: OpSc; - defaultOptions: GetOptionsSchemaValues; + options: { + schema: OpSc; + default: GetOptionsSchemaValues; + }; placement: 'top' | 'side' | 'bottom' | 'wall' | 'ceiling' | 'floor'; isChair?: boolean; createInstance: (args: { @@ -1097,7 +1099,7 @@ export class RoomEngine { type, position: new BABYLON.Vector3(0, 0, 0), rotation: new BABYLON.Vector3(0, Math.PI, 0), - options: def.defaultOptions, + options: def.options.default, }); const ghost = this.createGhost(root); @@ -1145,7 +1147,7 @@ export class RoomEngine { position: [pos.x, pos.y, pos.z], rotation: [rotation.x, rotation.y, rotation.z], sticky, - options: def.defaultOptions, + options: def.options.default, }); }, }; diff --git a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts index 505828a5ac..1d164c9b4e 100644 --- a/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts +++ b/packages/frontend/src/utility/room/objects/tabletopDigitalClock.ts @@ -9,21 +9,23 @@ import { get7segMeshesOfCurrentTime } from '../utility.js'; export const tabletopDigitalClock = defineObject({ id: 'tabletopDigitalClock', - optionsSchema: { - bodyStyle: { - type: 'select', - label: 'Body Style', - enum: ['color', 'wood'], + options: { + schema: { + bodyStyle: { + type: 'select', + label: 'Body Style', + enum: ['color', 'wood'], + }, + bodyColor: { + type: 'color', + label: 'Body Color', + }, }, - bodyColor: { - type: 'color', - label: 'Body Color', + default: { + bodyStyle: 'color', + bodyColor: [0.45, 0.8, 0], }, }, - defaultOptions: { - bodyStyle: 'color', - bodyColor: [0.45, 0.8, 0], - }, placement: 'top', createInstance: ({ room, options, root }) => { return {