浏览代码

rename lightMapScale > lightMapIntensity

Ben Houston 10 年之前
父节点
当前提交
0b993c1b5e

+ 1 - 1
examples/webgl_materials_lightmap.html

@@ -153,7 +153,7 @@
 				loader.load( "obj/lightmap/lightmap.js", function ( geometry, materials ) {
 
 					for( var i = 0; i < materials.length; i ++ ) {
-						materials[i].lightMapScale = 0.75;
+						materials[i].lightMapIntensity = 0.75;
 					}
 
 					var mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial( materials ) );

+ 2 - 2
src/loaders/ObjectLoader.js

@@ -278,8 +278,8 @@ THREE.ObjectLoader.prototype = {
 
 					material.lightMap = getTexture( data.lightMap );
 
-					if ( data.lightMapScale !== undefined ) {
-						material.lightMapScale = data.lightMapScale;
+					if ( data.lightMapIntensity !== undefined ) {
+						material.lightMapIntensity = data.lightMapIntensity;
 					}
 
 				}

+ 3 - 3
src/materials/MeshPhongMaterial.js

@@ -12,7 +12,7 @@
  *  map: new THREE.Texture( <Image> ),
  *
  *  lightMap: new THREE.Texture( <Image> ),
- *  lightMapScale: <float>
+ *  lightMapIntensity: <float>
  *
  *  aoMap: new THREE.Texture( <Image> ),
  *  oaMapScale: <float>
@@ -69,7 +69,7 @@ THREE.MeshPhongMaterial = function ( parameters ) {
 	this.map = null;
 
 	this.lightMap = null;
-	this.lightMapScale = null;
+	this.lightMapIntensity = null;
 
 	this.aoMap = null;
 	this.oaMapScale = 1.0;
@@ -130,7 +130,7 @@ THREE.MeshPhongMaterial.prototype.clone = function () {
 	material.map = this.map;
 
 	material.lightMap = this.lightMap;
-	material.lightMapScale = this.lightMapScale;
+	material.lightMapIntensity = this.lightMapIntensity;
 
 	material.aoMap = this.aoMap;
 	material.oaMapScale = this.oaMapScale;

+ 1 - 1
src/renderers/WebGLRenderer.js

@@ -4581,7 +4581,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		uniforms.map.value = material.map;
 		uniforms.lightMap.value = material.lightMap;
-		uniforms.lightMapScale.value = material.lightMapScale;
+		uniforms.lightMapIntensity.value = material.lightMapIntensity;
 		uniforms.aoMap.value = material.aoMap;
 		uniforms.oaMapScale.value = material.oaMapScale;
 		uniforms.specularMap.value = material.specularMap;

+ 1 - 1
src/renderers/shaders/ShaderChunk/lightmap_fragment.glsl

@@ -1,5 +1,5 @@
 #ifdef USE_LIGHTMAP
 
-	outgoingLight += diffuseColor.xyz * texture2D( lightMap, vUv2 ).xyz * lightMapScale;
+	outgoingLight += diffuseColor.xyz * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
 
 #endif

+ 1 - 1
src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl

@@ -1,6 +1,6 @@
 #ifdef USE_LIGHTMAP
 
 	uniform sampler2D lightMap;
-	uniform float lightMapScale;
+	uniform float lightMapIntensity;
 
 #endif

+ 1 - 1
src/renderers/shaders/UniformsLib.js

@@ -13,7 +13,7 @@ THREE.UniformsLib = {
 		"offsetRepeat" : { type: "v4", value: new THREE.Vector4( 0, 0, 1, 1 ) },
 
 		"lightMap" : { type: "t", value: null },
-		"lightMapScale" : { type: "f", value: 1 },
+		"lightMapIntensity" : { type: "f", value: 1 },
 
 		"aoMap" : { type: "t", value: null },
 		"oaMapScale" : { type: "f", value: 1 },