From e6ae15705eb735a3991c146033ce2547727a45d2 Mon Sep 17 00:00:00 2001 From: "Michael Erskine (at work)" <74360165+michael-erskine@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:16:54 +0000 Subject: [PATCH] tidy up vertices for computeTransformedBoundingBox Removed duplicate vertex and re-ordered remaining vertices to something meaningful. --- src/utils.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils.js b/src/utils.js index 3dfbc173..e71c6039 100644 --- a/src/utils.js +++ b/src/utils.js @@ -197,14 +197,13 @@ export class Utils { */ static computeTransformedBoundingBox (box, transform) { let vertices = [ - new THREE.Vector3(box.min.x, box.min.y, box.min.z).applyMatrix4(transform), new THREE.Vector3(box.min.x, box.min.y, box.min.z).applyMatrix4(transform), new THREE.Vector3(box.max.x, box.min.y, box.min.z).applyMatrix4(transform), new THREE.Vector3(box.min.x, box.max.y, box.min.z).applyMatrix4(transform), - new THREE.Vector3(box.min.x, box.min.y, box.max.z).applyMatrix4(transform), - new THREE.Vector3(box.min.x, box.max.y, box.max.z).applyMatrix4(transform), new THREE.Vector3(box.max.x, box.max.y, box.min.z).applyMatrix4(transform), + new THREE.Vector3(box.min.x, box.min.y, box.max.z).applyMatrix4(transform), new THREE.Vector3(box.max.x, box.min.y, box.max.z).applyMatrix4(transform), + new THREE.Vector3(box.min.x, box.max.y, box.max.z).applyMatrix4(transform), new THREE.Vector3(box.max.x, box.max.y, box.max.z).applyMatrix4(transform) ];