Mr.doob 2 лет назад
Родитель
Сommit
8d0adb60ce
5 измененных файлов с 279 добавлено и 120 удалено
  1. 93 40
      build/three.cjs
  2. 93 40
      build/three.js
  3. 0 0
      build/three.min.js
  4. 93 40
      build/three.module.js
  5. 0 0
      build/three.module.min.js

+ 93 - 40
build/three.cjs

@@ -2910,6 +2910,9 @@ class WebGLRenderTarget extends EventDispatcher {
 		this.height = source.height;
 		this.depth = source.depth;
 
+		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
 		this.viewport.copy( source.viewport );
 
 		this.texture = source.texture.clone();
@@ -3085,8 +3088,10 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 		this.height = source.height;
 		this.depth = source.depth;
 
-		this.viewport.set( 0, 0, this.width, this.height );
-		this.scissor.set( 0, 0, this.width, this.height );
+		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
+		this.viewport.copy( source.viewport );
 
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
@@ -11302,7 +11307,7 @@ class BufferGeometry extends EventDispatcher {
 
 const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();
 const _ray$2 = /*@__PURE__*/ new Ray();
-const _sphere$4 = /*@__PURE__*/ new Sphere();
+const _sphere$5 = /*@__PURE__*/ new Sphere();
 const _sphereHitAt = /*@__PURE__*/ new Vector3();
 
 const _vA$1 = /*@__PURE__*/ new Vector3();
@@ -11434,12 +11439,6 @@ class Mesh extends Object3D {
 
 		}
 
-		if ( this.isSkinnedMesh ) {
-
-			this.applyBoneTransform( index, target );
-
-		}
-
 		return target;
 
 	}
@@ -11456,14 +11455,14 @@ class Mesh extends Object3D {
 
 		if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-		_sphere$4.copy( geometry.boundingSphere );
-		_sphere$4.applyMatrix4( matrixWorld );
+		_sphere$5.copy( geometry.boundingSphere );
+		_sphere$5.applyMatrix4( matrixWorld );
 
 		_ray$2.copy( raycaster.ray ).recast( raycaster.near );
 
-		if ( _sphere$4.containsPoint( _ray$2.origin ) === false ) {
+		if ( _sphere$5.containsPoint( _ray$2.origin ) === false ) {
 
-			if ( _ray$2.intersectSphere( _sphere$4, _sphereHitAt ) === null ) return;
+			if ( _ray$2.intersectSphere( _sphere$5, _sphereHitAt ) === null ) return;
 
 			if ( _ray$2.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return;
 
@@ -11482,8 +11481,17 @@ class Mesh extends Object3D {
 
 		}
 
+		this._computeIntersections( raycaster, intersects );
+
+	}
+
+	_computeIntersections( raycaster, intersects ) {
+
 		let intersection;
 
+		const geometry = this.geometry;
+		const material = this.material;
+
 		const index = geometry.index;
 		const position = geometry.attributes.position;
 		const uv = geometry.attributes.uv;
@@ -12935,7 +12943,7 @@ class Plane {
 
 }
 
-const _sphere$3 = /*@__PURE__*/ new Sphere();
+const _sphere$4 = /*@__PURE__*/ new Sphere();
 const _vector$6 = /*@__PURE__*/ new Vector3();
 
 class Frustum {
@@ -13001,7 +13009,7 @@ class Frustum {
 
 			if ( object.boundingSphere === null ) object.computeBoundingSphere();
 
-			_sphere$3.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
+			_sphere$4.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 		} else {
 
@@ -13009,21 +13017,21 @@ class Frustum {
 
 			if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-			_sphere$3.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
+			_sphere$4.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 		}
 
-		return this.intersectsSphere( _sphere$3 );
+		return this.intersectsSphere( _sphere$4 );
 
 	}
 
 	intersectsSprite( sprite ) {
 
-		_sphere$3.center.set( 0, 0, 0 );
-		_sphere$3.radius = 0.7071067811865476;
-		_sphere$3.applyMatrix4( sprite.matrixWorld );
+		_sphere$4.center.set( 0, 0, 0 );
+		_sphere$4.radius = 0.7071067811865476;
+		_sphere$4.applyMatrix4( sprite.matrixWorld );
 
-		return this.intersectsSphere( _sphere$3 );
+		return this.intersectsSphere( _sphere$4 );
 
 	}
 
@@ -14450,25 +14458,38 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
 
 		}
 
-		// Ignore background in AR
-		// TODO: Reconsider this.
+		if ( background === null ) {
+
+			setClear( clearColor, clearAlpha );
+
+		} else if ( background && background.isColor ) {
+
+			setClear( background, 1 );
+			forceClear = true;
+
+		}
 
 		const xr = renderer.xr;
-		const session = xr.getSession && xr.getSession();
+		const session = xr.getSession();
 
-		if ( session && session.environmentBlendMode === 'additive' ) {
+		if ( session !== null ) {
 
-			background = null;
+			switch ( session.environmentBlendMode ) {
 
-		}
+				case 'additive':
 
-		if ( background === null ) {
+					state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );
 
-			setClear( clearColor, clearAlpha );
+					break;
 
-		} else if ( background && background.isColor ) {
+				case 'alpha-blend':
+
+					state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );
+
+					break;
+
+			}
 
-			setClear( background, 1 );
 			forceClear = true;
 
 		}
@@ -25807,6 +25828,7 @@ class WebXRManager extends EventDispatcher {
 		const scope = this;
 
 		let session = null;
+
 		let framebufferScaleFactor = 1.0;
 
 		let referenceSpace = null;
@@ -26056,7 +26078,7 @@ class WebXRManager extends EventDispatcher {
 
 					const layerInit = {
 						antialias: ( session.renderState.layers === undefined ) ? attributes.antialias : true,
-						alpha: attributes.alpha,
+						alpha: true,
 						depth: attributes.depth,
 						stencil: attributes.stencil,
 						framebufferScaleFactor: framebufferScaleFactor
@@ -30886,6 +30908,8 @@ const _vector3 = /*@__PURE__*/ new Vector3();
 const _matrix4 = /*@__PURE__*/ new Matrix4();
 const _vertex = /*@__PURE__*/ new Vector3();
 
+const _sphere$3 = /*@__PURE__*/ new Sphere();
+
 class SkinnedMesh extends Mesh {
 
 	constructor( geometry, material ) {
@@ -30967,6 +30991,29 @@ class SkinnedMesh extends Mesh {
 
 	}
 
+	raycast( raycaster, intersects ) {
+
+		if ( this.boundingSphere === null ) this.computeBoundingSphere();
+
+		_sphere$3.copy( this.boundingSphere );
+		_sphere$3.applyMatrix4( this.matrixWorld );
+
+		if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;
+
+		this._computeIntersections( raycaster, intersects );
+
+	}
+
+	getVertexPosition( index, target ) {
+
+		super.getVertexPosition( index, target );
+
+		this.applyBoneTransform( index, target );
+
+		return target;
+
+	}
+
 	bind( skeleton, bindMatrix ) {
 
 		this.skeleton = skeleton;
@@ -44610,25 +44657,31 @@ class AudioLoader extends Loader {
 
 					onLoad( audioBuffer );
 
-				} );
+				}, handleError );
 
 			} catch ( e ) {
 
-				if ( onError ) {
+				handleError( e );
 
-					onError( e );
+			}
 
-				} else {
+		}, onProgress, onError );
 
-					console.error( e );
+		function handleError( e ) {
 
-				}
+			if ( onError ) {
 
-				scope.manager.itemError( url );
+				onError( e );
+
+			} else {
+
+				console.error( e );
 
 			}
 
-		}, onProgress, onError );
+			scope.manager.itemError( url );
+
+		}
 
 	}
 

+ 93 - 40
build/three.js

@@ -2915,6 +2915,9 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			this.height = source.height;
 			this.depth = source.depth;
 
+			this.scissor.copy( source.scissor );
+			this.scissorTest = source.scissorTest;
+
 			this.viewport.copy( source.viewport );
 
 			this.texture = source.texture.clone();
@@ -3090,8 +3093,10 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			this.height = source.height;
 			this.depth = source.depth;
 
-			this.viewport.set( 0, 0, this.width, this.height );
-			this.scissor.set( 0, 0, this.width, this.height );
+			this.scissor.copy( source.scissor );
+			this.scissorTest = source.scissorTest;
+
+			this.viewport.copy( source.viewport );
 
 			this.depthBuffer = source.depthBuffer;
 			this.stencilBuffer = source.stencilBuffer;
@@ -11307,7 +11312,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 	const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();
 	const _ray$2 = /*@__PURE__*/ new Ray();
-	const _sphere$4 = /*@__PURE__*/ new Sphere();
+	const _sphere$5 = /*@__PURE__*/ new Sphere();
 	const _sphereHitAt = /*@__PURE__*/ new Vector3();
 
 	const _vA$1 = /*@__PURE__*/ new Vector3();
@@ -11439,12 +11444,6 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
-			if ( this.isSkinnedMesh ) {
-
-				this.applyBoneTransform( index, target );
-
-			}
-
 			return target;
 
 		}
