提交 1e47bb43 编写于 作者: M Mr.doob

Lights, Fogs: Renamed hex to color in constructors.

上级 55c2c10a
......@@ -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 );
};
......
......@@ -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 );
......
......@@ -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();
......
......@@ -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;
};
......
......@@ -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,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,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();
......
......@@ -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;
......
......@@ -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;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册