Browse Source

Updated builds.

Mr.doob 4 years ago
parent
commit
3702e1ee4d
3 changed files with 102 additions and 85 deletions
  1. 55 41
      build/three.js
  2. 0 0
      build/three.min.js
  3. 47 44
      build/three.module.js

+ 55 - 41
build/three.js

@@ -18872,6 +18872,11 @@
 			state.unbindTexture();
 			state.unbindTexture();
 		};
 		};
 
 
+		this.resetState = function () {
+			state.reset();
+			bindingStates.reset();
+		};
+
 		if (typeof __THREE_DEVTOOLS__ !== 'undefined') {
 		if (typeof __THREE_DEVTOOLS__ !== 'undefined') {
 			__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {
 			__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {
 				detail: this
 				detail: this
@@ -19561,6 +19566,16 @@
 		}
 		}
 	});
 	});
 
 
+	var _basePosition = new Vector3();
+
+	var _skinIndex = new Vector4();
+
+	var _skinWeight = new Vector4();
+
+	var _vector$7 = new Vector3();
+
+	var _matrix$1 = new Matrix4();
+
 	function SkinnedMesh(geometry, material) {
 	function SkinnedMesh(geometry, material) {
 		if (geometry && geometry.isGeometry) {
 		if (geometry && geometry.isGeometry) {
 			console.error('THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');
 			console.error('THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');
@@ -19630,33 +19645,32 @@
 				console.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode);
 				console.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode);
 			}
 			}
 		},
 		},
-		boneTransform: function () {
-			var basePosition = new Vector3();
-			var skinIndex = new Vector4();
-			var skinWeight = new Vector4();
-			var vector = new Vector3();
-			var matrix = new Matrix4();
-			return function (index, target) {
-				var skeleton = this.skeleton;
-				var geometry = this.geometry;
-				skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);
-				skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);
-				basePosition.fromBufferAttribute(geometry.attributes.position, index).applyMatrix4(this.bindMatrix);
-				target.set(0, 0, 0);
-
-				for (var i = 0; i < 4; i++) {
-					var weight = skinWeight.getComponent(i);
-
-					if (weight !== 0) {
-						var boneIndex = skinIndex.getComponent(i);
-						matrix.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);
-						target.addScaledVector(vector.copy(basePosition).applyMatrix4(matrix), weight);
-					}
+		boneTransform: function boneTransform(index, target) {
+			var skeleton = this.skeleton;
+			var geometry = this.geometry;
+
+			_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);
+
+			_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);
+
+			_basePosition.fromBufferAttribute(geometry.attributes.position, index).applyMatrix4(this.bindMatrix);
+
+			target.set(0, 0, 0);
+
+			for (var i = 0; i < 4; i++) {
+				var weight = _skinWeight.getComponent(i);
+
+				if (weight !== 0) {
+					var boneIndex = _skinIndex.getComponent(i);
+
+					_matrix$1.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);
+
+					target.addScaledVector(_vector$7.copy(_basePosition).applyMatrix4(_matrix$1), weight);
 				}
 				}
+			}
 
 
-				return target.applyMatrix4(this.bindMatrixInverse);
-			};
-		}()
+			return target.applyMatrix4(this.bindMatrixInverse);
+		}
 	});
 	});
 
 
 	function Bone() {
 	function Bone() {
@@ -34430,7 +34444,7 @@
 		return Cylindrical;
 		return Cylindrical;
 	}();
 	}();
 
 
