Browse Source

Moved THREE.CubeGeometry to Three.Legacy.

Mr.doob 9 years ago
parent
commit
6df432114e
3 changed files with 3 additions and 6 deletions
  1. 1 0
      src/Three.Legacy.js
  2. 1 1
      src/Three.js
  3. 1 5
      src/extras/geometries/BoxGeometry.js

+ 1 - 0
src/Three.Legacy.js

@@ -3,6 +3,7 @@
  */
 
 Object.assign( THREE, {
+	CubeGeometry: THREE.BoxGeometry,
 	Face4: function ( a, b, c, d, normal, color, materialIndex ) {
 		console.warn( 'THREE.Face4 has been removed. A THREE.Face3 will be created instead.' );
 		return new THREE.Face3( a, b, c, normal, color, materialIndex );

+ 1 - 1
src/Three.js

@@ -215,7 +215,7 @@ export { CylinderBufferGeometry } from './extras/geometries/CylinderBufferGeomet
 export { CircleBufferGeometry } from './extras/geometries/CircleBufferGeometry.js';
 export { CircleGeometry } from './extras/geometries/CircleGeometry.js';
 export { BoxBufferGeometry } from './extras/geometries/BoxBufferGeometry.js';
-export { CubeGeometry, BoxGeometry } from './extras/geometries/BoxGeometry.js';
+export { BoxGeometry } from './extras/geometries/BoxGeometry.js';
 export { ClosedSplineCurve3 } from './extras/curves/ClosedSplineCurve3.js';
 export { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
 export { SplineCurve3 } from './extras/curves/SplineCurve3.js';

+ 1 - 5
src/extras/geometries/BoxGeometry.js

@@ -1,8 +1,6 @@
 import { Geometry } from '../../core/Geometry';
 import { BoxBufferGeometry } from './BoxBufferGeometry';
 
-var CubeGeometry;
-
 /**
  * @author mrdoob / http://mrdoob.com/
  * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Cube.as
@@ -31,7 +29,5 @@ function BoxGeometry( width, height, depth, widthSegments, heightSegments, depth
 BoxGeometry.prototype = Object.create( Geometry.prototype );
 BoxGeometry.prototype.constructor = BoxGeometry;
 
-CubeGeometry = BoxGeometry;
-
 
-export { CubeGeometry, BoxGeometry };
+export { BoxGeometry };