Browse Source

Merge pull request #18813 from flostellbrink/dev

Update types of nullable bounding boxes and spheres
Mr.doob 5 years ago
parent
commit
95cc197d1a
3 changed files with 6 additions and 6 deletions
  1. 2 2
      src/core/BufferGeometry.d.ts
  2. 2 2
      src/core/DirectGeometry.d.ts
  3. 2 2
      src/core/Geometry.d.ts

+ 2 - 2
src/core/BufferGeometry.d.ts

@@ -42,8 +42,8 @@ export class BufferGeometry extends EventDispatcher {
 	};
 	morphTargetsRelative: boolean;
 	groups: { start: number; count: number; materialIndex?: number }[];
-	boundingBox: Box3;
-	boundingSphere: Sphere;
+	boundingBox: Box3 | null;
+	boundingSphere: Sphere | null;
 	drawRange: { start: number; count: number };
 	userData: {[key: string]: any};
 	readonly isBufferGeometry: true;

+ 2 - 2
src/core/DirectGeometry.d.ts

@@ -27,8 +27,8 @@ export class DirectGeometry {
 	morphTargets: MorphTarget[];
 	skinWeights: Vector4[];
 	skinIndices: Vector4[];
-	boundingBox: Box3;
-	boundingSphere: Sphere;
+	boundingBox: Box3 | null;
+	boundingSphere: Sphere | null;
 	verticesNeedUpdate: boolean;
 	normalsNeedUpdate: boolean;
 	colorsNeedUpdate: boolean;

+ 2 - 2
src/core/Geometry.d.ts

@@ -121,12 +121,12 @@ export class Geometry extends EventDispatcher {
 	/**
 	 * Bounding box.
 	 */
-	boundingBox: Box3;
+	boundingBox: Box3 | null;
 
 	/**
 	 * Bounding sphere.
 	 */
-	boundingSphere: Sphere;
+	boundingSphere: Sphere | null;
 
 	/**
 	 * Set to true if the vertices array has been updated.