mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
wip
This commit is contained in:
@@ -82,8 +82,10 @@ type GetOptionsSchemaValues<T extends OptionsSchema> = {
|
||||
|
||||
type ObjectDef<OpSc extends OptionsSchema> = {
|
||||
id: string;
|
||||
optionsSchema: OpSc;
|
||||
defaultOptions: GetOptionsSchemaValues<OpSc>;
|
||||
options: {
|
||||
schema: OpSc;
|
||||
default: GetOptionsSchemaValues<OpSc>;
|
||||
};
|
||||
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,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user