mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Bandaid-fix freecam signal spam from render loop when nothing changes
This commit is contained in:
1 parent
82790bcd97
commit
2a8d5faa66
1 file changed
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user