From c2dde53c1cab4aca5765953ef6f4884f9c3fcbaf Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:08:11 +0900 Subject: [PATCH] gizmo --- packages/frontend/src/world/room/engine.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/frontend/src/world/room/engine.ts b/packages/frontend/src/world/room/engine.ts index 2bdd3d3e76..bda3a271e9 100644 --- a/packages/frontend/src/world/room/engine.ts +++ b/packages/frontend/src/world/room/engine.ts @@ -188,6 +188,7 @@ export class RoomEngine extends EventEmitter { public lightContainer: BABYLON.ClusteredLightContainer; private gridMaterial: GridMaterial; private gridPlane: BABYLON.Mesh; + private gizmoManager: BABYLON.GizmoManager; private selectionOutlineLayer: BABYLON.SelectionOutlineLayer; public sr: BABYLON.SnapshotRenderingHelper; private gl: BABYLON.GlowLayer | null = null; @@ -377,6 +378,9 @@ export class RoomEngine extends EventEmitter { this.putParticleSystem.colorDead = new BABYLON.Color4(1, 1, 1, 0); this.putParticleSystem.targetStopDuration = 0.05; + this.gizmoManager = new BABYLON.GizmoManager(this.scene); + this.gizmoManager.positionGizmoEnabled = false; + this.gridMaterial = new GridMaterial('grid', this.scene); this.gridMaterial.lineColor = new BABYLON.Color3(0.5, 0.5, 0.5); this.gridMaterial.mainColor = new BABYLON.Color3(0, 0, 0); @@ -559,6 +563,9 @@ export class RoomEngine extends EventEmitter { const entity = this.objectEntities.get(objectId); if (entity != null) { entity.model.unbakeMesh(); + //this.gizmoManager.positionGizmoEnabled = true; + //this.gizmoManager.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false; + //this.gizmoManager.attachToMesh(entity.rootMesh); this.highlightMeshes(entity.rootMesh.getChildMeshes()); const state = this.roomState.installedObjects.find(o => o.id === objectId)!; this.selected = {