diff --git a/src/extras/geometries/OctahedronGeometry.js b/src/extras/geometries/OctahedronGeometry.js index 8ed2f9b4..7a856bd0 100644 --- a/src/extras/geometries/OctahedronGeometry.js +++ b/src/extras/geometries/OctahedronGeometry.js @@ -5,10 +5,11 @@ * to make a sharp edge choose a material that uses face normals instead. * * @author daniel.deady@knectar.com + * @param radius * @param detail Final number of triangles = 4^detail * 8 */ -THREE.OctahedronGeometry = function ( detail ) { +THREE.OctahedronGeometry = function ( radius, detail ) { THREE.Geometry.call( this ); @@ -40,7 +41,7 @@ THREE.OctahedronGeometry = function ( detail ) { function prepare( vector ) { var normal = vector.clone().normalize(); - var vertex = new THREE.Vertex( normal ); + var vertex = new THREE.Vertex( normal.clone().multiplyScalar( radius ) ); vertex.index = that.vertices.push( vertex ) - 1; // Texture coords are equivalent to map coords, calculate angle and convert to fraction of a circle. @@ -129,7 +130,7 @@ THREE.OctahedronGeometry = function ( detail ) { } - this.boundingSphere = { radius: 1 }; + this.boundingSphere = { radius: radius }; }; diff --git a/src/extras/objects/Sphere.js b/src/extras/objects/Sphere.js deleted file mode 100644 index 702b8ccf..00000000 --- a/src/extras/objects/Sphere.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This sphere is smooth and faces are evenly spaced in all directions. - * - * To create there does not need to be a geometry, just a radius. eg. - * var sphere = new THREE.Sphere(100, new THREE.MeshBasicMaterial()); - * - * The number of faces multiplies by 4 for every 1 increase in `detail`. - * 1 detail = 32 faces - * 2 detail = 128 faces - * 3 detail = 512 faces - * - * @author daniel.deady@knectar.com - * @param radius - * @param materials - * @param detail A logarithmic value of fidelity. Defaults to 3. - */ - -THREE.Sphere = function ( radius, materials, detail ) { - - var geometry = new THREE.OctahedronGeometry( detail ); - - THREE.Mesh.call( this, geometry, materials ); - - this.scale.multiplyScalar(radius); - -} - -THREE.Sphere.prototype = new THREE.Mesh(); -THREE.Sphere.prototype.constructor = THREE.Sphere; -THREE.Sphere.prototype.supr = THREE.Mesh.prototype; diff --git a/utils/build.py b/utils/build.py index 2e57cd94..cd077019 100644 --- a/utils/build.py +++ b/utils/build.py @@ -117,7 +117,6 @@ EXTRAS_FILES = [ 'extras/loaders/SceneLoader.js', 'extras/loaders/UTF8Loader.js', 'extras/objects/MarchingCubes.js', -'extras/objects/Sphere.js', 'extras/objects/Trident.js', 'extras/physics/Collisions.js', 'extras/physics/CollisionUtils.js',