mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
wip
This commit is contained in:
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
|
||||
<div v-if="engine != null && engine.isEditMode.value && engine.selected.value != null" class="_panel" :class="$style.overlayObjectInfoPanel">
|
||||
{{ engine.selected.value.objectId }}
|
||||
{{ engine.selected.value.objectDef.name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ type GetOptionsSchemaValues<T extends OptionsSchema> = {
|
||||
|
||||
type ObjectDef<OpSc extends OptionsSchema> = {
|
||||
id: string;
|
||||
name: string;
|
||||
options: {
|
||||
schema: OpSc;
|
||||
default: GetOptionsSchemaValues<OpSc>;
|
||||
@@ -174,6 +175,8 @@ export class RoomEngine {
|
||||
objectId: string;
|
||||
objectMesh: BABYLON.Mesh;
|
||||
objectInstance: RoomObjectInstance<any>;
|
||||
objectState: RoomStateObject<any>;
|
||||
objectDef: ObjectDef<any>;
|
||||
} | 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),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { get7segMeshesOfCurrentTime } from '../utility.js';
|
||||
|
||||
export const tabletopDigitalClock = defineObject({
|
||||
id: 'tabletopDigitalClock',
|
||||
name: 'Tabletop Digital Clock',
|
||||
options: {
|
||||
schema: {
|
||||
bodyStyle: {
|
||||
|
||||
Reference in New Issue
Block a user