浏览代码

renamed overrideColor to color

Lewy Blue 8 年之前
父节点
当前提交
1a00f44c35

+ 3 - 3
docs/api/helpers/DirectionalLightHelper.html

@@ -32,13 +32,13 @@
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]( [page:DirectionalLight light], [page:Number size], [page:Hex overrideColor] )</h3>
+		<h3>[name]( [page:DirectionalLight light], [page:Number size], [page:Hex color] )</h3>
 		<div>
 		<div>
 			[page:DirectionalLight light]-- The light to be visualized. <br /><br />
 			[page:DirectionalLight light]-- The light to be visualized. <br /><br />
 
 
 			[page:Number size] -- (optional) dimensions of the plane. Default is *1*.<br /><br />
 			[page:Number size] -- (optional) dimensions of the plane. Default is *1*.<br /><br />
 			
 			
-			[page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
+			[page:Hex color] -- (optional) by default the helper will take the color of the light.
 				In cases where this makes the helper difficult to see 
 				In cases where this makes the helper difficult to see 
 				(for example a white light against a white background) you can directly set the color here. 
 				(for example a white light against a white background) you can directly set the color here. 
 		</div>
 		</div>
@@ -63,7 +63,7 @@
 			light's [page:Object3D.matrixWorld matrixWorld].
 			light's [page:Object3D.matrixWorld matrixWorld].
 		</div>
 		</div>
 
 
-		<h3>[property:hex overrideColor]</h3>
+		<h3>[property:hex color]</h3>
 		<div>
 		<div>
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			but is set later, the helper's color will update the next time [page:.update update] is called.
 			but is set later, the helper's color will update the next time [page:.update update] is called.

+ 3 - 3
docs/api/helpers/HemisphereLightHelper.html

@@ -29,13 +29,13 @@ scene.add( helper );
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-		<h3>[name]( [page:HemisphereLight light], [page:Number sphereSize], [page:Hex overrideColor] )</h3>
+		<h3>[name]( [page:HemisphereLight light], [page:Number sphereSize], [page:Hex color] )</h3>
 		<div>
 		<div>
 			[page:HemisphereLight light] -- The light being visualized. <br /><br />
 			[page:HemisphereLight light] -- The light being visualized. <br /><br />
 
 
 			[page:Number size] -- The size of the mesh used to visualize the light.<br /><br />
 			[page:Number size] -- The size of the mesh used to visualize the light.<br /><br />
 			
 			
-			[page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
+			[page:Hex color] -- (optional) by default the helper will take the color of the light.
 				In cases where this makes the helper difficult to see 
 				In cases where this makes the helper difficult to see 
 				(for example a white light against a white background) you can directly set the color here. 
 				(for example a white light against a white background) you can directly set the color here. 
 		</div>
 		</div>
@@ -56,7 +56,7 @@ scene.add( helper );
 			hemisphereLight's [page:Object3D.matrixWorld matrixWorld].
 			hemisphereLight's [page:Object3D.matrixWorld matrixWorld].
 		</div>
 		</div>
 
 
-		<h3>[property:hex overrideColor]</h3>
+		<h3>[property:hex color]</h3>
 		<div>
 		<div>
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			but is set later, the helper's color will update the next time [page:.update update] is called.
 			but is set later, the helper's color will update the next time [page:.update update] is called.

+ 3 - 3
docs/api/helpers/PointLightHelper.html

@@ -37,13 +37,13 @@
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-		<h3>[name]( [page:PointLight light], [page:Float sphereSize], [page:Hex overrideColor] )</h3>
+		<h3>[name]( [page:PointLight light], [page:Float sphereSize], [page:Hex color] )</h3>
 		<div>
 		<div>
 		[page:PointLight light] -- The light to be visualized. <br /><br />
 		[page:PointLight light] -- The light to be visualized. <br /><br />
 
 
 		[page:Float sphereSize] -- (optional) The size of the sphere helper. Default is *1*.<br /><br />
 		[page:Float sphereSize] -- (optional) The size of the sphere helper. Default is *1*.<br /><br />
 
 
-		[page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
+		[page:Hex color] -- (optional) by default the helper will take the color of the light.
 			In cases where this makes the helper difficult to see 
 			In cases where this makes the helper difficult to see 
 			(for example a white light against a white background) you can directly set the color here. 
 			(for example a white light against a white background) you can directly set the color here. 
 		</div>
 		</div>
@@ -63,7 +63,7 @@
 			pointLight's [page:Object3D.matrixWorld matrixWorld].
 			pointLight's [page:Object3D.matrixWorld matrixWorld].
 		</div>
 		</div>
 
 
-		<h3>[property:hex overrideColor]</h3>
+		<h3>[property:hex color]</h3>
 		<div>
 		<div>
 			A color that overrides the default color of the helper. If this was not passed in the constructor but is set later, the helper's
 			A color that overrides the default color of the helper. If this was not passed in the constructor but is set later, the helper's
 			color will update the next time [page:.update update] is called.
 			color will update the next time [page:.update update] is called.

+ 3 - 3
docs/api/helpers/RectAreaLightHelper.html

@@ -29,11 +29,11 @@ scene.add( helper );
 
 
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
-		<h3>[name]( [page:RectAreaLight light], [page:Hex overrideColor] )</h3>
+		<h3>[name]( [page:RectAreaLight light], [page:Hex color] )</h3>
 		<div>
 		<div>
 			[page:RectAreaLight light] -- The light being visualized.<br /><br />
 			[page:RectAreaLight light] -- The light being visualized.<br /><br />
 
 
-			[page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
+			[page:Hex color] -- (optional) by default the helper will take the color of the light.
 				In cases where this makes the helper difficult to see 
 				In cases where this makes the helper difficult to see 
 				(for example a white light against a white background) you can directly set the color here. 
 				(for example a white light against a white background) you can directly set the color here. 
 		</div>
 		</div>
@@ -45,7 +45,7 @@ scene.add( helper );
 		<h3>[property:RectAreaLight light]</h3>
 		<h3>[property:RectAreaLight light]</h3>
 		<div>Reference to the RectAreaLight being visualized.</div>
 		<div>Reference to the RectAreaLight being visualized.</div>
 
 
-		<h3>[property:hex overrideColor]</h3>
+		<h3>[property:hex color]</h3>
 		<div>
 		<div>
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			but is set later, the helper's color will update the next time [page:.update update] is called.
 			but is set later, the helper's color will update the next time [page:.update update] is called.

+ 3 - 3
docs/api/helpers/SpotLightHelper.html

@@ -35,11 +35,11 @@
 		<h2>Constructor</h2>
 		<h2>Constructor</h2>
 
 
 
 
-		<h3>[name]( [page:SpotLight light], [page:Hex overrideColor] )</h3>
+		<h3>[name]( [page:SpotLight light], [page:Hex color] )</h3>
 		<div>
 		<div>
 			[page:SpotLight light] -- The [page:SpotLight] to be visualized. <br /><br/>
 			[page:SpotLight light] -- The [page:SpotLight] to be visualized. <br /><br/>
 			
 			
-			[page:Hex overrideColor] -- (optional) by default the helper will take the color of the light.
+			[page:Hex color] -- (optional) by default the helper will take the color of the light.
 			In cases where this makes the helper difficult to see 
 			In cases where this makes the helper difficult to see 
 			(for example a white light against a white background) you can directly set the color here. 
 			(for example a white light against a white background) you can directly set the color here. 
 		</div>
 		</div>
@@ -63,7 +63,7 @@
 			spotLight's [page:Object3D.matrixWorld matrixWorld].
 			spotLight's [page:Object3D.matrixWorld matrixWorld].
 		</div>
 		</div>
 
 
-		<h3>[property:hex overrideColor]</h3>
+		<h3>[property:hex color]</h3>
 		<div>
 		<div>
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			A color that overrides the default color of the helper. If this was not passed in the constructor 
 			but is set later, the helper's color will update the next time [page:.update update] is called.
 			but is set later, the helper's color will update the next time [page:.update update] is called.

+ 7 - 7
src/helpers/DirectionalLightHelper.js

@@ -11,7 +11,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
  * @author WestLangley / http://github.com/WestLangley
  * @author WestLangley / http://github.com/WestLangley
  */
  */
 
 
-function DirectionalLightHelper( light, size, overrideColor ) {
+function DirectionalLightHelper( light, size, color ) {
 
 
 	Object3D.call( this );
 	Object3D.call( this );
 
 
@@ -21,7 +21,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
 	this.matrix = light.matrixWorld;
 	this.matrix = light.matrixWorld;
 	this.matrixAutoUpdate = false;
 	this.matrixAutoUpdate = false;
 
 
-	this.overrideColor = overrideColor;
+	this.color = color;
 
 
 	if ( size === undefined ) size = 1;
 	if ( size === undefined ) size = 1;
 
 
@@ -34,7 +34,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
 		- size,   size, 0
 		- size,   size, 0
 	], 3 ) );
 	], 3 ) );
 
 
