mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-06-05 05:54:07 +02:00
Update engine.ts
This commit is contained in:
@@ -46,7 +46,6 @@ type RoomStateObject<Options = any> = {
|
|||||||
position: [number, number, number];
|
position: [number, number, number];
|
||||||
rotation: [number, number, number];
|
rotation: [number, number, number];
|
||||||
options: Options;
|
options: Options;
|
||||||
isMainLight?: boolean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 別のオブジェクトのID
|
* 別のオブジェクトのID
|
||||||
@@ -419,7 +418,6 @@ export class RoomEngine {
|
|||||||
rotation: number;
|
rotation: number;
|
||||||
ghost: BABYLON.AbstractMesh;
|
ghost: BABYLON.AbstractMesh;
|
||||||
descendantStickyObjectIds: string[];
|
descendantStickyObjectIds: string[];
|
||||||
isMainLight: boolean;
|
|
||||||
onMove?: (info: { position: BABYLON.Vector3; rotation: BABYLON.Vector3; sticky: string | null; }) => void;
|
onMove?: (info: { position: BABYLON.Vector3; rotation: BABYLON.Vector3; sticky: string | null; }) => void;
|
||||||
onCancel?: () => void;
|
onCancel?: () => void;
|
||||||
onDone?: () => void;
|
onDone?: () => void;
|
||||||
@@ -748,7 +746,6 @@ export class RoomEngine {
|
|||||||
position: new BABYLON.Vector3(...o.position),
|
position: new BABYLON.Vector3(...o.position),
|
||||||
rotation: new BABYLON.Vector3(o.rotation[0], o.rotation[1], o.rotation[2]),
|
rotation: new BABYLON.Vector3(o.rotation[0], o.rotation[1], o.rotation[2]),
|
||||||
options: o.options,
|
options: o.options,
|
||||||
isMainLight: o.isMainLight,
|
|
||||||
})));
|
})));
|
||||||
|
|
||||||
//const sphere = BABYLON.MeshBuilder.CreateSphere('sphere', { diameter: 1/*cm*/ }, this.scene);
|
//const sphere = BABYLON.MeshBuilder.CreateSphere('sphere', { diameter: 1/*cm*/ }, this.scene);
|
||||||
@@ -918,10 +915,6 @@ export class RoomEngine {
|
|||||||
// //soMesh.position = this.grabbing.mesh!.position.subtract(offset);
|
// //soMesh.position = this.grabbing.mesh!.position.subtract(offset);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if (grabbing.isMainLight) {
|
|
||||||
this.roomLight.position = grabbing.mesh.position.add(new BABYLON.Vector3(0, -1/*cm*/, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
grabbing.onMove?.({
|
grabbing.onMove?.({
|
||||||
position: newPos,
|
position: newPos,
|
||||||
rotation: newRotation,
|
rotation: newRotation,
|
||||||
@@ -1331,7 +1324,6 @@ export class RoomEngine {
|
|||||||
rotation: 0,
|
rotation: 0,
|
||||||
ghost: ghost,
|
ghost: ghost,
|
||||||
descendantStickyObjectIds,
|
descendantStickyObjectIds,
|
||||||
isMainLight: this.roomState.installedObjects.find(o => o.id === selectedObject.metadata.objectId)?.isMainLight ?? false,
|
|
||||||
onMove: (info) => {
|
onMove: (info) => {
|
||||||
sticky = info.sticky;
|
sticky = info.sticky;
|
||||||
},
|
},
|
||||||
@@ -1538,7 +1530,6 @@ export class RoomEngine {
|
|||||||
rotation: 0,
|
rotation: 0,
|
||||||
ghost: ghost,
|
ghost: ghost,
|
||||||
descendantStickyObjectIds: [],
|
descendantStickyObjectIds: [],
|
||||||
isMainLight: false,
|
|
||||||
onMove: (info) => {
|
onMove: (info) => {
|
||||||
sticky = info.sticky;
|
sticky = info.sticky;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user