Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
074ed074e7
3 changed files with 402 additions and 413 deletions
  1. 29 34
      build/three.js
  2. 344 345
      build/three.min.js
  3. 29 34
      build/three.module.js

+ 29 - 34
build/three.js

@@ -6155,6 +6155,21 @@
 			vertexShader: ShaderChunk.distanceRGBA_vert,
 			fragmentShader: ShaderChunk.distanceRGBA_frag
 
+		},
+
+		shadow: {
+
+			uniforms: UniformsUtils.merge( [
+				UniformsLib.lights,
+				{
+					color: { value: new Color( 0x00000 ) },
+					opacity: { value: 1.0 }
+				},
+			] ),
+
+			vertexShader: ShaderChunk.shadow_vert,
+			fragmentShader: ShaderChunk.shadow_frag
+
 		}
 
 	};
@@ -18121,7 +18136,8 @@
 			MeshPhysicalMaterial: 'physical',
 			LineBasicMaterial: 'basic',
 			LineDashedMaterial: 'dashed',
-			PointsMaterial: 'points'
+			PointsMaterial: 'points',
+			ShadowMaterial: 'shadow'
 		};
 
 		var parameterNames = [
@@ -22542,6 +22558,11 @@
 
 					refreshUniformsNormal( m_uniforms, material );
 
+				} else if ( material.isShadowMaterial ) {
+
+					m_uniforms.color.value = material.color;
+					m_uniforms.opacity.value = material.opacity;
+
 				}
 
 				// RectAreaLight Texture
@@ -29059,47 +29080,21 @@
 
 	function ShadowMaterial( parameters ) {
 
-		ShaderMaterial.call( this, {
-			uniforms: UniformsUtils.merge( [
-				UniformsLib.lights,
-				{
-					color: { value: new THREE.Color( 0, 0, 0 ) },
-					opacity: { value: 1.0 }
-				}
-			] ),
-			vertexShader: ShaderChunk[ 'shadow_vert' ],
-			fragmentShader: ShaderChunk[ 'shadow_frag' ]
-		} );
+		Material.call( this );
+
+		this.type = 'ShadowMaterial';
+
+		this.color = new Color( 0x000000 );
+		this.opacity = 1.0;
 
 		this.lights = true;
 		this.transparent = true;
 
-		Object.defineProperties( this, {
-			color: {
-				enumerable: true,
-				get: function () {
-					return this.uniforms.color.value;
-				},
-				set: function ( value ) {
-					this.uniforms.color.value = value;
-				}
-			},
-			opacity: {
-				enumerable: true,
-				get: function () {
-					return this.uniforms.opacity.value;
-				},
-				set: function ( value ) {
-					this.uniforms.opacity.value = value;
-				}
-			}
-		} );
-
 		this.setValues( parameters );
 
 	}
 
-	ShadowMaterial.prototype = Object.create( ShaderMaterial.prototype );
+	ShadowMaterial.prototype = Object.create( Material.prototype );
 	ShadowMaterial.prototype.constructor = ShadowMaterial;
 
 	ShadowMaterial.prototype.isShadowMaterial = true;

File diff suppressed because it is too large
+ 344 - 345
build/three.min.js


+ 29 - 34
build/three.module.js

@@ -6149,6 +6149,21 @@ var ShaderLib = {
 		vertexShader: ShaderChunk.distanceRGBA_vert,
 		fragmentShader: ShaderChunk.distanceRGBA_frag
 
+	},
+
+	shadow: {
+
+		uniforms: UniformsUtils.merge( [
+			UniformsLib.lights,
+			{
+				color: { value: new Color( 0x00000 ) },
+				opacity: { value: 1.0 }
+			},
+		] ),
+
+		vertexShader: ShaderChunk.shadow_vert,
+		fragmentShader: ShaderChunk.shadow_frag
+
 	}
 
 };
@@ -18115,7 +18130,8 @@ function WebGLPrograms( renderer, extensions, capabilities ) {
 		MeshPhysicalMaterial: 'physical',
 		LineBasicMaterial: 'basic',
 		LineDashedMaterial: 'dashed',
-		PointsMaterial: 'points'
+		PointsMaterial: 'points',
+		ShadowMaterial: 'shadow'
 	};
 
 	var parameterNames = [
@@ -22536,6 +22552,11 @@ function WebGLRenderer( parameters ) {
 
 				refreshUniformsNormal( m_uniforms, material );
 
+			} else if ( material.isShadowMaterial ) {
+
+				m_uniforms.color.value = material.color;
+				m_uniforms.opacity.value = material.opacity;
+
 			}
 
 			// RectAreaLight Texture
@@ -29053,47 +29074,21 @@ var Geometries = Object.freeze({
 
 function ShadowMaterial( parameters ) {
 
-	ShaderMaterial.call( this, {
-		uniforms: UniformsUtils.merge( [
-			UniformsLib.lights,
-			{
-				color: { value: new THREE.Color( 0, 0, 0 ) },
-				opacity: { value: 1.0 }
-			}
-		] ),
-		vertexShader: ShaderChunk[ 'shadow_vert' ],
-		fragmentShader: ShaderChunk[ 'shadow_frag' ]
-	} );
+	Material.call( this );
+
+	this.type = 'ShadowMaterial';
+
+	this.color = new Color( 0x000000 );
+	this.opacity = 1.0;
 
 	this.lights = true;
 	this.transparent = true;
 
-	Object.defineProperties( this, {
-		color: {
-			enumerable: true,
-			get: function () {
-				return this.uniforms.color.value;
-			},
-			set: function ( value ) {
-				this.uniforms.color.value = value;
-			}
-		},
-		opacity: {
-			enumerable: true,
-			get: function () {
-				return this.uniforms.opacity.value;
-			},
-			set: function ( value ) {
-				this.uniforms.opacity.value = value;
-			}
-		}
-	} );
-
 	this.setValues( parameters );
 
 }
 
-ShadowMaterial.prototype = Object.create( ShaderMaterial.prototype );
+ShadowMaterial.prototype = Object.create( Material.prototype );
 ShadowMaterial.prototype.constructor = ShadowMaterial;
 
 ShadowMaterial.prototype.isShadowMaterial = true;

Some files were not shown because too many files changed in this diff