-	var material = new LineBasicMaterial( { fog: false, color: this.overrideColor } );
+	var material = new LineBasicMaterial( { fog: false, color: this.color } );
 
 
 	this.lightPlane = new Line( geometry, material );
 	this.lightPlane = new Line( geometry, material );
 	this.add( this.lightPlane );
 	this.add( this.lightPlane );
@@ -74,13 +74,13 @@ DirectionalLightHelper.prototype.update = function () {
 		v3.subVectors( v2, v1 );
 		v3.subVectors( v2, v1 );
 
 
 		this.lightPlane.lookAt( v3 );
 		this.lightPlane.lookAt( v3 );
-		if ( ! this.overrideColor ) this.lightPlane.material.color.copy( this.light.color );
-		else this.lightPlane.material.color.set( this.overrideColor );
+		if ( ! this.color ) this.lightPlane.material.color.copy( this.light.color );
+		else this.lightPlane.material.color.set( this.color );
 
 
 		this.targetLine.lookAt( v3 );
 		this.targetLine.lookAt( v3 );
 		this.targetLine.scale.z = v3.length();
 		this.targetLine.scale.z = v3.length();
-		if ( ! this.overrideColor ) this.targetLine.material.color.copy( this.light.color );
-		else this.targetLine.material.color.set( this.overrideColor );
+		if ( ! this.color ) this.targetLine.material.color.copy( this.light.color );
+		else this.targetLine.material.color.set( this.color );
 
 
 	};
 	};
 
 

