Hotfix rerendering spam - Outliner and Promptbox (#547)

Could be done better, but this works just as well under time
constraints.

For future reference: The freecam movement speed logic should be moved
to React land instead of processing the update every frame using the
time delta. Just use performance.now() in a useEffect or something.

---------

Co-authored-by: Tanish Manku <-h>
This commit is contained in:
Tanish MankuandTanish Manku authored and GitHub committed 2025-04-22 01:26:49 -07:00
1 parent bb78fb389f
commit df07e1f1e9
2 files changed
+5 -12

No files matched your search

@@ -1300,17 +1300,6 @@ class Editor {
}
}
if (this.cam_obj == undefined) {
this.cam_obj = this.activeScene.get_object_by_name(this.camera_name);
if (this.outliner_feature_flag) {
const result = this.sceneManager?.render_outliner(
this.timeline.characters,
);
if (result) outlinerState.items.value = result.items;
}
}
if (this.clock == undefined || this.renderer == undefined) {
return;
}
@@ -220,8 +220,12 @@ class FreeCam extends EventDispatcher {
this.updateMovementVector();
}
isStationary() {
return this.moveVector.distanceTo(new Vector3(0, 0, 0)) === 0;
}
update(delta: number) {
if (!this.enabled) {
if (!this.enabled || this.isStationary()) {
return;
}