Browse Source

MarchingCubes: Added boundingSphere.

Mr.doob 2 năm trước cách đây
mục cha
commit
297724e33e
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      examples/jsm/objects/MarchingCubes.js

+ 5 - 1
examples/jsm/objects/MarchingCubes.js

@@ -3,7 +3,9 @@ import {
 	BufferGeometry,
 	Color,
 	DynamicDrawUsage,
-	Mesh
+	Mesh,
+	Sphere,
+	Vector3
 } from 'three';
 
 /**
@@ -94,6 +96,8 @@ class MarchingCubes extends Mesh {
 
 			}
 
+			geometry.boundingSphere = new Sphere( new Vector3(), 1 );
+
 		};
 
 		///////////////////////