+ 6 - 6
src/helpers/HemisphereLightHelper.js

@@ -13,7 +13,7 @@ import { BufferAttribute } from '../core/BufferAttribute';
  * @author Mugen87 / https://github.com/Mugen87
  * @author Mugen87 / https://github.com/Mugen87
  */
  */
 
 
-function HemisphereLightHelper( light, size, overrideColor ) {
+function HemisphereLightHelper( light, size, color ) {
 
 
 	Object3D.call( this );
 	Object3D.call( this );
 
 
@@ -23,13 +23,13 @@ function HemisphereLightHelper( light, size, overrideColor ) {
 	this.matrix = light.matrixWorld;
 	this.matrix = light.matrixWorld;
 	this.matrixAutoUpdate = false;
 	this.matrixAutoUpdate = false;
 
 
-	this.overrideColor = overrideColor;
+	this.color = color;
 
 
 	var geometry = new OctahedronBufferGeometry( size );
 	var geometry = new OctahedronBufferGeometry( size );
 	geometry.rotateY( Math.PI * 0.5 );
 	geometry.rotateY( Math.PI * 0.5 );
 
 
-	this.material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.overrideColor } );
-	if ( ! overrideColor ) this.material.vertexColors = VertexColors;
+	this.material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.color } );
+	if ( ! color ) this.material.vertexColors = VertexColors;
 
 
 	var position = geometry.getAttribute( 'position' );
 	var position = geometry.getAttribute( 'position' );
 	var colors = new Float32Array( position.count * 3 );
 	var colors = new Float32Array( position.count * 3 );
