提交 1a00f44c 编写于 作者: L Lewy Blue

renamed overrideColor to color

上级 d080a75c
......@@ -32,13 +32,13 @@
<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>
[page:DirectionalLight light]-- The light to be visualized. <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
(for example a white light against a white background) you can directly set the color here.
</div>
......@@ -63,7 +63,7 @@
light's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>[property:hex overrideColor]</h3>
<h3>[property:hex color]</h3>
<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 color will update the next time [page:.update update] is called.
......
......@@ -29,13 +29,13 @@ scene.add( helper );
<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>
[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: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
(for example a white light against a white background) you can directly set the color here.
</div>
......@@ -56,7 +56,7 @@ scene.add( helper );
hemisphereLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>[property:hex overrideColor]</h3>
<h3>[property:hex color]</h3>
<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 color will update the next time [page:.update update] is called.
......
......@@ -37,13 +37,13 @@
<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>
[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: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
(for example a white light against a white background) you can directly set the color here.
</div>
......@@ -63,7 +63,7 @@
pointLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>[property:hex overrideColor]</h3>
<h3>[property:hex color]</h3>
<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
color will update the next time [page:.update update] is called.
......
......@@ -29,11 +29,11 @@ scene.add( helper );
<h2>Constructor</h2>
<h3>[name]( [page:RectAreaLight light], [page:Hex overrideColor] )</h3>
<h3>[name]( [page:RectAreaLight light], [page:Hex color] )</h3>
<div>
[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
(for example a white light against a white background) you can directly set the color here.
</div>
......@@ -45,7 +45,7 @@ scene.add( helper );
<h3>[property:RectAreaLight light]</h3>
<div>Reference to the RectAreaLight being visualized.</div>
<h3>[property:hex overrideColor]</h3>
<h3>[property:hex color]</h3>
<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 color will update the next time [page:.update update] is called.
......
......@@ -35,11 +35,11 @@
<h2>Constructor</h2>
<h3>[name]( [page:SpotLight light], [page:Hex overrideColor] )</h3>
<h3>[name]( [page:SpotLight light], [page:Hex color] )</h3>
<div>
[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
(for example a white light against a white background) you can directly set the color here.
</div>
......@@ -63,7 +63,7 @@
spotLight's [page:Object3D.matrixWorld matrixWorld].
</div>
<h3>[property:hex overrideColor]</h3>
<h3>[property:hex color]</h3>
<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 color will update the next time [page:.update update] is called.
......
......@@ -11,7 +11,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
* @author WestLangley / http://github.com/WestLangley
*/
function DirectionalLightHelper( light, size, overrideColor ) {
function DirectionalLightHelper( light, size, color ) {
Object3D.call( this );
......@@ -21,7 +21,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.overrideColor = overrideColor;
this.color = color;
if ( size === undefined ) size = 1;
......@@ -34,7 +34,7 @@ function DirectionalLightHelper( light, size, overrideColor ) {
- size, size, 0
], 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.add( this.lightPlane );
......@@ -74,13 +74,13 @@ DirectionalLightHelper.prototype.update = function () {
v3.subVectors( v2, v1 );
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.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 );
};
......
......@@ -13,7 +13,7 @@ import { BufferAttribute } from '../core/BufferAttribute';
* @author Mugen87 / https://github.com/Mugen87
*/
function HemisphereLightHelper( light, size, overrideColor ) {
function HemisphereLightHelper( light, size, color ) {
Object3D.call( this );
......@@ -23,13 +23,13 @@ function HemisphereLightHelper( light, size, overrideColor ) {
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.overrideColor = overrideColor;
this.color = color;
var geometry = new OctahedronBufferGeometry( size );
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 colors = new Float32Array( position.count * 3 );
......@@ -63,9 +63,9 @@ HemisphereLightHelper.prototype.update = function () {
var mesh = this.children[ 0 ];
if ( this.overrideColor ) {
if ( this.color ) {
this.material.color.set( this.overrideColor );
this.material.color.set( this.color );
} else {
......
......@@ -7,15 +7,15 @@ import { SphereBufferGeometry } from '../geometries/SphereGeometry';
* @author mrdoob / http://mrdoob.com/
*/
function PointLightHelper( light, sphereSize, overrideColor ) {
function PointLightHelper( light, sphereSize, color ) {
this.light = light;
this.light.updateMatrixWorld();
this.overrideColor = overrideColor;
this.color = color;
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 );
......@@ -61,8 +61,8 @@ PointLightHelper.prototype.dispose = 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;
......
......@@ -10,7 +10,7 @@ import { LineBasicMaterial } from '../materials/LineBasicMaterial';
import { BufferGeometry } from '../core/BufferGeometry';
import { BufferAttribute } from '../core/BufferAttribute';
function RectAreaLightHelper( light, overrideColor ) {
function RectAreaLightHelper( light, color ) {
Object3D.call( this );
......@@ -20,9 +20,9 @@ function RectAreaLightHelper( light, overrideColor ) {
this.matrix = light.matrixWorld;
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();
......@@ -66,8 +66,8 @@ RectAreaLightHelper.prototype.update = function () {
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 );
};
......
......@@ -11,7 +11,7 @@ import { BufferGeometry } from '../core/BufferGeometry';
* @author WestLangley / http://github.com/WestLangley
*/
function SpotLightHelper( light, overrideColor ) {
function SpotLightHelper( light, color ) {
Object3D.call( this );
......@@ -21,7 +21,7 @@ function SpotLightHelper( light, overrideColor ) {
this.matrix = light.matrixWorld;
this.matrixAutoUpdate = false;
this.overrideColor = overrideColor;
this.color = color;
var geometry = new BufferGeometry();
......@@ -47,7 +47,7 @@ function SpotLightHelper( light, overrideColor ) {
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.add( this.cone );
......@@ -85,8 +85,8 @@ SpotLightHelper.prototype.update = function () {
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 );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册