diff --git a/viewer/frustum.js b/viewer/frustum.js index 75b6198..9b67102 100644 --- a/viewer/frustum.js +++ b/viewer/frustum.js @@ -38,7 +38,7 @@ export class Frustum { this.planes[5].init(m3 + m2, m7 + m6, m11 + m10, m15 + m14); } - // Tests for intersection with World-space AABB, which is assumed to be: [xmin, ymin, zmin, xwidth, ywidth, zwidth] + // Tests for intersection with World-space AABB, which is assumed to be: [xmin, ymin, zmin, xmax, ymax, zmax] intersectsWorldAABB(minmax) { var result = Frustum.INSIDE_FRUSTUM; var plane = null; diff --git a/viewer/octree.js b/viewer/octree.js index 0ca48a2..17be3c1 100644 --- a/viewer/octree.js +++ b/viewer/octree.js @@ -277,7 +277,10 @@ class Box { vec3.add(this.normalizedMinVector, this.normalizedMinVector, this.globalTranslationVector); vec3.add(this.normalizedMaxVector, this.normalizedMaxVector, this.globalTranslationVector); - this.minmax = [[this.normalizedMinVector[0], this.normalizedMinVector[1], this.normalizedMinVector[2]], [this.normalizedMaxVector[0] - this.normalizedMinVector[0], this.normalizedMaxVector[1] - this.normalizedMinVector[1], this.normalizedMaxVector[2] - this.normalizedMinVector[2]]]; + this.minmax = [ + [this.normalizedMinVector[0], this.normalizedMinVector[1], this.normalizedMinVector[2]], + [this.normalizedMaxVector[0], this.normalizedMaxVector[1], this.normalizedMaxVector[2]], + ]; } set(min, max) {