Преглед на файлове

adopt Sphere class as geometry.boundingSphere in extras.

Ben Houston преди 12 години
родител
ревизия
97d43cd4cd
променени са 3 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      src/extras/geometries/CircleGeometry.js
  2. 1 1
      src/extras/geometries/PolyhedronGeometry.js
  3. 1 1
      src/extras/geometries/SphereGeometry.js

+ 1 - 1
src/extras/geometries/CircleGeometry.js

@@ -46,7 +46,7 @@ THREE.CircleGeometry = function ( radius, segments, thetaStart, thetaLength ) {
     this.computeCentroids();
     this.computeFaceNormals();
 
-    this.boundingSphere = { radius: radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 };
 

+ 1 - 1
src/extras/geometries/PolyhedronGeometry.js

@@ -139,7 +139,7 @@ THREE.PolyhedronGeometry = function ( vertices, faces, radius, detail ) {
 
 	this.computeCentroids();
 
-	this.boundingSphere = { radius: radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 };
 

+ 1 - 1
src/extras/geometries/SphereGeometry.js

@@ -89,7 +89,7 @@ THREE.SphereGeometry = function ( radius, widthSegments, heightSegments, phiStar
 	this.computeCentroids();
 	this.computeFaceNormals();
 
-	this.boundingSphere = { radius: this.radius };
+    this.boundingSphere = new THREE.Sphere( new THREE.Vector3(), radius );
 
 };