Skip to content

Commit

Permalink
Remove CameraComponentSystem onUpdate handler (#7208)
Browse files Browse the repository at this point in the history
* Remove CameraComponentSystem onUpdate handler

* off the prerender event

* Reorder destroy
  • Loading branch information
willeastcott authored Dec 18, 2024
1 parent 53a574b commit 680d0d5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/framework/components/camera/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ class CameraComponentSystem extends ComponentSystem {

this.on('beforeremove', this.onBeforeRemove, this);
this.app.on('prerender', this.onAppPrerender, this);

this.app.systems.on('update', this.onUpdate, this);
}

initializeComponentData(component, data, properties) {
Expand Down Expand Up @@ -153,9 +151,6 @@ class CameraComponentSystem extends ComponentSystem {
component.onRemove();
}

onUpdate(dt) {
}

onAppPrerender() {
for (let i = 0, len = this.cameras.length; i < len; i++) {
this.cameras[i].onAppPrerender();
Expand All @@ -176,9 +171,9 @@ class CameraComponentSystem extends ComponentSystem {
}

destroy() {
super.destroy();
this.app.off('prerender', this.onAppPrerender, this);

this.app.systems.off('update', this.onUpdate, this);
super.destroy();
}
}

Expand Down

0 comments on commit 680d0d5

Please sign in to comment.