Ver código fonte

Moved helpers out of extras.

Mr.doob 8 anos atrás
pai
commit
c72b7dcc8e

+ 2 - 2
src/Three.Legacy.js

@@ -25,8 +25,8 @@ import { Object3D } from './core/Object3D.js';
 import { Uniform } from './core/Uniform';
 import { Curve } from './extras/core/Curve.js';
 import { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
-import { BoxHelper } from './extras/helpers/BoxHelper';
-import { GridHelper } from './extras/helpers/GridHelper.js';
+import { BoxHelper } from './helpers/BoxHelper';
+import { GridHelper } from './helpers/GridHelper.js';
 import { BoxGeometry } from './geometries/BoxGeometry.js';
 import { EdgesGeometry } from './geometries/EdgesGeometry.js';
 import { ExtrudeGeometry } from './geometries/ExtrudeGeometry.js';

+ 14 - 14
src/Three.js

@@ -120,20 +120,20 @@ export { Quaternion } from './math/Quaternion.js';
 export { Color } from './math/Color.js';
 export { MorphBlendMesh } from './extras/objects/MorphBlendMesh.js';
 export { ImmediateRenderObject } from './extras/objects/ImmediateRenderObject.js';
-export { VertexNormalsHelper } from './extras/helpers/VertexNormalsHelper.js';
-export { SpotLightHelper } from './extras/helpers/SpotLightHelper.js';
-export { SkeletonHelper } from './extras/helpers/SkeletonHelper.js';
-export { PointLightHelper } from './extras/helpers/PointLightHelper.js';
-export { RectAreaLightHelper } from './extras/helpers/RectAreaLightHelper.js';
-export { HemisphereLightHelper } from './extras/helpers/HemisphereLightHelper.js';
-export { GridHelper } from './extras/helpers/GridHelper.js';
-export { PolarGridHelper } from './extras/helpers/PolarGridHelper.js';
-export { FaceNormalsHelper } from './extras/helpers/FaceNormalsHelper.js';
-export { DirectionalLightHelper } from './extras/helpers/DirectionalLightHelper.js';
-export { CameraHelper } from './extras/helpers/CameraHelper.js';
-export { BoxHelper } from './extras/helpers/BoxHelper.js';
-export { ArrowHelper } from './extras/helpers/ArrowHelper.js';
-export { AxisHelper } from './extras/helpers/AxisHelper.js';
+export { VertexNormalsHelper } from './helpers/VertexNormalsHelper.js';
+export { SpotLightHelper } from './helpers/SpotLightHelper.js';
+export { SkeletonHelper } from './helpers/SkeletonHelper.js';
+export { PointLightHelper } from './helpers/PointLightHelper.js';
+export { RectAreaLightHelper } from './helpers/RectAreaLightHelper.js';
+export { HemisphereLightHelper } from './helpers/HemisphereLightHelper.js';
+export { GridHelper } from './helpers/GridHelper.js';
+export { PolarGridHelper } from './helpers/PolarGridHelper.js';
+export { FaceNormalsHelper } from './helpers/FaceNormalsHelper.js';
+export { DirectionalLightHelper } from './helpers/DirectionalLightHelper.js';
+export { CameraHelper } from './helpers/CameraHelper.js';
+export { BoxHelper } from './helpers/BoxHelper.js';
+export { ArrowHelper } from './helpers/ArrowHelper.js';
+export { AxisHelper } from './helpers/AxisHelper.js';
 export { CatmullRomCurve3 } from './extras/curves/CatmullRomCurve3.js';
 export { CubicBezierCurve3 } from './extras/curves/CubicBezierCurve3.js';
 export { QuadraticBezierCurve3 } from './extras/curves/QuadraticBezierCurve3.js';

+ 9 - 9
src/extras/helpers/ArrowHelper.js → src/helpers/ArrowHelper.js

@@ -14,15 +14,15 @@
  *  headWidth - Number
  */
 
-import { Vector3 } from '../../math/Vector3';
-import { Object3D } from '../../core/Object3D';
-import { CylinderBufferGeometry } from '../../geometries/CylinderBufferGeometry';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { MeshBasicMaterial } from '../../materials/MeshBasicMaterial';
-import { Mesh } from '../../objects/Mesh';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Line } from '../../objects/Line';
+import { Vector3 } from '../math/Vector3';
+import { Object3D } from '../core/Object3D';
+import { CylinderBufferGeometry } from '../geometries/CylinderBufferGeometry';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { MeshBasicMaterial } from '../materials/MeshBasicMaterial';
+import { Mesh } from '../objects/Mesh';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Line } from '../objects/Line';
 
 var lineGeometry = new BufferGeometry();
 lineGeometry.addAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );

