perf: skip debug render

This commit is contained in:
cha0s 2024-09-12 20:00:20 -05:00
parent 51d8f333ed
commit a54aed9b89

View File

@ -177,14 +177,16 @@ export default class Entity {
}
}
}
if (this.entity.Collider) {
this.colliderAabb.redraw(this.entity.Collider.aabb);
}
if (VisibleAabb) {
this.visibleAabb.redraw(this.entity.VisibleAabb);
}
if (this.isMainEntity) {
this.interactionAabb.redraw(this.entity.Interacts.aabb());
if (this.debug.alpha) {
if (this.entity.Collider) {
this.colliderAabb.redraw(this.entity.Collider.aabb);
}
if (VisibleAabb) {
this.visibleAabb.redraw(this.entity.VisibleAabb);
}
if (this.isMainEntity) {
this.interactionAabb.redraw(this.entity.Interacts.aabb());
}
}
if (this.attached || !container) {
return;