@@ -63,9 +63,9 @@ HemisphereLightHelper.prototype.update = function () {
 
 
 		var mesh = this.children[ 0 ];
 		var mesh = this.children[ 0 ];
 
 
-		if ( this.overrideColor ) {
+		if ( this.color ) {
 
 
-			this.material.color.set( this.overrideColor );
+			this.material.color.set( this.color );
 
 
 		} else {
 		} else {
 
 

+ 5 - 5
src/helpers/PointLightHelper.js

@@ -7,15 +7,15 @@ import { SphereBufferGeometry } from '../geometries/SphereGeometry';
  * @author mrdoob / http://mrdoob.com/
  * @author mrdoob / http://mrdoob.com/
  */
  */
 
 
-function PointLightHelper( light, sphereSize, overrideColor ) {
+function PointLightHelper( light, sphereSize, color ) {
 
 
 	this.light = light;
 	this.light = light;
 	this.light.updateMatrixWorld();
 	this.light.updateMatrixWorld();
 
 
-	this.overrideColor = overrideColor;
+	this.color = color;
 
 
 	var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
 	var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
-	var material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.overrideColor } );
+	var material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.color } );
 
 
 	Mesh.call( this, geometry, material );
 	Mesh.call( this, geometry, material );
 
 
@@ -61,8 +61,8 @@ PointLightHelper.prototype.dispose = function () {
 
 
 PointLightHelper.prototype.update = function () {
 PointLightHelper.prototype.update = function () {
 
 
-	if ( ! this.overrideColor ) this.material.color.copy( this.light.color );
-	else this.material.color.set( this.overrideColor );
+	if ( ! this.color ) this.material.color.copy( this.light.color );
+	else this.material.color.set( this.color );
 
 
 	/*
 	/*
 	var d = this.light.distance;
 	var d = this.light.distance;

+ 5 - 5
src/helpers/RectAreaLightHelper.js

@@ -10,7 +10,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { BufferAttribute } from '../core/BufferAttribute';
 import { BufferAttribute } from '../core/BufferAttribute';
 
 
-function RectAreaLightHelper( light, overrideColor ) {
+function RectAreaLightHelper( light, color ) {
 
 
 	Object3D.call( this );
 	Object3D.call( this );
 
 
@@ -20,9 +20,9 @@ function RectAreaLightHelper( light, overrideColor ) {
 	this.matrix = light.matrixWorld;
 	this.matrix = light.matrixWorld;
 	this.matrixAutoUpdate = false;
 	this.matrixAutoUpdate = false;
 
 
-	this.overrideColor = overrideColor;
+	this.color = color;
 
 
-	var material = new LineBasicMaterial( { fog: false, color: this.overrideColor } );
+	var material = new LineBasicMaterial( { fog: false, color: this.color } );
 
 
 	var geometry = new BufferGeometry();
 	var geometry = new BufferGeometry();
 
 
@@ -66,8 +66,8 @@ RectAreaLightHelper.prototype.update = function () {
 
 
 	position.needsUpdate = true;
 	position.needsUpdate = true;
 
 
-	if ( ! this.overrideColor ) this.line.material.color.copy( this.light.color );
-	else this.line.material.color.set( this.overrideColor );
+	if ( ! this.color ) this.line.material.color.copy( this.light.color );
+	else this.line.material.color.set( this.color );
 
 
 };
 };
 
 

+ 5 - 5
src/helpers/SpotLightHelper.js

@@ -11,7 +11,7 @@ import { BufferGeometry } from '../core/BufferGeometry';
  * @author WestLangley / http://github.com/WestLangley
  * @author WestLangley / http://github.com/WestLangley
 */
 */
 
 
-function SpotLightHelper( light, overrideColor ) {
+function SpotLightHelper( light, color ) {
 
 
 	Object3D.call( this );
 	Object3D.call( this );
 
 
@@ -21,7 +21,7 @@ function SpotLightHelper( light, overrideColor ) {
 	this.matrix = light.matrixWorld;
 	this.matrix = light.matrixWorld;
 	this.matrixAutoUpdate = false;
 	this.matrixAutoUpdate = false;
 
 
-	this.overrideColor = overrideColor;
+	this.color = color;
 
 
 	var geometry = new BufferGeometry();
 	var geometry = new BufferGeometry();
 
 
@@ -47,7 +47,7 @@ function SpotLightHelper( light, overrideColor ) {
 
 
 	geometry.addAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
 	geometry.addAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
 
 
-	var material = new LineBasicMaterial( { fog: false, color: this.overrideColor } );
+	var material = new LineBasicMaterial( { fog: false, color: this.color } );
 
 
 	this.cone = new LineSegments( geometry, material );
 	this.cone = new LineSegments( geometry, material );
 	this.add( this.cone );
 	this.add( this.cone );
@@ -85,8 +85,8 @@ SpotLightHelper.prototype.update = function () {
 
 
 		this.cone.lookAt( vector2.sub( vector ) );
 		this.cone.lookAt( vector2.sub( vector ) );
 
 
-		if ( ! this.overrideColor ) this.cone.material.color.copy( this.light.color );
-		else this.cone.material.color.set( this.overrideColor );
+		if ( ! this.color ) this.cone.material.color.copy( this.light.color );
+		else this.cone.material.color.set( this.color );
 
 
 	};
 	};