+ 5 - 5
src/extras/helpers/AxisHelper.js → src/helpers/AxisHelper.js

@@ -1,8 +1,8 @@
-import { LineSegments } from '../../objects/LineSegments';
-import { VertexColors } from '../../constants';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
+import { LineSegments } from '../objects/LineSegments';
+import { VertexColors } from '../constants';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
 
 /**
  * @author sroucheray / http://sroucheray.org/

+ 5 - 5
src/extras/helpers/BoxHelper.js → src/helpers/BoxHelper.js

@@ -1,8 +1,8 @@
-import { Box3 } from '../../math/Box3';
-import { LineSegments } from '../../objects/LineSegments';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
+import { Box3 } from '../math/Box3';
+import { LineSegments } from '../objects/LineSegments';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
 
 /**
  * @author mrdoob / http://mrdoob.com/

+ 8 - 8
src/extras/helpers/CameraHelper.js → src/helpers/CameraHelper.js

@@ -1,11 +1,11 @@
-import { Camera } from '../../cameras/Camera';
-import { Vector3 } from '../../math/Vector3';
-import { LineSegments } from '../../objects/LineSegments';
-import { Color } from '../../math/Color';
-import { FaceColors } from '../../constants';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
+import { Camera } from '../cameras/Camera';
+import { Vector3 } from '../math/Vector3';
+import { LineSegments } from '../objects/LineSegments';
+import { Color } from '../math/Color';
+import { FaceColors } from '../constants';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
 
 /**
  * @author alteredq / http://alteredqualia.com/

+ 6 - 6
src/extras/helpers/DirectionalLightHelper.js → src/helpers/DirectionalLightHelper.js

@@ -1,9 +1,9 @@
-import { Vector3 } from '../../math/Vector3';
-import { Object3D } from '../../core/Object3D';
-import { Line } from '../../objects/Line';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
+import { Vector3 } from '../math/Vector3';
+import { Object3D } from '../core/Object3D';
+import { Line } from '../objects/Line';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
 
 /**
  * @author alteredq / http://alteredqualia.com/

+ 6 - 6
src/extras/helpers/FaceNormalsHelper.js → src/helpers/FaceNormalsHelper.js

@@ -1,9 +1,9 @@
-import { Matrix3 } from '../../math/Matrix3';
-import { Vector3 } from '../../math/Vector3';
-import { LineSegments } from '../../objects/LineSegments';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
+import { Matrix3 } from '../math/Matrix3';
+import { Vector3 } from '../math/Vector3';
+import { LineSegments } from '../objects/LineSegments';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
 
 /**
  * @author mrdoob / http://mrdoob.com/

+ 6 - 6
src/extras/helpers/GridHelper.js → src/helpers/GridHelper.js

@@ -1,9 +1,9 @@
-import { LineSegments } from '../../objects/LineSegments';
-import { VertexColors } from '../../constants';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { Color } from '../../math/Color';
+import { LineSegments } from '../objects/LineSegments';
+import { VertexColors } from '../constants';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { Color } from '../math/Color';
 
 /**
  * @author mrdoob / http://mrdoob.com/

+ 8 - 8
src/extras/helpers/HemisphereLightHelper.js → src/helpers/HemisphereLightHelper.js

@@ -1,11 +1,11 @@
-import { Vector3 } from '../../math/Vector3';
-import { Color } from '../../math/Color';
-import { Object3D } from '../../core/Object3D';
-import { Mesh } from '../../objects/Mesh';
-import { VertexColors } from '../../constants';
-import { MeshBasicMaterial } from '../../materials/MeshBasicMaterial';
-import { OctahedronBufferGeometry } from '../../geometries/OctahedronBufferGeometry';
-import { BufferAttribute } from '../../core/BufferAttribute';
+import { Vector3 } from '../math/Vector3';
+import { Color } from '../math/Color';
+import { Object3D } from '../core/Object3D';
+import { Mesh } from '../objects/Mesh';
+import { VertexColors } from '../constants';
+import { MeshBasicMaterial } from '../materials/MeshBasicMaterial';
+import { OctahedronBufferGeometry } from '../geometries/OctahedronBufferGeometry';
+import { BufferAttribute } from '../core/BufferAttribute';
 
 /**
  * @author alteredq / http://alteredqualia.com/

+ 3 - 3
src/extras/helpers/PointLightHelper.js → src/helpers/PointLightHelper.js

@@ -1,6 +1,6 @@
-import { Mesh } from '../../objects/Mesh';
-import { MeshBasicMaterial } from '../../materials/MeshBasicMaterial';
-import { SphereBufferGeometry } from '../../geometries/SphereBufferGeometry';
+import { Mesh } from '../objects/Mesh';
+import { MeshBasicMaterial } from '../materials/MeshBasicMaterial';
+import { SphereBufferGeometry } from '../geometries/SphereBufferGeometry';
 
 /**
  * @author alteredq / http://alteredqualia.com/

+ 6 - 6
src/extras/helpers/PolarGridHelper.js → src/helpers/PolarGridHelper.js

@@ -1,9 +1,9 @@
-import { LineSegments } from '../../objects/LineSegments';
-import { VertexColors } from '../../constants';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { Color } from '../../math/Color';
+import { LineSegments } from '../objects/LineSegments';
+import { VertexColors } from '../constants';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { Color } from '../math/Color';
 
 /**
  * @author mrdoob / http://mrdoob.com/

+ 6 - 6
src/extras/helpers/RectAreaLightHelper.js → src/helpers/RectAreaLightHelper.js

@@ -3,12 +3,12 @@
  * @author Mugen87 / http://github.com/Mugen87
  */
 
