Browse Source

renamed environmentIntensity to environmentAlpha NodePhong

SUNAG 9 years ago
parent
commit
f7a086cffa

+ 5 - 5
examples/js/nodes/materials/PhongNode.js

@@ -114,7 +114,7 @@ THREE.PhongNode.prototype.build = function( builder ) {
 		if ( this.normalScale && this.normal ) this.normalScale.verify( builder );
 
 		if ( this.environment ) this.environment.verify( builder );
-		if ( this.environmentIntensity && this.environment ) this.environmentIntensity.verify( builder );
+		if ( this.environmentAlpha && this.environment ) this.environmentAlpha.verify( builder );
 
 		// build code
 
@@ -133,7 +133,7 @@ THREE.PhongNode.prototype.build = function( builder ) {
 		var normalScale = this.normalScale && this.normal ? this.normalScale.buildCode( builder, 'v2' ) : undefined;
 
 		var environment = this.environment ? this.environment.buildCode( builder, 'c' ) : undefined;
-		var environmentIntensity = this.environmentIntensity && this.environment ? this.environmentIntensity.buildCode( builder, 'fv1' ) : undefined;
+		var environmentAlpha = this.environmentAlpha && this.environment ? this.environmentAlpha.buildCode( builder, 'fv1' ) : undefined;
 
 		material.requestAttrib.transparent = alpha != undefined;
 
@@ -236,11 +236,11 @@ THREE.PhongNode.prototype.build = function( builder ) {
 
 			output.push( environment.code );
 
-			if ( environmentIntensity ) {
+			if ( environmentAlpha ) {
 
-				output.push( environmentIntensity.code );
+				output.push( environmentAlpha.code );
 
-				output.push( "outgoingLight = mix(" + 'outgoingLight' + "," + environment.result + "," + environmentIntensity.result + ");" );
+				output.push( "outgoingLight = mix(" + 'outgoingLight' + "," + environment.result + "," + environmentAlpha.result + ");" );
 
 			}
 			else {

+ 1 - 1
examples/js/nodes/materials/PhongNodeMaterial.js

@@ -14,4 +14,4 @@ THREE.PhongNodeMaterial.prototype = Object.create( THREE.NodeMaterial.prototype
 THREE.PhongNodeMaterial.prototype.constructor = THREE.PhongNodeMaterial;
 
 THREE.NodeMaterial.addShortcuts( THREE.PhongNodeMaterial.prototype, 'node',
-[ 'color', 'alpha', 'specular', 'shininess', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentIntensity', 'transform' ] );
+[ 'color', 'alpha', 'specular', 'shininess', 'normal', 'normalScale', 'emissive', 'ambient', 'shadow', 'ao', 'environment', 'environmentAlpha', 'transform' ] );

+ 4 - 4
examples/webgl_materials_nodes.html

@@ -273,7 +273,7 @@
 					//mtl.shadow = // shadowmap
 					//mtl.ao = // ambient occlusion
 					//mtl.environment = // reflection map (CubeMap recommended)
-					//mtl.environmentIntensity = // environment intensity
+					//mtl.environmentAlpha = // environment alpha
 					//mtl.transform = // vertex transformation
 
 					var mask = new THREE.SwitchNode( new THREE.TextureNode( decalDiffuse ), 'w' );
@@ -282,7 +282,7 @@
 					mtl.specular = new THREE.FloatNode( .5 );
 					mtl.shininess = new THREE.FloatNode( 15 );
 					mtl.environment = new THREE.CubeTextureNode( cubemap );
-					mtl.environmentIntensity = mask;
+					mtl.environmentAlpha = mask;
 					mtl.normal = new THREE.TextureNode( grassNormal );
 					mtl.normalScale = new THREE.Math1Node( mask, THREE.Math1Node.INVERT );
 
@@ -305,7 +305,7 @@
 					//mtl.shadow = // shadowmap
 					//mtl.ao = // ambient occlusion
 					//mtl.environment = // reflection map (CubeMap recommended)
-					//mtl.environmentIntensity = // environment intensity
+					//mtl.environmentAlpha = // environment alpha
 					//mtl.transform = // vertex transformation
 
 					var mask = new THREE.SwitchNode( new THREE.TextureNode( decalDiffuse ), 'w' );
@@ -619,7 +619,7 @@
 
 					mtl.color = new THREE.ColorNode( 0x3399FF );
 					mtl.environment = color;
-					mtl.environmentIntensity = new THREE.Math1Node( fresnel, THREE.Math1Node.SAT );
+					mtl.environmentAlpha = new THREE.Math1Node( fresnel, THREE.Math1Node.SAT );
 
 					// GUI