mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-25 06:14:14 +02:00
wip
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
import { reactive, ref, shallowRef, triggerRef, watch } from 'vue';
|
||||
import * as BABYLON from '@babylonjs/core';
|
||||
import { cm } from '../utility.js';
|
||||
import RoomWorker from './worker?worker';
|
||||
import { RoomEngine } from './engine.js';
|
||||
import type { ShallowRef } from 'vue';
|
||||
@@ -20,7 +21,7 @@ export class RoomController {
|
||||
public isSitting = ref(false);
|
||||
public isEditMode = ref(false);
|
||||
public grabbing = ref<{ forInstall: boolean } | null>(null);
|
||||
public gridSnapping = ref({ enabled: true, scale: 4 });
|
||||
public gridSnapping = ref({ enabled: true, scale: cm(4) });
|
||||
public selected = ref<{
|
||||
objectId: string;
|
||||
objectState: RoomStateObject;
|
||||
@@ -230,6 +231,14 @@ export class RoomController {
|
||||
}
|
||||
}
|
||||
|
||||
public cancelGrabbing() {
|
||||
if (this.worker != null) {
|
||||
this.worker.postMessage({ type: 'cancelGrabbing' });
|
||||
} else if (this.engine != null) {
|
||||
this.engine.endGrabbing(true);
|
||||
}
|
||||
}
|
||||
|
||||
public toggleRoomLight() {
|
||||
if (this.worker != null) {
|
||||
this.worker.postMessage({ type: 'toggleRoomLight' });
|
||||
|
||||
Reference in New Issue
Block a user