Browse Source

use point.clone

Garrett Johnson 5 năm trước cách đây
mục cha
commit
88ced5cbc8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/jsm/csm/Frustum.js

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

@@ -127,7 +127,7 @@ 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 );