@@ -11461,14 +11460,14 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-			_sphere$4.copy( geometry.boundingSphere );
-			_sphere$4.applyMatrix4( matrixWorld );
+			_sphere$5.copy( geometry.boundingSphere );
+			_sphere$5.applyMatrix4( matrixWorld );
 
 			_ray$2.copy( raycaster.ray ).recast( raycaster.near );
 
-			if ( _sphere$4.containsPoint( _ray$2.origin ) === false ) {
+			if ( _sphere$5.containsPoint( _ray$2.origin ) === false ) {
 
-				if ( _ray$2.intersectSphere( _sphere$4, _sphereHitAt ) === null ) return;
+				if ( _ray$2.intersectSphere( _sphere$5, _sphereHitAt ) === null ) return;
 
 				if ( _ray$2.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return;
 
@@ -11487,8 +11486,17 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
+			this._computeIntersections( raycaster, intersects );
+
+		}
+
+		_computeIntersections( raycaster, intersects ) {
+
 			let intersection;
 
+			const geometry = this.geometry;
+			const material = this.material;
+
 			const index = geometry.index;
 			const position = geometry.attributes.position;
 			const uv = geometry.attributes.uv;
@@ -12940,7 +12948,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 	}
 
-	const _sphere$3 = /*@__PURE__*/ new Sphere();
+	const _sphere$4 = /*@__PURE__*/ new Sphere();
 	const _vector$6 = /*@__PURE__*/ new Vector3();
 
 	class Frustum {
@@ -13006,7 +13014,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 				if ( object.boundingSphere === null ) object.computeBoundingSphere();
 
-				_sphere$3.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
+				_sphere$4.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 			} else {
 
@@ -13014,21 +13022,21 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 				if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-				_sphere$3.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
+				_sphere$4.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 			}
 
-			return this.intersectsSphere( _sphere$3 );
+			return this.intersectsSphere( _sphere$4 );
 
 		}
 
 		intersectsSprite( sprite ) {
 
-			_sphere$3.center.set( 0, 0, 0 );
-			_sphere$3.radius = 0.7071067811865476;
-			_sphere$3.applyMatrix4( sprite.matrixWorld );
+			_sphere$4.center.set( 0, 0, 0 );
+			_sphere$4.radius = 0.7071067811865476;
+			_sphere$4.applyMatrix4( sprite.matrixWorld );
 
-			return this.intersectsSphere( _sphere$3 );
+			return this.intersectsSphere( _sphere$4 );
 
 		}
 
@@ -14455,25 +14463,38 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
-			// Ignore background in AR
-			// TODO: Reconsider this.
+			if ( background === null ) {
+
+				setClear( clearColor, clearAlpha );
+
+			} else if ( background && background.isColor ) {
+
+				setClear( background, 1 );
+				forceClear = true;
+
+			}
 
 			const xr = renderer.xr;
-			const session = xr.getSession && xr.getSession();
+			const session = xr.getSession();
 
-			if ( session && session.environmentBlendMode === 'additive' ) {
+			if ( session !== null ) {
 
-				background = null;
+				switch ( session.environmentBlendMode ) {
 
-			}
+					case 'additive':
 
-			if ( background === null ) {
+						state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );
 
-				setClear( clearColor, clearAlpha );
+						break;
 
-			} else if ( background && background.isColor ) {
+					case 'alpha-blend':
+
+						state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );
+
+						break;
+
+				}
 
-				setClear( background, 1 );
 				forceClear = true;
 
 			}
