Browse Source

Merge pull request #17674 from Tomcc/patch-1

Fix typings for Ray intersects*
Michael Herzog 5 years ago
parent
commit
05603fa611
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/math/Ray.d.ts

+ 4 - 4
src/math/Ray.d.ts

@@ -26,12 +26,12 @@ export class Ray {
 		optionalPointOnRay?: Vector3,
 		optionalPointOnSegment?: Vector3
 	): number;
-	intersectSphere( sphere: Sphere, target: Vector3 ): Vector3;
+	intersectSphere( sphere: Sphere, target: Vector3 ): Vector3 | null;
 	intersectsSphere( sphere: Sphere ): boolean;
 	distanceToPlane( plane: Plane ): number;
-	intersectPlane( plane: Plane, target: Vector3 ): Vector3;
+	intersectPlane( plane: Plane, target: Vector3 ): Vector3 | null;
 	intersectsPlane( plane: Plane ): boolean;
-	intersectBox( box: Box3, target: Vector3 ): Vector3;
+	intersectBox( box: Box3, target: Vector3 ): Vector3 | null;
 	intersectsBox( box: Box3 ): boolean;
 	intersectTriangle(
 		a: Vector3,
@@ -39,7 +39,7 @@ export class Ray {
 		c: Vector3,
 		backfaceCulling: boolean,
 		target: Vector3
-	): Vector3;
+	): Vector3 | null;
 	applyMatrix4( matrix4: Matrix4 ): Ray;
 	equals( ray: Ray ): boolean;