-	var _vector$7 = /*@__PURE__*/new Vector2();
+	var _vector$8 = /*@__PURE__*/new Vector2();
 
 
 	var Box2 = /*#__PURE__*/function () {
 	var Box2 = /*#__PURE__*/function () {
 		function Box2(min, max) {
 		function Box2(min, max) {
@@ -34460,7 +34474,7 @@
 		};
 		};
 
 
 		_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {
 		_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {
-			var halfSize = _vector$7.copy(size).multiplyScalar(0.5);
+			var halfSize = _vector$8.copy(size).multiplyScalar(0.5);
 
 
 			this.min.copy(center).sub(halfSize);
 			this.min.copy(center).sub(halfSize);
 			this.max.copy(center).add(halfSize);
 			this.max.copy(center).add(halfSize);
@@ -34558,7 +34572,7 @@
 		};
 		};
 
 
 		_proto.distanceToPoint = function distanceToPoint(point) {
 		_proto.distanceToPoint = function distanceToPoint(point) {
-			var clampedPoint = _vector$7.copy(point).clamp(this.min, this.max);
+			var clampedPoint = _vector$8.copy(point).clamp(this.min, this.max);
 
 
 			return clampedPoint.sub(point).length();
 			return clampedPoint.sub(point).length();
 		};
 		};
@@ -34716,7 +34730,7 @@
 	ImmediateRenderObject.prototype.constructor = ImmediateRenderObject;
 	ImmediateRenderObject.prototype.constructor = ImmediateRenderObject;
 	ImmediateRenderObject.prototype.isImmediateRenderObject = true;
 	ImmediateRenderObject.prototype.isImmediateRenderObject = true;
 
 
-	var _vector$8 = /*@__PURE__*/new Vector3();
+	var _vector$9 = /*@__PURE__*/new Vector3();
 
 
 	var SpotLightHelper = /*#__PURE__*/function (_Object3D) {
 	var SpotLightHelper = /*#__PURE__*/function (_Object3D) {
 		_inheritsLoose(SpotLightHelper, _Object3D);
 		_inheritsLoose(SpotLightHelper, _Object3D);
@@ -34768,9 +34782,9 @@
 			var coneWidth = coneLength * Math.tan(this.light.angle);
 			var coneWidth = coneLength * Math.tan(this.light.angle);
 			this.cone.scale.set(coneWidth, coneWidth, coneLength);
 			this.cone.scale.set(coneWidth, coneWidth, coneLength);
 
 
-			_vector$8.setFromMatrixPosition(this.light.target.matrixWorld);
+			_vector$9.setFromMatrixPosition(this.light.target.matrixWorld);
 
 
-			this.cone.lookAt(_vector$8);
+			this.cone.lookAt(_vector$9);
 
 
 			if (this.color !== undefined) {
 			if (this.color !== undefined) {
 				this.cone.material.color.set(this.color);
 				this.cone.material.color.set(this.color);
@@ -34782,7 +34796,7 @@
 		return SpotLightHelper;
 		return SpotLightHelper;
 	}(Object3D);
 	}(Object3D);
 
 
-	var _vector$9 = /*@__PURE__*/new Vector3();
+	var _vector$a = /*@__PURE__*/new Vector3();
 
 
 	var _boneMatrix = /*@__PURE__*/new Matrix4();
 	var _boneMatrix = /*@__PURE__*/new Matrix4();
 
 
@@ -34846,15 +34860,15 @@
 				if (bone.parent && bone.parent.isBone) {
 				if (bone.parent && bone.parent.isBone) {
 					_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.matrixWorld);
 					_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.matrixWorld);
 
 
-					_vector$9.setFromMatrixPosition(_boneMatrix);
+					_vector$a.setFromMatrixPosition(_boneMatrix);
 
 
-					position.setXYZ(j, _vector$9.x, _vector$9.y, _vector$9.z);
+					position.setXYZ(j, _vector$a.x, _vector$a.y, _vector$a.z);
 
 
 					_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.parent.matrixWorld);
 					_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.parent.matrixWorld);
 
 
-					_vector$9.setFromMatrixPosition(_boneMatrix);
+					_vector$a.setFromMatrixPosition(_boneMatrix);
 
 
-					position.setXYZ(j + 1, _vector$9.x, _vector$9.y, _vector$9.z);
+					position.setXYZ(j + 1, _vector$a.x, _vector$a.y, _vector$a.z);
 					j += 2;
 					j += 2;
 				}
 				}
 			}
 			}