-import { Object3D } from '../../core/Object3D';
-import { Vector3 } from '../../math/Vector3';
-import { Mesh } from '../../objects/Mesh';
-import { MeshBasicMaterial } from '../../materials/MeshBasicMaterial';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { BufferAttribute } from '../../core/BufferAttribute';
+import { Object3D } from '../core/Object3D';
+import { Vector3 } from '../math/Vector3';
+import { Mesh } from '../objects/Mesh';
+import { MeshBasicMaterial } from '../materials/MeshBasicMaterial';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { BufferAttribute } from '../core/BufferAttribute';
 
 function RectAreaLightHelper( light ) {
 

+ 8 - 8
src/extras/helpers/SkeletonHelper.js → src/helpers/SkeletonHelper.js

@@ -1,11 +1,11 @@
-import { LineSegments } from '../../objects/LineSegments';
-import { Matrix4 } from '../../math/Matrix4';
-import { VertexColors } from '../../constants';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Color } from '../../math/Color';
-import { Vector3 } from '../../math/Vector3';
-import { BufferGeometry } from '../../core/BufferGeometry';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
+import { LineSegments } from '../objects/LineSegments';
+import { Matrix4 } from '../math/Matrix4';
+import { VertexColors } from '../constants';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Color } from '../math/Color';
+import { Vector3 } from '../math/Vector3';
+import { BufferGeometry } from '../core/BufferGeometry';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
 
 /**
  * @author Sean Griffin / http://twitter.com/sgrif

+ 6 - 6
src/extras/helpers/SpotLightHelper.js → src/helpers/SpotLightHelper.js

@@ -1,9 +1,9 @@
-import { Vector3 } from '../../math/Vector3';
-import { Object3D } from '../../core/Object3D';
-import { LineSegments } from '../../objects/LineSegments';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
+import { Vector3 } from '../math/Vector3';
+import { Object3D } from '../core/Object3D';
+import { LineSegments } from '../objects/LineSegments';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
 
 /**
  * @author alteredq / http://alteredqualia.com/

+ 6 - 6
src/extras/helpers/VertexNormalsHelper.js → src/helpers/VertexNormalsHelper.js

@@ -1,9 +1,9 @@
-import { Matrix3 } from '../../math/Matrix3';
-import { Vector3 } from '../../math/Vector3';
-import { LineSegments } from '../../objects/LineSegments';
-import { LineBasicMaterial } from '../../materials/LineBasicMaterial';
-import { Float32BufferAttribute } from '../../core/BufferAttribute';
-import { BufferGeometry } from '../../core/BufferGeometry';
+import { Matrix3 } from '../math/Matrix3';
+import { Vector3 } from '../math/Vector3';
+import { LineSegments } from '../objects/LineSegments';
+import { LineBasicMaterial } from '../materials/LineBasicMaterial';
+import { Float32BufferAttribute } from '../core/BufferAttribute';
+import { BufferGeometry } from '../core/BufferGeometry';
 
 /**
  * @author mrdoob / http://mrdoob.com/