@@ -25812,6 +25833,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			const scope = this;
 
 			let session = null;
+
 			let framebufferScaleFactor = 1.0;
 
 			let referenceSpace = null;
@@ -26061,7 +26083,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 						const layerInit = {
 							antialias: ( session.renderState.layers === undefined ) ? attributes.antialias : true,
-							alpha: attributes.alpha,
+							alpha: true,
 							depth: attributes.depth,
 							stencil: attributes.stencil,
 							framebufferScaleFactor: framebufferScaleFactor
@@ -30891,6 +30913,8 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 	const _matrix4 = /*@__PURE__*/ new Matrix4();
 	const _vertex = /*@__PURE__*/ new Vector3();
 
+	const _sphere$3 = /*@__PURE__*/ new Sphere();
+
 	class SkinnedMesh extends Mesh {
 
 		constructor( geometry, material ) {
@@ -30972,6 +30996,29 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		raycast( raycaster, intersects ) {
+
+			if ( this.boundingSphere === null ) this.computeBoundingSphere();
+
+			_sphere$3.copy( this.boundingSphere );
+			_sphere$3.applyMatrix4( this.matrixWorld );
+
+			if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;
+
+			this._computeIntersections( raycaster, intersects );
+
+		}
+
+		getVertexPosition( index, target ) {
+
+			super.getVertexPosition( index, target );
+
+			this.applyBoneTransform( index, target );
+
+			return target;
+
+		}
+
 		bind( skeleton, bindMatrix ) {
 
 			this.skeleton = skeleton;
@@ -44615,25 +44662,31 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 						onLoad( audioBuffer );
 
-					} );
+					}, handleError );
 
 				} catch ( e ) {
 
-					if ( onError ) {
+					handleError( e );
 
-						onError( e );
+				}
 
-					} else {
+			}, onProgress, onError );
 