@@ -34951,7 +34965,7 @@
 		return PointLightHelper;
 		return PointLightHelper;
 	}(Mesh);
 	}(Mesh);
 
 
-	var _vector$a = /*@__PURE__*/new Vector3();
+	var _vector$b = /*@__PURE__*/new Vector3();
 
 
 	var _color1 = /*@__PURE__*/new Color();
 	var _color1 = /*@__PURE__*/new Color();
 
 
@@ -35017,7 +35031,7 @@
 				colors.needsUpdate = true;
 				colors.needsUpdate = true;
 			}
 			}
 
 
-			mesh.lookAt(_vector$a.setFromMatrixPosition(this.light.matrixWorld).negate());
+			mesh.lookAt(_vector$b.setFromMatrixPosition(this.light.matrixWorld).negate());
 		};
 		};
 
 
 		return HemisphereLightHelper;
 		return HemisphereLightHelper;
@@ -35243,7 +35257,7 @@
 		return DirectionalLightHelper;
 		return DirectionalLightHelper;
 	}(Object3D);
 	}(Object3D);
 
 
-	var _vector$b = /*@__PURE__*/new Vector3();
+	var _vector$c = /*@__PURE__*/new Vector3();
 
 
 	var _camera = /*@__PURE__*/new Camera();
 	var _camera = /*@__PURE__*/new Camera();
 	/**
 	/**
@@ -35383,7 +35397,7 @@
 	}(LineSegments);
 	}(LineSegments);
 
 
 	function setPoint(point, pointMap, geometry, camera, x, y, z) {
 	function setPoint(point, pointMap, geometry, camera, x, y, z) {
-		_vector$b.set(x, y, z).unproject(camera);
+		_vector$c.set(x, y, z).unproject(camera);
 
 
 		var points = pointMap[point];
 		var points = pointMap[point];
 
 
@@ -35391,7 +35405,7 @@
 			var position = geometry.getAttribute('position');
 			var position = geometry.getAttribute('position');
 
 
 			for (var i = 0, l = points.length; i < l; i++) {
 			for (var i = 0, l = points.length; i < l; i++) {
-				position.setXYZ(points[i], _vector$b.x, _vector$b.y, _vector$b.z);
+				position.setXYZ(points[i], _vector$c.x, _vector$c.y, _vector$c.z);
 			}
 			}
 		}
 		}
 	}
 	}

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


+ 47 - 44
build/three.module.js

@@ -25259,6 +25259,13 @@ function WebGLRenderer( parameters ) {
 
 
 	};
 	};
 
 
+	this.resetState = function () {
+
+		state.reset();
+		bindingStates.reset();
+
+	};
+
 	if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
 	if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
 
 
 		__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
 		__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
@@ -26228,6 +26235,14 @@ LOD.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 
 } );
 } );
 
 
+const _basePosition = new Vector3();
+
+const _skinIndex = new Vector4();
+const _skinWeight = new Vector4();
+
+const _vector$7 = new Vector3();
+const _matrix$1 = new Matrix4();
+
 function SkinnedMesh( geometry, material ) {
 function SkinnedMesh( geometry, material ) {
 
 
 	if ( geometry && geometry.isGeometry ) {
 	if ( geometry && geometry.isGeometry ) {
@@ -26342,49 +26357,37 @@ SkinnedMesh.prototype = Object.assign( Object.create( Mesh.prototype ), {
 
 
 	},
 	},
 
 
-	boneTransform: ( function () {
-
-		const basePosition = new Vector3();
-
-		const skinIndex = new Vector4();
-		const skinWeight = new Vector4();
-
-		const vector = new Vector3();
-		const matrix = new Matrix4();
-
-		return function ( index, target ) {
+	boneTransform: function ( index, target ) {
 
 
-			const skeleton = this.skeleton;
-			const geometry = this.geometry;
-
-			skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );
-			skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );
+		const skeleton = this.skeleton;
+		const geometry = this.geometry;
 
 
-			basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix );
+		_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );
+		_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );
 
 
-			target.set( 0, 0, 0 );
+		_basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix );
 
 
-			for ( let i = 0; i < 4; i ++ ) {
+		target.set( 0, 0, 0 );
 
 
-				const weight = skinWeight.getComponent( i );
+		for ( let i = 0; i < 4; i ++ ) {
 
 
-				if ( weight !== 0 ) {
+			const weight = _skinWeight.getComponent( i );
 
 
-					const boneIndex = skinIndex.getComponent( i );
+			if ( weight !== 0 ) {
 
 
-					matrix.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );
+				const boneIndex = _skinIndex.getComponent( i );
 
 
-					target.addScaledVector( vector.copy( basePosition ).applyMatrix4( matrix ), weight );
+				_matrix$1.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );
 
 
-				}
+				target.addScaledVector( _vector$7.copy( _basePosition ).applyMatrix4( _matrix$1 ), weight );
 
 
 			}
 			}
 
 
-			return target.applyMatrix4( this.bindMatrixInverse );
+		}
 
 
-		};
+		return target.applyMatrix4( this.bindMatrixInverse );
 
 
-	}() )
+	}
 
 
 } );
 } );
 
 
@@ -46842,7 +46845,7 @@ class Cylindrical {
 
 
 }
 }
 
 
-const _vector$7 = /*@__PURE__*/ new Vector2();
+const _vector$8 = /*@__PURE__*/ new Vector2();
 
 
 class Box2 {
 class Box2 {
 
 
@@ -46880,7 +46883,7 @@ class Box2 {
 
 
 	setFromCenterAndSize( center, size ) {
 	setFromCenterAndSize( center, size ) {
 
 
-		const halfSize = _vector$7.copy( size ).multiplyScalar( 0.5 );
+		const halfSize = _vector$8.copy( size ).multiplyScalar( 0.5 );
 		this.min.copy( center ).sub( halfSize );
 		this.min.copy( center ).sub( halfSize );
 		this.max.copy( center ).add( halfSize );
 		this.max.copy( center ).add( halfSize );
 
 
@@ -47030,7 +47033,7 @@ class Box2 {
 
 
 	distanceToPoint( point ) {
 	distanceToPoint( point ) {
 
 
-		const clampedPoint = _vector$7.copy( point ).clamp( this.min, this.max );
+		const clampedPoint = _vector$8.copy( point ).clamp( this.min, this.max );
 		return clampedPoint.sub( point ).length();
 		return clampedPoint.sub( point ).length();
 
 
 	}
 	}
@@ -47235,7 +47238,7 @@ ImmediateRenderObject.prototype.constructor = ImmediateRenderObject;
 
 
 ImmediateRenderObject.prototype.isImmediateRenderObject = true;
 ImmediateRenderObject.prototype.isImmediateRenderObject = true;
 
 
-const _vector$8 = /*@__PURE__*/ new Vector3();
+const _vector$9 = /*@__PURE__*/ new Vector3();
 
 
 class SpotLightHelper extends Object3D {
 class SpotLightHelper extends Object3D {
 
 
@@ -47299,9 +47302,9 @@ class SpotLightHelper extends Object3D {
 
 
 		this.cone.scale.set( coneWidth, coneWidth, coneLength );
 		this.cone.scale.set( coneWidth, coneWidth, coneLength );
 
 
-		_vector$8.setFromMatrixPosition( this.light.target.matrixWorld );
+		_vector$9.setFromMatrixPosition( this.light.target.matrixWorld );
 
 
-		this.cone.lookAt( _vector$8 );
+		this.cone.lookAt( _vector$9 );
 
 
 		if ( this.color !== undefined ) {
 		if ( this.color !== undefined ) {
 
 
@@ -47317,7 +47320,7 @@ class SpotLightHelper extends Object3D {
 
 
 }
 }
 
 
-const _vector$9 = /*@__PURE__*/ new Vector3();
+const _vector$a = /*@__PURE__*/ new Vector3();
 const _boneMatrix = /*@__PURE__*/ new Matrix4();
 const _boneMatrix = /*@__PURE__*/ new Matrix4();
 const _matrixWorldInv = /*@__PURE__*/ new Matrix4();
 const _matrixWorldInv = /*@__PURE__*/ new Matrix4();
 
 
@@ -47385,12 +47388,12 @@ class SkeletonHelper extends LineSegments {
 			if ( bone.parent && bone.parent.isBone ) {
 			if ( bone.parent && bone.parent.isBone ) {
 
 
 				_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );
 				_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );
-				_vector$9.setFromMatrixPosition( _boneMatrix );
-				position.setXYZ( j, _vector$9.x, _vector$9.y, _vector$9.z );
+				_vector$a.setFromMatrixPosition( _boneMatrix );
+				position.setXYZ( j, _vector$a.x, _vector$a.y, _vector$a.z );
 
 
 				_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );
 				_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );
-				_vector$9.setFromMatrixPosition( _boneMatrix );
-				position.setXYZ( j + 1, _vector$9.x, _vector$9.y, _vector$9.z );
+				_vector$a.setFromMatrixPosition( _boneMatrix );
+				position.setXYZ( j + 1, _vector$a.x, _vector$a.y, _vector$a.z );
 
 
 				j += 2;
 				j += 2;
 
 
@@ -47512,7 +47515,7 @@ class PointLightHelper extends Mesh {
 
 
 }
 }
 
 
-const _vector$a = /*@__PURE__*/ new Vector3();
+const _vector$b = /*@__PURE__*/ new Vector3();
 const _color1 = /*@__PURE__*/ new Color();
 const _color1 = /*@__PURE__*/ new Color();
 const _color2 = /*@__PURE__*/ new Color();
 const _color2 = /*@__PURE__*/ new Color();
 
 
@@ -47580,7 +47583,7 @@ class HemisphereLightHelper extends Object3D {
 
 
 		}
 		}
 
 
-		mesh.lookAt( _vector$a.setFromMatrixPosition( this.light.matrixWorld ).negate() );
+		mesh.lookAt( _vector$b.setFromMatrixPosition( this.light.matrixWorld ).negate() );
 
 
 	}
 	}
 
 
@@ -47783,7 +47786,7 @@ class DirectionalLightHelper extends Object3D {
 
 
 }
 }
 
 
-const _vector$b = /*@__PURE__*/ new Vector3();
+const _vector$c = /*@__PURE__*/ new Vector3();
 const _camera = /*@__PURE__*/ new Camera();
 const _camera = /*@__PURE__*/ new Camera();
 
 
 /**
 /**
@@ -47959,7 +47962,7 @@ class CameraHelper extends LineSegments {
 
 
 function setPoint( point, pointMap, geometry, camera, x, y, z ) {
 function setPoint( point, pointMap, geometry, camera, x, y, z ) {
 
 
-	_vector$b.set( x, y, z ).unproject( camera );
+	_vector$c.set( x, y, z ).unproject( camera );
 
 
 	const points = pointMap[ point ];
 	const points = pointMap[ point ];
 
 
@@ -47969,7 +47972,7 @@ function setPoint( point, pointMap, geometry, camera, x, y, z ) {
 
 
 		for ( let i = 0, l = points.length; i < l; i ++ ) {
 		for ( let i = 0, l = points.length; i < l; i ++ ) {
 
 
-			position.setXYZ( points[ i ], _vector$b.x, _vector$b.y, _vector$b.z );
+			position.setXYZ( points[ i ], _vector$c.x, _vector$c.y, _vector$c.z );
 
 
 		}
 		}
 
 

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