Skip to content

Commit 187e75b

Browse files
committed
Fix gizmos
1 parent 77c3c1c commit 187e75b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Gizmos/axisDragGizmo.ts

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ export class AxisDragGizmo extends Gizmo {
115115
}
116116
// Snapping logic
117117
if (this.snapDistance == 0) {
118+
if ((this.attachedNode as any).position) { // Required for nodes like lights
119+
(this.attachedNode as any).position.addInPlaceFromFloats(localDelta.x, localDelta.y, localDelta.z);
120+
}
118121
this.attachedNode.getWorldMatrix().addTranslationFromFloats(localDelta.x, localDelta.y, localDelta.z);
119122
this.attachedNode.updateCache();
120123
} else {

src/Gizmos/lightGizmo.ts

-5
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ export class LightGizmo extends Gizmo {
149149
this._cachedForward.copyFrom(this.attachedMesh!.forward);
150150
}
151151
}
152-
if (!this._light.isEnabled()) {
153-
this._material.diffuseColor.set(0, 0, 0);
154-
} else {
155-
this._material.diffuseColor.set(this._light.diffuse.r / 3, this._light.diffuse.g / 3, this._light.diffuse.b / 3);
156-
}
157152
}
158153

159154
// Static helper methods

0 commit comments

Comments
 (0)