Browse Source

Merge pull request #15580 from Mugen87/dev21

Helpers: Fix usage of THREE namespace.
Mr.doob 6 years ago
parent
commit
55a392bd0c
2 changed files with 4 additions and 3 deletions
  1. 2 2
      src/helpers/ArrowHelper.js
  2. 2 1
      src/helpers/RectAreaLightHelper.js

+ 2 - 2
src/helpers/ArrowHelper.js

@@ -32,8 +32,8 @@ function ArrowHelper( dir, origin, length, color, headLength, headWidth ) {
 
 
 	Object3D.call( this );
 	Object3D.call( this );
 
 
-	if ( dir === undefined ) dir = new THREE.Vector3( 0, 0, 1 );
-	if ( origin === undefined ) origin = new THREE.Vector3( 0, 0, 0 );
+	if ( dir === undefined ) dir = new Vector3( 0, 0, 1 );
+	if ( origin === undefined ) origin = new Vector3( 0, 0, 0 );
 	if ( length === undefined ) length = 1;
 	if ( length === undefined ) length = 1;
 	if ( color === undefined ) color = 0xffff00;
 	if ( color === undefined ) color = 0xffff00;
 	if ( headLength === undefined ) headLength = 0.2 * length;
 	if ( headLength === undefined ) headLength = 0.2 * length;

+ 2 - 1
src/helpers/RectAreaLightHelper.js

@@ -12,6 +12,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
 import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
 import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { Float32BufferAttribute } from '../core/BufferAttribute.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
 import { BufferGeometry } from '../core/BufferGeometry.js';
+import { BackSide } from '../constants.js';
 
 
 function RectAreaLightHelper( light, color ) {
 function RectAreaLightHelper( light, color ) {
 
 
@@ -39,7 +40,7 @@ function RectAreaLightHelper( light, color ) {
 	geometry2.addAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
 	geometry2.addAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
 	geometry2.computeBoundingSphere();
 	geometry2.computeBoundingSphere();
 
 
-	this.add( new Mesh( geometry2, new MeshBasicMaterial( { side: THREE.BackSide, fog: false } ) ) );
+	this.add( new Mesh( geometry2, new MeshBasicMaterial( { side: BackSide, fog: false } ) ) );
 
 
 	this.update();
 	this.update();