-						console.error( e );
+			function handleError( e ) {
 
-					}
+				if ( onError ) {
 
-					scope.manager.itemError( url );
+					onError( e );
+
+				} else {
+
+					console.error( e );
 
 				}
 
-			}, onProgress, onError );
+				scope.manager.itemError( url );
+
+			}
 
 		}
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.min.js


+ 93 - 40
build/three.module.js

@@ -2908,6 +2908,9 @@ class WebGLRenderTarget extends EventDispatcher {
 		this.height = source.height;
 		this.depth = source.depth;
 
+		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
 		this.viewport.copy( source.viewport );
 
 		this.texture = source.texture.clone();
@@ -3083,8 +3086,10 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 		this.height = source.height;
 		this.depth = source.depth;
 
-		this.viewport.set( 0, 0, this.width, this.height );
-		this.scissor.set( 0, 0, this.width, this.height );
+		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
+		this.viewport.copy( source.viewport );
 
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
@@ -11300,7 +11305,7 @@ class BufferGeometry extends EventDispatcher {
 
 const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();
 const _ray$2 = /*@__PURE__*/ new Ray();
-const _sphere$4 = /*@__PURE__*/ new Sphere();
+const _sphere$5 = /*@__PURE__*/ new Sphere();
 const _sphereHitAt = /*@__PURE__*/ new Vector3();
 
 const _vA$1 = /*@__PURE__*/ new Vector3();
@@ -11432,12 +11437,6 @@ class Mesh extends Object3D {
 
 		}
 
-		if ( this.isSkinnedMesh ) {
-
-			this.applyBoneTransform( index, target );
-
-		}
-
 		return target;
 
 	}
@@ -11454,14 +11453,14 @@ class Mesh extends Object3D {
 
 		if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-		_sphere$4.copy( geometry.boundingSphere );
-		_sphere$4.applyMatrix4( matrixWorld );
+		_sphere$5.copy( geometry.boundingSphere );
+		_sphere$5.applyMatrix4( matrixWorld );
 
 		_ray$2.copy( raycaster.ray ).recast( raycaster.near );
 
-		if ( _sphere$4.containsPoint( _ray$2.origin ) === false ) {
+		if ( _sphere$5.containsPoint( _ray$2.origin ) === false ) {
 
-			if ( _ray$2.intersectSphere( _sphere$4, _sphereHitAt ) === null ) return;
+			if ( _ray$2.intersectSphere( _sphere$5, _sphereHitAt ) === null ) return;
 
 			if ( _ray$2.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return;
 
@@ -11480,8 +11479,17 @@ class Mesh extends Object3D {
 
 		}
 
+		this._computeIntersections( raycaster, intersects );
+
+	}
+
+	_computeIntersections( raycaster, intersects ) {
+
 		let intersection;
 
+		const geometry = this.geometry;
+		const material = this.material;
+
 		const index = geometry.index;
 		const position = geometry.attributes.position;
 		const uv = geometry.attributes.uv;
@@ -12933,7 +12941,7 @@ class Plane {
 
 }
 
-const _sphere$3 = /*@__PURE__*/ new Sphere();
+const _sphere$4 = /*@__PURE__*/ new Sphere();
 const _vector$6 = /*@__PURE__*/ new Vector3();
 
 class Frustum {
@@ -12999,7 +13007,7 @@ class Frustum {
 
 			if ( object.boundingSphere === null ) object.computeBoundingSphere();
 
-			_sphere$3.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
+			_sphere$4.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 		} else {
 
@@ -13007,21 +13015,21 @@ class Frustum {
 
 			if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();
 
-			_sphere$3.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
+			_sphere$4.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );
 
 		}
 
-		return this.intersectsSphere( _sphere$3 );
+		return this.intersectsSphere( _sphere$4 );
 
 	}
 
 	intersectsSprite( sprite ) {
 
-		_sphere$3.center.set( 0, 0, 0 );
-		_sphere$3.radius = 0.7071067811865476;
-		_sphere$3.applyMatrix4( sprite.matrixWorld );
+		_sphere$4.center.set( 0, 0, 0 );
+		_sphere$4.radius = 0.7071067811865476;
+		_sphere$4.applyMatrix4( sprite.matrixWorld );
 
-		return this.intersectsSphere( _sphere$3 );
+		return this.intersectsSphere( _sphere$4 );
 
 	}
 
@@ -14448,25 +14456,38 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
 
 		}
 
-		// Ignore background in AR
-		// TODO: Reconsider this.
+		if ( background === null ) {
+
+			setClear( clearColor, clearAlpha );
+
+		} else if ( background && background.isColor ) {
+
+			setClear( background, 1 );
+			forceClear = true;
+
+		}
 
 		const xr = renderer.xr;
-		const session = xr.getSession && xr.getSession();
+		const session = xr.getSession();
 
-		if ( session && session.environmentBlendMode === 'additive' ) {
+		if ( session !== null ) {
 
-			background = null;
+			switch ( session.environmentBlendMode ) {
 
-		}
+				case 'additive':
 
-		if ( background === null ) {
+					state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha );
 
-			setClear( clearColor, clearAlpha );
+					break;
 
-		} else if ( background && background.isColor ) {
+				case 'alpha-blend':
+
+					state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha );
+
+					break;
+
+			}
 
-			setClear( background, 1 );
 			forceClear = true;
 
 		}
@@ -25805,6 +25826,7 @@ class WebXRManager extends EventDispatcher {
 		const scope = this;
 
 		let session = null;
+
 		let framebufferScaleFactor = 1.0;
 
 		let referenceSpace = null;
@@ -26054,7 +26076,7 @@ class WebXRManager extends EventDispatcher {
 
 					const layerInit = {
 						antialias: ( session.renderState.layers === undefined ) ? attributes.antialias : true,
-						alpha: attributes.alpha,
+						alpha: true,
 						depth: attributes.depth,
 						stencil: attributes.stencil,
 						framebufferScaleFactor: framebufferScaleFactor
@@ -30884,6 +30906,8 @@ const _vector3 = /*@__PURE__*/ new Vector3();
 const _matrix4 = /*@__PURE__*/ new Matrix4();
 const _vertex = /*@__PURE__*/ new Vector3();
 
+const _sphere$3 = /*@__PURE__*/ new Sphere();
+
 class SkinnedMesh extends Mesh {
 
 	constructor( geometry, material ) {
@@ -30965,6 +30989,29 @@ class SkinnedMesh extends Mesh {
 
 	}
 
+	raycast( raycaster, intersects ) {
+
+		if ( this.boundingSphere === null ) this.computeBoundingSphere();
+
+		_sphere$3.copy( this.boundingSphere );
+		_sphere$3.applyMatrix4( this.matrixWorld );
+
+		if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;
+
+		this._computeIntersections( raycaster, intersects );
+
+	}
+
+	getVertexPosition( index, target ) {
+
+		super.getVertexPosition( index, target );
+
+		this.applyBoneTransform( index, target );
+
+		return target;
+
+	}
+
 	bind( skeleton, bindMatrix ) {
 
 		this.skeleton = skeleton;
@@ -44608,25 +44655,31 @@ class AudioLoader extends Loader {
 
 					onLoad( audioBuffer );
 
-				} );
+				}, handleError );
 
 			} catch ( e ) {
 
-				if ( onError ) {
+				handleError( e );
 
-					onError( e );
+			}
 
-				} else {
+		}, onProgress, onError );
 
-					console.error( e );
+		function handleError( e ) {
 
-				}
+			if ( onError ) {
 
-				scope.manager.itemError( url );
+				onError( e );
+
+			} else {
+
+				console.error( e );
 
 			}
 
-		}, onProgress, onError );
+			scope.manager.itemError( url );
+
+		}
 
 	}
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
build/three.module.min.js


Некоторые файлы не были показаны из-за большого количества измененных файлов