chore: names
This commit is contained in:
parent
1c15d81df3
commit
ca4b96ac47
|
@ -194,6 +194,28 @@ export default () => class Visible extends decorate(Trait) {
|
|||
this.#quadTreeAabb = [];
|
||||
}
|
||||
|
||||
tick() {
|
||||
if ('client' !== process.env.SIDE) {
|
||||
if (this.#scheduledBoundingBoxUpdate) {
|
||||
this.forceUpdateBoundingBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translateVisibleAabb() {
|
||||
const visibleAabb = Rectangle.translated(
|
||||
this.#rawVisibleAabb,
|
||||
this.entity.position,
|
||||
);
|
||||
/* eslint-disable prefer-destructuring */
|
||||
this.entity.visibleAabb[0] = visibleAabb[0];
|
||||
this.entity.visibleAabb[1] = visibleAabb[1];
|
||||
this.entity.visibleAabb[2] = visibleAabb[2];
|
||||
this.entity.visibleAabb[3] = visibleAabb[3];
|
||||
/* eslint-enable prefer-destructuring */
|
||||
this.entity.emit('visibleAabbChanged');
|
||||
}
|
||||
|
||||
updateQuadTree() {
|
||||
if (Vector.isNull(Rectangle.size(this.entity.visibleAabb))) {
|
||||
return;
|
||||
|
@ -224,26 +246,4 @@ export default () => class Visible extends decorate(Trait) {
|
|||
this.state.visibleScale = [this.state.visibleScale[0], y];
|
||||
}
|
||||
|
||||
tick() {
|
||||
if ('client' !== process.env.SIDE) {
|
||||
if (this.#scheduledBoundingBoxUpdate) {
|
||||
this.forceUpdateBoundingBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translateVisibleAabb() {
|
||||
const visibleAabb = Rectangle.translated(
|
||||
this.#rawVisibleAabb,
|
||||
this.entity.position,
|
||||
);
|
||||
/* eslint-disable prefer-destructuring */
|
||||
this.entity.visibleAabb[0] = visibleAabb[0];
|
||||
this.entity.visibleAabb[1] = visibleAabb[1];
|
||||
this.entity.visibleAabb[2] = visibleAabb[2];
|
||||
this.entity.visibleAabb[3] = visibleAabb[3];
|
||||
/* eslint-enable prefer-destructuring */
|
||||
this.entity.emit('visibleAabbChanged');
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user