Browse Source

Lights, Fogs: Renamed hex to color in constructors.

Mr.doob 11 năm trước cách đây
mục cha
commit
1e47bb43b5

+ 2 - 2
src/lights/AmbientLight.js

@@ -2,9 +2,9 @@
  * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.AmbientLight = function ( hex ) {
+THREE.AmbientLight = function ( color ) {
 
-	THREE.Light.call( this, hex );
+	THREE.Light.call( this, color );
 
 };
 

+ 2 - 2
src/lights/AreaLight.js

@@ -3,9 +3,9 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.AreaLight = function ( hex, intensity ) {
+THREE.AreaLight = function ( color, intensity ) {
 
-	THREE.Light.call( this, hex );
+	THREE.Light.call( this, color );
 
 	this.normal = new THREE.Vector3( 0, -1, 0 );
 	this.right = new THREE.Vector3( 1, 0, 0 );

+ 2 - 2
src/lights/DirectionalLight.js

@@ -3,9 +3,9 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.DirectionalLight = function ( hex, intensity ) {
+THREE.DirectionalLight = function ( color, intensity ) {
 
-	THREE.Light.call( this, hex );
+	THREE.Light.call( this, color );
 
 	this.position.set( 0, 1, 0 );
 	this.target = new THREE.Object3D();

+ 3 - 3
src/lights/HemisphereLight.js

@@ -2,13 +2,13 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.HemisphereLight = function ( skyColorHex, groundColorHex, intensity ) {
+THREE.HemisphereLight = function ( skyColor, groundColor, intensity ) {
 
-	THREE.Light.call( this, skyColorHex );
+	THREE.Light.call( this, skyColor );
 
 	this.position.set( 0, 100, 0 );
 
-	this.groundColor = new THREE.Color( groundColorHex );
+	this.groundColor = new THREE.Color( groundColor );
 	this.intensity = ( intensity !== undefined ) ? intensity : 1;
 
 };

+ 2 - 2
src/lights/Light.js

@@ -3,11 +3,11 @@
  * @author alteredq / http://alteredqualia.com/
  */
  
-THREE.Light = function ( hex ) {
+THREE.Light = function ( color ) {
 
 	THREE.Object3D.call( this );
 
-	this.color = new THREE.Color( hex );
+	this.color = new THREE.Color( color );
 
 };
 

+ 2 - 2
src/lights/PointLight.js

@@ -2,9 +2,9 @@
  * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.PointLight = function ( hex, intensity, distance ) {
+THREE.PointLight = function ( color, intensity, distance ) {
 
-	THREE.Light.call( this, hex );
+	THREE.Light.call( this, color );
 
 	this.intensity = ( intensity !== undefined ) ? intensity : 1;
 	this.distance = ( distance !== undefined ) ? distance : 0;

+ 2 - 2
src/lights/SpotLight.js

@@ -2,9 +2,9 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.SpotLight = function ( hex, intensity, distance, angle, exponent ) {
+THREE.SpotLight = function ( color, intensity, distance, angle, exponent ) {
 
-	THREE.Light.call( this, hex );
+	THREE.Light.call( this, color );
 
 	this.position.set( 0, 1, 0 );
 	this.target = new THREE.Object3D();

+ 2 - 2
src/scenes/Fog.js

@@ -3,11 +3,11 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.Fog = function ( hex, near, far ) {
+THREE.Fog = function ( color, near, far ) {
 
 	this.name = '';
 
-	this.color = new THREE.Color( hex );
+	this.color = new THREE.Color( color );
 
 	this.near = ( near !== undefined ) ? near : 1;
 	this.far = ( far !== undefined ) ? far : 1000;

+ 2 - 2
src/scenes/FogExp2.js

@@ -3,11 +3,11 @@
  * @author alteredq / http://alteredqualia.com/
  */
 
-THREE.FogExp2 = function ( hex, density ) {
+THREE.FogExp2 = function ( color, density ) {
 
 	this.name = '';
 
-	this.color = new THREE.Color( hex );
+	this.color = new THREE.Color( color );
 	this.density = ( density !== undefined ) ? density : 0.00025;
 
 };