1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-27 09:34:39 +02:00
This commit is contained in:
syuilo
2026-02-12 10:49:29 +09:00
parent 68d28eb4ac
commit de1a3e3765
6 changed files with 11 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ onMounted(() => {
}, { }, {
id: 'p', id: 'p',
type: 'tv', type: 'tv',
position: [-115, 0, -85], position: [-135, 88, -5],
rotation: [0, 0, 0], rotation: [0, 0, 0],
}, { }, {
id: 'q', id: 'q',
@@ -159,6 +159,11 @@ onMounted(() => {
position: [10, 100, 10], position: [10, 100, 10],
rotation: [0, 0, 0], rotation: [0, 0, 0],
variation: '1', variation: '1',
}, {
id: 'u',
type: 'bed',
position: [-30, 0, -100],
rotation: [0, 0, 0],
}], }],
}, { }, {
canvas: canvas.value!, canvas: canvas.value!,

View File

@@ -212,6 +212,9 @@ const OBJECTS = {
'opened-cardboard-box': { 'opened-cardboard-box': {
placement: 'top', placement: 'top',
}, },
'bed': {
placement: 'top',
},
} as Record<string, ObjectDef>; } as Record<string, ObjectDef>;
function vecToLocal(vector: BABYLON.Vector3, mesh: BABYLON.Mesh): BABYLON.Vector3 { function vecToLocal(vector: BABYLON.Vector3, mesh: BABYLON.Mesh): BABYLON.Vector3 {
@@ -354,7 +357,7 @@ export class RoomEngine {
descendantStickyObjectIds: string[]; descendantStickyObjectIds: string[];
} | null = null; } | null = null;
private highlightedObjectId: string | null = null; private highlightedObjectId: string | null = null;
private time: 0 | 1 | 2 = 1; // 0: 昼, 1: 夕, 2: 夜 private time: 0 | 1 | 2 = 0; // 0: 昼, 1: 夕, 2: 夜
private roomCollisionMeshes: BABYLON.AbstractMesh[] = []; private roomCollisionMeshes: BABYLON.AbstractMesh[] = [];
private def: RoomDef; private def: RoomDef;
public enableGridSnapping = false; public enableGridSnapping = false;
@@ -665,7 +668,7 @@ export class RoomEngine {
grabbing.ghost.position.x = Math.round(grabbing.ghost.position.x / scale) * scale; grabbing.ghost.position.x = Math.round(grabbing.ghost.position.x / scale) * scale;
grabbing.ghost.position.y = Math.round(grabbing.ghost.position.y / scale) * scale; grabbing.ghost.position.y = Math.round(grabbing.ghost.position.y / scale) * scale;
grabbing.ghost.position.z = Math.round(grabbing.ghost.position.z / scale) * scale; grabbing.ghost.position.z = Math.round(grabbing.ghost.position.z / scale) * scale;
grabbing.ghost.rotation.y = Math.round(grabbing.ghost.rotation.y / (Math.PI / 4)) * (Math.PI / 4); grabbing.ghost.rotation.y = Math.round(grabbing.ghost.rotation.y / (Math.PI / 8)) * (Math.PI / 8);
} }
const newPos = grabbing.ghost.position.clone(); const newPos = grabbing.ghost.position.clone();