Skip to content

Commit 0a5df18

Browse files
committed
Revert "perf(viewer): redraw the orientation gizmo only when orientation/hover changes"
This reverts commit 8ce6db8.
1 parent 9e6bcd6 commit 0a5df18

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/frontend/src/components/viewer/sceneHelpers/OrientationGizmo.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,6 @@ export class OrientationGizmo extends HTMLElement {
240240
}
241241

242242
update() {
243-
// The gizmo is a 2D canvas (drawImage/fillText/fillRect). Redrawing it on
244-
// every animation frame pegs the main thread on low-core mobile (Samsung
245-
// S21 etc.) and competes with model loading. Skip the redraw unless the
246-
// camera orientation or the hover position actually changed.
247-
const q = this.camera.quaternion;
248-
const m = this.mouse;
249-
const sig =
250-
q.x.toFixed(4) + "," + q.y.toFixed(4) + "," + q.z.toFixed(4) + "," + q.w.toFixed(4) +
251-
"|" + (m ? Math.round(m.x) + "," + Math.round(m.y) : "-");
252-
if (sig === this._drawSig) return;
253-
this._drawSig = sig;
254-
255243
this.clear();
256244

257245
// Calculate the rotation matrix from the camera

0 commit comments

Comments
 (0)