mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-21 00:35:25 +02:00
wip
This commit is contained in:
@@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="engine != null && engine.isEditMode.value && engine.selected.value != null" class="_panel" :class="$style.overlayObjectInfoPanel">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ type GetOptionsSchemaValues<T extends OptionsSchema> = {
|
|||||||
|
|
||||||
type ObjectDef<OpSc extends OptionsSchema> = {
|
type ObjectDef<OpSc extends OptionsSchema> = {
|
||||||
id: string;
|
id: string;
|
||||||
|
name: string;
|
||||||
options: {
|
options: {
|
||||||
schema: OpSc;
|
schema: OpSc;
|
||||||
default: GetOptionsSchemaValues<OpSc>;
|
default: GetOptionsSchemaValues<OpSc>;
|
||||||
@@ -174,6 +175,8 @@ export class RoomEngine {
|
|||||||
objectId: string;
|
objectId: string;
|
||||||
objectMesh: BABYLON.Mesh;
|
objectMesh: BABYLON.Mesh;
|
||||||
objectInstance: RoomObjectInstance<any>;
|
objectInstance: RoomObjectInstance<any>;
|
||||||
|
objectState: RoomStateObject<any>;
|
||||||
|
objectDef: ObjectDef<any>;
|
||||||
} | null>(null);
|
} | null>(null);
|
||||||
private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
|
private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
|
||||||
private roomCollisionMeshes: BABYLON.AbstractMesh[] = [];
|
private roomCollisionMeshes: BABYLON.AbstractMesh[] = [];
|
||||||
@@ -544,10 +547,13 @@ export class RoomEngine {
|
|||||||
for (const om of mesh.getChildMeshes()) {
|
for (const om of mesh.getChildMeshes()) {
|
||||||
om.renderOutline = true;
|
om.renderOutline = true;
|
||||||
}
|
}
|
||||||
|
const state = this.roomState.installedObjects.find(o => o.id === objectId)!;
|
||||||
this.selected.value = {
|
this.selected.value = {
|
||||||
objectId,
|
objectId,
|
||||||
objectMesh: mesh,
|
objectMesh: mesh,
|
||||||
objectInstance: this.objectInstances.get(objectId)!,
|
objectInstance: this.objectInstances.get(objectId)!,
|
||||||
|
objectState: state,
|
||||||
|
objectDef: getObjectDef(state.type),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { get7segMeshesOfCurrentTime } from '../utility.js';
|
|||||||
|
|
||||||
export const tabletopDigitalClock = defineObject({
|
export const tabletopDigitalClock = defineObject({
|
||||||
id: 'tabletopDigitalClock',
|
id: 'tabletopDigitalClock',
|
||||||
|
name: 'Tabletop Digital Clock',
|
||||||
options: {
|
options: {
|
||||||
schema: {
|
schema: {
|
||||||
bodyStyle: {
|
bodyStyle: {
|
||||||
|
|||||||
Reference in New Issue
Block a user