|
@@ -2,8 +2,7 @@
|
|
|
* @author vHawk / https://github.com/vHawk/
|
|
|
*/
|
|
|
|
|
|
-import { MathUtils, Vector3, Matrix4 } from '../../../build/three.module.js';
|
|
|
-import FrustumVertex from './FrustumVertex.js';
|
|
|
+import { Vector3, Matrix4 } from '../../../build/three.module.js';
|
|
|
|
|
|
const inverseProjectionMatrix = new Matrix4();
|
|
|
|
|
@@ -77,7 +76,7 @@ export default class Frustum {
|
|
|
|
|
|
for ( let j = 0; j < 4; j ++ ) {
|
|
|
|
|
|
- cascade.vertices.near.push( new FrustumVertex().fromLerp( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i - 1 ] ) );
|
|
|
+ cascade.vertices.near.push( new Vector3().lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i - 1 ] ) );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -91,7 +90,7 @@ export default class Frustum {
|
|
|
|
|
|
for ( let j = 0; j < 4; j ++ ) {
|
|
|
|
|
|
- cascade.vertices.far.push( new FrustumVertex().fromLerp( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i ] ) );
|
|
|
+ cascade.vertices.far.push( new Vector3().lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i ] ) );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -114,11 +113,11 @@ export default class Frustum {
|
|
|
|
|
|
point.set( this.vertices.near[ i ].x, this.vertices.near[ i ].y, this.vertices.near[ i ].z );
|
|
|
point.applyMatrix4( cameraMatrix );
|
|
|
- result.vertices.near.push( new FrustumVertex( point.x, point.y, point.z ) );
|
|
|
+ result.vertices.near.push( new Vector3( point.x, point.y, point.z ) );
|
|
|
|
|
|
point.set( this.vertices.far[ i ].x, this.vertices.far[ i ].y, this.vertices.far[ i ].z );
|
|
|
point.applyMatrix4( cameraMatrix );
|
|
|
- result.vertices.far.push( new FrustumVertex( point.x, point.y, point.z ) );
|
|
|
+ result.vertices.far.push( new Vector3( point.x, point.y, point.z ) );
|
|
|
|
|
|
}
|
|
|
|