fix: no null

This commit is contained in:
cha0s 2021-02-09 10:13:42 -06:00
parent 4689b36818
commit dc13b296db

View File

@ -314,6 +314,9 @@ export default () => class Visible extends decorate(Trait) {
updateQuadTree() {
if ('client' !== process.env.SIDE) {
if (Vector.isNull(Rectangle.size(this.entity.visibleAabb))) {
return;
}
if (
this.#quadTreeAabb.length > 0
&& Rectangle.isInside(this.#quadTreeAabb, this.entity.visibleAabb)