Forráskód Böngészése

simplify point copy

Garrett Johnson 5 éve
szülő
commit
c7fcf8b826
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      examples/jsm/csm/Frustum.js

+ 2 - 2
examples/jsm/csm/Frustum.js

@@ -105,11 +105,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 Vector3( point.x, point.y, point.z ) );
+			result.vertices.near.push( point.clone() );
 
 			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 Vector3( point.x, point.y, point.z ) );
+			result.vertices.far.push( point.clone() );
 
 		}