From 0a58d0694fb733b7c049a667e05db199f0af4911 Mon Sep 17 00:00:00 2001 From: Yomotsu Date: Wed, 2 Mar 2022 21:59:15 +0900 Subject: [PATCH] box3 should be initialized before using it --- src/CameraControls.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CameraControls.ts b/src/CameraControls.ts index 666e8f1..0d950d9 100644 --- a/src/CameraControls.ts +++ b/src/CameraControls.ts @@ -2337,6 +2337,7 @@ function createBoundingSphere( object3d: _THREE.Object3D, out: _THREE.Sphere ): const boundingSphere = out; const center = boundingSphere.center; + _box3A.makeEmpty(); // find the center object3d.traverse( ( object ) => {