1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-25 08:34:13 +02:00
This commit is contained in:
syuilo
2026-04-28 14:24:20 +09:00
parent 58e617af6d
commit 836de1bb28
4 changed files with 202 additions and 44 deletions

View File

@@ -245,6 +245,22 @@ export class RoomController {
}
}
public setCameraMoveVector(vec: { x: number; y: number }, dash: boolean) {
if (this.worker != null) {
this.worker.postMessage({ type: 'call', fn: 'cameraMove', args: [vec, dash] });
} else if (this.engine != null) {
this.engine.cameraMove(vec, dash);
}
}
public setCameraRotateVector(vec: { x: number; y: number }) {
if (this.worker != null) {
this.worker.postMessage({ type: 'call', fn: 'cameraRotate', args: [vec] });
} else if (this.engine != null) {
this.engine.cameraRotate(vec);
}
}
public setCameraJoystickMoveVector(vec: { x: number; y: number }) {
if (this.worker != null) {
this.worker.postMessage({ type: 'call', fn: 'cameraJoystickMove', args: [vec] });