diff --git a/README.md b/README.md index 5eee708f314e5c..90ee2ef89ea739 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@ three.js ======== -[![NPM package][npm]][npm-url] +[![NPM Package][npm]][npm-url] [![Build Size][build-size]][build-size-url] -[![Build Status][build-status]][build-status-url] -[![Dependencies][dependencies]][dependencies-url] +[![NPM Downloads][npm-downloads]][npmtrends-url] [![Dev Dependencies][dev-dependencies]][dev-dependencies-url] [![Language Grade][lgtm]][lgtm-url] @@ -18,7 +17,6 @@ The aim of the project is to create an easy to use, lightweight, 3D library with [Migrating](https://github.com/mrdoob/three.js/wiki/Migration-Guide) — [Questions](http://stackoverflow.com/questions/tagged/three.js) — [Forum](https://discourse.threejs.org/) — -[Gitter](https://gitter.im/mrdoob/three.js) — [Slack](https://join.slack.com/t/threejs/shared_invite/enQtMzYxMzczODM2OTgxLTQ1YmY4YTQxOTFjNDAzYmQ4NjU2YzRhNzliY2RiNDEyYjU2MjhhODgyYWQ5Y2MyZTU3MWNkOGVmOGRhOTQzYTk) ### Usage ### @@ -72,15 +70,13 @@ If everything went well you should see [this](https://jsfiddle.net/f2Lommf5/). [Releases](https://github.com/mrdoob/three.js/releases) -[npm]: https://img.shields.io/npm/v/three.svg +[npm]: https://img.shields.io/npm/v/three [npm-url]: https://www.npmjs.com/package/three [build-size]: https://badgen.net/bundlephobia/minzip/three [build-size-url]: https://bundlephobia.com/result?p=three -[build-status]: https://travis-ci.org/mrdoob/three.js.svg?branch=dev -[build-status-url]: https://travis-ci.org/mrdoob/three.js -[dependencies]: https://img.shields.io/david/mrdoob/three.js.svg -[dependencies-url]: https://david-dm.org/mrdoob/three.js -[dev-dependencies]: https://img.shields.io/david/dev/mrdoob/three.js.svg +[npm-downloads]: https://img.shields.io/npm/dw/three +[npmtrends-url]: https://www.npmtrends.com/three +[dev-dependencies]: https://img.shields.io/david/dev/mrdoob/three.js [dev-dependencies-url]: https://david-dm.org/mrdoob/three.js#info=devDependencies -[lgtm]: https://img.shields.io/lgtm/grade/javascript/g/mrdoob/three.js.svg?label=code%20quality +[lgtm]: https://img.shields.io/lgtm/alerts/github/mrdoob/three.js [lgtm-url]: https://lgtm.com/projects/g/mrdoob/three.js/ diff --git a/build/three.js b/build/three.js index 399274e08e97ad..b0bfb586313551 100644 --- a/build/three.js +++ b/build/three.js @@ -6400,8 +6400,7 @@ _box.copy( geometry.boundingBox ); _box.applyMatrix4( object.matrixWorld ); - this.expandByPoint( _box.min ); - this.expandByPoint( _box.max ); + this.union( _box ); } @@ -17968,8 +17967,6 @@ var prefixVertex, prefixFragment; - var numMultiviewViews = parameters.numMultiviewViews; - if ( parameters.isRawShaderMaterial ) { prefixVertex = [ @@ -18267,59 +18264,6 @@ '#define textureCubeGradEXT textureGrad' ].join( '\n' ) + '\n' + prefixFragment; - // Multiview - - if ( numMultiviewViews > 0 ) { - - prefixVertex = prefixVertex.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - 'layout(num_views = ' + numMultiviewViews + ') in;', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixVertex = prefixVertex.replace( - [ - 'uniform mat4 modelViewMatrix;', - 'uniform mat4 projectionMatrix;', - 'uniform mat4 viewMatrix;', - 'uniform mat3 normalMatrix;' - ].join( '\n' ), - [ - 'uniform mat4 modelViewMatrices[' + numMultiviewViews + '];', - 'uniform mat4 projectionMatrices[' + numMultiviewViews + '];', - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - 'uniform mat3 normalMatrices[' + numMultiviewViews + '];', - - '#define modelViewMatrix modelViewMatrices[VIEW_ID]', - '#define projectionMatrix projectionMatrices[VIEW_ID]', - '#define viewMatrix viewMatrices[VIEW_ID]', - '#define normalMatrix normalMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - 'uniform mat4 viewMatrix;', - [ - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - '#define viewMatrix viewMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - } - } var vertexGlsl = prefixVertex + vertexShader; @@ -18464,7 +18408,6 @@ this.program = program; this.vertexShader = glVertexShader; this.fragmentShader = glFragmentShader; - this.numMultiviewViews = numMultiviewViews; return this; @@ -18504,7 +18447,7 @@ }; var parameterNames = [ - "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "numMultiviewViews", + "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding", "envMapCubeUV", "lightMap", "lightMapEncoding", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "tangentSpaceNormalMap", "clearcoatNormalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", @@ -18638,7 +18581,6 @@ material.onBeforeCompile( shaderobject, renderer ); var currentRenderTarget = renderer.getRenderTarget(); - var numMultiviewViews = currentRenderTarget && currentRenderTarget.isWebGLMultiviewRenderTarget ? currentRenderTarget.numViews : 0; var parameters = { @@ -18660,7 +18602,6 @@ instancing: object.isInstancedMesh === true, supportsVertexTextures: vertexTextures, - numMultiviewViews: numMultiviewViews, outputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding, map: !! material.map, mapEncoding: getTextureEncodingFromMap( material.map ), @@ -21603,21 +21544,6 @@ } - if ( renderTarget.isWebGLMultiviewRenderTarget ) { - - _gl.deleteTexture( renderTargetProperties.__webglColorTexture ); - _gl.deleteTexture( renderTargetProperties.__webglDepthStencilTexture ); - - info.memory.textures -= 2; - - for ( var i = 0, il = renderTargetProperties.__webglViewFramebuffers.length; i < il; i ++ ) { - - _gl.deleteFramebuffer( renderTargetProperties.__webglViewFramebuffers[ i ] ); - - } - - } - properties.remove( renderTarget.texture ); properties.remove( renderTarget ); @@ -22315,7 +22241,6 @@ var isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); var isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true ); - var isMultiview = ( renderTarget.isWebGLMultiviewRenderTarget === true ); var supportsMips = isPowerOfTwo( renderTarget ) || isWebGL2; // Setup framebuffer @@ -22369,48 +22294,6 @@ } - } else if ( isMultiview ) { - - var width = renderTarget.width; - var height = renderTarget.height; - var numViews = renderTarget.numViews; - - _gl.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer ); - - var ext = extensions.get( 'OVR_multiview2' ); - - info.memory.textures += 2; - - var colorTexture = _gl.createTexture(); - _gl.bindTexture( 35866, colorTexture ); - _gl.texParameteri( 35866, 10240, 9728 ); - _gl.texParameteri( 35866, 10241, 9728 ); - _gl.texImage3D( 35866, 0, 32856, width, height, numViews, 0, 6408, 5121, null ); - ext.framebufferTextureMultiviewOVR( 36160, 36064, colorTexture, 0, 0, numViews ); - - var depthStencilTexture = _gl.createTexture(); - _gl.bindTexture( 35866, depthStencilTexture ); - _gl.texParameteri( 35866, 10240, 9728 ); - _gl.texParameteri( 35866, 10241, 9728 ); - _gl.texImage3D( 35866, 0, 35056, width, height, numViews, 0, 34041, 34042, null ); - ext.framebufferTextureMultiviewOVR( 36160, 33306, depthStencilTexture, 0, 0, numViews ); - - var viewFramebuffers = new Array( numViews ); - for ( var i = 0; i < numViews; ++ i ) { - - viewFramebuffers[ i ] = _gl.createFramebuffer(); - _gl.bindFramebuffer( 36160, viewFramebuffers[ i ] ); - _gl.framebufferTextureLayer( 36160, 36064, colorTexture, 0, i ); - - } - - renderTargetProperties.__webglColorTexture = colorTexture; - renderTargetProperties.__webglDepthStencilTexture = depthStencilTexture; - renderTargetProperties.__webglViewFramebuffers = viewFramebuffers; - - _gl.bindFramebuffer( 36160, null ); - _gl.bindTexture( 35866, null ); - } } @@ -22436,7 +22319,7 @@ state.bindTexture( 34067, null ); - } else if ( ! isMultiview ) { + } else { state.bindTexture( 3553, textureProperties.__webglTexture ); setTextureParameters( 3553, renderTarget.texture, supportsMips ); @@ -22783,271 +22666,6 @@ } - /** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - - function WebGLMultiviewRenderTarget( width, height, numViews, options ) { - - WebGLRenderTarget.call( this, width, height, options ); - - this.depthBuffer = false; - this.stencilBuffer = false; - - this.numViews = numViews; - - } - - WebGLMultiviewRenderTarget.prototype = Object.assign( Object.create( WebGLRenderTarget.prototype ), { - - constructor: WebGLMultiviewRenderTarget, - - isWebGLMultiviewRenderTarget: true, - - copy: function ( source ) { - - WebGLRenderTarget.prototype.copy.call( this, source ); - - this.numViews = source.numViews; - - return this; - - }, - - setNumViews: function ( numViews ) { - - if ( this.numViews !== numViews ) { - - this.numViews = numViews; - this.dispose(); - - } - - return this; - - } - - } ); - - /** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - - function WebGLMultiview( renderer, gl ) { - - var DEFAULT_NUMVIEWS = 2; - - var extensions = renderer.extensions; - var properties = renderer.properties; - - var renderTarget, currentRenderTarget; - var mat3, mat4, cameraArray, renderSize; - - var available; - var maxNumViews = 0; - - // - - function isAvailable() { - - if ( available === undefined ) { - - var extension = extensions.get( 'OVR_multiview2' ); - - available = extension !== null && gl.getContextAttributes().antialias === false; - - if ( available ) { - - maxNumViews = gl.getParameter( extension.MAX_VIEWS_OVR ); - renderTarget = new WebGLMultiviewRenderTarget( 0, 0, DEFAULT_NUMVIEWS ); - - renderSize = new Vector2(); - mat4 = []; - mat3 = []; - cameraArray = []; - - for ( var i = 0; i < maxNumViews; i ++ ) { - - mat4[ i ] = new Matrix4(); - mat3[ i ] = new Matrix3(); - - } - - } - - } - - return available; - - } - - function getCameraArray( camera ) { - - if ( camera.isArrayCamera ) { return camera.cameras; } - - cameraArray[ 0 ] = camera; - - return cameraArray; - - } - - function updateCameraProjectionMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].projectionMatrix ); - - } - - uniforms.setValue( gl, 'projectionMatrices', mat4 ); - - } - - function updateCameraViewMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].matrixWorldInverse ); - - } - - uniforms.setValue( gl, 'viewMatrices', mat4 ); - - } - - function updateObjectMatricesUniforms( object, camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].multiplyMatrices( cameras[ i ].matrixWorldInverse, object.matrixWorld ); - mat3[ i ].getNormalMatrix( mat4[ i ] ); - - } - - uniforms.setValue( gl, 'modelViewMatrices', mat4 ); - uniforms.setValue( gl, 'normalMatrices', mat3 ); - - } - - function isMultiviewCompatible( camera ) { - - if ( camera.isArrayCamera === undefined ) { return true; } - - var cameras = camera.cameras; - - if ( cameras.length > maxNumViews ) { return false; } - - for ( var i = 1, il = cameras.length; i < il; i ++ ) { - - if ( cameras[ 0 ].viewport.z !== cameras[ i ].viewport.z || - cameras[ 0 ].viewport.w !== cameras[ i ].viewport.w ) { return false; } - - } - - return true; - - } - - function resizeRenderTarget( camera ) { - - if ( currentRenderTarget ) { - - renderSize.set( currentRenderTarget.width, currentRenderTarget.height ); - - } else { - - renderer.getDrawingBufferSize( renderSize ); - - } - - if ( camera.isArrayCamera ) { - - var viewport = camera.cameras[ 0 ].viewport; - - renderTarget.setSize( viewport.z, viewport.w ); - renderTarget.setNumViews( camera.cameras.length ); - - } else { - - renderTarget.setSize( renderSize.x, renderSize.y ); - renderTarget.setNumViews( DEFAULT_NUMVIEWS ); - - } - - } - - function attachCamera( camera ) { - - if ( isMultiviewCompatible( camera ) === false ) { return; } - - currentRenderTarget = renderer.getRenderTarget(); - resizeRenderTarget( camera ); - renderer.setRenderTarget( renderTarget ); - - } - - function detachCamera( camera ) { - - if ( renderTarget !== renderer.getRenderTarget() ) { return; } - - renderer.setRenderTarget( currentRenderTarget ); - - flush( camera ); - - } - - function flush( camera ) { - - var srcRenderTarget = renderTarget; - var numViews = srcRenderTarget.numViews; - - var srcFramebuffers = properties.get( srcRenderTarget ).__webglViewFramebuffers; - - var viewWidth = srcRenderTarget.width; - var viewHeight = srcRenderTarget.height; - - if ( camera.isArrayCamera ) { - - for ( var i = 0; i < numViews; i ++ ) { - - var viewport = camera.cameras[ i ].viewport; - - var x1 = viewport.x; - var y1 = viewport.y; - var x2 = x1 + viewport.z; - var y2 = y1 + viewport.w; - - gl.bindFramebuffer( 36008, srcFramebuffers[ i ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, x1, y1, x2, y2, 16384, 9728 ); - - } - - } else { - - gl.bindFramebuffer( 36008, srcFramebuffers[ 0 ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, 0, 0, renderSize.x, renderSize.y, 16384, 9728 ); - - } - - } - - this.isAvailable = isAvailable; - this.attachCamera = attachCamera; - this.detachCamera = detachCamera; - this.updateCameraProjectionMatricesUniform = updateCameraProjectionMatricesUniform; - this.updateCameraViewMatricesUniform = updateCameraViewMatricesUniform; - this.updateObjectMatricesUniforms = updateObjectMatricesUniforms; - - } - /** * @author mrdoob / http://mrdoob.com/ */ @@ -23891,10 +23509,6 @@ this.xr = xr; - // Multiview - - var multiview = new WebGLMultiview( _this, _gl ); - // shadow map var shadowMap = new WebGLShadowMap( _this, objects, capabilities.maxTextureSize ); @@ -24792,12 +24406,6 @@ } - if ( xr.enabled && multiview.isAvailable() ) { - - multiview.attachCamera( camera ); - - } - // background.render( currentRenderList, scene, camera, forceClear ); @@ -24852,16 +24460,6 @@ state.setPolygonOffset( false ); - if ( xr.enabled ) { - - if ( multiview.isAvailable() ) { - - multiview.detachCamera( camera ); - - } - - } - // _gl.finish(); currentRenderList = null; @@ -25009,27 +24607,19 @@ _currentArrayCamera = camera; - if ( xr.enabled && multiview.isAvailable() ) { - - renderObject( object, scene, camera, geometry, material, group ); - - } else { + var cameras = camera.cameras; - var cameras = camera.cameras; + for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { - for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { + var camera2 = cameras[ j ]; - var camera2 = cameras[ j ]; + if ( object.layers.test( camera2.layers ) ) { - if ( object.layers.test( camera2.layers ) ) { + state.viewport( _currentViewport.copy( camera2.viewport ) ); - state.viewport( _currentViewport.copy( camera2.viewport ) ); + currentRenderState.setupLights( camera2 ); - currentRenderState.setupLights( camera2 ); - - renderObject( object, scene, camera2, geometry, material, group ); - - } + renderObject( object, scene, camera2, geometry, material, group ); } @@ -25311,15 +24901,7 @@ if ( refreshProgram || _currentCamera !== camera ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraProjectionMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); - - } + p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); if ( capabilities.logarithmicDepthBuffer ) { @@ -25380,15 +24962,7 @@ material.isShaderMaterial || material.skinning ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraViewMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); - - } + p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); } @@ -25593,17 +25167,8 @@ // common matrices - if ( program.numMultiviewViews > 0 ) { - - multiview.updateObjectMatricesUniforms( object, camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); - p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); - - } - + p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); + p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); return program; @@ -50193,19 +49758,19 @@ createMultiMaterialObject: function ( /* geometry, materials */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, detach: function ( /* child, parent, scene */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, attach: function ( /* child, scene, parent */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); } @@ -50215,7 +49780,7 @@ function LensFlare() { - console.error( 'THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js' ); + console.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' ); } diff --git a/build/three.min.js b/build/three.min.js index 5a2e15b044f4ff..47bdfd9552b671 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,355 +1,346 @@ // threejs.org/license -(function(h,Fa){"object"===typeof exports&&"undefined"!==typeof module?Fa(exports):"function"===typeof define&&define.amd?define(["exports"],Fa):(h=h||self,Fa(h.THREE={}))})(this,function(h){function Fa(){}function v(a,b){this.x=a||0;this.y=b||0}function ya(){this.elements=[1,0,0,0,1,0,0,0,1];0k)return!1}return!0}function pb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Vb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Ta(a,b){this.normal=void 0!==a?a:new n(1, -0,0);this.constant=void 0!==b?b:0}function pa(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function A(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function bg(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function cg(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function dg(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Bc(a,b,c,d,e,f){this.a=a;this.b= -b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new A;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function K(){Object.defineProperty(this,"id",{value:qj++});this.uuid=L.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexColors=this.flatShading=!1;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha= +(function(h,Ea){"object"===typeof exports&&"undefined"!==typeof module?Ea(exports):"function"===typeof define&&define.amd?define(["exports"],Ea):(h=h||self,Ea(h.THREE={}))})(this,function(h){function Ea(){}function v(a,b){this.x=a||0;this.y=b||0}function wa(){this.elements=[1,0,0,0,1,0,0,0,1];0k)return!1}return!0}function pb(a,b){this.center=void 0!==a?a:new n;this.radius=void 0!==b?b:0}function Vb(a,b){this.origin=void 0!==a?a:new n;this.direction=void 0!==b?b:new n(0,0,-1)}function Ta(a,b){this.normal=void 0!==a?a:new n(1, +0,0);this.constant=void 0!==b?b:0}function oa(a,b,c){this.a=void 0!==a?a:new n;this.b=void 0!==b?b:new n;this.c=void 0!==c?c:new n}function z(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function ag(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function bg(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function cg(a){return.0031308>a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Bc(a,b,c,d,e,f){this.a=a;this.b= +b;this.c=c;this.normal=d&&d.isVector3?d:new n;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new z;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function K(){Object.defineProperty(this,"id",{value:pj++});this.uuid=L.generateUUID();this.name="";this.type="Material";this.fog=!0;this.blending=1;this.side=0;this.vertexColors=this.flatShading=!1;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha= this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.stencilWriteMask=255;this.stencilFunc=519;this.stencilRef=0;this.stencilFuncMask=255;this.stencilZPass=this.stencilZFail=this.stencilFail=7680;this.stencilWrite=!1;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.shadowSide=null;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha= -!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Oa(a){K.call(this);this.type="MeshBasicMaterial";this.color=new A(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphTargets=this.skinning=!1;this.setValues(a)} +!1;this.toneMapped=this.visible=!0;this.userData={};this.version=0}function Oa(a){K.call(this);this.type="MeshBasicMaterial";this.color=new z(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphTargets=this.skinning=!1;this.setValues(a)} function M(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="";this.array=a;this.itemSize=b;this.count=void 0!==a?a.length/b:0;this.normalized=!0===c;this.usage=35044;this.updateRange={offset:0,count:-1};this.version=0}function Bd(a,b,c){M.call(this,new Int8Array(a),b,c)}function Cd(a,b,c){M.call(this,new Uint8Array(a),b,c)}function Dd(a,b,c){M.call(this,new Uint8ClampedArray(a),b,c)}function Ed(a,b,c){M.call(this,new Int16Array(a), -b,c)}function Wb(a,b,c){M.call(this,new Uint16Array(a),b,c)}function Fd(a,b,c){M.call(this,new Int32Array(a),b,c)}function Xb(a,b,c){M.call(this,new Uint32Array(a),b,c)}function B(a,b,c){M.call(this,new Float32Array(a),b,c)}function Gd(a,b,c){M.call(this,new Float64Array(a),b,c)}function xh(){this.vertices=[];this.normals=[];this.colors=[];this.uvs=[];this.uvs2=[];this.groups=[];this.morphTargets={};this.skinWeights=[];this.skinIndices=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate= -this.uvsNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.verticesNeedUpdate=!1}function yh(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function D(){Object.defineProperty(this,"id",{value:rj+=2});this.uuid=L.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}; -this.userData={}}function T(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new D;this.material=void 0!==b?b:new Oa;this.updateMorphTargets()}function zh(a,b,c,d,e,f,g,k){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,k):d.intersectTriangle(e,f,g,2!==b.side,k)))return null;Je.copy(k);Je.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Je);return bc.far?null:{distance:b,point:Je.clone(),object:a}}function Ke(a,b,c,d,e,f,g,k,l,m,x,p){Yb.fromBufferAttribute(e,m);Zb.fromBufferAttribute(e, -x);$b.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Le.set(0,0,0);Me.set(0,0,0);Ne.set(0,0,0);for(var q=0,t=f.length;qb&&(b=a[c]);return b}function B(){Object.defineProperty(this,"id",{value:qj+=2});this.uuid=L.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.morphTargetsRelative=!1;this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}; +this.userData={}}function S(a,b){F.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new Oa;this.updateMorphTargets()}function yh(a,b,c,d,e,f,g,k){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,k):d.intersectTriangle(e,f,g,2!==b.side,k)))return null;Je.copy(k);Je.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(Je);return bc.far?null:{distance:b,point:Je.clone(),object:a}}function Ke(a,b,c,d,e,f,g,k,l,m,x,p){Yb.fromBufferAttribute(e,m);Zb.fromBufferAttribute(e, +x);$b.fromBufferAttribute(e,p);e=a.morphTargetInfluences;if(b.morphTargets&&f&&e){Le.set(0,0,0);Me.set(0,0,0);Ne.set(0,0,0);for(var r=0,t=f.length;rg;g++)a.setRenderTarget(f, -g),a.clear(b,c,d);a.setRenderTarget(e)}}function Db(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);wa.call(this,a,a,b)}function ac(a,b,c,d,e,f,g,k,l,m,x,p){V.call(this,null,f,g,k,l,m,d,e,x,p);this.image={data:a||null,width:b||1,height:c||1};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Hc(a,b, -c,d,e,f){this.planes=[void 0!==a?a:new Ta,void 0!==b?b:new Ta,void 0!==c?c:new Ta,void 0!==d?d:new Ta,void 0!==e?e:new Ta,void 0!==f?f:new Ta]}function Ah(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function tj(a,b){function c(b,c){var d=b.array,e=b.usage,f=a.createBuffer();a.bindBuffer(c,f);a.bufferData(c, +g),a.clear(b,c,d);a.setRenderTarget(e)}}function Db(a,b,c){Number.isInteger(b)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),b=c);Ha.call(this,a,a,b)}function ac(a,b,c,d,e,f,g,k,l,m,x,p){W.call(this,null,f,g,k,l,m,d,e,x,p);this.image={data:a||null,width:b||1,height:c||1};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1;this.needsUpdate=!0}function Hc(a,b, +c,d,e,f){this.planes=[void 0!==a?a:new Ta,void 0!==b?b:new Ta,void 0!==c?c:new Ta,void 0!==d?d:new Ta,void 0!==e?e:new Ta,void 0!==f?f:new Ta]}function zh(){function a(e,f){!1!==c&&(d(e,f),b.requestAnimationFrame(a))}var b=null,c=!1,d=null;return{start:function(){!0!==c&&null!==d&&(b.requestAnimationFrame(a),c=!0)},stop:function(){c=!1},setAnimationLoop:function(a){d=a},setContext:function(a){b=a}}}function sj(a,b){function c(b,c){var d=b.array,e=b.usage,f=a.createBuffer();a.bindBuffer(c,f);a.bufferData(c, d,e);b.onUploadCallback();c=5126;d instanceof Float32Array?c=5126:d instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):d instanceof Uint16Array?c=5123:d instanceof Int16Array?c=5122:d instanceof Uint32Array?c=5125:d instanceof Int32Array?c=5124:d instanceof Int8Array?c=5120:d instanceof Uint8Array&&(c=5121);return{buffer:f,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var d=b.isWebGL2,e=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&& (a=a.data);return e.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var c=e.get(b);c&&(a.deleteBuffer(c.buffer),e.delete(b))},update:function(b,g){b.isInterleavedBufferAttribute&&(b=b.data);var f=e.get(b);if(void 0===f)e.set(b,c(b,g));else if(f.versionm;m++){if(p=d[m])if(l=p[0],p=p[1]){x&&e.setAttribute("morphTarget"+m,x[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=p;k+=p;continue}c[m]=0}e=e.morphTargetsRelative?1: -1-k;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Ej(a,b,c,d){var e=new WeakMap;return{update:function(a){var f=d.render.frame,k=a.geometry,l=b.get(a,k);e.get(l)!==f&&(k.isGeometry&&l.updateFromObject(a),b.update(l),e.set(l,f));a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e=new WeakMap}}}function qb(a,b,c,d,e,f,g,k,l,m){a=void 0!==a?a:[];V.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g? -g:1022,k,l,m);this.flipY=!1}function Ic(a,b,c,d){V.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Jc(a,b,c,d){V.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Kc(a,b,c){var d=a[0];if(0>=d||0");return a.replace(jg,ig)}function Qh(a,b,c,d){a="";for(b=parseInt(b);bd;d++)c.probe.push(new n);var e=new n,f=new P,g=new P;return{setup:function(d,l,m){for(var k=0,p=0,h=0,t=0;9>t;t++)c.probe[t].set(0,0,0);var r=l=0,u=0,n=0,w=0,C=0,ba=0,Q=0;m=m.matrixWorldInverse;d.sort(Dk);t=0;for(var da=d.length;tJa;Ja++)c.probe[Ja].addScaledVector(z.sh.coefficients[Ja],ea);else if(z.isDirectionalLight){var G=a.get(z);G.color.copy(z.color).multiplyScalar(z.intensity);G.direction.setFromMatrixPosition(z.matrixWorld);e.setFromMatrixPosition(z.target.matrixWorld);G.direction.sub(e);G.direction.transformDirection(m);z.castShadow&&(ea=z.shadow,v=b.get(z),v.shadowBias=ea.bias,v.shadowRadius=ea.radius,v.shadowMapSize=ea.mapSize,c.directionalShadow[l]=v, -c.directionalShadowMap[l]=Ja,c.directionalShadowMatrix[l]=z.shadow.matrix,C++);c.directional[l]=G;l++}else z.isSpotLight?(G=a.get(z),G.position.setFromMatrixPosition(z.matrixWorld),G.position.applyMatrix4(m),G.color.copy(v).multiplyScalar(ea),G.distance=Da,G.direction.setFromMatrixPosition(z.matrixWorld),e.setFromMatrixPosition(z.target.matrixWorld),G.direction.sub(e),G.direction.transformDirection(m),G.coneCos=Math.cos(z.angle),G.penumbraCos=Math.cos(z.angle*(1-z.penumbra)),G.decay=z.decay,z.castShadow&& -(ea=z.shadow,v=b.get(z),v.shadowBias=ea.bias,v.shadowRadius=ea.radius,v.shadowMapSize=ea.mapSize,c.spotShadow[u]=v,c.spotShadowMap[u]=Ja,c.spotShadowMatrix[u]=z.shadow.matrix,Q++),c.spot[u]=G,u++):z.isRectAreaLight?(G=a.get(z),G.color.copy(v).multiplyScalar(ea),G.position.setFromMatrixPosition(z.matrixWorld),G.position.applyMatrix4(m),g.identity(),f.copy(z.matrixWorld),f.premultiply(m),g.extractRotation(f),G.halfWidth.set(.5*z.width,0,0),G.halfHeight.set(0,.5*z.height,0),G.halfWidth.applyMatrix4(g), -G.halfHeight.applyMatrix4(g),c.rectArea[n]=G,n++):z.isPointLight?(G=a.get(z),G.position.setFromMatrixPosition(z.matrixWorld),G.position.applyMatrix4(m),G.color.copy(z.color).multiplyScalar(z.intensity),G.distance=z.distance,G.decay=z.decay,z.castShadow&&(ea=z.shadow,v=b.get(z),v.shadowBias=ea.bias,v.shadowRadius=ea.radius,v.shadowMapSize=ea.mapSize,v.shadowCameraNear=ea.camera.near,v.shadowCameraFar=ea.camera.far,c.pointShadow[r]=v,c.pointShadowMap[r]=Ja,c.pointShadowMatrix[r]=z.shadow.matrix,ba++), -c.point[r]=G,r++):z.isHemisphereLight&&(G=a.get(z),G.direction.setFromMatrixPosition(z.matrixWorld),G.direction.transformDirection(m),G.direction.normalize(),G.skyColor.copy(z.color).multiplyScalar(ea),G.groundColor.copy(z.groundColor).multiplyScalar(ea),c.hemi[w]=G,w++)}c.ambient[0]=k;c.ambient[1]=p;c.ambient[2]=h;d=c.hash;if(d.directionalLength!==l||d.pointLength!==r||d.spotLength!==u||d.rectAreaLength!==n||d.hemiLength!==w||d.numDirectionalShadows!==C||d.numPointShadows!==ba||d.numSpotShadows!== -Q)c.directional.length=l,c.spot.length=u,c.rectArea.length=n,c.point.length=r,c.hemi.length=w,c.directionalShadow.length=C,c.directionalShadowMap.length=C,c.pointShadow.length=ba,c.pointShadowMap.length=ba,c.spotShadow.length=Q,c.spotShadowMap.length=Q,c.directionalShadowMatrix.length=C,c.pointShadowMatrix.length=ba,c.spotShadowMatrix.length=Q,d.directionalLength=l,d.pointLength=r,d.spotLength=u,d.rectAreaLength=n,d.hemiLength=w,d.numDirectionalShadows=C,d.numPointShadows=ba,d.numSpotShadows=Q,c.version= -Fk++},state:c}}function Vh(){var a=new Ek,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function Gk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){if(!1===b.has(c)){var e=new Vh;b.set(c,new WeakMap);b.get(c).set(d,e);c.addEventListener("dispose",a)}else!1===b.get(c).has(d)? -(e=new Vh,b.get(c).set(d,e)):e=b.get(c).get(d);return e},dispose:function(){b=new WeakMap}}}function Fb(a){K.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.fog=!1;this.setValues(a)}function Gb(a){K.call(this);this.type="MeshDistanceMaterial";this.referencePosition=new n;this.nearDistance=1;this.farDistance= -1E3;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(a)}function Wh(a,b,c){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=p[c];void 0===d&&(d=new Fb({depthPacking:3201,morphTargets:a,skinning:b}),p[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=h[c];void 0===d&&(d=new Gb({morphTargets:a,skinning:b}),h[c]=d);return d}function f(b,c,f,g,k,l){var m=b.geometry,p=d,x=b.customDepthMaterial; -!0===f.isPointLight&&(p=e,x=b.customDistanceMaterial);void 0===x?(x=!1,!0===c.morphTargets&&(!0===m.isBufferGeometry?x=m.morphAttributes&&m.morphAttributes.position&&0\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}), -n=u.clone();n.defines.HORIZONAL_PASS=1;var w=new D;w.setAttribute("position",new M(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var C=new T(w,u),ba=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==ba.enabled&&(!1!==ba.autoUpdate||!1!==ba.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),h=a.getActiveCubeFace(),r=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1); -for(var t=0,w=d.length;tc||l.y>c)console.warn("THREE.WebGLShadowMap:",y,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/v.x),l.x=m.x*v.x,z.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/v.y),l.y=m.y*v.y,z.mapSize.y=m.y);null!==z.map||z.isPointLightShadow||3!==this.type||(v={minFilter:1006,magFilter:1006, -format:1023},z.map=new wa(l.x,l.y,v),z.map.texture.name=y.name+".shadowMap",z.mapPass=new wa(l.x,l.y,v),z.camera.updateProjectionMatrix());null===z.map&&(v={minFilter:1003,magFilter:1003,format:1023},z.map=new wa(l.x,l.y,v),z.map.texture.name=y.name+".shadowMap",z.camera.updateProjectionMatrix());a.setRenderTarget(z.map);a.clear();v=z.getViewportCount();for(var Q=0;Qm;m++){if(p=d[m])if(l=p[0],p=p[1]){x&&e.setAttribute("morphTarget"+m,x[l]);f&&e.setAttribute("morphNormal"+m,f[l]);c[m]=p;k+=p;continue}c[m]=0}e=e.morphTargetsRelative?1: +1-k;g.getUniforms().setValue(a,"morphTargetBaseInfluence",e);g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Dj(a,b,c,d){var e=new WeakMap;return{update:function(a){var f=d.render.frame,k=a.geometry,l=b.get(a,k);e.get(l)!==f&&(k.isGeometry&&l.updateFromObject(a),b.update(l),e.set(l,f));a.isInstancedMesh&&c.update(a.instanceMatrix,34962);return l},dispose:function(){e=new WeakMap}}}function qb(a,b,c,d,e,f,g,k,l,m){a=void 0!==a?a:[];W.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g? +g:1022,k,l,m);this.flipY=!1}function Ic(a,b,c,d){W.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Jc(a,b,c,d){W.call(this,null);this.image={data:a||null,width:b||1,height:c||1,depth:d||1};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1;this.needsUpdate=!0}function Kc(a,b,c){var d=a[0];if(0>=d||0");return a.replace(ig,hg)}function Ph(a,b,c,d){a="";for(b=parseInt(b);bd;d++)c.probe.push(new n);var e=new n,f=new P,g=new P;return{setup:function(d,l,m){for(var k=0,p=0,h=0,t=0;9>t;t++)c.probe[t].set(0,0,0);var q=l=0,u=0,n=0,w=0,E=0,T=0,V=0;m=m.matrixWorldInverse;d.sort(Ck);t=0;for(var da=d.length;tJa;Ja++)c.probe[Ja].addScaledVector(y.sh.coefficients[Ja],ia);else if(y.isDirectionalLight){var H=a.get(y);H.color.copy(y.color).multiplyScalar(y.intensity);H.direction.setFromMatrixPosition(y.matrixWorld);e.setFromMatrixPosition(y.target.matrixWorld);H.direction.sub(e);H.direction.transformDirection(m);y.castShadow&&(ia=y.shadow,v=b.get(y),v.shadowBias=ia.bias,v.shadowRadius=ia.radius,v.shadowMapSize=ia.mapSize,c.directionalShadow[l]=v,c.directionalShadowMap[l]= +Ja,c.directionalShadowMatrix[l]=y.shadow.matrix,E++);c.directional[l]=H;l++}else y.isSpotLight?(H=a.get(y),H.position.setFromMatrixPosition(y.matrixWorld),H.position.applyMatrix4(m),H.color.copy(v).multiplyScalar(ia),H.distance=Ca,H.direction.setFromMatrixPosition(y.matrixWorld),e.setFromMatrixPosition(y.target.matrixWorld),H.direction.sub(e),H.direction.transformDirection(m),H.coneCos=Math.cos(y.angle),H.penumbraCos=Math.cos(y.angle*(1-y.penumbra)),H.decay=y.decay,y.castShadow&&(ia=y.shadow,v=b.get(y), +v.shadowBias=ia.bias,v.shadowRadius=ia.radius,v.shadowMapSize=ia.mapSize,c.spotShadow[u]=v,c.spotShadowMap[u]=Ja,c.spotShadowMatrix[u]=y.shadow.matrix,V++),c.spot[u]=H,u++):y.isRectAreaLight?(H=a.get(y),H.color.copy(v).multiplyScalar(ia),H.position.setFromMatrixPosition(y.matrixWorld),H.position.applyMatrix4(m),g.identity(),f.copy(y.matrixWorld),f.premultiply(m),g.extractRotation(f),H.halfWidth.set(.5*y.width,0,0),H.halfHeight.set(0,.5*y.height,0),H.halfWidth.applyMatrix4(g),H.halfHeight.applyMatrix4(g), +c.rectArea[n]=H,n++):y.isPointLight?(H=a.get(y),H.position.setFromMatrixPosition(y.matrixWorld),H.position.applyMatrix4(m),H.color.copy(y.color).multiplyScalar(y.intensity),H.distance=y.distance,H.decay=y.decay,y.castShadow&&(ia=y.shadow,v=b.get(y),v.shadowBias=ia.bias,v.shadowRadius=ia.radius,v.shadowMapSize=ia.mapSize,v.shadowCameraNear=ia.camera.near,v.shadowCameraFar=ia.camera.far,c.pointShadow[q]=v,c.pointShadowMap[q]=Ja,c.pointShadowMatrix[q]=y.shadow.matrix,T++),c.point[q]=H,q++):y.isHemisphereLight&& +(H=a.get(y),H.direction.setFromMatrixPosition(y.matrixWorld),H.direction.transformDirection(m),H.direction.normalize(),H.skyColor.copy(y.color).multiplyScalar(ia),H.groundColor.copy(y.groundColor).multiplyScalar(ia),c.hemi[w]=H,w++)}c.ambient[0]=k;c.ambient[1]=p;c.ambient[2]=h;d=c.hash;if(d.directionalLength!==l||d.pointLength!==q||d.spotLength!==u||d.rectAreaLength!==n||d.hemiLength!==w||d.numDirectionalShadows!==E||d.numPointShadows!==T||d.numSpotShadows!==V)c.directional.length=l,c.spot.length= +u,c.rectArea.length=n,c.point.length=q,c.hemi.length=w,c.directionalShadow.length=E,c.directionalShadowMap.length=E,c.pointShadow.length=T,c.pointShadowMap.length=T,c.spotShadow.length=V,c.spotShadowMap.length=V,c.directionalShadowMatrix.length=E,c.pointShadowMatrix.length=T,c.spotShadowMatrix.length=V,d.directionalLength=l,d.pointLength=q,d.spotLength=u,d.rectAreaLength=n,d.hemiLength=w,d.numDirectionalShadows=E,d.numPointShadows=T,d.numSpotShadows=V,c.version=Ek++},state:c}}function Uh(){var a= +new Dk,b=[],c=[];return{init:function(){b.length=0;c.length=0},state:{lightsArray:b,shadowsArray:c,lights:a},setupLights:function(d){a.setup(b,c,d)},pushLight:function(a){b.push(a)},pushShadow:function(a){c.push(a)}}}function Fk(){function a(c){c=c.target;c.removeEventListener("dispose",a);b.delete(c)}var b=new WeakMap;return{get:function(c,d){if(!1===b.has(c)){var e=new Uh;b.set(c,new WeakMap);b.get(c).set(d,e);c.addEventListener("dispose",a)}else!1===b.get(c).has(d)?(e=new Uh,b.get(c).set(d,e)): +e=b.get(c).get(d);return e},dispose:function(){b=new WeakMap}}}function Fb(a){K.call(this);this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.fog=!1;this.setValues(a)}function Gb(a){K.call(this);this.type="MeshDistanceMaterial";this.referencePosition=new n;this.nearDistance=1;this.farDistance=1E3;this.morphTargets=this.skinning= +!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.fog=!1;this.setValues(a)}function Vh(a,b,c){function d(a,b,c){c=a<<0|b<<1|c<<2;var d=p[c];void 0===d&&(d=new Fb({depthPacking:3201,morphTargets:a,skinning:b}),p[c]=d);return d}function e(a,b,c){c=a<<0|b<<1|c<<2;var d=h[c];void 0===d&&(d=new Gb({morphTargets:a,skinning:b}),h[c]=d);return d}function f(b,c,f,g,k,l){var m=b.geometry,p=d,x=b.customDepthMaterial;!0===f.isPointLight&&(p=e,x=b.customDistanceMaterial); +void 0===x?(x=!1,!0===c.morphTargets&&(!0===m.isBufferGeometry?x=m.morphAttributes&&m.morphAttributes.position&&0\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}), +n=u.clone();n.defines.HORIZONAL_PASS=1;var w=new B;w.setAttribute("position",new M(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var E=new S(w,u),T=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(d,e,f){if(!1!==T.enabled&&(!1!==T.autoUpdate||!1!==T.needsUpdate)&&0!==d.length){var p=a.getRenderTarget(),h=a.getActiveCubeFace(),r=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1); +for(var t=0,w=d.length;tc||l.y>c)console.warn("THREE.WebGLShadowMap:",C,"has shadow exceeding max texture size, reducing"),l.x>c&&(m.x=Math.floor(c/v.x),l.x=m.x*v.x,y.mapSize.x=m.x),l.y>c&&(m.y=Math.floor(c/v.y),l.y=m.y*v.y,y.mapSize.y=m.y);null!==y.map||y.isPointLightShadow||3!==this.type||(v={minFilter:1006,magFilter:1006, +format:1023},y.map=new Ha(l.x,l.y,v),y.map.texture.name=C.name+".shadowMap",y.mapPass=new Ha(l.x,l.y,v),y.camera.updateProjectionMatrix());null===y.map&&(v={minFilter:1003,magFilter:1003,format:1023},y.map=new Ha(l.x,l.y,v),y.map.texture.name=C.name+".shadowMap",y.camera.updateProjectionMatrix());a.setRenderTarget(y.map);a.clear();v=y.getViewportCount();for(var V=0;Vd||a.height>d)e=d/Math.max(a.width,a.height);if(1>e||!0===b){if("undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&a instanceof ImageBitmap)return d=b?L.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0=== -H&&(H=k(b,e)),c=c?k(b,e):H,c.width=b,c.height=e,c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return L.isPowerOfTwo(a.width)&&L.isPowerOfTwo(a.height)}function x(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function p(b,c,e,f){a.generateMipmap(b); -d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function h(c,d,e){if(!1===Da)return d;if(null!==c){if(void 0!==a[c])return a[c];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+c+"'")}c=d;6403===d&&(5126===e&&(c=33326),5131===e&&(c=33325),5121===e&&(c=33321));6407===d&&(5126===e&&(c=34837),5131===e&&(c=34843),5121===e&&(c=32849));6408===d&&(5126===e&&(c=34836),5131===e&&(c=34842),5121===e&&(c=32856));33325===c||33326===c||34842===c||34836===c?b.get("EXT_color_buffer_float"): -(34843===c||34837===c)&&console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return c}function t(a){return 1003===a||1004===a||1005===a?9728:9729}function r(b){b=b.target;b.removeEventListener("dispose",r);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&D.delete(b);g.memory.textures--}function u(b){b=b.target;b.removeEventListener("dispose",u);var c=d.get(b),e=d.get(b.texture); -if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLCubeRenderTarget)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);if(b.isWebGLMultiviewRenderTarget){a.deleteTexture(c.__webglColorTexture);a.deleteTexture(c.__webglDepthStencilTexture);g.memory.textures-= -2;e=0;for(var f=c.__webglViewFramebuffers.length;eq;q++)r[q]=k||e?e?b.image[q].image:b.image[q]:l(b.image[q],!1,!0,G);var t=r[0],u=m(t)||Da,n=f.convert(b.format), -y=f.convert(b.type),w=h(b.internalFormat,n,y);v(34067,b,u);if(k){for(q=0;6>q;q++){var Z=r[q].mipmaps;for(k=0;kq;q++)if(e)for(c.texImage2D(34069+q,0, -w,r[q].width,r[q].height,0,n,y,r[q].data),k=0;k=F&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+F);M+=1;return a};this.resetTextureUnits=function(){M=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e= -d.get(a);0y;y++)k.__webglFramebuffer[y]=a.createFramebuffer()}else if(k.__webglFramebuffer=a.createFramebuffer(),q)if(Da){k.__webglMultisampledFramebuffer=a.createFramebuffer();k.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,k.__webglColorRenderbuffer);q=f.convert(e.texture.format);var C=f.convert(e.texture.type);q=h(e.texture.internalFormat,q,C);C= -ea(e);a.renderbufferStorageMultisample(36161,C,q,e.width,e.height);a.bindFramebuffer(36160,k.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,k.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);e.depthBuffer&&(k.__webglDepthRenderbuffer=a.createRenderbuffer(),B(k.__webglDepthRenderbuffer,e,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");else if(t){y=e.width;var G=e.height;q=e.numViews; -a.bindFramebuffer(36160,k.__webglFramebuffer);var ba=b.get("OVR_multiview2");g.memory.textures+=2;C=a.createTexture();a.bindTexture(35866,C);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,32856,y,G,q,0,6408,5121,null);ba.framebufferTextureMultiviewOVR(36160,36064,C,0,0,q);var Q=a.createTexture();a.bindTexture(35866,Q);a.texParameteri(35866,10240,9728);a.texParameteri(35866,10241,9728);a.texImage3D(35866,0,35056,y,G,q,0,34041,34042,null);ba.framebufferTextureMultiviewOVR(36160, -33306,Q,0,0,q);G=Array(q);for(y=0;yy;y++)z(k.__webglFramebuffer[y],e,36064,34069+y);x(e.texture,w)&&p(34067,e.texture,e.width,e.height);c.bindTexture(34067,null)}else t||(c.bindTexture(3553, -l.__webglTexture),v(3553,e.texture,w),z(k.__webglFramebuffer,e,36064,3553),x(e.texture,w)&&p(3553,e.texture,e.width,e.height),c.bindTexture(3553,null));if(e.depthBuffer){k=d.get(e);l=!0===e.isWebGLCubeRenderTarget;if(e.depthTexture){if(l)throw Error("target.depthTexture not supported in Cube render targets");if(e&&e.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,k.__webglFramebuffer);if(!e.depthTexture||!e.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture"); -d.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0);n(e.depthTexture,0);k=d.get(e.depthTexture).__webglTexture;if(1026===e.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,k,0);else if(1027===e.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,k,0);else throw Error("Unknown depthTexture format");}else if(l)for(k.__webglDepthbuffer= -[],l=0;6>l;l++)a.bindFramebuffer(36160,k.__webglFramebuffer[l]),k.__webglDepthbuffer[l]=a.createRenderbuffer(),B(k.__webglDepthbuffer[l],e);else a.bindFramebuffer(36160,k.__webglFramebuffer),k.__webglDepthbuffer=a.createRenderbuffer(),B(k.__webglDepthbuffer,e);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=m(a)||Da;if(x(b,e)){e=a.isWebGLCubeRenderTarget?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);p(e,b,a.width,a.height);c.bindTexture(e, -null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(Da){var c=d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var e=b.height,f=16384;b.depthBuffer&&(f|=256);b.stencilBuffer&&(f|=1024);a.blitFramebuffer(0,0,c,e,0,0,c,e,f,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&& -(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),P=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===O&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),O=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?w(a,b):C(a,b)}}function Yh(a,b,c){var d= -c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010===a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410; -if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(1029===a)return 36244;if(1030===a)return 33319;if(1031===a)return 33320;if(1032===a)return 36248;if(1033===a)return 36249;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null; -if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===a||37496===a)if(c=b.get("WEBGL_compressed_texture_etc"), -null!==c){if(37492===a)return c.COMPRESSED_RGB8_ETC2;if(37496===a)return c.COMPRESSED_RGBA8_ETC2_EAC}if(37808===a||37809===a||37810===a||37811===a||37812===a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function og(a,b,c,d){wa.call(this,a,b,d);this.stencilBuffer=this.depthBuffer= -!1;this.numViews=c}function Jk(a,b){function c(a){if(a.isArrayCamera)return a.cameras;x[0]=a;return x}function d(a){if(void 0===a.isArrayCamera)return!0;a=a.cameras;if(a.length>t)return!1;for(var b=1,c=a.length;bf.matrixWorld.determinant(),l=h(a,c,e,f);Y.setMaterial(e,k); -var m=!1;if(b!==d.id||ia!==l.id||Pe!==(!0===e.wireframe))b=d.id,ia=l.id,Pe=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)za.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=ya.getWireframeAttribute(d),p=2);k=Aa;if(null!==a){var x=pa.get(a);k=Ca;k.setIndex(x)}if(m){if(!1!==Ga.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==sa.get("ANGLE_instanced_arrays")){Y.initAttributes(); -m=d.attributes;l=l.getAttributes();var q=e.defaultAttributeValues;for(ba in l){var r=l[ba];if(0<=r){var t=m[ba];if(void 0!==t){var n=t.normalized,u=t.itemSize,y=pa.get(t);if(void 0!==y){var w=y.buffer,z=y.type;y=y.bytesPerElement;if(t.isInterleavedBufferAttribute){var C=t.data,v=C.stride;t=t.offset;C&&C.isInstancedInterleavedBuffer?(Y.enableAttributeAndDivisor(r,C.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=C.meshPerAttribute*C.count)):Y.enableAttribute(r);I.bindBuffer(34962, -w);I.vertexAttribPointer(r,u,z,n,v*y,t*y)}else t.isInstancedBufferAttribute?(Y.enableAttributeAndDivisor(r,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Y.enableAttribute(r),I.bindBuffer(34962,w),I.vertexAttribPointer(r,u,z,n,0,0)}}else if("instanceMatrix"===ba)y=pa.get(f.instanceMatrix),void 0!==y&&(w=y.buffer,z=y.type,Y.enableAttributeAndDivisor(r+0,1),Y.enableAttributeAndDivisor(r+1,1),Y.enableAttributeAndDivisor(r+2,1),Y.enableAttributeAndDivisor(r+ -3,1),I.bindBuffer(34962,w),I.vertexAttribPointer(r+0,4,z,!1,64,0),I.vertexAttribPointer(r+1,4,z,!1,64,16),I.vertexAttribPointer(r+2,4,z,!1,64,32),I.vertexAttribPointer(r+3,4,z,!1,64,48));else if(void 0!==q&&(n=q[ba],void 0!==n))switch(n.length){case 2:I.vertexAttrib2fv(r,n);break;case 3:I.vertexAttrib3fv(r,n);break;case 4:I.vertexAttrib4fv(r,n);break;default:I.vertexAttrib1fv(r,n)}}}Y.disableUnusedAttributes()}null!==a&&I.bindBuffer(34963,x.buffer)}var ba=d.drawRange.start*p;m=null!==g?g.start*p: -0;x=Math.max(ba,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,ba+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-x+1);0!==g&&(f.isMesh?!0===e.wireframe?(Y.setLineWidth(e.wireframeLinewidth*(null===O?R:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Y.setLineWidth(e*(null===O?R:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&&k.setMode(4),f.isInstancedMesh?k.renderInstances(d,x,g,f.count):d.isInstancedBufferGeometry? -k.renderInstances(d,x,g,d.maxInstancedCount):k.render(x,g))};this.compile=function(a,b){A=wa.get(a,b);A.init();a.traverse(function(a){a.isLight&&(A.pushLight(a),a.castShadow&&A.pushShadow(a))});A.setupLights(b);var c={};a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var d=0;de.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function tg(a,b,c,d,e,f,g,k,l){V.call(this,a,b,c,d,e,f,g,k,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Qc(a,b,c,d,e,f,g,k,l,m,h, -p){V.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Td(a,b,c,d,e,f,g,k,l){V.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Ud(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);V.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter= -void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Rc(a){D.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;mc;c++){var p=h[k[c]];var q=h[k[(c+1)%3]];f[0]=Math.min(p,q);f[1]=Math.max(p,q);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2], -b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;ac;c++)p=h.getX(m+c),q=h.getX(m+(c+1)%3),f[0]=Math.min(p,q),f[1]=Math.max(p,q),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l, -m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;mc;c++)g=3*m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new B(b,3))}function Vd(a,b,c){N.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Sc(a,b,c));this.mergeVertices()}function Sc(a,b,c){D.call(this);this.type="ParametricBufferGeometry";this.parameters= -{func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,q,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var r=b+1;for(q=0;q<=c;q++){var u=q/c;for(t=0;t<=b;t++){var y=t/b;a(y,u,l);e.push(l.x,l.y,l.z);0<=y-1E-5?(a(y-1E-5,u,m),h.subVectors(l,m)):(a(y+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(y,u-1E-5,m),p.subVectors(l,m)):(a(y,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y, -k.z);g.push(y,u)}}for(q=0;qd&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}D.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;ke&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+= -1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new B(k,3));this.setAttribute("normal",new B(k.slice(),3));this.setAttribute("uv",new B(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xd(a,b){N.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(a,b){Ha.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters= -{radius:a,detail:b}}function Yd(a,b){N.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new cc(a,b));this.mergeVertices()}function cc(a,b){Ha.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Zd(a,b){N.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Uc(a, -b));this.mergeVertices()}function Uc(a,b){var c=(1+Math.sqrt(5))/2;Ha.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function $d(a,b){N.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Vc(a, -b));this.mergeVertices()}function Vc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ha.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a, +b&&(a.clearStencil(b),x=b)},reset:function(){b=!1;x=p=m=l=k=e=d=c=null}}};c=a.getParameter(34921);var n=new Uint8Array(c),w=new Uint8Array(c),E=new Uint8Array(c),v={},V=null,da=null,y=null,A=null,ia=null,Ca=null,Ja=null,H=null,D=null,F=!1,z=null,B=null,G=null,K=null,M=null,ha=a.getParameter(35661),N=!1;c=0;c=a.getParameter(7938);-1!==c.indexOf("WebGL")?(c=parseFloat(/^WebGL ([0-9])/.exec(c)[1]),N=1<=c):-1!==c.indexOf("OpenGL ES")&&(c=parseFloat(/^OpenGL ES ([0-9])/.exec(c)[1]),N=2<=c);var L=null, +Nd={},aa=new ka,Wh=new ka,mg={};mg[3553]=d(3553,3553,1);mg[34067]=d(34067,34069,6);t.setClear(0,0,0,1);q.setClear(1);u.setClear(0);f(2929);q.setFunc(3);l(!1);m(1);f(2884);k(0);var Lc={100:32774,101:32778,102:32779};h?(Lc[103]=32775,Lc[104]=32776):(c=b.get("EXT_blend_minmax"),null!==c&&(Lc[103]=c.MIN_EXT,Lc[104]=c.MAX_EXT));var J={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};return{buffers:{color:t,depth:q,stencil:u},initAttributes:function(){for(var a=0,b=n.length;a< +b;a++)n[a]=0},enableAttribute:function(a){e(a,0)},enableAttributeAndDivisor:e,disableUnusedAttributes:function(){for(var b=0,c=w.length;b!==c;++b)w[b]!==n[b]&&(a.disableVertexAttribArray(b),w[b]=0)},enable:f,disable:g,useProgram:function(b){return V!==b?(a.useProgram(b),V=b,!0):!1},setBlending:k,setMaterial:function(a,b){2===a.side?g(2884):f(2884);var c=1===a.side;b&&(c=!c);l(c);1===a.blending&&!1===a.transparent?k(0):k(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha, +a.blendDstAlpha,a.premultipliedAlpha);q.setFunc(a.depthFunc);q.setTest(a.depthTest);q.setMask(a.depthWrite);t.setMask(a.colorWrite);b=a.stencilWrite;u.setTest(b);b&&(u.setMask(a.stencilWriteMask),u.setFunc(a.stencilFunc,a.stencilRef,a.stencilFuncMask),u.setOp(a.stencilFail,a.stencilZFail,a.stencilZPass));x(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)},setFlipSided:l,setCullFace:m,setLineWidth:function(b){b!==G&&(N&&a.lineWidth(b),G=b)},setPolygonOffset:x,setScissorTest:function(a){a? +f(3089):g(3089)},activeTexture:p,bindTexture:function(b,c){null===L&&p();var d=Nd[L];void 0===d&&(d={type:void 0,texture:void 0},Nd[L]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||mg[b]),d.type=b,d.texture=c},unbindTexture:function(){var b=Nd[L];void 0!==b&&void 0!==b.type&&(a.bindTexture(b.type,null),b.type=void 0,b.texture=void 0)},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}},texImage2D:function(){try{a.texImage2D.apply(a, +arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}},texImage3D:function(){try{a.texImage3D.apply(a,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}},scissor:function(b){!1===aa.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),aa.copy(b))},viewport:function(b){!1===Wh.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),Wh.copy(b))},reset:function(){for(var b=0;bd||a.height>d)e=d/Math.max(a.width,a.height);if(1>e||!0===b){if("undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&a instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&a instanceof ImageBitmap)return d=b?L.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0=== +G&&(G=k(b,e)),c=c?k(b,e):G,c.width=b,c.height=e,c.getContext("2d").drawImage(a,0,0,b,e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+b+"x"+e+")."),c;"data"in a&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+").")}return a}function m(a){return L.isPowerOfTwo(a.width)&&L.isPowerOfTwo(a.height)}function x(a,b){return a.generateMipmaps&&b&&1003!==a.minFilter&&1006!==a.minFilter}function p(b,c,e,f){a.generateMipmap(b); +d.get(c).__maxMipLevel=Math.log(Math.max(e,f))*Math.LOG2E}function h(c,d,e){if(!1===Ca)return d;if(null!==c){if(void 0!==a[c])return a[c];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+c+"'")}c=d;6403===d&&(5126===e&&(c=33326),5131===e&&(c=33325),5121===e&&(c=33321));6407===d&&(5126===e&&(c=34837),5131===e&&(c=34843),5121===e&&(c=32849));6408===d&&(5126===e&&(c=34836),5131===e&&(c=34842),5121===e&&(c=32856));33325===c||33326===c||34842===c||34836===c?b.get("EXT_color_buffer_float"): +(34843===c||34837===c)&&console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return c}function t(a){return 1003===a||1004===a||1005===a?9728:9729}function q(b){b=b.target;b.removeEventListener("dispose",q);var c=d.get(b);void 0!==c.__webglInit&&(a.deleteTexture(c.__webglTexture),d.remove(b));b.isVideoTexture&&B.delete(b);g.memory.textures--}function u(b){b=b.target;b.removeEventListener("dispose",u);var c=d.get(b),e=d.get(b.texture); +if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLCubeRenderTarget)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.memory.textures--}function n(a,b){var e=d.get(a);if(a.isVideoTexture){var f=g.render.frame; +B.get(a)!==f&&(B.set(a,f),a.update())}if(0q;q++)r[q]=k||e?e?b.image[q].image:b.image[q]:l(b.image[q],!1,!0,H);var t=r[0],u=m(t)||Ca,n=f.convert(b.format),C=f.convert(b.type),w=h(b.internalFormat,n,C);v(34067,b,u);if(k){for(q=0;6>q;q++){var aa=r[q].mipmaps;for(k=0;kq;q++)if(e)for(c.texImage2D(34069+q,0,w,r[q].width,r[q].height,0,n,C,r[q].data),k=0;k=D&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+D);M+=1;return a};this.resetTextureUnits=function(){M=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0r;r++)e.__webglFramebuffer[r]=a.createFramebuffer();else if(e.__webglFramebuffer=a.createFramebuffer(),r)if(Ca){e.__webglMultisampledFramebuffer=a.createFramebuffer(); +e.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,e.__webglColorRenderbuffer);r=f.convert(b.texture.format);var t=f.convert(b.texture.type);r=h(b.texture.internalFormat,r,t);t=ia(b);a.renderbufferStorageMultisample(36161,t,r,b.width,b.height);a.bindFramebuffer(36160,e.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,e.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);b.depthBuffer&&(e.__webglDepthRenderbuffer=a.createRenderbuffer(),A(e.__webglDepthRenderbuffer, +b,!0));a.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){c.bindTexture(34067,k.__webglTexture);v(34067,b.texture,q);for(r=0;6>r;r++)y(e.__webglFramebuffer[r],b,36064,34069+r);x(b.texture,q)&&p(34067,b.texture,b.width,b.height);c.bindTexture(34067,null)}else c.bindTexture(3553,k.__webglTexture),v(3553,b.texture,q),y(e.__webglFramebuffer,b,36064,3553),x(b.texture,q)&&p(3553,b.texture,b.width,b.height),c.bindTexture(3553, +null);if(b.depthBuffer){e=d.get(b);k=!0===b.isWebGLCubeRenderTarget;if(b.depthTexture){if(k)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");a.bindFramebuffer(36160,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width=== +b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);n(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,e,0);else throw Error("Unknown depthTexture format");}else if(k)for(e.__webglDepthbuffer=[],k=0;6>k;k++)a.bindFramebuffer(36160,e.__webglFramebuffer[k]), +e.__webglDepthbuffer[k]=a.createRenderbuffer(),A(e.__webglDepthbuffer[k],b);else a.bindFramebuffer(36160,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),A(e.__webglDepthbuffer,b);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,e=m(a)||Ca;if(x(b,e)){e=a.isWebGLCubeRenderTarget?34067:3553;var f=d.get(b).__webglTexture;c.bindTexture(e,f);p(e,b,a.width,a.height);c.bindTexture(e,null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(Ca){var c= +d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var e=b.height,f=16384;b.depthBuffer&&(f|=256);b.stencilBuffer&&(f|=1024);a.blitFramebuffer(0,0,c,e,0,0,c,e,f,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&(!1===P&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."), +P=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLCubeRenderTarget&&(!1===O&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),O=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?w(a,b):E(a,b)}}function Xh(a,b,c){var d=c.isWebGL2;return{convert:function(a){if(1009===a)return 5121;if(1017===a)return 32819;if(1018===a)return 32820;if(1019===a)return 33635;if(1010=== +a)return 5120;if(1011===a)return 5122;if(1012===a)return 5123;if(1013===a)return 5124;if(1014===a)return 5125;if(1015===a)return 5126;if(1016===a){if(d)return 5131;var c=b.get("OES_texture_half_float");return null!==c?c.HALF_FLOAT_OES:null}if(1021===a)return 6406;if(1022===a)return 6407;if(1023===a)return 6408;if(1024===a)return 6409;if(1025===a)return 6410;if(1026===a)return 6402;if(1027===a)return 34041;if(1028===a)return 6403;if(1029===a)return 36244;if(1030===a)return 33319;if(1031===a)return 33320; +if(1032===a)return 36248;if(1033===a)return 36249;if(33776===a||33777===a||33778===a||33779===a)if(c=b.get("WEBGL_compressed_texture_s3tc"),null!==c){if(33776===a)return c.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return c.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return c.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return c.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(35840===a||35841===a||35842===a||35843===a)if(c=b.get("WEBGL_compressed_texture_pvrtc"),null!==c){if(35840===a)return c.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; +if(35841===a)return c.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return c.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return c.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(36196===a)return c=b.get("WEBGL_compressed_texture_etc1"),null!==c?c.COMPRESSED_RGB_ETC1_WEBGL:null;if(37492===a||37496===a)if(c=b.get("WEBGL_compressed_texture_etc"),null!==c){if(37492===a)return c.COMPRESSED_RGB8_ETC2;if(37496===a)return c.COMPRESSED_RGBA8_ETC2_EAC}if(37808===a||37809===a||37810===a||37811===a||37812=== +a||37813===a||37814===a||37815===a||37816===a||37817===a||37818===a||37819===a||37820===a||37821===a)return c=b.get("WEBGL_compressed_texture_astc"),null!==c?a:null;if(1020===a){if(d)return 34042;c=b.get("WEBGL_depth_texture");return null!==c?c.UNSIGNED_INT_24_8_WEBGL:null}}}}function Qe(a){ba.call(this);this.cameras=a||[]}function Mc(){F.call(this);this.type="Group"}function Yh(a,b){function c(a){var b=q.get(a.inputSource);b&&(b.targetRay&&b.targetRay.dispatchEvent({type:a.type}),b.grip&&b.grip.dispatchEvent({type:a.type}))} +function d(){q.forEach(function(a,b){a.targetRay&&(a.targetRay.dispatchEvent({type:"disconnected",data:b}),a.targetRay.visible=!1);a.grip&&(a.grip.dispatchEvent({type:"disconnected",data:b}),a.grip.visible=!1)});q.clear();a.setFramebuffer(null);a.setRenderTarget(a.getRenderTarget());A.stop();k.isPresenting=!1;k.dispatchEvent({type:"sessionend"})}function e(a){x=a;A.setContext(l);A.start();k.isPresenting=!0;k.dispatchEvent({type:"sessionstart"})}function f(a){for(var b=l.inputSources,c=0;cf.matrixWorld.determinant(),l=h(a,c,e,f);Z.setMaterial(e,k);var m=!1;if(b!==d.id||ha!==l.id||Pe!==(!0===e.wireframe))b=d.id,ha=l.id,Pe=!0===e.wireframe,m=!0;if(e.morphTargets||e.morphNormals)ya.update(f,d,e,l),m=!0;a=d.index;c=d.attributes.position;if(null===a){if(void 0===c||0===c.count)return}else if(0===a.count)return;var p=1;!0===e.wireframe&&(a=xa.getWireframeAttribute(d),p=2);k=Aa;if(null!==a){var x=oa.get(a);k=Ba;k.setIndex(x)}if(m){if(!1!== +Fa.isWebGL2||!f.isInstancedMesh&&!d.isInstancedBufferGeometry||null!==ra.get("ANGLE_instanced_arrays")){Z.initAttributes();m=d.attributes;l=l.getAttributes();var r=e.defaultAttributeValues;for(T in l){var q=l[T];if(0<=q){var t=m[T];if(void 0!==t){var n=t.normalized,u=t.itemSize,w=oa.get(t);if(void 0!==w){var C=w.buffer,y=w.type;w=w.bytesPerElement;if(t.isInterleavedBufferAttribute){var E=t.data,v=E.stride;t=t.offset;E&&E.isInstancedInterleavedBuffer?(Z.enableAttributeAndDivisor(q,E.meshPerAttribute), +void 0===d.maxInstancedCount&&(d.maxInstancedCount=E.meshPerAttribute*E.count)):Z.enableAttribute(q);I.bindBuffer(34962,C);I.vertexAttribPointer(q,u,y,n,v*w,t*w)}else t.isInstancedBufferAttribute?(Z.enableAttributeAndDivisor(q,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):Z.enableAttribute(q),I.bindBuffer(34962,C),I.vertexAttribPointer(q,u,y,n,0,0)}}else if("instanceMatrix"===T)w=oa.get(f.instanceMatrix),void 0!==w&&(C=w.buffer,y=w.type,Z.enableAttributeAndDivisor(q+ +0,1),Z.enableAttributeAndDivisor(q+1,1),Z.enableAttributeAndDivisor(q+2,1),Z.enableAttributeAndDivisor(q+3,1),I.bindBuffer(34962,C),I.vertexAttribPointer(q+0,4,y,!1,64,0),I.vertexAttribPointer(q+1,4,y,!1,64,16),I.vertexAttribPointer(q+2,4,y,!1,64,32),I.vertexAttribPointer(q+3,4,y,!1,64,48));else if(void 0!==r&&(n=r[T],void 0!==n))switch(n.length){case 2:I.vertexAttrib2fv(q,n);break;case 3:I.vertexAttrib3fv(q,n);break;case 4:I.vertexAttrib4fv(q,n);break;default:I.vertexAttrib1fv(q,n)}}}Z.disableUnusedAttributes()}null!== +a&&I.bindBuffer(34963,x.buffer)}var T=d.drawRange.start*p;m=null!==g?g.start*p:0;x=Math.max(T,m);g=Math.max(0,Math.min(null!==a?a.count:c.count,T+d.drawRange.count*p,m+(null!==g?g.count*p:Infinity))-1-x+1);0!==g&&(f.isMesh?!0===e.wireframe?(Z.setLineWidth(e.wireframeLinewidth*(null===O?Q:1)),k.setMode(1)):k.setMode(4):f.isLine?(e=e.linewidth,void 0===e&&(e=1),Z.setLineWidth(e*(null===O?Q:1)),f.isLineSegments?k.setMode(1):f.isLineLoop?k.setMode(2):k.setMode(3)):f.isPoints?k.setMode(0):f.isSprite&& +k.setMode(4),f.isInstancedMesh?k.renderInstances(d,x,g,f.count):d.isInstancedBufferGeometry?k.renderInstances(d,x,g,d.maxInstancedCount):k.render(x,g))};this.compile=function(a,b){z=va.get(a,b);z.init();a.traverse(function(a){a.isLight&&(z.pushLight(a),a.castShadow&&z.pushShadow(a))});z.setupLights(b);var c={};a.traverse(function(b){if(b.material)if(Array.isArray(b.material))for(var d=0;de.far||f.push({distance:a,distanceToRay:Math.sqrt(k),point:c,index:b,face:null,object:g}))}function rg(a,b,c,d,e,f,g,k,l){W.call(this,a,b,c,d,e,f,g,k,l);this.format=void 0!==g?g:1022;this.minFilter=void 0!==f?f:1006;this.magFilter=void 0!==e?e:1006;this.generateMipmaps=!1}function Qc(a,b,c,d,e,f,g,k,l,m,h, +p){W.call(this,null,f,g,k,l,m,d,e,h,p);this.image={width:b,height:c};this.mipmaps=a;this.generateMipmaps=this.flipY=!1}function Td(a,b,c,d,e,f,g,k,l){W.call(this,a,b,c,d,e,f,g,k,l);this.needsUpdate=!0}function Ud(a,b,c,d,e,f,g,k,l,m){m=void 0!==m?m:1026;if(1026!==m&&1027!==m)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===c&&1026===m&&(c=1012);void 0===c&&1027===m&&(c=1020);W.call(this,null,d,e,f,g,k,m,c,l);this.image={width:a,height:b};this.magFilter= +void 0!==g?g:1003;this.minFilter=void 0!==k?k:1003;this.generateMipmaps=this.flipY=!1}function Rc(a){B.call(this);this.type="WireframeGeometry";var b=[],c,d,e,f=[0,0],g={},k=["a","b","c"];if(a&&a.isGeometry){var l=a.faces;var m=0;for(d=l.length;mc;c++){var p=h[k[c]];var r=h[k[(c+1)%3]];f[0]=Math.min(p,r);f[1]=Math.max(p,r);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],k=a.vertices[m.index1],b.push(k.x,k.y,k.z),k=a.vertices[m.index2], +b.push(k.x,k.y,k.z)}else if(a&&a.isBufferGeometry)if(k=new n,null!==a.index){l=a.attributes.position;h=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:h.count,materialIndex:0}]);a=0;for(e=t.length;ac;c++)p=h.getX(m+c),r=h.getX(m+(c+1)%3),f[0]=Math.min(p,r),f[1]=Math.max(p,r),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],k.fromBufferAttribute(l,m.index1),b.push(k.x,k.y,k.z),k.fromBufferAttribute(l, +m.index2),b.push(k.x,k.y,k.z)}else for(l=a.attributes.position,m=0,d=l.count/3;mc;c++)g=3*m+c,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z),g=3*m+(c+1)%3,k.fromBufferAttribute(l,g),b.push(k.x,k.y,k.z);this.setAttribute("position",new A(b,3))}function Vd(a,b,c){N.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Sc(a,b,c));this.mergeVertices()}function Sc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters= +{func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],k=new n,l=new n,m=new n,h=new n,p=new n,r,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var q=b+1;for(r=0;r<=c;r++){var u=r/c;for(t=0;t<=b;t++){var C=t/b;a(C,u,l);e.push(l.x,l.y,l.z);0<=C-1E-5?(a(C-1E-5,u,m),h.subVectors(l,m)):(a(C+1E-5,u,m),h.subVectors(m,l));0<=u-1E-5?(a(C,u-1E-5,m),p.subVectors(l,m)):(a(C,u+1E-5,m),p.subVectors(m,l));k.crossVectors(h,p).normalize();f.push(k.x,k.y, +k.z);g.push(C,u)}}for(r=0;rd&&1===a.x&&(l[b]=a.x-1);0===c.x&&0===c.z&&(l[b]=d/2/Math.PI+.5)}B.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;d=d||0;var k=[],l=[];(function(a){for(var c=new n,d=new n,g=new n,k=0;ke&&(.2>b&&(l[a+0]+=1),.2>c&&(l[a+2]+= +1),.2>d&&(l[a+4]+=1))})();this.setAttribute("position",new A(k,3));this.setAttribute("normal",new A(k.slice(),3));this.setAttribute("uv",new A(l,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xd(a,b){N.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Tc(a,b));this.mergeVertices()}function Tc(a,b){Ga.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters= +{radius:a,detail:b}}function Yd(a,b){N.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new cc(a,b));this.mergeVertices()}function cc(a,b){Ga.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Zd(a,b){N.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Uc(a, +b));this.mergeVertices()}function Uc(a,b){var c=(1+Math.sqrt(5))/2;Ga.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function $d(a,b){N.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Vc(a, +b));this.mergeVertices()}function Vc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Ga.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a, b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function ae(a,b,c,d,e,f){N.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new dc(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function dc(a,b,c,d,e){function f(e){h=a.getPointAt(e/b,h);var f=g.normals[e]; -e=g.binormals[e];for(q=0;q<=d;q++){var m=q/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);l.x=m*f.x+p*e.x;l.y=m*f.y+p*e.y;l.z=m*f.z+p*e.z;l.normalize();r.push(l.x,l.y,l.z);k.x=h.x+c*l.x;k.y=h.y+c*l.y;k.z=h.z+c*l.z;t.push(k.x,k.y,k.z)}}D.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents=g.tangents;this.normals=g.normals;this.binormals=g.binormals;var k=new n, -l=new n,m=new v,h=new n,p,q,t=[],r=[],u=[],y=[];for(p=0;p=b;e-=d)f=ci(e,a[e],a[e+1],f);f&&ec(f,f.next)&&(de(f),f=f.next); -return f}function ee(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!ec(a,a.next)&&0!==ta(a.prev,a,a.next))a=a.next;else{de(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function fe(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=ug(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,q,t=1;do{l=k;var r=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;mn!== -r.next.y>n&&r.next.y!==r.y&&p<(r.next.x-r.x)*(n-r.y)/(r.next.y-r.y)+r.x&&(h=!h),r=r.next;while(r!==l);r=h}l=r}if(l){a=ei(g,k);g=ee(g,g.next);a=ee(a,a.next);fe(g,b,c,d,e,f);fe(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Kk(a,b,c,d){var e=a.prev,f=a.next;if(0<=ta(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=ug(e.x=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ta(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ta(d.prev,d,d.next))return!1;d=d.nextZ}return!0} -function Lk(a,b){return a.x-b.x}function Mk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x=c.x&&c.x>=g&&d!==c.x&&Yc(ek.x)&&ge(c,a)&&(k=c,m=h)}c=c.next}return k}function ug(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Nk(a){var b=a,c=a;do{if(b.xta(a.prev,a,a.next)?0<=ta(a,b,a.next)&&0<=ta(a,a.prev,b):0>ta(a,b,a.prev)||0>ta(a,a.next,b)}function ei(a,b){var c=new vg(a.i,a.x,a.y),d=new vg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function ci(a, -b,c,d){a=new vg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function de(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function vg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function fi(a){var b=a.length;2=b;e-=d)f=bi(e,a[e],a[e+1],f);f&&ec(f,f.next)&&(de(f),f=f.next); +return f}function ee(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!ec(a,a.next)&&0!==xa(a.prev,a,a.next))a=a.next;else{de(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b}function fe(a,b,c,d,e,f,g){if(a){if(!g&&f){var k=a,l=k;do null===l.z&&(l.z=sg(l.x,l.y,d,e,f)),l.prevZ=l.prev,l=l.nextZ=l.next;while(l!==k);l.prevZ.nextZ=null;l.prevZ=null;k=l;var m,h,p,r,t=1;do{l=k;var q=k=null;for(h=0;l;){h++;var n=l;for(m=p=0;mn!== +q.next.y>n&&q.next.y!==q.y&&p<(q.next.x-q.x)*(n-q.y)/(q.next.y-q.y)+q.x&&(h=!h),q=q.next;while(q!==l);q=h}l=q}if(l){a=di(g,k);g=ee(g,g.next);a=ee(a,a.next);fe(g,b,c,d,e,f);fe(a,b,c,d,e,f);break a}k=k.next}g=g.next}while(g!==a)}break}}}}function Ik(a,b,c,d){var e=a.prev,f=a.next;if(0<=xa(e,a,f))return!1;var g=e.x>a.x?e.x>f.x?e.x:f.x:a.x>f.x?a.x:f.x,k=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,l=sg(e.x=l&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=xa(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=xa(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=l;){if(c!==a.prev&&c!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=xa(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&Yc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=xa(d.prev,d,d.next))return!1;d=d.nextZ}return!0} +function Jk(a,b){return a.x-b.x}function Kk(a,b){var c=b,d=a.x,e=a.y,f=-Infinity;do{if(e<=c.y&&e>=c.next.y&&c.next.y!==c.y){var g=c.x+(e-c.y)*(c.next.x-c.x)/(c.next.y-c.y);if(g<=d&&g>f){f=g;if(g===d){if(e===c.y)return c;if(e===c.next.y)return c.next}var k=c.x=c.x&&c.x>=g&&d!==c.x&&Yc(ek.x)&&ge(c,a)&&(k=c,m=h)}c=c.next}return k}function sg(a,b,c,d,e){a=32767*(a-c)*e;b=32767*(b-d)*e;a=(a|a<<8)&16711935;a=(a|a<<4)&252645135;a=(a|a<<2)&858993459;b=(b|b<<8)&16711935;b=(b|b<<4)&252645135;b=(b|b<<2)&858993459;return(a|a<<1)&1431655765|((b|b<<1)&1431655765)<<1}function Lk(a){var b=a,c=a;do{if(b.xxa(a.prev,a,a.next)?0<=xa(a,b,a.next)&&0<=xa(a,a.prev,b):0>xa(a,b,a.prev)||0>xa(a,a.next,b)}function di(a,b){var c=new tg(a.i,a.x,a.y),d=new tg(b.i,b.x,b.y),e=a.next,f=b.prev;a.next=b;b.prev=a;c.next=e;e.prev=c;d.next=c;c.prev=d;f.next=d;d.prev=f;return d}function bi(a, +b,c,d){a=new tg(a,b,c);d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a);return a}function de(a){a.next.prev=a.prev;a.prev.next=a.next;a.prevZ&&(a.prevZ.nextZ=a.nextZ);a.nextZ&&(a.nextZ.prevZ=a.prevZ)}function tg(a,b,c){this.i=a;this.x=b;this.y=c;this.nextZ=this.prevZ=this.z=this.next=this.prev=null;this.steiner=!1}function ei(a){var b=a.length;2Number.EPSILON){var l=Math.sqrt(k),m=Math.sqrt(f*f+g*g);k=b.x-e/l;b=b.y+d/l;g=((c.x-g/m-k)*g-(c.y+f/m-b)*f)/(d*g-e*f);f= -k+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new v(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new v(f/e,d/e)}function k(a,b){for(J=a.length;0<=--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=C+2*B;for(g=0;g=e)return new v(f,d);e=Math.sqrt(e/2)}else a=!1,d>Number.EPSILON?f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(f=-e,e=Math.sqrt(k)):(f=d,d=e,e=Math.sqrt(k/2));return new v(f/e,d/e)}function k(a,b){for(J=a.length;0<=--J;){var c=J;var f=J-1;0>f&&(f=a.length-1);var g,k=E+2*A;for(g=0;gh;h++){var p=m[f[h]];var q=m[f[(h+1)%3]];d[0]=Math.min(p,q);d[1]=Math.max(p,q);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2|| -g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new B(c,3))}function jc(a,b,c,d,e,f,g,k){N.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new tb(a,b,c,d,e,f,g,k));this.mergeVertices()}function tb(a,b,c,d,e,f,g,k){function l(c){var e,f=new v,l=new n,x=0,u=!0===c?a: -b,C=!0===c?1:-1;var A=r;for(e=1;e<=d;e++)p.push(0,y*C,0),q.push(0,C,0),t.push(.5,.5),r++;var B=r;for(e=0;e<=d;e++){var G=e/d*k+g,D=Math.cos(G);G=Math.sin(G);l.x=u*G;l.y=y*C;l.z=u*D;p.push(l.x,l.y,l.z);q.push(0,C,0);f.x=.5*D+.5;f.y=.5*G*C+.5;t.push(f.x,f.y);r++}for(e=0;eh;h++){var p=m[f[h]];var r=m[f[(h+1)%3]];d[0]=Math.min(p,r);d[1]=Math.max(p,r);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:k,face2:void 0}:e[p].face2=k}for(p in e)if(d=e[p],void 0===d.face2|| +g[d.face1].normal.dot(g[d.face2].normal)<=b)f=a[d.index1],c.push(f.x,f.y,f.z),f=a[d.index2],c.push(f.x,f.y,f.z);this.setAttribute("position",new A(c,3))}function jc(a,b,c,d,e,f,g,k){N.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:k};this.fromBufferGeometry(new tb(a,b,c,d,e,f,g,k));this.mergeVertices()}function tb(a,b,c,d,e,f,g,k){function l(c){var e,f=new v,l=new n,x=0,u=!0===c?a: +b,E=!0===c?1:-1;var z=q;for(e=1;e<=d;e++)p.push(0,C*E,0),r.push(0,E,0),t.push(.5,.5),q++;var A=q;for(e=0;e<=d;e++){var B=e/d*k+g,D=Math.cos(B);B=Math.sin(B);l.x=u*B;l.y=C*E;l.z=u*D;p.push(l.x,l.y,l.z);r.push(0,E,0);f.x=.5*D+.5;f.y=.5*B*E+.5;t.push(f.x,f.y);q++}for(e=0;ethis.duration&&this.resetDuration()}function Pk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return dd;case "vector":case "vector2":case "vector3":case "vector4":return ed;case "color":return $e;case "quaternion":return pe;case "bool":case "boolean":return Ze;case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Qk(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse"); -var b=Pk(a.type);if(void 0===a.times){var c=[],d=[];S.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function wg(a,b,c){var d=this,e=!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()}; -this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;ba;a++)this.coefficients.push(new n)}function ab(a,b){fa.call(this,void 0,b);this.sh=void 0!==a?a:new uf}function Fg(a,b,c){ab.call(this,void 0,c);a=(new A).set(a);c=(new A).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Gg(a,b){ab.call(this,void 0,b);a=(new A).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))} -function li(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new aa;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new aa;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Hg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ig(){E.call(this);this.type="AudioListener";this.context=Jg.getContext(); -this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Hg}function id(a){E.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt= -this._startedAt=0;this.filters=[]}function Kg(a){id.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Lg(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Mg(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a= -Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function mi(a,b,c){c=c||Aa.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function Aa(a,b,c){this.path=b;this.parsedPath=c||Aa.parseTrackName(b);this.node=Aa.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function ni(){this.uuid=L.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_= -0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function oi(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400}, +this.type="MeshLambertMaterial";this.color=new z(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new z(0);this.emissiveIntensity=1;this.envMap=this.alphaMap=this.specularMap=this.emissiveMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function pc(a){K.call(this); +this.defines={MATCAP:""};this.type="MeshMatcapMaterial";this.color=new z(16777215);this.bumpMap=this.map=this.matcap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new v(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.alphaMap=null;this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function qc(a){la.call(this);this.type="LineDashedMaterial";this.scale=1;this.dashSize=3;this.gapSize=1;this.setValues(a)}function La(a, +b,c,d){this.parameterPositions=a;this._cachedIndex=0;this.resultBuffer=void 0!==d?d:new b.constructor(c);this.sampleValues=b;this.valueSize=c}function Xe(a,b,c,d){La.call(this,a,b,c,d);this._offsetNext=this._weightNext=this._offsetPrev=this._weightPrev=-0}function oe(a,b,c,d){La.call(this,a,b,c,d)}function Ye(a,b,c,d){La.call(this,a,b,c,d)}function sa(a,b,c,d){if(void 0===a)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===b||0===b.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+ +a);this.name=a;this.times=R.convertArray(b,this.TimeBufferType);this.values=R.convertArray(c,this.ValueBufferType);this.setInterpolation(d||this.DefaultInterpolation)}function Ze(a,b,c){sa.call(this,a,b,c)}function $e(a,b,c,d){sa.call(this,a,b,c,d)}function dd(a,b,c,d){sa.call(this,a,b,c,d)}function af(a,b,c,d){La.call(this,a,b,c,d)}function pe(a,b,c,d){sa.call(this,a,b,c,d)}function bf(a,b,c,d){sa.call(this,a,b,c,d)}function ed(a,b,c,d){sa.call(this,a,b,c,d)}function Qa(a,b,c){this.name=a;this.tracks= +c;this.duration=void 0!==b?b:-1;this.uuid=L.generateUUID();0>this.duration&&this.resetDuration()}function Nk(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return dd;case "vector":case "vector2":case "vector3":case "vector4":return ed;case "color":return $e;case "quaternion":return pe;case "bool":case "boolean":return Ze;case "string":return bf}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Ok(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse"); +var b=Nk(a.type);if(void 0===a.times){var c=[],d=[];R.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)}function ug(a,b,c){var d=this,e=!1,f=0,g=0,k=void 0,l=[];this.onStart=void 0;this.onLoad=a;this.onProgress=b;this.onError=c;this.itemStart=function(a){g++;if(!1===e&&void 0!==d.onStart)d.onStart(a,f,g);e=!0};this.itemEnd=function(a){f++;if(void 0!==d.onProgress)d.onProgress(a,f,g);if(f===g&&(e=!1,void 0!==d.onLoad))d.onLoad()}; +this.itemError=function(a){if(void 0!==d.onError)d.onError(a)};this.resolveURL=function(a){return k?k(a):a};this.setURLModifier=function(a){k=a;return this};this.addHandler=function(a,b){l.push(a,b);return this};this.removeHandler=function(a){a=l.indexOf(a);-1!==a&&l.splice(a,2);return this};this.getHandler=function(a){for(var b=0,c=l.length;ba;a++)this.coefficients.push(new n)}function ab(a,b){ea.call(this,void 0,b);this.sh=void 0!==a?a:new uf}function Dg(a,b,c){ab.call(this,void 0,c);a=(new z).set(a);c=(new z).set(b);b=new n(a.r,a.g,a.b);a=new n(c.r,c.g,c.b);c=Math.sqrt(Math.PI);var d=c*Math.sqrt(.75);this.sh.coefficients[0].copy(b).add(a).multiplyScalar(c);this.sh.coefficients[1].copy(b).sub(a).multiplyScalar(d)}function Eg(a,b){ab.call(this,void 0,b);a=(new z).set(a);this.sh.coefficients[0].set(a.r,a.g,a.b).multiplyScalar(2*Math.sqrt(Math.PI))} +function ki(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new ba;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new ba;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1;this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}function Fg(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Gg(){F.call(this);this.type="AudioListener";this.context=Hg.getContext(); +this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0;this._clock=new Fg}function id(a){F.call(this);this.type="Audio";this.listener=a;this.context=a.context;this.gain=this.context.createGain();this.gain.connect(a.getInput());this.autoplay=!1;this.buffer=null;this.detune=0;this.loop=!1;this.offset=this.loopEnd=this.loopStart=0;this.duration=void 0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty";this._pausedAt= +this._startedAt=0;this.filters=[]}function Ig(a){id.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Jg(a,b){this.analyser=a.context.createAnalyser();this.analyser.fftSize=void 0!==b?b:2048;this.data=new Uint8Array(this.analyser.frequencyBinCount);a.getOutput().connect(this.analyser)}function Kg(a,b,c){this.binding=a;this.valueSize=c;a=Float64Array;switch(b){case "quaternion":b=this._slerp;break;case "string":case "bool":a= +Array;b=this._select;break;default:b=this._lerp}this.buffer=new a(4*c);this._mixBufferRegion=b;this.referenceCount=this.useCount=this.cumulativeWeight=0}function li(a,b,c){c=c||ya.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ya(a,b,c){this.path=b;this.parsedPath=c||ya.parseTrackName(b);this.node=ya.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function mi(){this.uuid=L.generateUUID();this._objects=Array.prototype.slice.call(arguments);this.nCachedObjects_= +0;var a={};this._indicesByUUID=a;for(var b=0,c=arguments.length;b!==c;++b)a[arguments[b].uuid]=b;this._paths=[];this._parsedPaths=[];this._bindings=[];this._bindingsIndicesByPath={};var d=this;this.stats={objects:{get total(){return d._objects.length},get inUse(){return this.total-d.nCachedObjects_}},get bindingsPerObject(){return d._bindings.length}}}function ni(a,b,c){this._mixer=a;this._clip=b;this._localRoot=c||null;a=b.tracks;b=a.length;c=Array(b);for(var d={endingStart:2400,endingEnd:2400}, e=0;e!==b;++e){var f=a[e].createInterpolant(null);c[e]=f;f.settings=d}this._interpolantSettings=d;this._interpolants=c;this._propertyBindings=Array(b);this._weightInterpolant=this._timeScaleInterpolant=this._byClipCacheIndex=this._cacheIndex=null;this.loop=2201;this._loopCount=-1;this._startTime=null;this.time=0;this._effectiveWeight=this.weight=this._effectiveTimeScale=this.timeScale=1;this.repetitions=Infinity;this.paused=!1;this.enabled=!0;this.clampWhenFinished=!1;this.zeroSlopeAtEnd=this.zeroSlopeAtStart= -!0}function Ng(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function vf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Og(a,b,c){rb.call(this,a,b);this.meshPerAttribute=c||1}function Pg(a,b,c,d){this.ray=new Vb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.layers=new Ie;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params, -{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function pi(a,b){return a.distance-b.distance}function Qg(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new B(b,3));b=new la({fog:!1});this.cone=new na(a,b);this.add(this.cone);this.update()}function si(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;cn;++n){var r=n/h;r=Math.exp(-r*r/2);e.push(r);0==n?q+=r:n\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"} -function Ei(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");za.call(this,a);this.type="catmullrom";this.closed=!0}function Fi(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");za.call(this,a);this.type="catmullrom"}function ah(a){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.");za.call(this,a);this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2, +!0}function Lg(a){this._root=a;this._initMemoryManager();this.time=this._accuIndex=0;this.timeScale=1}function vf(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Mg(a,b,c){rb.call(this,a,b);this.meshPerAttribute=c||1}function Ng(a,b,c,d){this.ray=new Vb(a,b);this.near=c||0;this.far=d||Infinity;this.camera=null;this.layers=new Ie;this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params, +{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function oi(a,b){return a.distance-b.distance}function Og(a,b,c,d){a.layers.test(b.layers)&&a.raycast(b,c);if(!0===d){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.setAttribute("position",new A(b,3));b=new la({fog:!1});this.cone=new ma(a,b);this.add(this.cone);this.update()}function ri(a){var b=[];a&&a.isBone&&b.push(a);for(var c=0;cn;++n){var q=n/h;q=Math.exp(-q*q/2);e.push(q);0==n?r+=q:n\n\nvec4 inputTexelToLinear(vec4 value){\n\tif(inputEncoding == 0){\n\t\treturn value;\n\t}else if(inputEncoding == 1){\n\t\treturn sRGBToLinear(value);\n\t}else if(inputEncoding == 2){\n\t\treturn RGBEToLinear(value);\n\t}else if(inputEncoding == 3){\n\t\treturn RGBMToLinear(value, 7.0);\n\t}else if(inputEncoding == 4){\n\t\treturn RGBMToLinear(value, 16.0);\n\t}else if(inputEncoding == 5){\n\t\treturn RGBDToLinear(value, 256.0);\n\t}else{\n\t\treturn GammaToLinear(value, 2.2);\n\t}\n}\n\nvec4 linearToOutputTexel(vec4 value){\n\tif(outputEncoding == 0){\n\t\treturn value;\n\t}else if(outputEncoding == 1){\n\t\treturn LinearTosRGB(value);\n\t}else if(outputEncoding == 2){\n\t\treturn LinearToRGBE(value);\n\t}else if(outputEncoding == 3){\n\t\treturn LinearToRGBM(value, 7.0);\n\t}else if(outputEncoding == 4){\n\t\treturn LinearToRGBM(value, 16.0);\n\t}else if(outputEncoding == 5){\n\t\treturn LinearToRGBD(value, 256.0);\n\t}else{\n\t\treturn LinearToGamma(value, 2.2);\n\t}\n}\n\nvec4 envMapTexelToLinear(vec4 color) {\n\treturn inputTexelToLinear(color);\n}\n\t"} +function Di(a){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");pa.call(this,a);this.type="catmullrom";this.closed=!0}function Ei(a){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.");pa.call(this,a);this.type="catmullrom"}function Zg(a){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.");pa.call(this,a);this.type="catmullrom"}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2, -52));void 0===Number.isInteger&&(Number.isInteger=function(a){return"number"===typeof a&&isFinite(a)&&Math.floor(a)===a});void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0ye;ye++)xa[ye]=(16>ye?"0":"")+ye.toString(16);var L={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var a=4294967295*Math.random()|0,b=4294967295*Math.random()|0,c=4294967295*Math.random()| -0,d=4294967295*Math.random()|0;return(xa[a&255]+xa[a>>8&255]+xa[a>>16&255]+xa[a>>24&255]+"-"+xa[b&255]+xa[b>>8&255]+"-"+xa[b>>16&15|64]+xa[b>>24&255]+"-"+xa[c&63|128]+xa[c>>8&255]+"-"+xa[c>>16&255]+xa[c>>24&255]+xa[d&255]+xa[d>>8&255]+xa[d>>16&255]+xa[d>>24&255]).toUpperCase()},clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a, +Object(a),c=1;cye;ye++)ta[ye]=(16>ye?"0":"")+ye.toString(16);var L={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var a=4294967295*Math.random()|0,b=4294967295*Math.random()|0,c=4294967295*Math.random()| +0,d=4294967295*Math.random()|0;return(ta[a&255]+ta[a>>8&255]+ta[a>>16&255]+ta[a>>24&255]+"-"+ta[b&255]+ta[b>>8&255]+"-"+ta[b>>16&15|64]+ta[b>>24&255]+"-"+ta[c&63|128]+ta[c>>8&255]+"-"+ta[c>>16&255]+ta[c>>24&255]+ta[d&255]+ta[d>>8&255]+ta[d>>16&255]+ta[d>>24&255]).toUpperCase()},clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a,b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a, b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a*L.DEG2RAD},radToDeg:function(a){return a*L.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},ceilPowerOfTwo:function(a){return Math.pow(2, Math.ceil(Math.log(a)/Math.LN2))},floorPowerOfTwo:function(a){return Math.pow(2,Math.floor(Math.log(a)/Math.LN2))},setQuaternionFromProperEuler:function(a,b,c,d,e){var f=Math.cos,g=Math.sin,k=f(c/2);c=g(c/2);var l=f((b+d)/2),m=g((b+d)/2),h=f((b-d)/2),p=g((b-d)/2);f=f((d-b)/2);b=g((d-b)/2);"XYX"===e?a.set(k*m,c*h,c*p,k*l):"YZY"===e?a.set(c*p,k*m,c*h,k*l):"ZXZ"===e?a.set(c*h,c*p,k*m,k*l):"XZX"===e?a.set(k*m,c*b,c*f,k*l):"YXY"===e?a.set(c*f,k*m,c*b,k*l):"ZYZ"===e?a.set(c*b,c*f,k*m,k*l):console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order.")}}; Object.defineProperties(v.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(v.prototype,{isVector2:!0,set:function(a,b){this.x=a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+ @@ -360,19 +351,19 @@ b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,th Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},cross:function(a){return this.x*a.y-this.y*a.x},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+ Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){return Math.atan2(-this.y,-this.x)+Math.PI},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this}, lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a, -b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(ya.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,k,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=k;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]= +b){var c=Math.cos(b);b=Math.sin(b);var d=this.x-a.x,e=this.y-a.y;this.x=d*c-e*b+a.x;this.y=d*b+e*c+a.y;return this}});Object.assign(wa.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,k,l){var m=this.elements;m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=k;m[6]=c;m[7]=f;m[8]=l;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]= a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return this},extractBasis:function(a,b,c){a.setFromMatrix3Column(this,0);b.setFromMatrix3Column(this,1);c.setFromMatrix3Column(this,2);return this},setFromMatrix4:function(a){a=a.elements;this.set(a[0],a[4],a[8],a[1],a[5],a[9],a[2],a[6],a[10]);return this},multiply:function(a){return this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements; -a=c[0];var e=c[3],f=c[6],g=c[1],k=c[4],l=c[7],m=c[2],h=c[5];c=c[8];var p=d[0],q=d[3],n=d[6],r=d[1],u=d[4],y=d[7],w=d[2],v=d[5];d=d[8];b[0]=a*p+e*r+f*w;b[3]=a*q+e*u+f*v;b[6]=a*n+e*y+f*d;b[1]=g*p+k*r+l*w;b[4]=g*q+k*u+l*v;b[7]=g*n+k*y+l*d;b[2]=m*p+h*r+c*w;b[5]=m*q+h*u+c*v;b[8]=m*n+h*y+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3], -f=a[4],g=a[5],k=a[6],l=a[7];a=a[8];return b*f*a-b*g*l-c*e*a+c*g*k+d*e*l-d*f*k},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],k=c[4],l=c[5],m=c[6],h=c[7];c=c[8];var p=c*k-l*h,q=l*m-c*g,n=h*g-k*m,r=d*p+e*q+f*n;if(0===r){if(!0===b)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"); -return this.identity()}b=1/r;a[0]=p*b;a[1]=(f*h-c*e)*b;a[2]=(l*e-f*k)*b;a[3]=q*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-l*d)*b;a[6]=n*b;a[7]=(e*m-h*d)*b;a[8]=(k*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]= +a=c[0];var e=c[3],f=c[6],g=c[1],k=c[4],l=c[7],m=c[2],h=c[5];c=c[8];var p=d[0],n=d[3],t=d[6],q=d[1],u=d[4],C=d[7],w=d[2],v=d[5];d=d[8];b[0]=a*p+e*q+f*w;b[3]=a*n+e*u+f*v;b[6]=a*t+e*C+f*d;b[1]=g*p+k*q+l*w;b[4]=g*n+k*u+l*v;b[7]=g*t+k*C+l*d;b[2]=m*p+h*q+c*w;b[5]=m*n+h*u+c*v;b[8]=m*t+h*C+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[3]*=a;b[6]*=a;b[1]*=a;b[4]*=a;b[7]*=a;b[2]*=a;b[5]*=a;b[8]*=a;return this},determinant:function(){var a=this.elements,b=a[0],c=a[1],d=a[2],e=a[3], +f=a[4],g=a[5],k=a[6],l=a[7];a=a[8];return b*f*a-b*g*l-c*e*a+c*g*k+d*e*l-d*f*k},getInverse:function(a,b){a&&a.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var c=a.elements;a=this.elements;var d=c[0],e=c[1],f=c[2],g=c[3],k=c[4],l=c[5],m=c[6],h=c[7];c=c[8];var p=c*k-l*h,n=l*m-c*g,t=h*g-k*m,q=d*p+e*n+f*t;if(0===q){if(!0===b)throw Error("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0");console.warn("THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0"); +return this.identity()}b=1/q;a[0]=p*b;a[1]=(f*h-c*e)*b;a[2]=(l*e-f*k)*b;a[3]=n*b;a[4]=(c*d-f*m)*b;a[5]=(f*g-l*d)*b;a[6]=t*b;a[7]=(e*m-h*d)*b;a[8]=(k*d-e*g)*b;return this},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[3];a[3]=b;b=a[2];a[2]=a[6];a[6]=b;b=a[5];a[5]=a[7];a[7]=b;return this},getNormalMatrix:function(a){return this.setFromMatrix4(a).getInverse(this).transpose()},transposeIntoArray:function(a){var b=this.elements;a[0]=b[0];a[1]=b[3];a[2]=b[6];a[3]=b[1];a[4]=b[4];a[5]=b[7];a[6]= b[2];a[7]=b[5];a[8]=b[8];return this},setUvTransform:function(a,b,c,d,e,f,g){var k=Math.cos(e);e=Math.sin(e);this.set(c*k,c*e,-c*(k*f+e*g)+f+a,-d*e,d*k,-d*(-e*f+k*g)+g+b,0,0,1)},scale:function(a,b){var c=this.elements;c[0]*=a;c[3]*=a;c[6]*=a;c[1]*=b;c[4]*=b;c[7]*=b;return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.elements,d=c[0],e=c[3],f=c[6],g=c[1],k=c[4],l=c[7];c[0]=b*d+a*g;c[3]=b*e+a*k;c[6]=b*f+a*l;c[1]=-a*d+b*g;c[4]=-a*e+b*k;c[7]=-a*f+b*l;return this},translate:function(a, b){var c=this.elements;c[0]+=a*c[2];c[3]+=a*c[5];c[6]+=a*c[8];c[1]+=b*c[2];c[4]+=b*c[5];c[7]+=b*c[8];return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;9>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;9>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8]; -return a}});var nd,Lb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===nd&&(nd=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"));nd.width=a.width;nd.height=a.height;var b=nd.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=nd}return 2048 -a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(V.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(ka.prototype, +a.x||1a.x?0:1;break;case 1002:a.x=1===Math.abs(Math.floor(a.x)%2)?Math.ceil(a.x)-a.x:a.x-Math.floor(a.x)}if(0>a.y||1a.y?0:1;break;case 1002:a.y=1===Math.abs(Math.floor(a.y)%2)?Math.ceil(a.y)-a.y:a.y-Math.floor(a.y)}this.flipY&&(a.y=1-a.y);return a}});Object.defineProperty(W.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.defineProperties(ka.prototype, {width:{get:function(){return this.z},set:function(a){this.z=a}},height:{get:function(){return this.w},set:function(a){this.w=a}}});Object.assign(ka.prototype,{isVector4:!0,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setScalar:function(a){this.w=this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x= b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!== b)return console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;this.w+=a.w*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), @@ -384,10 +375,10 @@ Math.min(b.w,this.w));return this},clampScalar:function(a,b){this.x=Math.max(a,M Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);this.w=Math.ceil(this.w);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);this.w=Math.round(this.w);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);this.w=0>this.w?Math.ceil(this.w):Math.floor(this.w);return this},negate:function(){this.x= -this.x;this.y=-this.y;this.z=-this.z;this.w=-this.w;return this},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)}, lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]= -this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});wa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:wa,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0, -a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});$f.prototype=Object.assign(Object.create(wa.prototype),{constructor:$f,isWebGLMultisampleRenderTarget:!0,copy:function(a){wa.prototype.copy.call(this, -a);this.samples=a.samples;return this}});Object.assign(Ca,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var k=c[d+0],l=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var h=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||k!==d||l!==h||m!==p){f=1-g;var q=k*d+l*h+m*p+c*e,n=0<=q?1:-1,r=1-q*q;r>Number.EPSILON&&(r=Math.sqrt(r),q=Math.atan2(r,q*n),f=Math.sin(f*q)/r,g=Math.sin(g*q)/r);n*=g;k=k*f+d*n;l=l*f+h*n;m=m*f+p*n;c=c*f+e*n;f===1-g&&(g=1/Math.sqrt(k*k+l*l+m*m+c*c),k*=g,l*=g,m*=g,c*=g)}a[b]= -k;a[b+1]=l;a[b+2]=m;a[b+3]=c}});Object.defineProperties(Ca.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this._onChangeCallback()}}});Object.assign(Ca.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y= +this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Ha.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Ha,isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.texture.image.width=a,this.texture.image.height=b,this.dispose();this.viewport.set(0,0, +a,b);this.scissor.set(0,0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Zf.prototype=Object.assign(Object.create(Ha.prototype),{constructor:Zf,isWebGLMultisampleRenderTarget:!0,copy:function(a){Ha.prototype.copy.call(this, +a);this.samples=a.samples;return this}});Object.assign(Aa,{slerp:function(a,b,c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var k=c[d+0],l=c[d+1],m=c[d+2];c=c[d+3];d=e[f+0];var h=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||k!==d||l!==h||m!==p){f=1-g;var n=k*d+l*h+m*p+c*e,t=0<=n?1:-1,q=1-n*n;q>Number.EPSILON&&(q=Math.sqrt(q),n=Math.atan2(q,n*t),f=Math.sin(f*n)/q,g=Math.sin(g*n)/q);t*=g;k=k*f+d*t;l=l*f+h*t;m=m*f+p*t;c=c*f+e*t;f===1-g&&(g=1/Math.sqrt(k*k+l*l+m*m+c*c),k*=g,l*=g,m*=g,c*=g)}a[b]= +k;a[b+1]=l;a[b+2]=m;a[b+3]=c}});Object.defineProperties(Aa.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this._onChangeCallback()}}});Object.assign(Aa.prototype,{isQuaternion:!0,set:function(a,b,c,d){this._x=a;this._y= b;this._z=c;this._w=d;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this._onChangeCallback();return this},setFromEuler:function(a,b){if(!a||!a.isEuler)throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=a._x,d=a._y,e=a._z;a=a.order;var f=Math.cos,g=Math.sin,k=f(c/2),l=f(d/2);f=f(e/2);c=g(c/2);d=g(d/ 2);e=g(e/2);"XYZ"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f-c*l*e,this._z=k*l*e+c*d*f,this._w=k*l*f-c*d*e):"YXZ"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f-c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f+c*d*e):"ZXY"===a?(this._x=c*l*f-k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e+c*d*f,this._w=k*l*f-c*d*e):"ZYX"===a?(this._x=c*l*f-k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f+c*d*e):"YZX"===a?(this._x=c*l*f+k*d*e,this._y=k*d*f+c*l*e,this._z=k*l*e-c*d*f,this._w=k*l*f-c*d*e):"XZY"===a&&(this._x=c*l*f-k*d* e,this._y=k*d*f-c*l*e,this._z=k*l*e+c*d*f,this._w=k*l*f+c*d*e);!1!==b&&this._onChangeCallback();return this},setFromAxisAngle:function(a,b){b/=2;var c=Math.sin(b);this._x=a.x*c;this._y=a.y*c;this._z=a.z*c;this._w=Math.cos(b);this._onChangeCallback();return this},setFromRotationMatrix:function(a){var b=a.elements,c=b[0];a=b[4];var d=b[8],e=b[1],f=b[5],g=b[9],k=b[2],l=b[6];b=b[10];var m=c+f+b;0f&&c>b?(c=2*Math.sqrt(1+ @@ -396,11 +387,11 @@ a.x*b.y-a.y*b.x);this._w=c;return this.normalize()},angleTo:function(a){return 2 this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var a=this.length();0===a?(this._z=this._y=this._x=0,this._w=1):(a=1/a,this._x*=a,this._y*=a,this._z*=a,this._w*=a);this._onChangeCallback();return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(a, b)):this.multiplyQuaternions(this,a)},premultiply:function(a){return this.multiplyQuaternions(a,this)},multiplyQuaternions:function(a,b){var c=a._x,d=a._y,e=a._z;a=a._w;var f=b._x,g=b._y,k=b._z;b=b._w;this._x=c*b+a*f+d*k-e*g;this._y=d*b+a*g+e*f-c*k;this._z=e*b+a*k+c*g-d*f;this._w=a*b-c*f-d*g-e*k;this._onChangeCallback();return this},slerp:function(a,b){if(0===b)return this;if(1===b)return this.copy(a);var c=this._x,d=this._y,e=this._z,f=this._w,g=f*a._w+c*a._x+d*a._y+e*a._z;0>g?(this._w=-a._w,this._x= -a._x,this._y=-a._y,this._z=-a._z,g=-g):this.copy(a);if(1<=g)return this._w=f,this._x=c,this._y=d,this._z=e,this;a=1-g*g;if(a<=Number.EPSILON)return g=1-b,this._w=g*f+b*this._w,this._x=g*c+b*this._x,this._y=g*d+b*this._y,this._z=g*e+b*this._z,this.normalize(),this._onChangeCallback(),this;a=Math.sqrt(a);var k=Math.atan2(a,g);g=Math.sin((1-b)*k)/a;b=Math.sin(b*k)/a;this._w=f*g+this._w*b;this._x=c*g+this._x*b;this._y=d*g+this._y*b;this._z=e*g+this._z*b;this._onChangeCallback();return this},equals:function(a){return a._x=== -this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var bh=new n,Gi=new Ca;Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x= +this._x&&a._y===this._y&&a._z===this._z&&a._w===this._w},fromArray:function(a,b){void 0===b&&(b=0);this._x=a[b];this._y=a[b+1];this._z=a[b+2];this._w=a[b+3];this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var $g=new n,Fi=new Aa;Object.assign(n.prototype,{isVector3:!0,set:function(a,b,c){this.x= a;this.y=b;this.z=c;return this},setScalar:function(a){this.z=this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+ a);}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},addScaledVector:function(a, b){this.x+=a.x*b;this.y+=a.y*b;this.z+=a.z*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subScalar:function(a){this.x-=a;this.y-=a;this.z-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."), -this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(a){a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(Gi.setFromEuler(a))},applyAxisAngle:function(a,b){return this.applyQuaternion(Gi.setFromAxisAngle(a, +this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x*b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyEuler:function(a){a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(Fi.setFromEuler(a))},applyAxisAngle:function(a,b){return this.applyQuaternion(Fi.setFromAxisAngle(a, b))},applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyNormalMatrix:function(a){return this.applyMatrix3(a).normalize()},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;var e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]);this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b= this.x,c=this.y,d=this.z,e=a.x,f=a.y,g=a.z;a=a.w;var k=a*b+f*d-g*c,l=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=k*a+b*-e+l*-g-m*-f;this.y=l*a+b*-f+m*-e-k*-g;this.z=m*a+b*-g+k*-f-l*-e;return this},project:function(a){return this.applyMatrix4(a.matrixWorldInverse).applyMatrix4(a.projectionMatrix)},unproject:function(a){return this.applyMatrix4(a.projectionMatrixInverse).applyMatrix4(a.matrixWorld)},transformDirection:function(a){var b=this.x,c=this.y,d=this.z;a=a.elements;this.x=a[0]*b+a[4]*c+ a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]*b+a[6]*c+a[10]*d;return this.normalize()},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);this.z=Math.min(this.z,a.z);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);this.z=Math.max(this.z,a.z);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x)); @@ -408,198 +399,198 @@ this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this. Math.ceil(this.x);this.y=Math.ceil(this.y);this.z=Math.ceil(this.z);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.z=Math.round(this.z);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);this.z=0>this.z?Math.ceil(this.z):Math.floor(this.z);return this},negate:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z;return this},dot:function(a){return this.x*a.x+this.y* a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(a){return this.normalize().multiplyScalar(a)},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},lerpVectors:function(a, b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},cross:function(a,b){return void 0!==b?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b)):this.crossVectors(this,a)},crossVectors:function(a,b){var c=a.x,d=a.y;a=a.z;var e=b.x,f=b.y;b=b.z;this.x=d*b-a*f;this.y=a*e-c*b;this.z=c*f-d*e;return this},projectOnVector:function(a){var b=a.lengthSq();if(0===b)return this.set(0,0,0);b=a.dot(this)/b;return this.copy(a).multiplyScalar(b)}, -projectOnPlane:function(a){bh.copy(this).projectOnVector(a);return this.sub(bh)},reflect:function(a){return this.sub(bh.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){var b=Math.sqrt(this.lengthSq()*a.lengthSq());if(0===b)return Math.PI/2;a=this.dot(a)/b;return Math.acos(L.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x- +projectOnPlane:function(a){$g.copy(this).projectOnVector(a);return this.sub($g)},reflect:function(a){return this.sub($g.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){var b=Math.sqrt(this.lengthSq()*a.lengthSq());if(0===b)return Math.PI/2;a=this.dot(a)/b;return Math.acos(L.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},manhattanDistanceTo:function(a){return Math.abs(this.x- a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){return this.setFromSphericalCoords(a.radius,a.phi,a.theta)},setFromSphericalCoords:function(a,b,c){var d=Math.sin(b)*a;this.x=d*Math.sin(c);this.y=Math.cos(b)*a;this.z=d*Math.cos(c);return this},setFromCylindrical:function(a){return this.setFromCylindricalCoords(a.radius,a.theta,a.y)},setFromCylindricalCoords:function(a,b,c){this.x=a*Math.sin(b);this.y=c;this.z=a*Math.cos(b);return this},setFromMatrixPosition:function(a){a= a.elements;this.x=a[12];this.y=a[13];this.z=a[14];return this},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){return this.fromArray(a.elements,4*b)},setFromMatrix3Column:function(a,b){return this.fromArray(a.elements,3*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0=== -b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var od=new n,X=new P,Rk=new n(0,0,0),Sk=new n(1,1,1),Mb=new n,Df=new n,ma=new n;Object.assign(P.prototype,{isMatrix4:!0,set:function(a, -b,c,d,e,f,g,k,l,m,h,p,q,n,r,u){var x=this.elements;x[0]=a;x[4]=b;x[8]=c;x[12]=d;x[1]=e;x[5]=f;x[9]=g;x[13]=k;x[2]=l;x[6]=m;x[10]=h;x[14]=p;x[3]=q;x[7]=n;x[11]=r;x[15]=u;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new P).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]= +b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);return this}});var od=new n,Y=new P,Pk=new n(0,0,0),Qk=new n(1,1,1),Mb=new n,Df=new n,qa=new n;Object.assign(P.prototype,{isMatrix4:!0,set:function(a, +b,c,d,e,f,g,k,l,m,h,p,n,t,q,u){var x=this.elements;x[0]=a;x[4]=b;x[8]=c;x[12]=d;x[1]=e;x[5]=f;x[9]=g;x[13]=k;x[2]=l;x[6]=m;x[10]=h;x[14]=p;x[3]=n;x[7]=t;x[11]=q;x[15]=u;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new P).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]= a[13];b[14]=a[14];b[15]=a[15];return this},copyPosition:function(a){var b=this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(a){var b=this.elements,c=a.elements,d=1/od.setFromMatrixColumn(a,0).length(),e=1/od.setFromMatrixColumn(a, 1).length();a=1/od.setFromMatrixColumn(a,2).length();b[0]=c[0]*d;b[1]=c[1]*d;b[2]=c[2]*d;b[3]=0;b[4]=c[4]*e;b[5]=c[5]*e;b[6]=c[6]*e;b[7]=0;b[8]=c[8]*a;b[9]=c[9]*a;b[10]=c[10]*a;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromEuler:function(a){a&&a.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c);c=Math.sin(c);var g=Math.cos(d);d=Math.sin(d);var k= Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a=f*k;var l=f*e,m=c*k,h=c*e;b[0]=g*k;b[4]=-g*e;b[8]=d;b[1]=l+m*d;b[5]=a-h*d;b[9]=-c*g;b[2]=h-a*d;b[6]=m+l*d;b[10]=f*g}else"YXZ"===a.order?(a=g*k,l=g*e,m=d*k,h=d*e,b[0]=a+h*c,b[4]=m*c-l,b[8]=f*d,b[1]=f*e,b[5]=f*k,b[9]=-c,b[2]=l*c-m,b[6]=h+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*k,l=g*e,m=d*k,h=d*e,b[0]=a-h*c,b[4]=-f*e,b[8]=m+l*c,b[1]=l+m*c,b[5]=f*k,b[9]=h-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*k,l=f*e,m=c*k,h=c*e,b[0]=g*k,b[4]=m*d-l,b[8]=a*d+ -h,b[1]=g*e,b[5]=h*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=h-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*k,b[9]=-c*k,b[2]=-d*k,b[6]=l*e+m,b[10]=a-h*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=-e,b[8]=d*k,b[1]=a*e+h,b[5]=f*k,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*k,b[10]=h*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){return this.compose(Rk,a,Sk)},lookAt:function(a,b,c){var d=this.elements; -ma.subVectors(a,b);0===ma.lengthSq()&&(ma.z=1);ma.normalize();Mb.crossVectors(c,ma);0===Mb.lengthSq()&&(1===Math.abs(c.z)?ma.x+=1E-4:ma.z+=1E-4,ma.normalize(),Mb.crossVectors(c,ma));Mb.normalize();Df.crossVectors(ma,Mb);d[0]=Mb.x;d[4]=Df.x;d[8]=ma.x;d[1]=Mb.y;d[5]=Df.y;d[9]=ma.y;d[2]=Mb.z;d[6]=Df.z;d[10]=ma.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a, -b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],k=c[1],l=c[5],m=c[9],h=c[13],p=c[2],q=c[6],n=c[10],r=c[14],u=c[3],y=c[7],w=c[11];c=c[15];var v=d[0],A=d[4],B=d[8],D=d[12],z=d[1],E=d[5],F=d[9],H=d[13],K=d[2],G=d[6],L=d[10],M=d[14],N=d[3],O=d[7],P=d[11];d=d[15];b[0]=a*v+e*z+f*K+g*N;b[4]=a*A+e*E+f*G+g*O;b[8]=a*B+e*F+f*L+g*P;b[12]=a*D+e*H+f*M+g* -d;b[1]=k*v+l*z+m*K+h*N;b[5]=k*A+l*E+m*G+h*O;b[9]=k*B+l*F+m*L+h*P;b[13]=k*D+l*H+m*M+h*d;b[2]=p*v+q*z+n*K+r*N;b[6]=p*A+q*E+n*G+r*O;b[10]=p*B+q*F+n*L+r*P;b[14]=p*D+q*H+n*M+r*d;b[3]=u*v+y*z+w*K+c*N;b[7]=u*A+y*E+w*G+c*O;b[11]=u*B+y*F+w*L+c*P;b[15]=u*D+y*H+w*M+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},determinant:function(){var a=this.elements, -b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],k=a[9],l=a[13],m=a[2],h=a[6],p=a[10],q=a[14];return a[3]*(+e*k*h-d*l*h-e*g*p+c*l*p+d*g*q-c*k*q)+a[7]*(+b*k*q-b*l*p+e*f*p-d*f*q+d*l*m-e*k*m)+a[11]*(+b*l*h-b*g*q-e*f*h+c*f*q+e*g*m-c*l*m)+a[15]*(-d*g*m-b*k*h+b*g*p+d*f*h-c*f*p+c*k*m)},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a, -b,c){var d=this.elements;a.isVector3?(d[12]=a.x,d[13]=a.y,d[14]=a.z):(d[12]=a,d[13]=b,d[14]=c);return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],k=d[4],l=d[5],m=d[6],h=d[7],p=d[8],q=d[9],n=d[10],r=d[11],u=d[12],y=d[13],w=d[14];d=d[15];var v=q*w*h-y*n*h+y*m*r-l*w*r-q*m*d+l*n*d,A=u*n*h-p*w*h-u*m*r+k*w*r+p*m*d-k*n*d,B=p*y*h-u*q*h+u*l*r-k*y*r-p*l*d+k*q*d,D=u*q*m-p*y*m-u*l*n+k*y*n+p*l*w-k*q*w,z=a*v+e*A+f*B+g*D;if(0===z){if(!0===b)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"); -console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return this.identity()}b=1/z;c[0]=v*b;c[1]=(y*n*g-q*w*g-y*f*r+e*w*r+q*f*d-e*n*d)*b;c[2]=(l*w*g-y*m*g+y*f*h-e*w*h-l*f*d+e*m*d)*b;c[3]=(q*m*g-l*n*g-q*f*h+e*n*h+l*f*r-e*m*r)*b;c[4]=A*b;c[5]=(p*w*g-u*n*g+u*f*r-a*w*r-p*f*d+a*n*d)*b;c[6]=(u*m*g-k*w*g-u*f*h+a*w*h+k*f*d-a*m*d)*b;c[7]=(k*n*g-p*m*g+p*f*h-a*n*h-k*f*r+a*m*r)*b;c[8]=B*b;c[9]=(u*q*g-p*y*g-u*e*r+a*y*r+p*e*d-a*q*d)*b;c[10]=(k*y*g-u*l*g+u*e*h-a*y*h-k*e*d+a*l*d)*b;c[11]= -(p*l*g-k*q*g-p*e*h+a*q*h+k*e*r-a*l*r)*b;c[12]=D*b;c[13]=(p*y*f-u*q*f+u*e*n-a*y*n-p*e*w+a*q*w)*b;c[14]=(u*l*f-k*y*f-u*e*m+a*y*m+k*e*w-a*l*w)*b;c[15]=(k*q*f-p*l*f+p*e*m-a*q*m-k*e*n+a*l*n)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6], +h,b[1]=g*e,b[5]=h*d+a,b[9]=l*d-m,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=h-a*e,b[8]=m*e+l,b[1]=e,b[5]=f*k,b[9]=-c*k,b[2]=-d*k,b[6]=l*e+m,b[10]=a-h*e):"XZY"===a.order&&(a=f*g,l=f*d,m=c*g,h=c*d,b[0]=g*k,b[4]=-e,b[8]=d*k,b[1]=a*e+h,b[5]=f*k,b[9]=l*e-m,b[2]=m*e-l,b[6]=c*k,b[10]=h*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){return this.compose(Pk,a,Qk)},lookAt:function(a,b,c){var d=this.elements; +qa.subVectors(a,b);0===qa.lengthSq()&&(qa.z=1);qa.normalize();Mb.crossVectors(c,qa);0===Mb.lengthSq()&&(1===Math.abs(c.z)?qa.x+=1E-4:qa.z+=1E-4,qa.normalize(),Mb.crossVectors(c,qa));Mb.normalize();Df.crossVectors(qa,Mb);d[0]=Mb.x;d[4]=Df.x;d[8]=qa.x;d[1]=Mb.y;d[5]=Df.y;d[9]=qa.y;d[2]=Mb.z;d[6]=Df.z;d[10]=qa.z;return this},multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a, +b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements;b=this.elements;a=c[0];var e=c[4],f=c[8],g=c[12],k=c[1],l=c[5],m=c[9],h=c[13],p=c[2],n=c[6],t=c[10],q=c[14],u=c[3],C=c[7],w=c[11];c=c[15];var v=d[0],z=d[4],B=d[8],A=d[12],y=d[1],D=d[5],F=d[9],G=d[13],K=d[2],H=d[6],L=d[10],M=d[14],N=d[3],O=d[7],P=d[11];d=d[15];b[0]=a*v+e*y+f*K+g*N;b[4]=a*z+e*D+f*H+g*O;b[8]=a*B+e*F+f*L+g*P;b[12]=a*A+e*G+f*M+g* +d;b[1]=k*v+l*y+m*K+h*N;b[5]=k*z+l*D+m*H+h*O;b[9]=k*B+l*F+m*L+h*P;b[13]=k*A+l*G+m*M+h*d;b[2]=p*v+n*y+t*K+q*N;b[6]=p*z+n*D+t*H+q*O;b[10]=p*B+n*F+t*L+q*P;b[14]=p*A+n*G+t*M+q*d;b[3]=u*v+C*y+w*K+c*N;b[7]=u*z+C*D+w*H+c*O;b[11]=u*B+C*F+w*L+c*P;b[15]=u*A+C*G+w*M+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},determinant:function(){var a=this.elements, +b=a[0],c=a[4],d=a[8],e=a[12],f=a[1],g=a[5],k=a[9],l=a[13],m=a[2],h=a[6],p=a[10],n=a[14];return a[3]*(+e*k*h-d*l*h-e*g*p+c*l*p+d*g*n-c*k*n)+a[7]*(+b*k*n-b*l*p+e*f*p-d*f*n+d*l*m-e*k*m)+a[11]*(+b*l*h-b*g*n-e*f*h+c*f*n+e*g*m-c*l*m)+a[15]*(-d*g*m-b*k*h+b*g*p+d*f*h-c*f*p+c*k*m)},transpose:function(){var a=this.elements;var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},setPosition:function(a, +b,c){var d=this.elements;a.isVector3?(d[12]=a.x,d[13]=a.y,d[14]=a.z):(d[12]=a,d[13]=b,d[14]=c);return this},getInverse:function(a,b){var c=this.elements,d=a.elements;a=d[0];var e=d[1],f=d[2],g=d[3],k=d[4],l=d[5],m=d[6],h=d[7],p=d[8],n=d[9],t=d[10],q=d[11],u=d[12],v=d[13],w=d[14];d=d[15];var E=n*w*h-v*t*h+v*m*q-l*w*q-n*m*d+l*t*d,z=u*t*h-p*w*h-u*m*q+k*w*q+p*m*d-k*t*d,B=p*v*h-u*n*h+u*l*q-k*v*q-p*l*d+k*n*d,A=u*n*m-p*v*m-u*l*t+k*v*t+p*l*w-k*n*w,y=a*E+e*z+f*B+g*A;if(0===y){if(!0===b)throw Error("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0"); +console.warn("THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0");return this.identity()}b=1/y;c[0]=E*b;c[1]=(v*t*g-n*w*g-v*f*q+e*w*q+n*f*d-e*t*d)*b;c[2]=(l*w*g-v*m*g+v*f*h-e*w*h-l*f*d+e*m*d)*b;c[3]=(n*m*g-l*t*g-n*f*h+e*t*h+l*f*q-e*m*q)*b;c[4]=z*b;c[5]=(p*w*g-u*t*g+u*f*q-a*w*q-p*f*d+a*t*d)*b;c[6]=(u*m*g-k*w*g-u*f*h+a*w*h+k*f*d-a*m*d)*b;c[7]=(k*t*g-p*m*g+p*f*h-a*t*h-k*f*q+a*m*q)*b;c[8]=B*b;c[9]=(u*n*g-p*v*g-u*e*q+a*v*q+p*e*d-a*n*d)*b;c[10]=(k*v*g-u*l*g+u*e*h-a*v*h-k*e*d+a*l*d)*b;c[11]= +(p*l*g-k*n*g-p*e*h+a*n*h+k*e*q-a*l*q)*b;c[12]=A*b;c[13]=(p*v*f-u*n*f+u*e*t-a*v*t-p*e*w+a*n*w)*b;c[14]=(u*l*f-k*v*f-u*e*m+a*v*m+k*e*w-a*l*w)*b;c[15]=(k*n*f-p*l*f+p*e*m-a*n*m-k*e*t+a*l*t)*b;return this},scale:function(a){var b=this.elements,c=a.x,d=a.y;a=a.z;b[0]*=c;b[4]*=d;b[8]*=a;b[1]*=c;b[5]*=d;b[9]*=a;b[2]*=c;b[6]*=d;b[10]*=a;b[3]*=c;b[7]*=d;b[11]*=a;return this},getMaxScaleOnAxis:function(){var a=this.elements;return Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1]+a[2]*a[2],a[4]*a[4]+a[5]*a[5]+a[6]*a[6], a[8]*a[8]+a[9]*a[9]+a[10]*a[10]))},makeTranslation:function(a,b,c){this.set(1,0,0,a,0,1,0,b,0,0,1,c,0,0,0,1);return this},makeRotationX:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(1,0,0,0,0,b,-a,0,0,a,b,0,0,0,0,1);return this},makeRotationY:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,0,a,0,0,1,0,0,-a,0,b,0,0,0,0,1);return this},makeRotationZ:function(a){var b=Math.cos(a);a=Math.sin(a);this.set(b,-a,0,0,a,b,0,0,0,0,1,0,0,0,0,1);return this},makeRotationAxis:function(a,b){var c= Math.cos(b);b=Math.sin(b);var d=1-c,e=a.x,f=a.y;a=a.z;var g=d*e,k=d*f;this.set(g*e+c,g*f-b*a,g*a+b*f,0,g*f+b*a,k*f+c,k*a-b*e,0,g*a-b*f,k*a+b*e,d*a*a+c,0,0,0,0,1);return this},makeScale:function(a,b,c){this.set(a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1);return this},makeShear:function(a,b,c){this.set(1,b,c,0,a,1,c,0,a,b,1,0,0,0,0,1);return this},compose:function(a,b,c){var d=this.elements,e=b._x,f=b._y,g=b._z,k=b._w,l=e+e,m=f+f,h=g+g;b=e*l;var p=e*m;e*=h;var n=f*m;f*=h;g*=h;l*=k;m*=k;k*=h;h=c.x;var t=c.y;c= -c.z;d[0]=(1-(n+g))*h;d[1]=(p+k)*h;d[2]=(e-m)*h;d[3]=0;d[4]=(p-k)*t;d[5]=(1-(b+g))*t;d[6]=(f+l)*t;d[7]=0;d[8]=(e+m)*c;d[9]=(f-l)*c;d[10]=(1-(b+n))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(a,b,c){var d=this.elements,e=od.set(d[0],d[1],d[2]).length(),f=od.set(d[4],d[5],d[6]).length(),g=od.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];X.copy(this);a=1/e;d=1/f;var k=1/g;X.elements[0]*=a;X.elements[1]*=a;X.elements[2]*=a; -X.elements[4]*=d;X.elements[5]*=d;X.elements[6]*=d;X.elements[8]*=k;X.elements[9]*=k;X.elements[10]*=k;b.setFromRotationMatrix(X);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0; +c.z;d[0]=(1-(n+g))*h;d[1]=(p+k)*h;d[2]=(e-m)*h;d[3]=0;d[4]=(p-k)*t;d[5]=(1-(b+g))*t;d[6]=(f+l)*t;d[7]=0;d[8]=(e+m)*c;d[9]=(f-l)*c;d[10]=(1-(b+n))*c;d[11]=0;d[12]=a.x;d[13]=a.y;d[14]=a.z;d[15]=1;return this},decompose:function(a,b,c){var d=this.elements,e=od.set(d[0],d[1],d[2]).length(),f=od.set(d[4],d[5],d[6]).length(),g=od.set(d[8],d[9],d[10]).length();0>this.determinant()&&(e=-e);a.x=d[12];a.y=d[13];a.z=d[14];Y.copy(this);a=1/e;d=1/f;var k=1/g;Y.elements[0]*=a;Y.elements[1]*=a;Y.elements[2]*=a; +Y.elements[4]*=d;Y.elements[5]*=d;Y.elements[6]*=d;Y.elements[8]*=k;Y.elements[9]*=k;Y.elements[10]*=k;b.setFromRotationMatrix(Y);c.x=e;c.y=f;c.z=g;return this},makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0; g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,k=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*k;g[4]=0;g[8]=0;g[12]=-((b+a)*k);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a, -b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var Hi=new P,Ii=new Ca;Tb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");Tb.DefaultOrder="XYZ";Object.defineProperties(Tb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y}, +b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});var Gi=new P,Hi=new Aa;Tb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" ");Tb.DefaultOrder="XYZ";Object.defineProperties(Tb.prototype,{x:{get:function(){return this._x},set:function(a){this._x=a;this._onChangeCallback()}},y:{get:function(){return this._y}, set:function(a){this._y=a;this._onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this._onChangeCallback()}},order:{get:function(){return this._order},set:function(a){this._order=a;this._onChangeCallback()}}});Object.assign(Tb.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._order=d||this._order;this._onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(a){this._x= a._x;this._y=a._y;this._z=a._z;this._order=a._order;this._onChangeCallback();return this},setFromRotationMatrix:function(a,b,c){var d=L.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],k=e[1],l=e[5],m=e[9],h=e[2],p=e[6];e=e[10];b=b||this._order;"XYZ"===b?(this._y=Math.asin(d(g,-1,1)),.9999999>Math.abs(g)?(this._x=Math.atan2(-m,e),this._z=Math.atan2(-f,a)):(this._x=Math.atan2(p,l),this._z=0)):"YXZ"===b?(this._x=Math.asin(-d(m,-1,1)),.9999999>Math.abs(m)?(this._y=Math.atan2(g,e),this._z=Math.atan2(k,l)): (this._y=Math.atan2(-h,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.9999999>Math.abs(p)?(this._y=Math.atan2(-h,e),this._z=Math.atan2(-f,l)):(this._y=0,this._z=Math.atan2(k,a))):"ZYX"===b?(this._y=Math.asin(-d(h,-1,1)),.9999999>Math.abs(h)?(this._x=Math.atan2(p,e),this._z=Math.atan2(k,a)):(this._x=0,this._z=Math.atan2(-f,l))):"YZX"===b?(this._z=Math.asin(d(k,-1,1)),.9999999>Math.abs(k)?(this._x=Math.atan2(-m,l),this._y=Math.atan2(-h,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z= -Math.asin(-d(f,-1,1)),.9999999>Math.abs(f)?(this._x=Math.atan2(p,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;!1!==c&&this._onChangeCallback();return this},setFromQuaternion:function(a,b,c){Hi.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(Hi,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){Ii.setFromEuler(this);return this.setFromQuaternion(Ii, +Math.asin(-d(f,-1,1)),.9999999>Math.abs(f)?(this._x=Math.atan2(p,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+b);this._order=b;!1!==c&&this._onChangeCallback();return this},setFromQuaternion:function(a,b,c){Gi.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(Gi,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){Hi.setFromEuler(this);return this.setFromQuaternion(Hi, a)},equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this._onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new n(this._x,this._y,this._z)},_onChange:function(a){this._onChangeCallback= -a;return this},_onChangeCallback:function(){}});Object.assign(Ie.prototype,{set:function(a){this.mask=1<e&&(e=m);h>f&&(f=h);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromBufferAttribute:function(a){for(var b=Infinity,c=Infinity,d=Infinity,e=-Infinity,f=-Infinity,g=-Infinity,k=0,l=a.count;ke&&(e=m);h>f&&(f=h);p>g&&(g=p)}this.min.set(b,c,d);this.max.set(e,f,g);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.y< -this.min.y||a.y>this.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new n);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.x< -this.min.x||a.min.x>this.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(a){this.clampPoint(a.center,Ae);return Ae.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(Be);Gf.subVectors(this.max,Be);qd.subVectors(a.a,Be);rd.subVectors(a.b,Be);sd.subVectors(a.c,Be);Nb.subVectors(rd,qd);Ob.subVectors(sd,rd);sc.subVectors(qd,sd);a=[0,-Nb.z,Nb.y,0,-Ob.z,Ob.y,0,-sc.z,sc.y,Nb.z,0,-Nb.x,Ob.z,0,-Ob.x,sc.z,0,-sc.x,-Nb.y,Nb.x,0,-Ob.y,Ob.x,0,-sc.y, -sc.x,0];if(!ag(a,qd,rd,sd,Gf))return!1;a=[1,0,0,0,1,0,0,0,1];if(!ag(a,qd,rd,sd,Gf))return!1;Hf.crossVectors(Nb,Ob);a=[Hf.x,Hf.y,Hf.z];return ag(a,qd,rd,sd,Gf)},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new n);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ae.copy(a).clamp(this.min,this.max).sub(a).length()},getBoundingSphere:function(a){void 0===a&&console.error("THREE.Box3: .getBoundingSphere() target is now required"); -this.getCenter(a.center);a.radius=.5*this.getSize(Ae).length();return a},intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;zb[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a);zb[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a);zb[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);zb[3].set(this.min.x, -this.max.y,this.max.z).applyMatrix4(a);zb[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);zb[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);zb[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);zb[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(zb);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Xk=new Sa;Object.assign(pb.prototype,{set:function(a, -b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(a,b){var c=this.center;void 0!==b?c.copy(b):Xk.setFromPoints(a).getCenter(c);for(var d=b=0,e=a.length;d=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<= -this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)-this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a);void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"), -b=new n);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center));return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Sa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&& -a.radius===this.radius}});var Ab=new n,ch=new n,If=new n,Pb=new n,dh=new n,Jf=new n,eh=new n;Object.assign(Vb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"),b=new n);return b.copy(this.direction).multiplyScalar(a).add(this.origin)}, -lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(a){this.origin.copy(this.at(a,Ab));return this},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),b=new n);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(a){var b= -Ab.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);Ab.copy(this.direction).multiplyScalar(b).add(this.origin);return Ab.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){ch.copy(a).add(b).multiplyScalar(.5);If.copy(b).sub(a).normalize();Pb.copy(this.origin).sub(ch);var e=.5*a.distanceTo(b),f=-this.direction.dot(If),g=Pb.dot(this.direction),k=-Pb.dot(If),l=Pb.lengthSq(),m=Math.abs(1-f*f);if(0=-h?b<=h?(e=1/m, -a*=e,b*=e,f=a*(a+f*b+2*g)+b*(f*a+b+2*k)+l):(b=e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):(b=-e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):b<=-h?(a=Math.max(0,-(-f*e+g)),b=0a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<= -a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin);return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var k=(a.min.y-f.y)*d;d*=a.max.y-f.y}else k=(a.max.y-f.y)*d,d*=a.min.y-f.y; -if(g>d||k>c)return null;if(k>g||g!==g)g=k;if(da||k>c)return null;if(k>g||g!==g)g=k;if(ac?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,Ab)},intersectTriangle:function(a,b,c,d,e){dh.subVectors(b,a);Jf.subVectors(c,a);eh.crossVectors(dh,Jf);b=this.direction.dot(eh);if(0b)d=-1,b=-b;else return null;Pb.subVectors(this.origin, -a);a=d*this.direction.dot(Jf.crossVectors(Pb,Jf));if(0>a)return null;c=d*this.direction.dot(dh.cross(Pb));if(0>c||a+c>b)return null;a=-d*Pb.dot(eh);return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var fh=new n,Yk=new n,Zk=new ya;Object.assign(Ta.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b; -return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=fh.subVectors(c,b).cross(Yk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a= -1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a, -b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(fh),d=this.normal.dot(c);if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||1b&&0a&&0=Cb.x+Cb.y},getUV:function(a,b,c,d,e,f,g,k){this.getBarycoord(a,b,c,d,Cb);k.set(0,0);k.addScaledVector(e,Cb.x);k.addScaledVector(f,Cb.y);k.addScaledVector(g,Cb.z);return k},isFrontFacing:function(a,b,c,d){bb.subVectors(c, -b);Bb.subVectors(a,b);return 0>bb.cross(Bb).dot(d)?!0:!1}});Object.assign(pa.prototype,{set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){bb.subVectors(this.c,this.b);Bb.subVectors(this.a,this.b);return.5*bb.cross(Bb).length()}, -getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return pa.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Ta);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return pa.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a, -b,c,d,e){return pa.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return pa.containsPoint(a,this.a,this.b,this.c)},isFrontFacing:function(a){return pa.isFrontFacing(this.a,this.b,this.c,a)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new n);var c=this.a,d=this.b,e=this.c;td.subVectors(d,c);ud.subVectors(e,c);hh.subVectors(a,c);var f=td.dot(hh), -g=ud.dot(hh);if(0>=f&&0>=g)return b.copy(c);ih.subVectors(a,d);var k=td.dot(ih),l=ud.dot(ih);if(0<=k&&l<=k)return b.copy(d);var m=f*l-k*g;if(0>=m&&0<=f&&0>=k)return d=f/(f-k),b.copy(c).addScaledVector(td,d);jh.subVectors(a,e);a=td.dot(jh);var h=ud.dot(jh);if(0<=h&&a<=h)return b.copy(e);f=a*g-f*h;if(0>=f&&0<=g&&0>=h)return m=g/(g-h),b.copy(c).addScaledVector(ud,m);g=k*h-a*l;if(0>=g&&0<=l-k&&0<=a-h)return Ni.subVectors(e,d),m=(l-k)/(l-k+(a-h)),b.copy(d).addScaledVector(Ni,m);e=1/(g+f+m);d=f*e;m*=e; -return b.copy(c).addScaledVector(td,d).addScaledVector(ud,m)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Oi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535, -darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842, -fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762, -lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685, -navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256, -skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ba={h:0,s:0,l:0},Kf={h:0,s:0,l:0};Object.assign(A.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this}, -setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){a=L.euclideanModulo(a,1);b=L.clamp(b,0,1);c=L.clamp(c,0,1);0===b?this.r=this.g=this.b=c:(b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=bg(c,b,a+1/3),this.g=bg(c,b,a),this.b=bg(c,b,a-1/3));return this},setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&& -console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100, -parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+ -c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return a&&0=k?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent=this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;d.stencilWrite=this.stencilWrite;d.stencilWriteMask=this.stencilWriteMask;d.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilFuncMask=this.stencilFuncMask;d.stencilFail=this.stencilFail;d.stencilZFail=this.stencilZFail;d.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(d.rotation=this.rotation); -!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&&(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0this.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box3: .getParameter() target is now required"),b=new n);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(a){return a.max.xthis.max.x|| +a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},intersectsSphere:function(a){this.clampPoint(a.center,Ae);return Ae.distanceToSquared(a.center)<=a.radius*a.radius},intersectsPlane:function(a){if(0=-a.constant},intersectsTriangle:function(a){if(this.isEmpty())return!1;this.getCenter(Be);Ff.subVectors(this.max,Be);qd.subVectors(a.a,Be);rd.subVectors(a.b,Be);sd.subVectors(a.c,Be);Nb.subVectors(rd,qd);Ob.subVectors(sd,rd);sc.subVectors(qd,sd);a=[0,-Nb.z,Nb.y,0,-Ob.z,Ob.y,0,-sc.z,sc.y,Nb.z,0,-Nb.x,Ob.z,0,-Ob.x,sc.z,0,-sc.x,-Nb.y,Nb.x,0,-Ob.y,Ob.x,0,-sc.y,sc.x,0];if(!$f(a,qd,rd,sd,Ff))return!1; +a=[1,0,0,0,1,0,0,0,1];if(!$f(a,qd,rd,sd,Ff))return!1;Gf.crossVectors(Nb,Ob);a=[Gf.x,Gf.y,Gf.z];return $f(a,qd,rd,sd,Ff)},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box3: .clampPoint() target is now required"),b=new n);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return Ae.copy(a).clamp(this.min,this.max).sub(a).length()},getBoundingSphere:function(a){void 0===a&&console.error("THREE.Box3: .getBoundingSphere() target is now required");this.getCenter(a.center); +a.radius=.5*this.getSize(Ae).length();return a},intersect:function(a){this.min.max(a.min);this.max.min(a.max);this.isEmpty()&&this.makeEmpty();return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(a){if(this.isEmpty())return this;zb[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(a);zb[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(a);zb[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(a);zb[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(a); +zb[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(a);zb[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(a);zb[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(a);zb[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(a);this.setFromPoints(zb);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Vk=new Sa;Object.assign(pb.prototype,{set:function(a,b){this.center.copy(a);this.radius= +b;return this},setFromPoints:function(a,b){var c=this.center;void 0!==b?c.copy(b):Vk.setFromPoints(a).getCenter(c);for(var d=b=0,e=a.length;d=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)- +this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},intersectsBox:function(a){return a.intersectsSphere(this)},intersectsPlane:function(a){return Math.abs(a.distanceToPoint(this.center))<=this.radius},clampPoint:function(a,b){var c=this.center.distanceToSquared(a);void 0===b&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),b=new n);b.copy(a);c>this.radius*this.radius&&(b.sub(this.center).normalize(),b.multiplyScalar(this.radius).add(this.center)); +return b},getBoundingBox:function(a){void 0===a&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),a=new Sa);a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a);this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius}});var Ab=new n,bh=new n,Hf=new n,Pb=new n,ch=new n,If=new n,dh=new n; +Object.assign(Vb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){void 0===b&&(console.warn("THREE.Ray: .at() target is now required"),b=new n);return b.copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize();return this},recast:function(a){this.origin.copy(this.at(a, +Ab));return this},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),b=new n);b.subVectors(a,this.origin);a=b.dot(this.direction);return 0>a?b.copy(this.origin):b.copy(this.direction).multiplyScalar(a).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(a){var b=Ab.subVectors(a,this.origin).dot(this.direction);if(0>b)return this.origin.distanceToSquared(a);Ab.copy(this.direction).multiplyScalar(b).add(this.origin); +return Ab.distanceToSquared(a)},distanceSqToSegment:function(a,b,c,d){bh.copy(a).add(b).multiplyScalar(.5);Hf.copy(b).sub(a).normalize();Pb.copy(this.origin).sub(bh);var e=.5*a.distanceTo(b),f=-this.direction.dot(Hf),g=Pb.dot(this.direction),k=-Pb.dot(Hf),l=Pb.lengthSq(),m=Math.abs(1-f*f);if(0=-h?b<=h?(e=1/m,a*=e,b*=e,f=a*(a+f*b+2*g)+b*(f*a+b+2*k)+l):(b=e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):(b=-e,a=Math.max(0,-(f*b+g)),f=-a*a+b*(b+2*k)+l):b<=-h?(a=Math.max(0, +-(-f*e+g)),b=0a)return null;a=Math.sqrt(a-d);d=c-a;c+=a;return 0>d&&0>c?null:0>d?this.at(c,b):this.at(d,b)},intersectsSphere:function(a){return this.distanceSqToPoint(a.center)<=a.radius*a.radius},distanceToPlane:function(a){var b=a.normal.dot(this.direction);if(0===b)return 0===a.distanceToPoint(this.origin)?0:null;a=-(this.origin.dot(a.normal)+a.constant)/b;return 0<=a?a:null},intersectPlane:function(a,b){a=this.distanceToPlane(a);return null===a?null:this.at(a,b)},intersectsPlane:function(a){var b=a.distanceToPoint(this.origin); +return 0===b||0>a.normal.dot(this.direction)*b?!0:!1},intersectBox:function(a,b){var c=1/this.direction.x;var d=1/this.direction.y;var e=1/this.direction.z,f=this.origin;if(0<=c){var g=(a.min.x-f.x)*c;c*=a.max.x-f.x}else g=(a.max.x-f.x)*c,c*=a.min.x-f.x;if(0<=d){var k=(a.min.y-f.y)*d;d*=a.max.y-f.y}else k=(a.max.y-f.y)*d,d*=a.min.y-f.y;if(g>d||k>c)return null;if(k>g||g!==g)g=k;if(da||k>c)return null; +if(k>g||g!==g)g=k;if(ac?null:this.at(0<=g?g:c,b)},intersectsBox:function(a){return null!==this.intersectBox(a,Ab)},intersectTriangle:function(a,b,c,d,e){ch.subVectors(b,a);If.subVectors(c,a);dh.crossVectors(ch,If);b=this.direction.dot(dh);if(0b)d=-1,b=-b;else return null;Pb.subVectors(this.origin,a);a=d*this.direction.dot(If.crossVectors(Pb,If));if(0>a)return null;c=d*this.direction.dot(ch.cross(Pb));if(0>c||a+c>b)return null;a=-d*Pb.dot(dh); +return 0>a?null:this.at(a/b,e)},applyMatrix4:function(a){this.origin.applyMatrix4(a);this.direction.transformDirection(a);return this},equals:function(a){return a.origin.equals(this.origin)&&a.direction.equals(this.direction)}});var eh=new n,Wk=new n,Xk=new wa;Object.assign(Ta.prototype,{isPlane:!0,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a); +this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(a,b,c){b=eh.subVectors(c,b).cross(Wk.subVectors(a,b)).normalize();this.setFromNormalAndCoplanarPoint(b,a);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate(); +return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){void 0===b&&(console.warn("THREE.Plane: .projectPoint() target is now required"),b=new n);return b.copy(this.normal).multiplyScalar(-this.distanceToPoint(a)).add(a)},intersectLine:function(a,b){void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(eh),d=this.normal.dot(c); +if(0===d){if(0===this.distanceToPoint(a.start))return b.copy(a.start)}else if(d=-(a.start.dot(this.normal)+this.constant)/d,!(0>d||1b&&0a&&0=Cb.x+Cb.y},getUV:function(a,b,c,d,e,f,g,k){this.getBarycoord(a,b,c,d,Cb);k.set(0,0);k.addScaledVector(e,Cb.x);k.addScaledVector(f,Cb.y);k.addScaledVector(g,Cb.z);return k},isFrontFacing:function(a,b,c,d){bb.subVectors(c,b);Bb.subVectors(a,b);return 0>bb.cross(Bb).dot(d)?!0:!1}});Object.assign(oa.prototype,{set:function(a, +b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},getArea:function(){bb.subVectors(this.c,this.b);Bb.subVectors(this.a,this.b);return.5*bb.cross(Bb).length()},getMidpoint:function(a){void 0===a&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"), +a=new n);return a.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(a){return oa.getNormal(this.a,this.b,this.c,a)},getPlane:function(a){void 0===a&&(console.warn("THREE.Triangle: .getPlane() target is now required"),a=new Ta);return a.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(a,b){return oa.getBarycoord(a,this.a,this.b,this.c,b)},getUV:function(a,b,c,d,e){return oa.getUV(a,this.a,this.b,this.c,b,c,d,e)},containsPoint:function(a){return oa.containsPoint(a, +this.a,this.b,this.c)},isFrontFacing:function(a){return oa.isFrontFacing(this.a,this.b,this.c,a)},intersectsBox:function(a){return a.intersectsTriangle(this)},closestPointToPoint:function(a,b){void 0===b&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),b=new n);var c=this.a,d=this.b,e=this.c;td.subVectors(d,c);ud.subVectors(e,c);gh.subVectors(a,c);var f=td.dot(gh),g=ud.dot(gh);if(0>=f&&0>=g)return b.copy(c);hh.subVectors(a,d);var k=td.dot(hh),l=ud.dot(hh);if(0<=k&&l<= +k)return b.copy(d);var h=f*l-k*g;if(0>=h&&0<=f&&0>=k)return d=f/(f-k),b.copy(c).addScaledVector(td,d);ih.subVectors(a,e);a=td.dot(ih);var x=ud.dot(ih);if(0<=x&&a<=x)return b.copy(e);f=a*g-f*x;if(0>=f&&0<=g&&0>=x)return h=g/(g-x),b.copy(c).addScaledVector(ud,h);g=k*x-a*l;if(0>=g&&0<=l-k&&0<=a-x)return Mi.subVectors(e,d),h=(l-k)/(l-k+(a-x)),b.copy(d).addScaledVector(Mi,h);e=1/(g+f+h);d=f*e;h*=e;return b.copy(c).addScaledVector(td,d).addScaledVector(ud,h)},equals:function(a){return a.a.equals(this.a)&& +a.b.equals(this.b)&&a.c.equals(this.c)}});var Ni={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017, +darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504, +green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734, +lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734, +palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407, +steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},za={h:0,s:0,l:0},Jf={h:0,s:0,l:0};Object.assign(z.prototype,{isColor:!0,r:1,g:1,b:1,set:function(a){a&&a.isColor?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setScalar:function(a){this.b=this.g=this.r=a;return this},setHex:function(a){a=Math.floor(a); +this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){a=L.euclideanModulo(a,1);b=L.clamp(b,0,1);c=L.clamp(c,0,1);0===b?this.r=this.g=this.b=c:(b=.5>=c?c*(1+b):c+b-c*b,c=2*c-b,this.r=ag(c,b,a+1/3),this.g=ag(c,b,a),this.b=ag(c,b,a-1/3));return this},setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c= +/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100, +parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){d=parseFloat(c[1])/360;var e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r= +parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return a&&0=k?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(cthis.opacity&&(d.opacity=this.opacity);!0===this.transparent&&(d.transparent= +this.transparent);d.depthFunc=this.depthFunc;d.depthTest=this.depthTest;d.depthWrite=this.depthWrite;d.stencilWrite=this.stencilWrite;d.stencilWriteMask=this.stencilWriteMask;d.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilFuncMask=this.stencilFuncMask;d.stencilFail=this.stencilFail;d.stencilZFail=this.stencilZFail;d.stencilZPass=this.stencilZPass;this.rotation&&0!==this.rotation&&(d.rotation=this.rotation);!0===this.polygonOffset&&(d.polygonOffset=!0);0!==this.polygonOffsetFactor&& +(d.polygonOffsetFactor=this.polygonOffsetFactor);0!==this.polygonOffsetUnits&&(d.polygonOffsetUnits=this.polygonOffsetUnits);this.linewidth&&1!==this.linewidth&&(d.linewidth=this.linewidth);void 0!==this.dashSize&&(d.dashSize=this.dashSize);void 0!==this.gapSize&&(d.gapSize=this.gapSize);void 0!==this.scale&&(d.scale=this.scale);!0===this.dithering&&(d.dithering=!0);0g;g++)if(d[g]===d[(g+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(d=a[f],this.faces.splice(d,1),c=0,e=this.faceVertexUvs.length;c\n\t#include \n}",fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}", -side:1,blending:0});d.uniforms.tEquirect.value=b;b=new T(new Jd(5,5,5),d);c.add(b);d=new Gc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};ac.prototype=Object.create(V.prototype);ac.prototype.constructor=ac;ac.prototype.isDataTexture=!0;var wd=new pb,Mf=new n;Object.assign(Hc.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f); -return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromProjectionMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],k=c[5],h=c[6],m=c[7],n=c[8],p=c[9],q=c[10],t=c[11],r=c[12],u=c[13],y=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-n,c-r).normalize();b[1].setComponents(f+a,m+g,t+n,c+r).normalize();b[2].setComponents(f+d,m+k,t+p,c+u).normalize();b[3].setComponents(f- -d,m-k,t-p,c-u).normalize();b[4].setComponents(f-e,m-h,t-q,c-y).normalize();b[5].setComponents(f+e,m+h,t+q,c+y).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();wd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(wd)},intersectsSprite:function(a){wd.center.set(0,0,0);wd.radius=.7071067811865476;wd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(wd)},intersectsSphere:function(a){var b=this.planes, -c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)c;c++){var d=b[c];Mf.x=0d.distanceToPoint(Mf))return!1}return!0},containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var F={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null}, -uvTransform:{value:new ya},uv2Transform:{value:new ya},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1, -1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new A(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{}, +this.fov)/this.zoom,c=2*b,d=this.aspect*c,e=-.5*d,f=this.view;if(null!==this.view&&this.view.enabled){var g=f.fullWidth,k=f.fullHeight;e+=f.offsetX*d/g;b-=f.offsetY*c/k;d*=f.width/g;c*=f.height/k}f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far);this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(a){a=F.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far= +this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Gc.prototype=Object.create(F.prototype);Gc.prototype.constructor=Gc;Db.prototype=Object.create(Ha.prototype);Db.prototype.constructor=Db;Db.prototype.isWebGLCubeRenderTarget=!0;Db.prototype.fromEquirectangularTexture=function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding= +b.encoding;var c=new ob,d=new Ba({type:"CubemapFromEquirect",uniforms:Fc({tEquirect:{value:null}}),vertexShader:"varying vec3 vWorldDirection;\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",fragmentShader:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}", +side:1,blending:0});d.uniforms.tEquirect.value=b;b=new S(new Jd(5,5,5),d);c.add(b);d=new Gc(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};ac.prototype=Object.create(W.prototype);ac.prototype.constructor=ac;ac.prototype.isDataTexture=!0;var wd=new pb,Lf=new n;Object.assign(Hc.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f); +return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromProjectionMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],k=c[5],h=c[6],m=c[7],n=c[8],p=c[9],r=c[10],t=c[11],q=c[12],u=c[13],v=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-n,c-q).normalize();b[1].setComponents(f+a,m+g,t+n,c+q).normalize();b[2].setComponents(f+d,m+k,t+p,c+u).normalize();b[3].setComponents(f- +d,m-k,t-p,c-u).normalize();b[4].setComponents(f-e,m-h,t-r,c-v).normalize();b[5].setComponents(f+e,m+h,t+r,c+v).normalize();return this},intersectsObject:function(a){var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere();wd.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(wd)},intersectsSprite:function(a){wd.center.set(0,0,0);wd.radius=.7071067811865476;wd.applyMatrix4(a.matrixWorld);return this.intersectsSphere(wd)},intersectsSphere:function(a){var b=this.planes, +c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)c;c++){var d=b[c];Lf.x=0d.distanceToPoint(Lf))return!1}return!0},containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});var D={common:{diffuse:{value:new z(15658734)},opacity:{value:1},map:{value:null}, +uvTransform:{value:new wa},uv2Transform:{value:new wa},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1, +1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:2.5E-4},fogNear:{value:1},fogFar:{value:2E3},fogColor:{value:new z(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{}, shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowRadius:{}, -shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new A(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ya}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new v(.5, -.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new ya}}};Id.prototype=Object.create(N.prototype);Id.prototype.constructor=Id;bc.prototype=Object.create(D.prototype);bc.prototype.constructor=bc;var O={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif", +shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new z(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new wa}},sprite:{diffuse:{value:new z(15658734)},opacity:{value:1},center:{value:new v(.5, +.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new wa}}};Id.prototype=Object.create(N.prototype);Id.prototype.constructor=Id;bc.prototype=Object.create(B.prototype);bc.prototype.constructor=bc;var O={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif", aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif", begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif", @@ -672,233 +663,233 @@ points_vert:"uniform float size;\nuniform float scale;\n#include \n#incl shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}", sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}", sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"}, -eb={basic:{uniforms:qa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:qa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.fog,F.lights,{emissive:{value:new A(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:qa([F.common,F.specularmap,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.fog,F.lights,{emissive:{value:new A(0)}, -specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshphong_vert,fragmentShader:O.meshphong_frag},standard:{uniforms:qa([F.common,F.envmap,F.aomap,F.lightmap,F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.roughnessmap,F.metalnessmap,F.fog,F.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag},toon:{uniforms:qa([F.common,F.specularmap,F.aomap,F.lightmap, -F.emissivemap,F.bumpmap,F.normalmap,F.displacementmap,F.gradientmap,F.fog,F.lights,{emissive:{value:new A(0)},specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:O.meshtoon_vert,fragmentShader:O.meshtoon_frag},matcap:{uniforms:qa([F.common,F.bumpmap,F.normalmap,F.displacementmap,F.fog,{matcap:{value:null}}]),vertexShader:O.meshmatcap_vert,fragmentShader:O.meshmatcap_frag},points:{uniforms:qa([F.points,F.fog]),vertexShader:O.points_vert,fragmentShader:O.points_frag},dashed:{uniforms:qa([F.common, -F.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:O.linedashed_vert,fragmentShader:O.linedashed_frag},depth:{uniforms:qa([F.common,F.displacementmap]),vertexShader:O.depth_vert,fragmentShader:O.depth_frag},normal:{uniforms:qa([F.common,F.bumpmap,F.normalmap,F.displacementmap,{opacity:{value:1}}]),vertexShader:O.normal_vert,fragmentShader:O.normal_frag},sprite:{uniforms:qa([F.sprite,F.fog]),vertexShader:O.sprite_vert,fragmentShader:O.sprite_frag},background:{uniforms:{uvTransform:{value:new ya}, -t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:qa([F.envmap,{opacity:{value:1}}]),vertexShader:O.cube_vert,fragmentShader:O.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:O.equirect_vert,fragmentShader:O.equirect_frag},distanceRGBA:{uniforms:qa([F.common,F.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert,fragmentShader:O.distanceRGBA_frag},shadow:{uniforms:qa([F.lights, -F.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:O.shadow_vert,fragmentShader:O.shadow_frag}};eb.physical={uniforms:qa([eb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new A(0)},clearcoatNormalScale:{value:new v(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag};qb.prototype=Object.create(V.prototype);qb.prototype.constructor=qb;qb.prototype.isCubeTexture=!0;Object.defineProperty(qb.prototype, -"images",{get:function(){return this.image},set:function(a){this.image=a}});Ic.prototype=Object.create(V.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDataTexture2DArray=!0;Jc.prototype=Object.create(V.prototype);Jc.prototype.constructor=Jc;Jc.prototype.isDataTexture3D=!0;var Hh=new V,Oj=new Ic,Qj=new Jc,Ih=new qb,Bh=[],Dh=[],Gh=new Float32Array(16),Fh=new Float32Array(9),Eh=new Float32Array(4);Jh.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&& -(this.cache=new Float32Array(a.length));Ia(b,a)};Kh.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var hg=/([\w\d_]+)(\])?(\[|\.)?/g;Eb.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Eb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Eb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],k=c[g.id];!1!==k.needsUpdate&&g.setValue(a,k.value,d)}};Eb.seqWithValue= -function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var vk=0,jg=/^[ \t]*#include +<([\w\d./]+)>/gm,Sh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Fk=0;Fb.prototype=Object.create(K.prototype);Fb.prototype.constructor=Fb;Fb.prototype.isMeshDepthMaterial=!0;Fb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map= +eb={basic:{uniforms:va([D.common,D.specularmap,D.envmap,D.aomap,D.lightmap,D.fog]),vertexShader:O.meshbasic_vert,fragmentShader:O.meshbasic_frag},lambert:{uniforms:va([D.common,D.specularmap,D.envmap,D.aomap,D.lightmap,D.emissivemap,D.fog,D.lights,{emissive:{value:new z(0)}}]),vertexShader:O.meshlambert_vert,fragmentShader:O.meshlambert_frag},phong:{uniforms:va([D.common,D.specularmap,D.envmap,D.aomap,D.lightmap,D.emissivemap,D.bumpmap,D.normalmap,D.displacementmap,D.fog,D.lights,{emissive:{value:new z(0)}, +specular:{value:new z(1118481)},shininess:{value:30}}]),vertexShader:O.meshphong_vert,fragmentShader:O.meshphong_frag},standard:{uniforms:va([D.common,D.envmap,D.aomap,D.lightmap,D.emissivemap,D.bumpmap,D.normalmap,D.displacementmap,D.roughnessmap,D.metalnessmap,D.fog,D.lights,{emissive:{value:new z(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag},toon:{uniforms:va([D.common,D.specularmap,D.aomap,D.lightmap, +D.emissivemap,D.bumpmap,D.normalmap,D.displacementmap,D.gradientmap,D.fog,D.lights,{emissive:{value:new z(0)},specular:{value:new z(1118481)},shininess:{value:30}}]),vertexShader:O.meshtoon_vert,fragmentShader:O.meshtoon_frag},matcap:{uniforms:va([D.common,D.bumpmap,D.normalmap,D.displacementmap,D.fog,{matcap:{value:null}}]),vertexShader:O.meshmatcap_vert,fragmentShader:O.meshmatcap_frag},points:{uniforms:va([D.points,D.fog]),vertexShader:O.points_vert,fragmentShader:O.points_frag},dashed:{uniforms:va([D.common, +D.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:O.linedashed_vert,fragmentShader:O.linedashed_frag},depth:{uniforms:va([D.common,D.displacementmap]),vertexShader:O.depth_vert,fragmentShader:O.depth_frag},normal:{uniforms:va([D.common,D.bumpmap,D.normalmap,D.displacementmap,{opacity:{value:1}}]),vertexShader:O.normal_vert,fragmentShader:O.normal_frag},sprite:{uniforms:va([D.sprite,D.fog]),vertexShader:O.sprite_vert,fragmentShader:O.sprite_frag},background:{uniforms:{uvTransform:{value:new wa}, +t2D:{value:null}},vertexShader:O.background_vert,fragmentShader:O.background_frag},cube:{uniforms:va([D.envmap,{opacity:{value:1}}]),vertexShader:O.cube_vert,fragmentShader:O.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:O.equirect_vert,fragmentShader:O.equirect_frag},distanceRGBA:{uniforms:va([D.common,D.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:O.distanceRGBA_vert,fragmentShader:O.distanceRGBA_frag},shadow:{uniforms:va([D.lights, +D.fog,{color:{value:new z(0)},opacity:{value:1}}]),vertexShader:O.shadow_vert,fragmentShader:O.shadow_frag}};eb.physical={uniforms:va([eb.standard.uniforms,{transparency:{value:0},clearcoat:{value:0},clearcoatRoughness:{value:0},sheen:{value:new z(0)},clearcoatNormalScale:{value:new v(1,1)},clearcoatNormalMap:{value:null}}]),vertexShader:O.meshphysical_vert,fragmentShader:O.meshphysical_frag};qb.prototype=Object.create(W.prototype);qb.prototype.constructor=qb;qb.prototype.isCubeTexture=!0;Object.defineProperty(qb.prototype, +"images",{get:function(){return this.image},set:function(a){this.image=a}});Ic.prototype=Object.create(W.prototype);Ic.prototype.constructor=Ic;Ic.prototype.isDataTexture2DArray=!0;Jc.prototype=Object.create(W.prototype);Jc.prototype.constructor=Jc;Jc.prototype.isDataTexture3D=!0;var Gh=new W,Nj=new Ic,Pj=new Jc,Hh=new qb,Ah=[],Ch=[],Fh=new Float32Array(16),Eh=new Float32Array(9),Dh=new Float32Array(4);Ih.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&& +(this.cache=new Float32Array(a.length));Ia(b,a)};Jh.prototype.setValue=function(a,b,c){for(var d=this.seq,e=0,f=d.length;e!==f;++e){var g=d[e];g.setValue(a,b[g.id],c)}};var gg=/([\w\d_]+)(\])?(\[|\.)?/g;Eb.prototype.setValue=function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};Eb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};Eb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],k=c[g.id];!1!==k.needsUpdate&&g.setValue(a,k.value,d)}};Eb.seqWithValue= +function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var uk=0,ig=/^[ \t]*#include +<([\w\d./]+)>/gm,Rh=/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Ek=0;Fb.prototype=Object.create(K.prototype);Fb.prototype.constructor=Fb;Fb.prototype.isMeshDepthMaterial=!0;Fb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.depthPacking=a.depthPacking;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map= a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;return this};Gb.prototype=Object.create(K.prototype);Gb.prototype.constructor=Gb;Gb.prototype.isMeshDistanceMaterial=!0;Gb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.referencePosition.copy(a.referencePosition);this.nearDistance=a.nearDistance;this.farDistance= -a.farDistance;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.map=a.map;this.alphaMap=a.alphaMap;this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;return this};og.prototype=Object.assign(Object.create(wa.prototype),{constructor:og,isWebGLMultiviewRenderTarget:!0,copy:function(a){wa.prototype.copy.call(this,a);this.numViews=a.numViews;return this},setNumViews:function(a){this.numViews!==a&&(this.numViews=a,this.dispose()); -return this}});Qe.prototype=Object.assign(Object.create(aa.prototype),{constructor:Qe,isArrayCamera:!0});Mc.prototype=Object.assign(Object.create(E.prototype),{constructor:Mc,isGroup:!0});Object.assign(Zh.prototype,Fa.prototype);Object.assign(Re.prototype,{isFogExp2:!0,clone:function(){return new Re(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Se.prototype,{isFog:!0,clone:function(){return new Se(this.color,this.near, -this.far)},toJSON:function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(rb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(rb.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(a){this.usage=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.count=a.count;this.stride=a.stride;this.usage=a.usage;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride; -for(var d=0,e=this.stride;da.far||b.push({distance:e,point:De.clone(),uv:pa.getUV(De,Nf,Ee,Of,Qi,oh,Ri,new v),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){E.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});var Pf=new n,Si=new n;Rd.prototype=Object.assign(Object.create(E.prototype),{constructor:Rd,isLOD:!0,copy:function(a){E.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(this._currentLevel=c-1;cd||(k.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld), -index:c,face:null,faceIndex:null,object:this}))}}else for(c=0,p=x.length/3-1;cd||(k.applyMatrix4(this.matrixWorld),q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld),index:c,face:null,faceIndex:null,object:this}))}else if(c.isGeometry)for(f=c.vertices,g=f.length,c=0;cd||(k.applyMatrix4(this.matrixWorld), -q=a.ray.origin.distanceTo(k),qa.far||b.push({distance:q,point:e.clone().applyMatrix4(this.matrixWorld),index:c,face:null,faceIndex:null,object:this}))}},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Rf=new n,Sf=new n;na.prototype=Object.assign(Object.create(Ka.prototype),{constructor:na,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[],d=0,e=b.count;d< -e;d+=2)Rf.fromBufferAttribute(b,d),Sf.fromBufferAttribute(b,d+1),c[d]=0===d?0:c[d-1],c[d+1]=c[d]+Rf.distanceTo(Sf);a.setAttribute("lineDistance",new B(c,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(a.isGeometry)for(b=a.vertices,c=a.lineDistances,d=0,e=b.length;d=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Qc.prototype=Object.create(V.prototype);Qc.prototype.constructor=Qc;Qc.prototype.isCompressedTexture= -!0;Td.prototype=Object.create(V.prototype);Td.prototype.constructor=Td;Td.prototype.isCanvasTexture=!0;Ud.prototype=Object.create(V.prototype);Ud.prototype.constructor=Ud;Ud.prototype.isDepthTexture=!0;Rc.prototype=Object.create(D.prototype);Rc.prototype.constructor=Rc;Vd.prototype=Object.create(N.prototype);Vd.prototype.constructor=Vd;Sc.prototype=Object.create(D.prototype);Sc.prototype.constructor=Sc;Wd.prototype=Object.create(N.prototype);Wd.prototype.constructor=Wd;Ha.prototype=Object.create(D.prototype); -Ha.prototype.constructor=Ha;Xd.prototype=Object.create(N.prototype);Xd.prototype.constructor=Xd;Tc.prototype=Object.create(Ha.prototype);Tc.prototype.constructor=Tc;Yd.prototype=Object.create(N.prototype);Yd.prototype.constructor=Yd;cc.prototype=Object.create(Ha.prototype);cc.prototype.constructor=cc;Zd.prototype=Object.create(N.prototype);Zd.prototype.constructor=Zd;Uc.prototype=Object.create(Ha.prototype);Uc.prototype.constructor=Uc;$d.prototype=Object.create(N.prototype);$d.prototype.constructor= -$d;Vc.prototype=Object.create(Ha.prototype);Vc.prototype.constructor=Vc;ae.prototype=Object.create(N.prototype);ae.prototype.constructor=ae;dc.prototype=Object.create(D.prototype);dc.prototype.constructor=dc;dc.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};be.prototype=Object.create(N.prototype);be.prototype.constructor=be;Wc.prototype=Object.create(D.prototype);Wc.prototype.constructor=Wc;ce.prototype=Object.create(N.prototype);ce.prototype.constructor= -ce;Xc.prototype=Object.create(D.prototype);Xc.prototype.constructor=Xc;var al={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=bi(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var k;if(d){var h=c;d=[];var m;var n=0;for(m=b.length;n80*c){var t=k=a[0];var r= -d=a[1];for(h=c;hk&&(k=n),b>d&&(d=b);k=Math.max(k-t,d-r);k=0!==k?1/k:0}fe(f,g,c,t,r,k);return g}},sb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;esb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];fi(a);gi(c,a);var f=a.length;b.forEach(fi);for(a=0;aMath.abs(g-h)?[new v(a,1-c),new v(k,1-d),new v(m,1-e),new v(p,1-b)]:[new v(g,1-c),new v(h,1-d),new v(n,1-e),new v(q,1-b)]}};he.prototype=Object.create(N.prototype);he.prototype.constructor=he;Zc.prototype=Object.create(fb.prototype);Zc.prototype.constructor=Zc;ie.prototype= -Object.create(N.prototype);ie.prototype.constructor=ie;gc.prototype=Object.create(D.prototype);gc.prototype.constructor=gc;je.prototype=Object.create(N.prototype);je.prototype.constructor=je;$c.prototype=Object.create(D.prototype);$c.prototype.constructor=$c;ke.prototype=Object.create(N.prototype);ke.prototype.constructor=ke;ad.prototype=Object.create(D.prototype);ad.prototype.constructor=ad;hc.prototype=Object.create(N.prototype);hc.prototype.constructor=hc;hc.prototype.toJSON=function(){var a=N.prototype.toJSON.call(this); -return ii(this.parameters.shapes,a)};ic.prototype=Object.create(D.prototype);ic.prototype.constructor=ic;ic.prototype.toJSON=function(){var a=D.prototype.toJSON.call(this);return ii(this.parameters.shapes,a)};bd.prototype=Object.create(D.prototype);bd.prototype.constructor=bd;jc.prototype=Object.create(N.prototype);jc.prototype.constructor=jc;tb.prototype=Object.create(D.prototype);tb.prototype.constructor=tb;le.prototype=Object.create(jc.prototype);le.prototype.constructor=le;me.prototype=Object.create(tb.prototype); -me.prototype.constructor=me;ne.prototype=Object.create(N.prototype);ne.prototype.constructor=ne;cd.prototype=Object.create(D.prototype);cd.prototype.constructor=cd;var va=Object.freeze({__proto__:null,WireframeGeometry:Rc,ParametricGeometry:Vd,ParametricBufferGeometry:Sc,TetrahedronGeometry:Xd,TetrahedronBufferGeometry:Tc,OctahedronGeometry:Yd,OctahedronBufferGeometry:cc,IcosahedronGeometry:Zd,IcosahedronBufferGeometry:Uc,DodecahedronGeometry:$d,DodecahedronBufferGeometry:Vc,PolyhedronGeometry:Wd, -PolyhedronBufferGeometry:Ha,TubeGeometry:ae,TubeBufferGeometry:dc,TorusKnotGeometry:be,TorusKnotBufferGeometry:Wc,TorusGeometry:ce,TorusBufferGeometry:Xc,TextGeometry:he,TextBufferGeometry:Zc,SphereGeometry:ie,SphereBufferGeometry:gc,RingGeometry:je,RingBufferGeometry:$c,PlaneGeometry:Id,PlaneBufferGeometry:bc,LatheGeometry:ke,LatheBufferGeometry:ad,ShapeGeometry:hc,ShapeBufferGeometry:ic,ExtrudeGeometry:fc,ExtrudeBufferGeometry:fb,EdgesGeometry:bd,ConeGeometry:le,ConeBufferGeometry:me,CylinderGeometry:jc, -CylinderBufferGeometry:tb,CircleGeometry:ne,CircleBufferGeometry:cd,BoxGeometry:nh,BoxBufferGeometry:Jd});kc.prototype=Object.create(K.prototype);kc.prototype.constructor=kc;kc.prototype.isShadowMaterial=!0;kc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);return this};ub.prototype=Object.create(ra.prototype);ub.prototype.constructor=ub;ub.prototype.isRawShaderMaterial=!0;gb.prototype=Object.create(K.prototype);gb.prototype.constructor=gb;gb.prototype.isMeshStandardMaterial= -!0;gb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType= -a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin= -a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.vertexTangents=a.vertexTangents;return this};lc.prototype=Object.create(gb.prototype);lc.prototype.constructor=lc;lc.prototype.isMeshPhysicalMaterial=!0;lc.prototype.copy=function(a){gb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness=a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen|| -new A).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency;return this};Jb.prototype=Object.create(K.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isMeshPhongMaterial=!0;Jb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity; -this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap= -a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};mc.prototype=Object.create(K.prototype);mc.prototype.constructor=mc;mc.prototype.isMeshToonMaterial=!0;mc.prototype.copy=function(a){K.prototype.copy.call(this, -a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.gradientMap=a.gradientMap;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale); -this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nc.prototype=Object.create(K.prototype);nc.prototype.constructor= -nc;nc.prototype.isMeshNormalMaterial=!0;nc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets; -this.morphNormals=a.morphNormals;return this};oc.prototype=Object.create(K.prototype);oc.prototype.constructor=oc;oc.prototype.isMeshLambertMaterial=!0;oc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap; -this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pc.prototype=Object.create(K.prototype);pc.prototype.constructor=pc;pc.prototype.isMeshMatcapMaterial= -!0;pc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets; -this.morphNormals=a.morphNormals;return this};qc.prototype=Object.create(la.prototype);qc.prototype.constructor=qc;qc.prototype.isLineDashedMaterial=!0;qc.prototype.copy=function(a){la.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var bl=Object.freeze({__proto__:null,ShadowMaterial:kc,SpriteMaterial:Ib,RawShaderMaterial:ub,ShaderMaterial:ra,PointsMaterial:Va,MeshPhysicalMaterial:lc,MeshStandardMaterial:gb,MeshPhongMaterial:Jb,MeshToonMaterial:mc, -MeshNormalMaterial:nc,MeshLambertMaterial:oc,MeshDepthMaterial:Fb,MeshDistanceMaterial:Gb,MeshBasicMaterial:Oa,MeshMatcapMaterial:pc,LineDashedMaterial:qc,LineBasicMaterial:la,Material:K}),S={arraySlice:function(a,b,c){return S.isTypedArray(a)?new a.constructor(a.subarray(b,void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&& -!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!==b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)), -f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}},subclip:function(a,b,c,d,e){e=e||30;a=a.clone();a.name=b;var f=[];for(b=0;b=d))for(h.push(g.times[n]),p=0;pa.tracks[b].times[0]&&(c=a.tracks[b].times[0]);for(b=0;b=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=S.arraySlice(c,e,f),this.values=S.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.", -this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&S.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=S.arraySlice(this.times), -b=S.arraySlice(this.values),c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(L.clamp(d[l-1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g,c))),f[l].crossVectors(d[l],e[l]);if(!0===b)for(c=Math.acos(L.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);ph.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);qh.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);rh.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,l)}else"catmullrom"===this.curveType&&(ph.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),qh.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),rh.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(ph.calc(a),qh.calc(a),rh.calc(a));return b};za.prototype.copy=function(a){H.prototype.copy.call(this, -a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(ki(d,e.x,f.x,g.x,c.x),ki(d,e.y,f.y,g.y,c.y));return b};Za.prototype.copy=function(a){H.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()}, -getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[],b=0,c=0,d=this.curves.length;cNumber.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d} -var e=sb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);b=[];if(1===f.length){var g=f[0];var h=new Kb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var m=[],n=[],p=0;m[p]=void 0;n[p]=[];for(var q=0,t=f.length;qb;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095); -b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3],.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086* -d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a);b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0}, -copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)},fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(uf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d; -b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});ab.prototype=Object.assign(Object.create(fa.prototype),{constructor:ab,isLightProbe:!0,copy:function(a){fa.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return fa.prototype.toJSON.call(this,a)}});Fg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Fg,isHemisphereLightProbe:!0,copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this, -a)}});Gg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Gg,isAmbientLightProbe:!0,copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this,a)}});var bj=new P,cj=new P;Object.assign(li.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect; -b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var c=a.projectionMatrix.clone(),d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(L.DEG2RAD*b.fov*.5)/b.zoom;cj.elements[12]=-d;bj.elements[12]=d;d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(cj); -this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(bj)}});Object.assign(Hg.prototype,{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance? -Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}});var wc=new n,dj=new Ca,dl=new n,xc=new n;Ig.prototype=Object.assign(Object.create(E.prototype),{constructor:Ig,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this},getFilter:function(){return this.filter},setFilter:function(a){null!== -this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(a){E.prototype.updateMatrixWorld.call(this,a);a=this.context.listener; -var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(wc,dj,dl);xc.set(0,0,-1).applyQuaternion(dj);if(a.positionX){var c=this.context.currentTime+this.timeDelta;a.positionX.linearRampToValueAtTime(wc.x,c);a.positionY.linearRampToValueAtTime(wc.y,c);a.positionZ.linearRampToValueAtTime(wc.z,c);a.forwardX.linearRampToValueAtTime(xc.x,c);a.forwardY.linearRampToValueAtTime(xc.y,c);a.forwardZ.linearRampToValueAtTime(xc.z,c);a.upX.linearRampToValueAtTime(b.x,c);a.upY.linearRampToValueAtTime(b.y, -c);a.upZ.linearRampToValueAtTime(b.z,c)}else a.setPosition(wc.x,wc.y,wc.z),a.setOrientation(xc.x,xc.y,xc.z,b.x,b.y,b.z)}});id.prototype=Object.assign(Object.create(E.prototype),{constructor:id,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect(); -return this},setMediaStreamSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(a){void 0===a&&(a=0);if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); -else return this._startedAt=this.context.currentTime+a,a=this.context.createBufferSource(),a.buffer=this.buffer,a.loop=this.loop,a.loopStart=this.loopStart,a.loopEnd=this.loopEnd,a.onended=this.onEnded.bind(this),a.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=a,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control."); -else return!0===this.isPlaying&&(this._pausedAt+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this},connect:function(){if(0a.far||b.push({distance:e,point:De.clone(),uv:oa.getUV(De,Mf,Ee,Nf,Pi,nh,Qi,new v),face:null,object:this})},clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){F.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}}); +var Of=new n,Ri=new n;Rd.prototype=Object.assign(Object.create(F.prototype),{constructor:Rd,isLOD:!0,copy:function(a){F.prototype.copy.call(this,a,!1);for(var b=a.levels,c=0,d=b.length;c=b[c].distance)b[c-1].object.visible=!1,b[c].object.visible=!0;else break;for(this._currentLevel=c-1;cd||(k.applyMatrix4(this.matrixWorld),r=a.ray.origin.distanceTo(k),ra.far||b.push({distance:r,point:e.clone().applyMatrix4(this.matrixWorld),index:c,face:null,faceIndex:null,object:this}))}}else for(c=0,p=x.length/3-1;cd||(k.applyMatrix4(this.matrixWorld),r=a.ray.origin.distanceTo(k),ra.far||b.push({distance:r, +point:e.clone().applyMatrix4(this.matrixWorld),index:c,face:null,faceIndex:null,object:this}))}else if(c.isGeometry)for(f=c.vertices,g=f.length,c=0;cd||(k.applyMatrix4(this.matrixWorld),r=a.ray.origin.distanceTo(k),ra.far||b.push({distance:r,point:e.clone().applyMatrix4(this.matrixWorld),index:c,face:null,faceIndex:null,object:this}))}},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var Qf=new n, +Rf=new n;ma.prototype=Object.assign(Object.create(Ka.prototype),{constructor:ma,isLineSegments:!0,computeLineDistances:function(){var a=this.geometry;if(a.isBufferGeometry)if(null===a.index){for(var b=a.attributes.position,c=[],d=0,e=b.count;d=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});Qc.prototype=Object.create(W.prototype);Qc.prototype.constructor=Qc;Qc.prototype.isCompressedTexture=!0;Td.prototype=Object.create(W.prototype);Td.prototype.constructor=Td;Td.prototype.isCanvasTexture=!0;Ud.prototype=Object.create(W.prototype);Ud.prototype.constructor=Ud;Ud.prototype.isDepthTexture=!0;Rc.prototype=Object.create(B.prototype);Rc.prototype.constructor=Rc;Vd.prototype=Object.create(N.prototype); +Vd.prototype.constructor=Vd;Sc.prototype=Object.create(B.prototype);Sc.prototype.constructor=Sc;Wd.prototype=Object.create(N.prototype);Wd.prototype.constructor=Wd;Ga.prototype=Object.create(B.prototype);Ga.prototype.constructor=Ga;Xd.prototype=Object.create(N.prototype);Xd.prototype.constructor=Xd;Tc.prototype=Object.create(Ga.prototype);Tc.prototype.constructor=Tc;Yd.prototype=Object.create(N.prototype);Yd.prototype.constructor=Yd;cc.prototype=Object.create(Ga.prototype);cc.prototype.constructor= +cc;Zd.prototype=Object.create(N.prototype);Zd.prototype.constructor=Zd;Uc.prototype=Object.create(Ga.prototype);Uc.prototype.constructor=Uc;$d.prototype=Object.create(N.prototype);$d.prototype.constructor=$d;Vc.prototype=Object.create(Ga.prototype);Vc.prototype.constructor=Vc;ae.prototype=Object.create(N.prototype);ae.prototype.constructor=ae;dc.prototype=Object.create(B.prototype);dc.prototype.constructor=dc;dc.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON(); +return a};be.prototype=Object.create(N.prototype);be.prototype.constructor=be;Wc.prototype=Object.create(B.prototype);Wc.prototype.constructor=Wc;ce.prototype=Object.create(N.prototype);ce.prototype.constructor=ce;Xc.prototype=Object.create(B.prototype);Xc.prototype.constructor=Xc;var Zk={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=ai(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var k;if(d){var h=c;d=[];var m;var n=0;for(m=b.length;n80*c){var t=k=a[0];var q=d=a[1];for(h=c;hk&&(k=n),b>d&&(d=b);k=Math.max(k-t,d-q);k=0!==k?1/k:0}fe(f,g,c,t,q,k);return g}},sb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;esb.area(a)}, +triangulateShape:function(a,b){var c=[],d=[],e=[];ei(a);fi(c,a);var f=a.length;b.forEach(ei);for(a=0;aMath.abs(g-h)?[new v(a,1-c),new v(k,1-d),new v(m,1-e),new v(p, +1-b)]:[new v(g,1-c),new v(h,1-d),new v(n,1-e),new v(r,1-b)]}};he.prototype=Object.create(N.prototype);he.prototype.constructor=he;Zc.prototype=Object.create(fb.prototype);Zc.prototype.constructor=Zc;ie.prototype=Object.create(N.prototype);ie.prototype.constructor=ie;gc.prototype=Object.create(B.prototype);gc.prototype.constructor=gc;je.prototype=Object.create(N.prototype);je.prototype.constructor=je;$c.prototype=Object.create(B.prototype);$c.prototype.constructor=$c;ke.prototype=Object.create(N.prototype); +ke.prototype.constructor=ke;ad.prototype=Object.create(B.prototype);ad.prototype.constructor=ad;hc.prototype=Object.create(N.prototype);hc.prototype.constructor=hc;hc.prototype.toJSON=function(){var a=N.prototype.toJSON.call(this);return hi(this.parameters.shapes,a)};ic.prototype=Object.create(B.prototype);ic.prototype.constructor=ic;ic.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);return hi(this.parameters.shapes,a)};bd.prototype=Object.create(B.prototype);bd.prototype.constructor= +bd;jc.prototype=Object.create(N.prototype);jc.prototype.constructor=jc;tb.prototype=Object.create(B.prototype);tb.prototype.constructor=tb;le.prototype=Object.create(jc.prototype);le.prototype.constructor=le;me.prototype=Object.create(tb.prototype);me.prototype.constructor=me;ne.prototype=Object.create(N.prototype);ne.prototype.constructor=ne;cd.prototype=Object.create(B.prototype);cd.prototype.constructor=cd;var ua=Object.freeze({__proto__:null,WireframeGeometry:Rc,ParametricGeometry:Vd,ParametricBufferGeometry:Sc, +TetrahedronGeometry:Xd,TetrahedronBufferGeometry:Tc,OctahedronGeometry:Yd,OctahedronBufferGeometry:cc,IcosahedronGeometry:Zd,IcosahedronBufferGeometry:Uc,DodecahedronGeometry:$d,DodecahedronBufferGeometry:Vc,PolyhedronGeometry:Wd,PolyhedronBufferGeometry:Ga,TubeGeometry:ae,TubeBufferGeometry:dc,TorusKnotGeometry:be,TorusKnotBufferGeometry:Wc,TorusGeometry:ce,TorusBufferGeometry:Xc,TextGeometry:he,TextBufferGeometry:Zc,SphereGeometry:ie,SphereBufferGeometry:gc,RingGeometry:je,RingBufferGeometry:$c, +PlaneGeometry:Id,PlaneBufferGeometry:bc,LatheGeometry:ke,LatheBufferGeometry:ad,ShapeGeometry:hc,ShapeBufferGeometry:ic,ExtrudeGeometry:fc,ExtrudeBufferGeometry:fb,EdgesGeometry:bd,ConeGeometry:le,ConeBufferGeometry:me,CylinderGeometry:jc,CylinderBufferGeometry:tb,CircleGeometry:ne,CircleBufferGeometry:cd,BoxGeometry:mh,BoxBufferGeometry:Jd});kc.prototype=Object.create(K.prototype);kc.prototype.constructor=kc;kc.prototype.isShadowMaterial=!0;kc.prototype.copy=function(a){K.prototype.copy.call(this, +a);this.color.copy(a.color);return this};ub.prototype=Object.create(Ba.prototype);ub.prototype.constructor=ub;ub.prototype.isRawShaderMaterial=!0;gb.prototype=Object.create(K.prototype);gb.prototype.constructor=gb;gb.prototype.isMeshStandardMaterial=!0;gb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity; +this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap= +a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;this.vertexTangents=a.vertexTangents;return this};lc.prototype=Object.create(gb.prototype);lc.prototype.constructor=lc;lc.prototype.isMeshPhysicalMaterial= +!0;lc.prototype.copy=function(a){gb.prototype.copy.call(this,a);this.defines={STANDARD:"",PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearcoat=a.clearcoat;this.clearcoatRoughness=a.clearcoatRoughness;this.sheen=a.sheen?(this.sheen||new z).copy(a.sheen):null;this.clearcoatNormalMap=a.clearcoatNormalMap;this.clearcoatNormalScale.copy(a.clearcoatNormalScale);this.transparency=a.transparency;return this};Jb.prototype=Object.create(K.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isMeshPhongMaterial= +!0;Jb.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType; +this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning= +a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};mc.prototype=Object.create(K.prototype);mc.prototype.constructor=mc;mc.prototype.isMeshToonMaterial=!0;mc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.gradientMap=a.gradientMap;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity; +this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth; +this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};nc.prototype=Object.create(K.prototype);nc.prototype.constructor=nc;nc.prototype.isMeshNormalMaterial=!0;nc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType;this.normalScale.copy(a.normalScale); +this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};oc.prototype=Object.create(K.prototype);oc.prototype.constructor=oc;oc.prototype.isMeshLambertMaterial=!0;oc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map; +this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap; +this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pc.prototype=Object.create(K.prototype);pc.prototype.constructor=pc;pc.prototype.isMeshMatcapMaterial=!0;pc.prototype.copy=function(a){K.prototype.copy.call(this,a);this.defines={MATCAP:""};this.color.copy(a.color);this.matcap=a.matcap;this.map=a.map;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalMapType=a.normalMapType; +this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.alphaMap=a.alphaMap;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};qc.prototype=Object.create(la.prototype);qc.prototype.constructor=qc;qc.prototype.isLineDashedMaterial=!0;qc.prototype.copy=function(a){la.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize= +a.gapSize;return this};var $k=Object.freeze({__proto__:null,ShadowMaterial:kc,SpriteMaterial:Ib,RawShaderMaterial:ub,ShaderMaterial:Ba,PointsMaterial:Va,MeshPhysicalMaterial:lc,MeshStandardMaterial:gb,MeshPhongMaterial:Jb,MeshToonMaterial:mc,MeshNormalMaterial:nc,MeshLambertMaterial:oc,MeshDepthMaterial:Fb,MeshDistanceMaterial:Gb,MeshBasicMaterial:Oa,MeshMatcapMaterial:pc,LineDashedMaterial:qc,LineBasicMaterial:la,Material:K}),R={arraySlice:function(a,b,c){return R.isTypedArray(a)?new a.constructor(a.subarray(b, +void 0!==c?c:a.length)):a.slice(b,c)},convertArray:function(a,b,c){return!a||!c&&a.constructor===b?a:"number"===typeof b.BYTES_PER_ELEMENT?new b(a):Array.prototype.slice.call(a)},isTypedArray:function(a){return ArrayBuffer.isView(a)&&!(a instanceof DataView)},getKeyframeOrder:function(a){for(var b=a.length,c=Array(b),d=0;d!==b;++d)c[d]=d;c.sort(function(b,c){return a[b]-a[c]});return c},sortedArray:function(a,b,c){for(var d=a.length,e=new a.constructor(d),f=0,g=0;g!==d;++f)for(var k=c[f]*b,h=0;h!== +b;++h)e[g++]=a[k+h];return e},flattenJSON:function(a,b,c,d){for(var e=1,f=a[0];void 0!==f&&void 0===f[d];)f=a[e++];if(void 0!==f){var g=f[d];if(void 0!==g)if(Array.isArray(g)){do g=f[d],void 0!==g&&(b.push(f.time),c.push.apply(c,g)),f=a[e++];while(void 0!==f)}else if(void 0!==g.toArray){do g=f[d],void 0!==g&&(b.push(f.time),g.toArray(c,c.length)),f=a[e++];while(void 0!==f)}else{do g=f[d],void 0!==g&&(b.push(f.time),c.push(g)),f=a[e++];while(void 0!==f)}}},subclip:function(a,b,c,d,e){e=e||30;a=a.clone(); +a.name=b;var f=[];for(b=0;b=d))for(h.push(g.times[n]),p=0;pa.tracks[b].times[0]&&(c=a.tracks[b].times[0]);for(b=0;b=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c< +d;)e=c+d>>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=R.arraySlice(c,e,f),this.values=R.arraySlice(this.values,e*a,f*a);return this},validate:function(){var a=!0, +b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),a=!1);var c=this.times;b=this.values;var d=c.length;0===d&&(console.error("THREE.KeyframeTrack: Track is empty.",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("THREE.KeyframeTrack: Out of order keys.",this,f,g,e);a=!1;break}e= +g}if(void 0!==b&&R.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,f,d);a=!1;break}return a},optimize:function(){for(var a=R.arraySlice(this.times),b=R.arraySlice(this.values),c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gg)e=a+1;else if(0b&&(b=0);1Number.EPSILON&&(g.normalize(),c=Math.acos(L.clamp(d[l-1].dot(d[l]),-1,1)),e[l].applyMatrix4(h.makeRotationAxis(g,c))),f[l].crossVectors(d[l], +e[l]);if(!0===b)for(c=Math.acos(L.clamp(e[0].dot(e[a]),-1,1)),c/=a,0d;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>l&&(l=e);oh.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,l);ph.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,l);qh.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d, +e,l)}else"catmullrom"===this.curveType&&(oh.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),ph.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),qh.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(oh.calc(a),ph.calc(a),qh.calc(a));return b};pa.prototype.copy=function(a){G.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bc.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(ji(d,e.x,f.x,g.x, +c.x),ji(d,e.y,f.y,g.y,c.y));return b};Za.prototype.copy=function(a){G.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;b=b)return b=c[a]-b,a=this.curves[a],c=a.getLength(),a.getPointAt(0===c?0:1-b/c);a++}return null},getLength:function(){var a=this.getCurveLengths();return a[a.length-1]},updateArcLengths:function(){this.needsUpdate=!0;this.cacheLengths=null;this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var a=[], +b=0,c=0,d=this.curves.length;cNumber.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=sb.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f); +b=[];if(1===f.length){var g=f[0];var h=new Kb;h.curves=g.curves;b.push(h);return b}var l=!e(f[0].getPoints());l=a?!l:l;h=[];var m=[],n=[],p=0;m[p]=void 0;n[p]=[];for(var r=0,t=f.length;rb;b++)this.coefficients[b].copy(a[b]);return this},zero:function(){for(var a=0;9>a;a++)this.coefficients[a].set(0,0,0);return this},getAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.282095);b.addScale(e[1],.488603*d);b.addScale(e[2],.488603*a);b.addScale(e[3], +.488603*c);b.addScale(e[4],1.092548*c*d);b.addScale(e[5],1.092548*d*a);b.addScale(e[6],.315392*(3*a*a-1));b.addScale(e[7],1.092548*c*a);b.addScale(e[8],.546274*(c*c-d*d));return b},getIrradianceAt:function(a,b){var c=a.x,d=a.y;a=a.z;var e=this.coefficients;b.copy(e[0]).multiplyScalar(.886227);b.addScale(e[1],1.023328*d);b.addScale(e[2],1.023328*a);b.addScale(e[3],1.023328*c);b.addScale(e[4],.858086*c*d);b.addScale(e[5],.858086*d*a);b.addScale(e[6],.743125*a*a-.247708);b.addScale(e[7],.858086*c*a); +b.addScale(e[8],.429043*(c*c-d*d));return b},add:function(a){for(var b=0;9>b;b++)this.coefficients[b].add(a.coefficients[b]);return this},scale:function(a){for(var b=0;9>b;b++)this.coefficients[b].multiplyScalar(a);return this},lerp:function(a,b){for(var c=0;9>c;c++)this.coefficients[c].lerp(a.coefficients[c],b);return this},equals:function(a){for(var b=0;9>b;b++)if(!this.coefficients[b].equals(a.coefficients[b]))return!1;return!0},copy:function(a){return this.set(a.coefficients)},clone:function(){return(new this.constructor).copy(this)}, +fromArray:function(a,b){void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].fromArray(a,b+3*d);return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);for(var c=this.coefficients,d=0;9>d;d++)c[d].toArray(a,b+3*d);return a}});Object.assign(uf,{getBasisAt:function(a,b){var c=a.x,d=a.y;a=a.z;b[0]=.282095;b[1]=.488603*d;b[2]=.488603*a;b[3]=.488603*c;b[4]=1.092548*c*d;b[5]=1.092548*d*a;b[6]=.315392*(3*a*a-1);b[7]=1.092548*c*a;b[8]=.546274*(c*c-d*d)}});ab.prototype=Object.assign(Object.create(ea.prototype), +{constructor:ab,isLightProbe:!0,copy:function(a){ea.prototype.copy.call(this,a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return ea.prototype.toJSON.call(this,a)}});Dg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Dg,isHemisphereLightProbe:!0,copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this,a)}});Eg.prototype=Object.assign(Object.create(ab.prototype),{constructor:Eg,isAmbientLightProbe:!0, +copy:function(a){ab.prototype.copy.call(this,a);return this},toJSON:function(a){return ab.prototype.toJSON.call(this,a)}});var aj=new P,bj=new P;Object.assign(ki.prototype,{update:function(a){var b=this._cache;if(b.focus!==a.focus||b.fov!==a.fov||b.aspect!==a.aspect*this.aspect||b.near!==a.near||b.far!==a.far||b.zoom!==a.zoom||b.eyeSep!==this.eyeSep){b.focus=a.focus;b.fov=a.fov;b.aspect=a.aspect*this.aspect;b.near=a.near;b.far=a.far;b.zoom=a.zoom;b.eyeSep=this.eyeSep;var c=a.projectionMatrix.clone(), +d=b.eyeSep/2,e=d*b.near/b.focus,f=b.near*Math.tan(L.DEG2RAD*b.fov*.5)/b.zoom;bj.elements[12]=-d;aj.elements[12]=d;d=-f*b.aspect+e;var g=f*b.aspect+e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraL.projectionMatrix.copy(c);d=-f*b.aspect-e;g=f*b.aspect-e;c.elements[0]=2*b.near/(g-d);c.elements[8]=(g+d)/(g-d);this.cameraR.projectionMatrix.copy(c)}this.cameraL.matrixWorld.copy(a.matrixWorld).multiply(bj);this.cameraR.matrixWorld.copy(a.matrixWorld).multiply(aj)}});Object.assign(Fg.prototype, +{start:function(){this.oldTime=this.startTime=("undefined"===typeof performance?Date:performance).now();this.elapsedTime=0;this.running=!0},stop:function(){this.getElapsedTime();this.autoStart=this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var b=("undefined"===typeof performance?Date:performance).now();a=(b-this.oldTime)/1E3;this.oldTime=b;this.elapsedTime+=a}return a}}); +var wc=new n,cj=new Aa,bl=new n,xc=new n;Gg.prototype=Object.assign(Object.create(F.prototype),{constructor:Gg,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null);return this},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)): +this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination);return this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.setTargetAtTime(a,this.context.currentTime,.01);return this},updateMatrixWorld:function(a){F.prototype.updateMatrixWorld.call(this,a);a=this.context.listener;var b=this.up;this.timeDelta=this._clock.getDelta();this.matrixWorld.decompose(wc,cj,bl);xc.set(0, +0,-1).applyQuaternion(cj);if(a.positionX){var c=this.context.currentTime+this.timeDelta;a.positionX.linearRampToValueAtTime(wc.x,c);a.positionY.linearRampToValueAtTime(wc.y,c);a.positionZ.linearRampToValueAtTime(wc.z,c);a.forwardX.linearRampToValueAtTime(xc.x,c);a.forwardY.linearRampToValueAtTime(xc.y,c);a.forwardZ.linearRampToValueAtTime(xc.z,c);a.upX.linearRampToValueAtTime(b.x,c);a.upY.linearRampToValueAtTime(b.y,c);a.upZ.linearRampToValueAtTime(b.z,c)}else a.setPosition(wc.x,wc.y,wc.z),a.setOrientation(xc.x, +xc.y,xc.z,b.x,b.y,b.z)}});id.prototype=Object.assign(Object.create(F.prototype),{constructor:id,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this},setMediaElementSource:function(a){this.hasPlaybackControl=!1;this.sourceType="mediaNode";this.source=this.context.createMediaElementSource(a);this.connect();return this},setMediaStreamSource:function(a){this.hasPlaybackControl=!1;this.sourceType= +"mediaStreamNode";this.source=this.context.createMediaStreamSource(a);this.connect();return this},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(a){void 0===a&&(a=0);if(!0===this.isPlaying)console.warn("THREE.Audio: Audio is already playing.");else if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._startedAt=this.context.currentTime+a,a=this.context.createBufferSource(), +a.buffer=this.buffer,a.loop=this.loop,a.loopStart=this.loopStart,a.loopEnd=this.loopEnd,a.onended=this.onEnded.bind(this),a.start(this._startedAt,this._pausedAt+this.offset,this.duration),this.isPlaying=!0,this.source=a,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&(this._pausedAt+=Math.max(this.context.currentTime- +this._startedAt,0)*this.playbackRate,this.source.stop(),this.source.onended=null,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this._pausedAt=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this},connect:function(){if(0d&&this._mixBufferRegion(c,a,3*b,1-d,b);d=b;for(var f=b+b;d!==f;++d)if(c[d]!==c[d+b]){e.setValue(c,a);break}},saveOriginalState:function(){var a=this.buffer,b=this.valueSize,c=3*b;this.binding.getValue(a,c);for(var d=b;d!==c;++d)a[d]= -a[c+d%b];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(a,b,c,d,e){if(.5<=d)for(d=0;d!==e;++d)a[b+d]=a[c+d]},_slerp:function(a,b,c,d){Ca.slerpFlat(a,b,a,b,a,c,d)},_lerp:function(a,b,c,d,e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});var fl=/[\[\]\.:\/]/g,gl="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",hl=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),il=/(WCOD+)?/.source.replace("WCOD",gl), -jl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),kl=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ll=new RegExp("^"+hl+il+jl+kl+"$"),ml=["material","materials","bones"];Object.assign(mi.prototype,{getValue:function(a,b){this.bind();var c=this._bindings[this._targetGroup.nCachedObjects_];void 0!==c&&c.getValue(a,b)},setValue:function(a,b){for(var c=this._bindings,d=this._targetGroup.nCachedObjects_,e=c.length;d!==e;++d)c[d].setValue(a,b)},bind:function(){for(var a= -this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].bind()},unbind:function(){for(var a=this._bindings,b=this._targetGroup.nCachedObjects_,c=a.length;b!==c;++b)a[b].unbind()}});Object.assign(Aa,{Composite:mi,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new Aa.Composite(a,b,c):new Aa(a,b,c)},sanitizeNodeName:function(a){return a.replace(/\s/g,"_").replace(fl,"")},parseTrackName:function(a){var b=ll.exec(a);if(!b)throw Error("PropertyBinding: Cannot parse trackName: "+ -a);b={nodeName:b[2],objectName:b[3],objectIndex:b[4],propertyName:b[5],propertyIndex:b[6]};var c=b.nodeName&&b.nodeName.lastIndexOf(".");if(void 0!==c&&-1!==c){var d=b.nodeName.substring(c+1);-1!==ml.indexOf(d)&&(b.nodeName=b.nodeName.substring(0,c),b.objectName=d)}if(null===b.propertyName||0===b.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+a);return b},findNode:function(a,b){if(!b||""===b||"."===b||-1===b||b===a.name||b===a.uuid)return a;if(a.skeleton){var c= -a.skeleton.getBoneByName(b);if(void 0!==c)return c}if(a.children){var d=function(a){for(var c=0;c=b){var n=b++,p=a[n];c[p.uuid]=m;a[m]=p;c[l]=n;a[n]=h;h=0;for(l=e;h!==l;++h){p=d[h];var q=p[m];p[m]=p[n];p[n]=q}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var l= -arguments[g].uuid,m=d[l];if(void 0!==m)if(delete d[l],m=b){var n=b++,p=a[n];c[p.uuid]=m;a[m]=p;c[l]=n;a[n]=h;h=0;for(l=e;h!==l;++h){p=d[h];var r=p[m];p[m]=p[n];p[n]=r}}}this.nCachedObjects_=b},uncache:function(){for(var a=this._objects,b=a.length,c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var l= +arguments[g].uuid,m=d[l];if(void 0!==m)if(delete d[l],mc.parameterPositions[1]&&(this.stopFading(),0===d&&(this.enabled=!1))}}return this._effectiveWeight=b},_updateTimeScale:function(a){var b=0;if(!this.paused){b=this.timeScale;var c=this._timeScaleInterpolant;if(null!==c){var d=c.evaluate(a)[0];b*=d;a>c.parameterPositions[1]&&(this.stopWarping(),0===b?this.paused=!0:this.timeScale=b)}}return this._effectiveTimeScale=b},_updateTime:function(a){var b=this.time+a,c=this._clip.duration,d=this.loop,e=this._loopCount,f=2202===d;if(0===a)return-1=== e?b:f&&1===(e&1)?c-b:b;if(2200===d)a:{if(-1===e&&(this._loopCount=0,this._setEndings(!0,!0,!1)),b>=c)b=c;else if(0>b)b=0;else{this.time=b;break a}this.clampWhenFinished?this.paused=!0:this.enabled=!1;this.time=b;this._mixer.dispatchEvent({type:"finished",action:this,direction:0>a?-1:1})}else{-1===e&&(0<=a?(e=0,this._setEndings(!0,0===this.repetitions,f)):this._setEndings(0===this.repetitions,!0,f));if(b>=c||0>b){d=Math.floor(b/c);b-=c*d;e+=Math.abs(d);var g=this.repetitions-e;0>=g?(this.clampWhenFinished? this.paused=!0:this.enabled=!1,this.time=b=0a,this._setEndings(a,!a,f)):this._setEndings(!1,!1,f),this._loopCount=e,this.time=b,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:d}))}else this.time=b;if(f&&1===(e&1))return c-b}return b},_setEndings:function(a,b,c){var d=this._interpolantSettings;c?(d.endingStart=2401,d.endingEnd=2401):(d.endingStart=a?this.zeroSlopeAtStart?2401:2400:2402,d.endingEnd= -b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});Ng.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ng,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName, -l=h[g];void 0===l&&(l={},h[g]=l);for(h=0;h!==e;++h){var m=d[h],n=m.name,p=l[n];if(void 0===p){p=f[h];if(void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,g,n));continue}p=new Mg(Aa.create(c,n,b&&b._propertyBindings[h].binding.parsedPath),m.ValueTypeName,m.getValueSize());++p.referenceCount;this._addInactiveBinding(p,g,n)}f[h]=p;a[h].resultBuffer=p.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid, +b?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(a,b,c){var d=this._mixer,e=d.time,f=this._weightInterpolant;null===f&&(this._weightInterpolant=f=d._lendControlInterpolant());d=f.parameterPositions;f=f.sampleValues;d[0]=e;f[0]=b;d[1]=e+a;f[1]=c;return this}});Lg.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Lg,_bindAction:function(a,b){var c=a._localRoot||this._root,d=a._clip.tracks,e=d.length,f=a._propertyBindings;a=a._interpolants;var g=c.uuid,h=this._bindingsByRootAndName, +l=h[g];void 0===l&&(l={},h[g]=l);for(h=0;h!==e;++h){var m=d[h],n=m.name,p=l[n];if(void 0===p){p=f[h];if(void 0!==p){null===p._cacheIndex&&(++p.referenceCount,this._addInactiveBinding(p,g,n));continue}p=new Kg(ya.create(c,n,b&&b._propertyBindings[h].binding.parsedPath),m.ValueTypeName,m.getValueSize());++p.referenceCount;this._addInactiveBinding(p,g,n)}f[h]=p;a[h].resultBuffer=p.buffer}},_activateAction:function(a){if(!this._isActiveAction(a)){if(null===a._cacheIndex){var b=(a._localRoot||this._root).uuid, c=a._clip.uuid,d=this._actionsByClip[c];this._bindAction(a,d&&d.knownActions[0]);this._addInactiveAction(a,c,b)}b=a._propertyBindings;c=0;for(d=b.length;c!==d;++c){var e=b[c];0===e.useCount++&&(this._lendBinding(e),e.saveOriginalState())}this._lendAction(a)}},_deactivateAction:function(a){if(this._isActiveAction(a)){for(var b=a._propertyBindings,c=0,d=b.length;c!==d;++c){var e=b[c];0===--e.useCount&&(e.restoreOriginalState(),this._takeBackBinding(e))}this._takeBackAction(a)}},_initMemoryManager:function(){this._actions= [];this._nActiveActions=0;this._actionsByClip={};this._bindings=[];this._nActiveBindings=0;this._bindingsByRootAndName={};this._controlInterpolants=[];this._nActiveControlInterpolants=0;var a=this;this.stats={actions:{get total(){return a._actions.length},get inUse(){return a._nActiveActions}},bindings:{get total(){return a._bindings.length},get inUse(){return a._nActiveBindings}},controlInterpolants:{get total(){return a._controlInterpolants.length},get inUse(){return a._nActiveControlInterpolants}}}}, _isActiveAction:function(a){a=a._cacheIndex;return null!==a&&athis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new v);return b.set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x< -this.min.x||a.min.x>this.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new v);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return fj.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a); -this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var gj=new n,Wf=new n;Object.assign(Sg.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)}, -delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){gj.subVectors(a,this.start);Wf.subVectors(this.end, -this.start);a=Wf.dot(Wf);a=Wf.dot(gj)/a;b&&(a=L.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});se.prototype=Object.create(E.prototype); -se.prototype.constructor=se;se.prototype.isImmediateRenderObject=!0;var hj=new n;jd.prototype=Object.create(E.prototype);jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};jd.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);hj.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(hj);void 0!==this.color? -this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Qb=new n,Xf=new P,vh=new P;rc.prototype=Object.create(na.prototype);rc.prototype.constructor=rc;rc.prototype.isSkeletonHelper=!0;rc.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");vh.getInverse(this.root.matrixWorld);for(var e=0,f=0;eMath.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);E.prototype.updateMatrixWorld.call(this,a)};var mj=new n,zf,Tg;xb.prototype=Object.create(E.prototype);xb.prototype.constructor=xb;xb.prototype.setDirection=function(a){.99999a.y?this.quaternion.set(1,0,0,0):(mj.set(a.z, -0,-a.x).normalize(),this.quaternion.setFromAxisAngle(mj,Math.acos(a.y)))};xb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};xb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};xb.prototype.copy=function(a){E.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone); -return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};we.prototype=Object.create(na.prototype);we.prototype.constructor=we;var kb=Math.pow(2,8),nj=[.125,.215,.35,.446,.526,.582],xi=5+nj.length,lb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},Xg=new hd,Af=function(a){var b=new Float32Array(a),c=new n(0,1,0);a=new ub({defines:{n:a},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:b},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:c}, -inputEncoding:{value:lb[3E3]},outputEncoding:{value:lb[3E3]}},vertexShader:Zg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+$g()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include \n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t\t\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t", -blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";return a}(20),Rb=null,Sb=null,wh=function(){for(var a=[],b=[],c=[],d=8,e=0;em;m++){var n=m%3*2/3-1,p=2p;p++)q=p%3,0==q?(c.up.set(0,d[p],0),c.lookAt(f[p],0,0)):1==q?(c.up.set(0,0,d[p]),c.lookAt(0,f[p],0)):(c.up.set(0,d[p],0),c.lookAt(0,0,f[p])),Yg(e,q*kb,2this.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){void 0===b&&(console.warn("THREE.Box2: .clampPoint() target is now required"),b=new v);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){return ej.copy(a).clamp(this.min,this.max).sub(a).length()},intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a); +this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var fj=new n,Vf=new n;Object.assign(Qg.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},getCenter:function(a){void 0===a&&(console.warn("THREE.Line3: .getCenter() target is now required"),a=new n);return a.addVectors(this.start,this.end).multiplyScalar(.5)}, +delta:function(a){void 0===a&&(console.warn("THREE.Line3: .delta() target is now required"),a=new n);return a.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a,b){void 0===b&&(console.warn("THREE.Line3: .at() target is now required"),b=new n);return this.delta(b).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(a,b){fj.subVectors(a,this.start);Vf.subVectors(this.end, +this.start);a=Vf.dot(Vf);a=Vf.dot(fj)/a;b&&(a=L.clamp(a,0,1));return a},closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);void 0===c&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),c=new n);return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a);this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)}});se.prototype=Object.create(F.prototype); +se.prototype.constructor=se;se.prototype.isImmediateRenderObject=!0;var gj=new n;jd.prototype=Object.create(F.prototype);jd.prototype.constructor=jd;jd.prototype.dispose=function(){this.cone.geometry.dispose();this.cone.material.dispose()};jd.prototype.update=function(){this.light.updateMatrixWorld();var a=this.light.distance?this.light.distance:1E3,b=a*Math.tan(this.light.angle);this.cone.scale.set(b,b,a);gj.setFromMatrixPosition(this.light.target.matrixWorld);this.cone.lookAt(gj);void 0!==this.color? +this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)};var Qb=new n,Wf=new P,uh=new P;rc.prototype=Object.create(ma.prototype);rc.prototype.constructor=rc;rc.prototype.isSkeletonHelper=!0;rc.prototype.updateMatrixWorld=function(a){var b=this.bones,c=this.geometry,d=c.getAttribute("position");uh.getInverse(this.root.matrixWorld);for(var e=0,f=0;eMath.abs(b)&&(b=1E-8);this.scale.set(.5*this.size,.5*this.size,b);this.children[0].material.side=0>b?1:0;this.lookAt(this.plane.normal);F.prototype.updateMatrixWorld.call(this,a)};var lj=new n,zf,Rg;xb.prototype=Object.create(F.prototype);xb.prototype.constructor=xb;xb.prototype.setDirection=function(a){.99999a.y?this.quaternion.set(1,0,0,0):(lj.set(a.z, +0,-a.x).normalize(),this.quaternion.setFromAxisAngle(lj,Math.acos(a.y)))};xb.prototype.setLength=function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(1E-4,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};xb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};xb.prototype.copy=function(a){F.prototype.copy.call(this,a,!1);this.line.copy(a.line);this.cone.copy(a.cone); +return this};xb.prototype.clone=function(){return(new this.constructor).copy(this)};we.prototype=Object.create(ma.prototype);we.prototype.constructor=we;var kb=Math.pow(2,8),mj=[.125,.215,.35,.446,.526,.582],wi=5+mj.length,lb={3E3:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},Vg=new hd,Af=function(a){var b=new Float32Array(a),c=new n(0,1,0);a=new ub({defines:{n:a},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:b},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:c}, +inputEncoding:{value:lb[3E3]},outputEncoding:{value:lb[3E3]}},vertexShader:Xg(),fragmentShader:"\nprecision mediump float;\nprecision mediump int;\nvarying vec3 vOutputDirection;\nuniform sampler2D envMap;\nuniform int samples;\nuniform float weights[n];\nuniform bool latitudinal;\nuniform float dTheta;\nuniform float mipInt;\nuniform vec3 poleAxis;\n\n"+Yg()+"\n\n#define ENVMAP_TYPE_CUBE_UV\n#include \n\nvoid main() {\n\tgl_FragColor = vec4(0.0);\n\tfor (int i = 0; i < n; i++) {\n\t\tif (i >= samples)\n\t\t\tbreak;\n\t\tfor (int dir = -1; dir < 2; dir += 2) {\n\t\t\tif (i == 0 && dir == 1)\n\t\t\t\tcontinue;\n\t\t\tvec3 axis = latitudinal ? poleAxis : cross(poleAxis, vOutputDirection);\n\t\t\tif (all(equal(axis, vec3(0.0))))\n\t\t\t\taxis = cross(vec3(0.0, 1.0, 0.0), vOutputDirection);\n\t\t\taxis = normalize(axis);\n\t\t\tfloat theta = dTheta * float(dir * i);\n\t\t\tfloat cosTheta = cos(theta);\n\t\t\t// Rodrigues' axis-angle rotation\n\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross(axis, vOutputDirection) * sin(theta)\n\t\t\t\t\t+ axis * dot(axis, vOutputDirection) * (1.0 - cosTheta);\n\t\t\tgl_FragColor.rgb +=\n\t\t\t\t\tweights[i] * bilinearCubeUV(envMap, sampleDirection, mipInt);\n\t\t}\n\t}\n\tgl_FragColor = linearToOutputTexel(gl_FragColor);\n}\n\t\t", +blending:0,depthTest:!1,depthWrite:!1});a.type="SphericalGaussianBlur";return a}(20),Rb=null,Sb=null,vh=function(){for(var a=[],b=[],c=[],d=8,e=0;em;m++){var n=m%3*2/3-1,p=2p;p++)r=p%3,0==r?(c.up.set(0,d[p],0),c.lookAt(f[p],0,0)):1==r?(c.up.set(0,0,d[p]),c.lookAt(0,f[p],0)):(c.up.set(0,d[p],0),c.lookAt(0,0,f[p])),Wg(e,r*kb,2 0 ) { - - prefixVertex = prefixVertex.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - 'layout(num_views = ' + numMultiviewViews + ') in;', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixVertex = prefixVertex.replace( - [ - 'uniform mat4 modelViewMatrix;', - 'uniform mat4 projectionMatrix;', - 'uniform mat4 viewMatrix;', - 'uniform mat3 normalMatrix;' - ].join( '\n' ), - [ - 'uniform mat4 modelViewMatrices[' + numMultiviewViews + '];', - 'uniform mat4 projectionMatrices[' + numMultiviewViews + '];', - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - 'uniform mat3 normalMatrices[' + numMultiviewViews + '];', - - '#define modelViewMatrix modelViewMatrices[VIEW_ID]', - '#define projectionMatrix projectionMatrices[VIEW_ID]', - '#define viewMatrix viewMatrices[VIEW_ID]', - '#define normalMatrix normalMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - 'uniform mat4 viewMatrix;', - [ - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - '#define viewMatrix viewMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - } - } var vertexGlsl = prefixVertex + vertexShader; @@ -18451,7 +18395,6 @@ function WebGLProgram( renderer, cacheKey, parameters ) { this.program = program; this.vertexShader = glVertexShader; this.fragmentShader = glFragmentShader; - this.numMultiviewViews = numMultiviewViews; return this; @@ -18491,7 +18434,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) { }; var parameterNames = [ - "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "numMultiviewViews", + "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding", "envMapCubeUV", "lightMap", "lightMapEncoding", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "tangentSpaceNormalMap", "clearcoatNormalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", @@ -18625,7 +18568,6 @@ function WebGLPrograms( renderer, extensions, capabilities ) { material.onBeforeCompile( shaderobject, renderer ); var currentRenderTarget = renderer.getRenderTarget(); - var numMultiviewViews = currentRenderTarget && currentRenderTarget.isWebGLMultiviewRenderTarget ? currentRenderTarget.numViews : 0; var parameters = { @@ -18647,7 +18589,6 @@ function WebGLPrograms( renderer, extensions, capabilities ) { instancing: object.isInstancedMesh === true, supportsVertexTextures: vertexTextures, - numMultiviewViews: numMultiviewViews, outputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding, map: !! material.map, mapEncoding: getTextureEncodingFromMap( material.map ), @@ -21592,21 +21533,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - if ( renderTarget.isWebGLMultiviewRenderTarget ) { - - _gl.deleteTexture( renderTargetProperties.__webglColorTexture ); - _gl.deleteTexture( renderTargetProperties.__webglDepthStencilTexture ); - - info.memory.textures -= 2; - - for ( var i = 0, il = renderTargetProperties.__webglViewFramebuffers.length; i < il; i ++ ) { - - _gl.deleteFramebuffer( renderTargetProperties.__webglViewFramebuffers[ i ] ); - - } - - } - properties.remove( renderTarget.texture ); properties.remove( renderTarget ); @@ -22307,7 +22233,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, var isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); var isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true ); - var isMultiview = ( renderTarget.isWebGLMultiviewRenderTarget === true ); var supportsMips = isPowerOfTwo( renderTarget ) || isWebGL2; // Setup framebuffer @@ -22361,48 +22286,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - } else if ( isMultiview ) { - - var width = renderTarget.width; - var height = renderTarget.height; - var numViews = renderTarget.numViews; - - _gl.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer ); - - var ext = extensions.get( 'OVR_multiview2' ); - - info.memory.textures += 2; - - var colorTexture = _gl.createTexture(); - _gl.bindTexture( 35866, colorTexture ); - _gl.texParameteri( 35866, 10240, 9728 ); - _gl.texParameteri( 35866, 10241, 9728 ); - _gl.texImage3D( 35866, 0, 32856, width, height, numViews, 0, 6408, 5121, null ); - ext.framebufferTextureMultiviewOVR( 36160, 36064, colorTexture, 0, 0, numViews ); - - var depthStencilTexture = _gl.createTexture(); - _gl.bindTexture( 35866, depthStencilTexture ); - _gl.texParameteri( 35866, 10240, 9728 ); - _gl.texParameteri( 35866, 10241, 9728 ); - _gl.texImage3D( 35866, 0, 35056, width, height, numViews, 0, 34041, 34042, null ); - ext.framebufferTextureMultiviewOVR( 36160, 33306, depthStencilTexture, 0, 0, numViews ); - - var viewFramebuffers = new Array( numViews ); - for ( var i = 0; i < numViews; ++ i ) { - - viewFramebuffers[ i ] = _gl.createFramebuffer(); - _gl.bindFramebuffer( 36160, viewFramebuffers[ i ] ); - _gl.framebufferTextureLayer( 36160, 36064, colorTexture, 0, i ); - - } - - renderTargetProperties.__webglColorTexture = colorTexture; - renderTargetProperties.__webglDepthStencilTexture = depthStencilTexture; - renderTargetProperties.__webglViewFramebuffers = viewFramebuffers; - - _gl.bindFramebuffer( 36160, null ); - _gl.bindTexture( 35866, null ); - } } @@ -22428,7 +22311,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, state.bindTexture( 34067, null ); - } else if ( ! isMultiview ) { + } else { state.bindTexture( 3553, textureProperties.__webglTexture ); setTextureParameters( 3553, renderTarget.texture, supportsMips ); @@ -22775,271 +22658,6 @@ function WebGLUtils( gl, extensions, capabilities ) { } -/** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - -function WebGLMultiviewRenderTarget( width, height, numViews, options ) { - - WebGLRenderTarget.call( this, width, height, options ); - - this.depthBuffer = false; - this.stencilBuffer = false; - - this.numViews = numViews; - -} - -WebGLMultiviewRenderTarget.prototype = Object.assign( Object.create( WebGLRenderTarget.prototype ), { - - constructor: WebGLMultiviewRenderTarget, - - isWebGLMultiviewRenderTarget: true, - - copy: function ( source ) { - - WebGLRenderTarget.prototype.copy.call( this, source ); - - this.numViews = source.numViews; - - return this; - - }, - - setNumViews: function ( numViews ) { - - if ( this.numViews !== numViews ) { - - this.numViews = numViews; - this.dispose(); - - } - - return this; - - } - -} ); - -/** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - -function WebGLMultiview( renderer, gl ) { - - var DEFAULT_NUMVIEWS = 2; - - var extensions = renderer.extensions; - var properties = renderer.properties; - - var renderTarget, currentRenderTarget; - var mat3, mat4, cameraArray, renderSize; - - var available; - var maxNumViews = 0; - - // - - function isAvailable() { - - if ( available === undefined ) { - - var extension = extensions.get( 'OVR_multiview2' ); - - available = extension !== null && gl.getContextAttributes().antialias === false; - - if ( available ) { - - maxNumViews = gl.getParameter( extension.MAX_VIEWS_OVR ); - renderTarget = new WebGLMultiviewRenderTarget( 0, 0, DEFAULT_NUMVIEWS ); - - renderSize = new Vector2(); - mat4 = []; - mat3 = []; - cameraArray = []; - - for ( var i = 0; i < maxNumViews; i ++ ) { - - mat4[ i ] = new Matrix4(); - mat3[ i ] = new Matrix3(); - - } - - } - - } - - return available; - - } - - function getCameraArray( camera ) { - - if ( camera.isArrayCamera ) return camera.cameras; - - cameraArray[ 0 ] = camera; - - return cameraArray; - - } - - function updateCameraProjectionMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].projectionMatrix ); - - } - - uniforms.setValue( gl, 'projectionMatrices', mat4 ); - - } - - function updateCameraViewMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].matrixWorldInverse ); - - } - - uniforms.setValue( gl, 'viewMatrices', mat4 ); - - } - - function updateObjectMatricesUniforms( object, camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].multiplyMatrices( cameras[ i ].matrixWorldInverse, object.matrixWorld ); - mat3[ i ].getNormalMatrix( mat4[ i ] ); - - } - - uniforms.setValue( gl, 'modelViewMatrices', mat4 ); - uniforms.setValue( gl, 'normalMatrices', mat3 ); - - } - - function isMultiviewCompatible( camera ) { - - if ( camera.isArrayCamera === undefined ) return true; - - var cameras = camera.cameras; - - if ( cameras.length > maxNumViews ) return false; - - for ( var i = 1, il = cameras.length; i < il; i ++ ) { - - if ( cameras[ 0 ].viewport.z !== cameras[ i ].viewport.z || - cameras[ 0 ].viewport.w !== cameras[ i ].viewport.w ) return false; - - } - - return true; - - } - - function resizeRenderTarget( camera ) { - - if ( currentRenderTarget ) { - - renderSize.set( currentRenderTarget.width, currentRenderTarget.height ); - - } else { - - renderer.getDrawingBufferSize( renderSize ); - - } - - if ( camera.isArrayCamera ) { - - var viewport = camera.cameras[ 0 ].viewport; - - renderTarget.setSize( viewport.z, viewport.w ); - renderTarget.setNumViews( camera.cameras.length ); - - } else { - - renderTarget.setSize( renderSize.x, renderSize.y ); - renderTarget.setNumViews( DEFAULT_NUMVIEWS ); - - } - - } - - function attachCamera( camera ) { - - if ( isMultiviewCompatible( camera ) === false ) return; - - currentRenderTarget = renderer.getRenderTarget(); - resizeRenderTarget( camera ); - renderer.setRenderTarget( renderTarget ); - - } - - function detachCamera( camera ) { - - if ( renderTarget !== renderer.getRenderTarget() ) return; - - renderer.setRenderTarget( currentRenderTarget ); - - flush( camera ); - - } - - function flush( camera ) { - - var srcRenderTarget = renderTarget; - var numViews = srcRenderTarget.numViews; - - var srcFramebuffers = properties.get( srcRenderTarget ).__webglViewFramebuffers; - - var viewWidth = srcRenderTarget.width; - var viewHeight = srcRenderTarget.height; - - if ( camera.isArrayCamera ) { - - for ( var i = 0; i < numViews; i ++ ) { - - var viewport = camera.cameras[ i ].viewport; - - var x1 = viewport.x; - var y1 = viewport.y; - var x2 = x1 + viewport.z; - var y2 = y1 + viewport.w; - - gl.bindFramebuffer( 36008, srcFramebuffers[ i ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, x1, y1, x2, y2, 16384, 9728 ); - - } - - } else { - - gl.bindFramebuffer( 36008, srcFramebuffers[ 0 ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, 0, 0, renderSize.x, renderSize.y, 16384, 9728 ); - - } - - } - - this.isAvailable = isAvailable; - this.attachCamera = attachCamera; - this.detachCamera = detachCamera; - this.updateCameraProjectionMatricesUniform = updateCameraProjectionMatricesUniform; - this.updateCameraViewMatricesUniform = updateCameraViewMatricesUniform; - this.updateObjectMatricesUniforms = updateObjectMatricesUniforms; - -} - /** * @author mrdoob / http://mrdoob.com/ */ @@ -23883,10 +23501,6 @@ function WebGLRenderer( parameters ) { this.xr = xr; - // Multiview - - var multiview = new WebGLMultiview( _this, _gl ); - // shadow map var shadowMap = new WebGLShadowMap( _this, objects, capabilities.maxTextureSize ); @@ -24784,12 +24398,6 @@ function WebGLRenderer( parameters ) { } - if ( xr.enabled && multiview.isAvailable() ) { - - multiview.attachCamera( camera ); - - } - // background.render( currentRenderList, scene, camera, forceClear ); @@ -24844,16 +24452,6 @@ function WebGLRenderer( parameters ) { state.setPolygonOffset( false ); - if ( xr.enabled ) { - - if ( multiview.isAvailable() ) { - - multiview.detachCamera( camera ); - - } - - } - // _gl.finish(); currentRenderList = null; @@ -25001,27 +24599,19 @@ function WebGLRenderer( parameters ) { _currentArrayCamera = camera; - if ( xr.enabled && multiview.isAvailable() ) { - - renderObject( object, scene, camera, geometry, material, group ); - - } else { + var cameras = camera.cameras; - var cameras = camera.cameras; + for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { - for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { + var camera2 = cameras[ j ]; - var camera2 = cameras[ j ]; + if ( object.layers.test( camera2.layers ) ) { - if ( object.layers.test( camera2.layers ) ) { + state.viewport( _currentViewport.copy( camera2.viewport ) ); - state.viewport( _currentViewport.copy( camera2.viewport ) ); + currentRenderState.setupLights( camera2 ); - currentRenderState.setupLights( camera2 ); - - renderObject( object, scene, camera2, geometry, material, group ); - - } + renderObject( object, scene, camera2, geometry, material, group ); } @@ -25303,15 +24893,7 @@ function WebGLRenderer( parameters ) { if ( refreshProgram || _currentCamera !== camera ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraProjectionMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); - - } + p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); if ( capabilities.logarithmicDepthBuffer ) { @@ -25372,15 +24954,7 @@ function WebGLRenderer( parameters ) { material.isShaderMaterial || material.skinning ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraViewMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); - - } + p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); } @@ -25585,17 +25159,8 @@ function WebGLRenderer( parameters ) { // common matrices - if ( program.numMultiviewViews > 0 ) { - - multiview.updateObjectMatricesUniforms( object, camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); - p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); - - } - + p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); + p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); return program; @@ -50343,19 +49908,19 @@ var SceneUtils = { createMultiMaterialObject: function ( /* geometry, materials */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, detach: function ( /* child, parent, scene */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, attach: function ( /* child, scene, parent */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); } @@ -50365,7 +49930,7 @@ var SceneUtils = { function LensFlare() { - console.error( 'THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js' ); + console.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' ); } diff --git a/docs/api/en/animation/KeyframeTrack.html b/docs/api/en/animation/KeyframeTrack.html index 389707cb45c2df..35a31b995a19c6 100644 --- a/docs/api/en/animation/KeyframeTrack.html +++ b/docs/api/en/animation/KeyframeTrack.html @@ -58,7 +58,7 @@

[name]

Some examples of how to manually create [page:AnimationClip AnimationClips] with different sorts - of KeyframeTracks can be found in the [link:https://threejs.org/examples/js/animation/AnimationClipCreator.js AnimationClipCreator] + of KeyframeTracks can be found in the [link:https://threejs.org/examples/jsm/animation/AnimationClipCreator.js AnimationClipCreator] file.

diff --git a/docs/api/en/cameras/StereoCamera.html b/docs/api/en/cameras/StereoCamera.html index 4e37b28af54f1f..1795a52c43f71c 100644 --- a/docs/api/en/cameras/StereoCamera.html +++ b/docs/api/en/cameras/StereoCamera.html @@ -25,9 +25,9 @@

Example

This class is used internally in the files

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/AnaglyphEffect.js examples/js/effects/AnaglyphEffect.js]

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/ParallaxBarrierEffect.js examples/js/effects/ParallaxBarrierEffect.js]

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/StereoEffect.js examples/js/effects/StereoEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/AnaglyphEffect.js examples/jsm/effects/AnaglyphEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/ParallaxBarrierEffect.js examples/jsm/effects/ParallaxBarrierEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/StereoEffect.js examples/jsm/effects/StereoEffect.js]

used in the above examples.

diff --git a/docs/api/en/deprecated/DeprecatedList.html b/docs/api/en/deprecated/DeprecatedList.html index 7c76b7ebe2ec5a..c6daef4d0c1256 100644 --- a/docs/api/en/deprecated/DeprecatedList.html +++ b/docs/api/en/deprecated/DeprecatedList.html @@ -473,7 +473,7 @@

[page:Object3D]

[page:LensFlare]

- LensFlare has been moved to [link:https://github.com/mrdoob/three.js/blob/master/examples/js/objects/Lensflare.js /examples/js/objects/Lensflare.js]. + LensFlare has been moved to [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js /examples/jsm/objects/Lensflare.js].

@@ -509,7 +509,7 @@

[page:CanvasRenderer]

[page:Projector]

Projector has been moved to - [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/Projector.js /examples/js/renderers/Projector.js].

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/Projector.js /examples/jsm/renderers/Projector.js].

Projector.projectVector() is now [page:Vector.project]().

diff --git a/docs/api/en/lights/RectAreaLight.html b/docs/api/en/lights/RectAreaLight.html index 15197bf2bcbcfe..d0a98d4ebf3bfd 100644 --- a/docs/api/en/lights/RectAreaLight.html +++ b/docs/api/en/lights/RectAreaLight.html @@ -20,7 +20,7 @@

[name]

  • There is no shadow support.
  • Only [page:MeshStandardMaterial MeshStandardMaterial] and [page:MeshPhysicalMaterial MeshPhysicalMaterial] are supported.
  • -
  • You have to include [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene and call *init()*.
  • +
  • You have to include [link:https://threejs.org/examples/jsm/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene and call *init()*.

diff --git a/docs/api/en/loaders/CompressedTextureLoader.html b/docs/api/en/loaders/CompressedTextureLoader.html index a03c5ba03f8ecf..293830ae1963c2 100644 --- a/docs/api/en/loaders/CompressedTextureLoader.html +++ b/docs/api/en/loaders/CompressedTextureLoader.html @@ -20,8 +20,8 @@

[name]

Examples

- See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DDSLoader.js DDSLoader] - and [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PVRLoader.js PVRLoader] + See the [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/DDSLoader.js DDSLoader] + and [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PVRLoader.js PVRLoader] for examples of derived classes.

diff --git a/docs/api/en/loaders/DataTextureLoader.html b/docs/api/en/loaders/DataTextureLoader.html index 372b085f00f40c..7bcaaed1d0cf7a 100644 --- a/docs/api/en/loaders/DataTextureLoader.html +++ b/docs/api/en/loaders/DataTextureLoader.html @@ -21,7 +21,7 @@

[name]

Examples

- See the [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/RGBELoader.js RGBELoader] + See the [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/RGBELoader.js RGBELoader] for an example of a derived class.

diff --git a/docs/api/en/renderers/shaders/UniformsUtils.html b/docs/api/en/renderers/shaders/UniformsUtils.html index 6731259ef05f75..7ac9813b333160 100644 --- a/docs/api/en/renderers/shaders/UniformsUtils.html +++ b/docs/api/en/renderers/shaders/UniformsUtils.html @@ -10,15 +10,28 @@

[name]

-

Uniform Utilities. Support merging and cloning of uniform variables

- -

Properties

+

+ Provides utility functions for managing uniforms. +

+

Methods

+

[method:Object clone]( [param:Object src] )

+

+ src -- An object representing uniform definitions.

-

Methods

+ Clones the given uniform definitions by performing a deep-copy. That means if + the [page:Uniform.value value] of a uniform refers to an object like a [page:Vector3] + or [page:Texture], the cloned uniform will refer to a new object reference. +

+

[method:Object merge]( [param:Array uniforms] )

+

+ uniforms -- An array of objects containing uniform definitions.

+ Merges the given uniform definitions into a single object. Since the method + internally uses [page:.clone](), it performs a deep-copy when producing the + merged uniform definitions.

Source

diff --git a/docs/api/zh/animation/KeyframeTrack.html b/docs/api/zh/animation/KeyframeTrack.html index f78a1275b7b782..8dd320e5b27945 100644 --- a/docs/api/zh/animation/KeyframeTrack.html +++ b/docs/api/zh/animation/KeyframeTrack.html @@ -49,7 +49,7 @@

[name]

- 可以在[link:https://threejs.org/examples/js/animation/AnimationClipCreator.js AnimationClipCreator]文件中找到用不同类型的关键帧轨道创建动画剪辑([page:AnimationClip AnimationClips])的示例。 + 可以在[link:https://threejs.org/examples/jsm/animation/AnimationClipCreator.js AnimationClipCreator]文件中找到用不同类型的关键帧轨道创建动画剪辑([page:AnimationClip AnimationClips])的示例。

diff --git a/docs/api/zh/cameras/StereoCamera.html b/docs/api/zh/cameras/StereoCamera.html index 965dc866869375..7625f95767c0d3 100644 --- a/docs/api/zh/cameras/StereoCamera.html +++ b/docs/api/zh/cameras/StereoCamera.html @@ -25,9 +25,9 @@

示例

这些类在以上示例中的文件内部使用:

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/AnaglyphEffect.js examples/js/effects/AnaglyphEffect.js]

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/ParallaxBarrierEffect.js examples/js/effects/ParallaxBarrierEffect.js]

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/StereoEffect.js examples/js/effects/StereoEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/AnaglyphEffect.js examples/jsm/effects/AnaglyphEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/ParallaxBarrierEffect.js examples/jsm/effects/ParallaxBarrierEffect.js]

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/effects/StereoEffect.js examples/jsm/effects/StereoEffect.js]

diff --git a/docs/api/zh/deprecated/DeprecatedList.html b/docs/api/zh/deprecated/DeprecatedList.html index 9fe372d64dcf33..a2b820175c2e8e 100644 --- a/docs/api/zh/deprecated/DeprecatedList.html +++ b/docs/api/zh/deprecated/DeprecatedList.html @@ -454,7 +454,7 @@

[page:Object3D]

[page:LensFlare]

- LensFlare 已被移动到了 [link:https://github.com/mrdoob/three.js/blob/master/examples/js/objects/Lensflare.js /examples/js/objects/Lensflare.js]. + LensFlare 已被移动到了 [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js /examples/jsm/objects/Lensflare.js].

@@ -484,13 +484,13 @@

渲染器(Renderer)

[page:Projector]

- CanvasRenderer 已被移动到了 [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CanvasRenderer.js /examples/js/renderers/CanvasRenderer.js]. + CanvasRenderer has been removed.

[page:Projector]

Projector 已被移动到了 - [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/Projector.js /examples/js/renderers/Projector.js]。

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/Projector.js /examples/jsm/renderers/Projector.js]。

Projector.projectVector() 现在是 [page:Vector.project]()。

diff --git a/docs/api/zh/geometries/TorusKnotBufferGeometry.html b/docs/api/zh/geometries/TorusKnotBufferGeometry.html index 9ec982e3e0a8be..cb3ff221ac1797 100644 --- a/docs/api/zh/geometries/TorusKnotBufferGeometry.html +++ b/docs/api/zh/geometries/TorusKnotBufferGeometry.html @@ -10,7 +10,7 @@ [page:BufferGeometry] → -

圆环缓冲几何体([name])

+

圆环缓冲扭结几何体([name])

This is the [page:BufferGeometry] port of [page:TorusKnotGeometry].

diff --git a/docs/api/zh/lights/RectAreaLight.html b/docs/api/zh/lights/RectAreaLight.html index fd59c127636127..30cc37640323f8 100644 --- a/docs/api/zh/lights/RectAreaLight.html +++ b/docs/api/zh/lights/RectAreaLight.html @@ -19,7 +19,7 @@

平面光光源([name])

  • 不支持阴影。
  • 只支持 [page:MeshStandardMaterial MeshStandardMaterial] 和 [page:MeshPhysicalMaterial MeshPhysicalMaterial] 两种材质。
  • -
  • 你必须在你的场景中加入 [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] ,并调用*init()*。
  • +
  • 你必须在你的场景中加入 [link:https://threejs.org/examples/jsm/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] ,并调用*init()*。

diff --git a/docs/api/zh/loaders/CompressedTextureLoader.html b/docs/api/zh/loaders/CompressedTextureLoader.html index 5fca540fea7f87..17701e3fae6f3b 100644 --- a/docs/api/zh/loaders/CompressedTextureLoader.html +++ b/docs/api/zh/loaders/CompressedTextureLoader.html @@ -20,8 +20,8 @@

[name]

例子

- 请参考[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DDSLoader.js DDSLoader] - 和[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PVRLoader.js PVRLoader] + 请参考[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/DDSLoader.js DDSLoader] + 和[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PVRLoader.js PVRLoader] 子类的例子

diff --git a/docs/api/zh/loaders/DataTextureLoader.html b/docs/api/zh/loaders/DataTextureLoader.html index 16200f8edb4ca7..0f63995c315a8c 100644 --- a/docs/api/zh/loaders/DataTextureLoader.html +++ b/docs/api/zh/loaders/DataTextureLoader.html @@ -21,7 +21,7 @@

[name]

例子

- 请参考[link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/RGBELoader.js RGBELoader] + 请参考[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/RGBELoader.js RGBELoader] 这个子类的例子。

diff --git a/docs/api/zh/renderers/shaders/UniformsUtils.html b/docs/api/zh/renderers/shaders/UniformsUtils.html index 8201da89c3720a..8ba568f66e5598 100644 --- a/docs/api/zh/renderers/shaders/UniformsUtils.html +++ b/docs/api/zh/renderers/shaders/UniformsUtils.html @@ -12,13 +12,24 @@

[name]

Uniform工具. 支持uniform变量的合并和克隆

-

属性

- +

方法

+

[method:Object clone]( [param:Object src] )

+

+ src -- An object representing uniform definitions.

-

方法

+ Clones the given uniform definitions by performing a deep-copy. That means if + the [page:Uniform.value value] of a uniform refers to an object like a [page:Vector3] + or [page:Texture], the cloned uniform will refer to a new object reference. +

+

[method:Object merge]( [param:Array uniforms] )

+

+ uniforms -- An array of objects containing uniform definitions.

+ Merges the given uniform definitions into a single object. Since the method + internally uses [page:.clone](), it performs a deep-copy when producing the + merged uniform definitions.

源码

diff --git a/docs/examples/en/animations/CCDIKSolver.html b/docs/examples/en/animations/CCDIKSolver.html index 3592789821e327..69b6a74f6e0bfa 100644 --- a/docs/examples/en/animations/CCDIKSolver.html +++ b/docs/examples/en/animations/CCDIKSolver.html @@ -21,7 +21,7 @@

Example

var ikSolver; // Load MMD resources and instantiate CCDIKSolver - new THREE.MMDLoader().load( + new MMDLoader().load( 'models/mmd/miku.pmd', function ( mesh ) { @@ -98,7 +98,7 @@

[method:CCDIKSolver update]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/CCDIKSolver.js examples/js/animation/CCDIKSolver.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/CCDIKSolver.js examples/jsm/animation/CCDIKSolver.js]

diff --git a/docs/examples/en/animations/MMDAnimationHelper.html b/docs/examples/en/animations/MMDAnimationHelper.html index 5fa9c9d8329641..2ff68faea16839 100644 --- a/docs/examples/en/animations/MMDAnimationHelper.html +++ b/docs/examples/en/animations/MMDAnimationHelper.html @@ -19,10 +19,10 @@

Example

// Instantiate a helper - var helper = new THREE.MMDAnimationHelper(); + var helper = new MMDAnimationHelper(); // Load MMD resources and add to helper - new THREE.MMDLoader().loadWithAnimation( + new MMDLoader().loadWithAnimation( 'models/mmd/miku.pmd', 'models/mmd/dance.vmd', function ( mmd ) { @@ -165,7 +165,7 @@

[method:MMDAnimationHelper update]( [param:Nummber delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/MMDAnimationHelper.js examples/js/animation/MMDAnimationHelper.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/MMDAnimationHelper.js examples/jsm/animation/MMDAnimationHelper.js]

diff --git a/docs/examples/en/animations/MMDPhysics.html b/docs/examples/en/animations/MMDPhysics.html index be52ce0518cb6a..0d5863cee93bff 100644 --- a/docs/examples/en/animations/MMDPhysics.html +++ b/docs/examples/en/animations/MMDPhysics.html @@ -20,11 +20,11 @@

Example

var physics; // Load MMD resources and instantiate MMDPhysics - new THREE.MMDLoader().load( + new MMDLoader().load( 'models/mmd/miku.pmd', function ( mesh ) { - physics = new THREE.MMDPhysics( mesh ) + physics = new MMDPhysics( mesh ) scene.add( mesh ); } @@ -108,7 +108,7 @@

[method:CCDIKSolver warmup]( [param:Integer cycles] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/MMDPhysics.js examples/js/animation/MMDPhysics.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/MMDPhysics.js examples/jsm/animation/MMDPhysics.js]

diff --git a/docs/examples/en/controls/DeviceOrientationControls.html b/docs/examples/en/controls/DeviceOrientationControls.html index 8ea8bccfa2b791..3ad924fc97b4da 100644 --- a/docs/examples/en/controls/DeviceOrientationControls.html +++ b/docs/examples/en/controls/DeviceOrientationControls.html @@ -12,7 +12,7 @@

[name]

- Can be used to orient an object based on the mobile device's orientation. + Can be used to orient the camera based on the mobile device's orientation.

Example

@@ -21,10 +21,10 @@

Example

Constructor

-

[name]( [param:Object3D object] )

+

[name]( [param:Camera object] )

- [page:Object3D object]: The object to be controlled. + [page:Camera object]: The camera to be controlled.

Creates a new instance of [name]. @@ -48,9 +48,9 @@

[property:Boolean enabled]

Whether or not the controls are enabled.

-

[property:Object3D object]

+

[property:Camera object]

- The object to be controlled. + The camera to be controlled.

[property:Number screenOrientation]

@@ -83,7 +83,7 @@

[method:null update] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DeviceOrientationControls.js examples/js/controls/DeviceOrientationControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/DeviceOrientationControls.js examples/jsm/controls/DeviceOrientationControls.js]

diff --git a/docs/examples/en/controls/DragControls.html b/docs/examples/en/controls/DragControls.html index f1e5a4b1a16981..86b839533d45ad 100644 --- a/docs/examples/en/controls/DragControls.html +++ b/docs/examples/en/controls/DragControls.html @@ -21,7 +21,7 @@

Example

[example:misc_controls_drag misc / controls / drag ]

-var controls = new THREE.DragControls( objects, camera, renderer.domElement ); +var controls = new DragControls( objects, camera, renderer.domElement ); // add event listener to highlight dragged objects @@ -93,7 +93,7 @@

[property:Boolean enabled]

[property:Boolean transformGroup]

- This option only works if the [page:DragControls.objects] array contains a single draggable group object. + This option only works if the [page:DragControls.objects] array contains a single draggable group object. If set to *true*, [name] does not transform individual objects but the entire group. Default is *false*.

@@ -124,7 +124,7 @@

[method:Array getObjects] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DragControls.js examples/js/controls/DragControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/DragControls.js examples/jsm/controls/DragControls.js]

diff --git a/docs/examples/en/controls/FirstPersonControls.html b/docs/examples/en/controls/FirstPersonControls.html index 4445b2b96eb944..66d3bd5e4bb864 100644 --- a/docs/examples/en/controls/FirstPersonControls.html +++ b/docs/examples/en/controls/FirstPersonControls.html @@ -159,7 +159,7 @@

[method:null update] ( [param:Number delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FirstPersonControls.js examples/js/controls/FirstPersonControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FirstPersonControls.js examples/jsm/controls/FirstPersonControls.js]

diff --git a/docs/examples/en/controls/FlyControls.html b/docs/examples/en/controls/FlyControls.html index 58e6e9d33f22fc..b9bd9711931d10 100644 --- a/docs/examples/en/controls/FlyControls.html +++ b/docs/examples/en/controls/FlyControls.html @@ -88,7 +88,7 @@

[method:null update] ( [param:Number delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FlyControls.js examples/js/controls/FlyControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FlyControls.js examples/jsm/controls/FlyControls.js]

diff --git a/docs/examples/en/controls/OrbitControls.html b/docs/examples/en/controls/OrbitControls.html index b1541ef594fdb7..fa0ea0cc1b8721 100644 --- a/docs/examples/en/controls/OrbitControls.html +++ b/docs/examples/en/controls/OrbitControls.html @@ -32,7 +32,7 @@

Example

var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 ); -var controls = new THREE.OrbitControls( camera, renderer.domElement ); +var controls = new OrbitControls( camera, renderer.domElement ); //controls.update() must be called after any manual changes to the camera's transform camera.position.set( 0, 20, 100 ); @@ -292,7 +292,7 @@

[method:Boolean update] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrbitControls.js examples/js/controls/OrbitControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/OrbitControls.js examples/jsm/controls/OrbitControls.js]

diff --git a/docs/examples/en/controls/PointerLockControls.html b/docs/examples/en/controls/PointerLockControls.html index 34962c31319193..66ca16057d9027 100644 --- a/docs/examples/en/controls/PointerLockControls.html +++ b/docs/examples/en/controls/PointerLockControls.html @@ -143,7 +143,7 @@

[method:null unlock] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/PointerLockControls.js examples/js/controls/PointerLockControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/PointerLockControls.js examples/jsm/controls/PointerLockControls.js]

diff --git a/docs/examples/en/controls/TrackballControls.html b/docs/examples/en/controls/TrackballControls.html index 2428f5db5a8979..08d326879c3927 100644 --- a/docs/examples/en/controls/TrackballControls.html +++ b/docs/examples/en/controls/TrackballControls.html @@ -201,7 +201,7 @@

[method:null zoomCamera] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js examples/js/controls/TrackballControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TrackballControls.js examples/jsm/controls/TrackballControls.js]

diff --git a/docs/examples/en/controls/TransformControls.html b/docs/examples/en/controls/TransformControls.html index 5ca6328e2b3fb2..ada7579d7a798a 100644 --- a/docs/examples/en/controls/TransformControls.html +++ b/docs/examples/en/controls/TransformControls.html @@ -220,7 +220,7 @@

[method:null setTranslationSnap] ( [param:Number translationSnap] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TransformControls.js examples/js/controls/TransformControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TransformControls.js examples/jsm/controls/TransformControls.js]

diff --git a/docs/examples/en/exporters/ColladaExporter.html b/docs/examples/en/exporters/ColladaExporter.html index f049e391d78e6c..77f03d098e7bb8 100644 --- a/docs/examples/en/exporters/ColladaExporter.html +++ b/docs/examples/en/exporters/ColladaExporter.html @@ -22,7 +22,7 @@

Example

// Instantiate an exporter - var exporter = new THREE.ColladaExporter(); + var exporter = new ColladaExporter(); // Parse the input and generate the ply output var data = exporter.parse( scene, null, options ); @@ -77,7 +77,7 @@

[method:null parse]( [param:Object3D input], [param:Function onCompleted], [

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/ColladaExporter.js examples/js/exporters/ColladaExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/ColladaExporter.js examples/jsm/exporters/ColladaExporter.js]

diff --git a/docs/examples/en/exporters/GLTFExporter.html b/docs/examples/en/exporters/GLTFExporter.html index 6560fa1e789f6d..c8ce1af481c22b 100644 --- a/docs/examples/en/exporters/GLTFExporter.html +++ b/docs/examples/en/exporters/GLTFExporter.html @@ -38,7 +38,7 @@

Example

// Instantiate a exporter - var exporter = new THREE.GLTFExporter(); + var exporter = new GLTFExporter(); // Parse the input and generate the glTF output exporter.parse( scene, function ( gltf ) { @@ -108,7 +108,7 @@

[method:null parse]( [param:Object3D input], [param:Function onCompleted], [

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/GLTFExporter.js examples/js/exporters/GLTFExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/GLTFExporter.js examples/jsm/exporters/GLTFExporter.js]

diff --git a/docs/examples/en/exporters/PLYExporter.html b/docs/examples/en/exporters/PLYExporter.html index 68dcbb9a67d0d0..61335e4cb8033b 100644 --- a/docs/examples/en/exporters/PLYExporter.html +++ b/docs/examples/en/exporters/PLYExporter.html @@ -23,7 +23,7 @@

Example

// Instantiate an exporter - var exporter = new THREE.PLYExporter(); + var exporter = new PLYExporter(); // Parse the input and generate the ply output var data = exporter.parse( scene, options ); @@ -60,7 +60,7 @@

[method:null parse]( [param:Object3D input], [param:Function onDone], [param

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/PLYExporter.js examples/js/exporters/PLYExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/PLYExporter.js examples/jsm/exporters/PLYExporter.js]

diff --git a/docs/examples/en/geometries/ConvexBufferGeometry.html b/docs/examples/en/geometries/ConvexBufferGeometry.html index d222caa6d23ae0..e5bf0d4239ae53 100644 --- a/docs/examples/en/geometries/ConvexBufferGeometry.html +++ b/docs/examples/en/geometries/ConvexBufferGeometry.html @@ -36,7 +36,7 @@

Example

[example:webgl_geometry_convex geometry / convex ]

- var geometry = new THREE.ConvexBufferGeometry( points ); + var geometry = new ConvexBufferGeometry( points ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -53,7 +53,7 @@

[name]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/ConvexGeometry.js examples/js/geometries/ConvexGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ConvexGeometry.js examples/jsm/geometries/ConvexGeometry.js]

diff --git a/docs/examples/en/geometries/ConvexGeometry.html b/docs/examples/en/geometries/ConvexGeometry.html index a6bb891b3ae48d..8763a0f7484b3e 100644 --- a/docs/examples/en/geometries/ConvexGeometry.html +++ b/docs/examples/en/geometries/ConvexGeometry.html @@ -35,7 +35,7 @@

Example

[example:webgl_geometry_convex geometry / convex ]

- var geometry = new THREE.ConvexGeometry( points ); + var geometry = new ConvexGeometry( points ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -52,7 +52,7 @@

[name]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/ConvexGeometry.js examples/js/geometries/ConvexGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ConvexGeometry.js examples/jsm/geometries/ConvexGeometry.js]

diff --git a/docs/examples/en/geometries/DecalGeometry.html b/docs/examples/en/geometries/DecalGeometry.html index 2d7a06f4378ef6..2476cc18d798b2 100644 --- a/docs/examples/en/geometries/DecalGeometry.html +++ b/docs/examples/en/geometries/DecalGeometry.html @@ -34,7 +34,7 @@

Example

[example:webgl_decals WebGL / decals]

- var geometry = new THREE.DecalGeometry( mesh, position, orientation, size ); + var geometry = new DecalGeometry( mesh, position, orientation, size ); var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -53,7 +53,7 @@

[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientatio

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/DecalGeometry.js examples/js/geometries/DecalGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/DecalGeometry.js examples/jsm/geometries/DecalGeometry.js]

diff --git a/docs/examples/en/helpers/FaceNormalsHelper.html b/docs/examples/en/helpers/FaceNormalsHelper.html index dfbca7ec633002..781e9700c8e2df 100644 --- a/docs/examples/en/helpers/FaceNormalsHelper.html +++ b/docs/examples/en/helpers/FaceNormalsHelper.html @@ -31,7 +31,7 @@

Example

material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); box = new THREE.Mesh( geometry, material ); - helper = new THREE.FaceNormalsHelper( box, 2, 0x00ff00, 1 ); + helper = new FaceNormalsHelper( box, 2, 0x00ff00, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/en/helpers/RectAreaLightHelper.html b/docs/examples/en/helpers/RectAreaLightHelper.html index 372962a63c4910..5c23d19e95d69e 100644 --- a/docs/examples/en/helpers/RectAreaLightHelper.html +++ b/docs/examples/en/helpers/RectAreaLightHelper.html @@ -21,7 +21,7 @@

Example

var light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 ); -var helper = new THREE.RectAreaLightHelper( light ); +var helper = new RectAreaLightHelper( light ); light.add( helper ); // helper must be added as a child of the light diff --git a/docs/examples/en/helpers/VertexNormalsHelper.html b/docs/examples/en/helpers/VertexNormalsHelper.html index ab60f284153fdc..dbd1ce72fc12ba 100644 --- a/docs/examples/en/helpers/VertexNormalsHelper.html +++ b/docs/examples/en/helpers/VertexNormalsHelper.html @@ -30,7 +30,7 @@

Example

var material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); var box = new THREE.Mesh( geometry, material ); - var helper = new THREE.VertexNormalsHelper( box, 2, 0x00ff00, 1 ); + var helper = new VertexNormalsHelper( box, 2, 0x00ff00, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/en/helpers/VertexTangentsHelper.html b/docs/examples/en/helpers/VertexTangentsHelper.html index 19a4c8bd9f5604..c34b7673c06217 100644 --- a/docs/examples/en/helpers/VertexTangentsHelper.html +++ b/docs/examples/en/helpers/VertexTangentsHelper.html @@ -30,7 +30,7 @@

Example

var material = new THREE.MeshNormalMaterial(); var box = new THREE.Mesh( geometry, material ); - var helper = new THREE.VertexTangentsHelper( box, 1, 0x00ffff, 1 ); + var helper = new VertexTangentsHelper( box, 1, 0x00ffff, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/en/loaders/BasisTextureLoader.html b/docs/examples/en/loaders/BasisTextureLoader.html index a986252938702b..773229b6cf5560 100644 --- a/docs/examples/en/loaders/BasisTextureLoader.html +++ b/docs/examples/en/loaders/BasisTextureLoader.html @@ -25,15 +25,15 @@

[name]

This loader parallelizes the transcoding process across a configurable number of web workers, before transferring the transcoded compressed texture back to the main thread. The required WASM transcoder and JS wrapper are available from the - [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/basis examples/js/libs/basis] + [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/basis examples/jsm/libs/basis] directory.

Example

- var basisLoader = new THREE.BasisTextureLoader(); - basisLoader.setTranscoderPath( 'examples/js/libs/basis/' ); + var basisLoader = new BasisTextureLoader(); + basisLoader.setTranscoderPath( 'examples/jsm/libs/basis/' ); basisLoader.detectSupport( renderer ); basisLoader.load( 'diffuse.basis', function ( texture ) { @@ -114,7 +114,7 @@

[method:this setTranscoderPath]( [param:String path] )

The WASM transcoder and JS wrapper are available from the - [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/basis examples/js/libs/basis] + [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/basis examples/jsm/libs/basis] directory.

@@ -134,7 +134,7 @@

[method:this dispose]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/BasisTextureLoader.js examples/js/loaders/BasisTextureLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/BasisTextureLoader.js examples/jsm/loaders/BasisTextureLoader.js]

diff --git a/docs/examples/en/loaders/DRACOLoader.html b/docs/examples/en/loaders/DRACOLoader.html index a84a6488eabf13..502cadfcf61fb3 100644 --- a/docs/examples/en/loaders/DRACOLoader.html +++ b/docs/examples/en/loaders/DRACOLoader.html @@ -31,10 +31,10 @@

Example

// Instantiate a loader - var loader = new THREE.DRACOLoader(); + var loader = new DRACOLoader(); // Specify path to a folder containing WASM/JS decoding libraries. - loader.setDecoderPath( '/examples/js/libs/draco/' ); + loader.setDecoderPath( '/examples/jsm/libs/draco/' ); // Optional: Pre-fetch Draco WASM/JS module. loader.preload(); @@ -145,7 +145,7 @@

[method:this dispose]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DRACOLoader.js examples/js/loaders/DRACOLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/DRACOLoader.js examples/jsm/loaders/DRACOLoader.js]

diff --git a/docs/examples/en/loaders/GLTFLoader.html b/docs/examples/en/loaders/GLTFLoader.html index 7a859a804a54c4..5138a400eab3ff 100644 --- a/docs/examples/en/loaders/GLTFLoader.html +++ b/docs/examples/en/loaders/GLTFLoader.html @@ -55,11 +55,11 @@

Example

// Instantiate a loader - var loader = new THREE.GLTFLoader(); + var loader = new GLTFLoader(); // Optional: Provide a DRACOLoader instance to decode compressed mesh data - var dracoLoader = new THREE.DRACOLoader(); - dracoLoader.setDecoderPath( '/examples/js/libs/draco/' ); + var dracoLoader = new DRACOLoader(); + dracoLoader.setDecoderPath( '/examples/jsm/libs/draco/' ); loader.setDRACOLoader( dracoLoader ); // Load a glTF resource @@ -183,7 +183,7 @@

[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )

[page:DRACOLoader dracoLoader] — Instance of THREE.DRACOLoader, to be used for decoding assets compressed with the KHR_draco_mesh_compression extension.

- Refer to this [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/draco#readme readme] for the details of Draco and its decoder. + Refer to this [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/draco#readme readme] for the details of Draco and its decoder.

[method:null setDDSLoader]( [param:DDSLoader ddsLoader] )

@@ -205,7 +205,7 @@

[method:null parse]( [param:ArrayBuffer data], [param:String path], [param:F

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js examples/js/loaders/GLTFLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/GLTFLoader.js examples/jsm/loaders/GLTFLoader.js]

diff --git a/docs/examples/en/loaders/MMDLoader.html b/docs/examples/en/loaders/MMDLoader.html index 182d6b0958516d..c91af6b432f6c3 100644 --- a/docs/examples/en/loaders/MMDLoader.html +++ b/docs/examples/en/loaders/MMDLoader.html @@ -22,7 +22,7 @@

Example

// Instantiate a loader - var loader = new THREE.MMDLoader(); + var loader = new MMDLoader(); // Load a MMD model loader.load( @@ -118,7 +118,7 @@

[method:MMDLoader setAnimationPath]( [param:String animationPath] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/MMDLoader.js examples/js/loaders/MMDLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/MMDLoader.js examples/jsm/loaders/MMDLoader.js]

diff --git a/docs/examples/en/loaders/MTLLoader.html b/docs/examples/en/loaders/MTLLoader.html index 06622f5a6e5c18..72c683ff406339 100644 --- a/docs/examples/en/loaders/MTLLoader.html +++ b/docs/examples/en/loaders/MTLLoader.html @@ -73,7 +73,7 @@

[method:MTLLoaderMaterialCreator parse]( [param:String text, param:String pa

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/[name].js examples/js/loaders/[name].js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/[name].js examples/jsm/loaders/[name].js]

diff --git a/docs/examples/en/loaders/OBJLoader.html b/docs/examples/en/loaders/OBJLoader.html index 28ec22bda53e1b..c5f60904bc6ebd 100644 --- a/docs/examples/en/loaders/OBJLoader.html +++ b/docs/examples/en/loaders/OBJLoader.html @@ -24,7 +24,7 @@

Example

// instantiate a loader - var loader = new THREE.OBJLoader(); + var loader = new OBJLoader(); // load a resource loader.load( @@ -102,7 +102,7 @@

[method:OBJLoader setMaterials]( [param:MTLLoader.MaterialCreator materials]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJLoader.js examples/js/loaders/OBJLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/OBJLoader.js examples/jsm/loaders/OBJLoader.js]

diff --git a/docs/examples/en/loaders/OBJLoader2.html b/docs/examples/en/loaders/OBJLoader2.html index f84e429a606316..c38b14bcff2ad1 100644 --- a/docs/examples/en/loaders/OBJLoader2.html +++ b/docs/examples/en/loaders/OBJLoader2.html @@ -22,7 +22,7 @@

Examples

// instantiate the loader - let loader = new THREE.OBJLoader2(); + let loader = new OBJLoader2(); // function called on successful load function callbackOnLoad ( object3d ) { diff --git a/docs/examples/en/loaders/PCDLoader.html b/docs/examples/en/loaders/PCDLoader.html index 4d341a17f0de7d..cd87162112f0bf 100644 --- a/docs/examples/en/loaders/PCDLoader.html +++ b/docs/examples/en/loaders/PCDLoader.html @@ -22,7 +22,7 @@

Example

// instantiate a loader - var loader = new THREE.PCDLoader(); + var loader = new PCDLoader(); // load a resource loader.load( @@ -99,7 +99,7 @@

[method:Object3D parse]( [param:Arraybuffer data],[param:String url] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PCDLoader.js examples/js/loaders/PCDLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PCDLoader.js examples/jsm/loaders/PCDLoader.js]

diff --git a/docs/examples/en/loaders/PDBLoader.html b/docs/examples/en/loaders/PDBLoader.html index 46bd0cf7ca0203..80b8302692d57a 100644 --- a/docs/examples/en/loaders/PDBLoader.html +++ b/docs/examples/en/loaders/PDBLoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.PDBLoader(); + var loader = new PDBLoader(); // load a PDB resource loader.load( @@ -92,7 +92,7 @@

[method:Object parse]( [param:String text] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PDBLoader.js examples/js/loaders/PDBLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PDBLoader.js examples/jsm/loaders/PDBLoader.js]

diff --git a/docs/examples/en/loaders/PRWMLoader.html b/docs/examples/en/loaders/PRWMLoader.html index 4e58a4b5d9ea82..efd49dffd64d23 100644 --- a/docs/examples/en/loaders/PRWMLoader.html +++ b/docs/examples/en/loaders/PRWMLoader.html @@ -24,7 +24,7 @@

Example

// instantiate a loader - var loader = new THREE.PRWMLoader(); + var loader = new PRWMLoader(); // load a resource loader.load( @@ -99,7 +99,7 @@

PRWMLoader.isBigEndianPlatform( )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PRWMLoader.js examples/js/loaders/PRWMLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PRWMLoader.js examples/jsm/loaders/PRWMLoader.js]

diff --git a/docs/examples/en/loaders/SVGLoader.html b/docs/examples/en/loaders/SVGLoader.html index 55148bdaf1894c..ee51fa1557b230 100644 --- a/docs/examples/en/loaders/SVGLoader.html +++ b/docs/examples/en/loaders/SVGLoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.SVGLoader(); + var loader = new SVGLoader(); // load a SVG resource loader.load( @@ -105,7 +105,7 @@

[method:null load]( [param:String url], [param:Function onLoad], [param:Func

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/SVGLoader.js examples/js/loaders/SVGLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/SVGLoader.js examples/jsm/loaders/SVGLoader.js]

diff --git a/docs/examples/en/loaders/TGALoader.html b/docs/examples/en/loaders/TGALoader.html index 1101c3b681adc8..7db28036a9e555 100644 --- a/docs/examples/en/loaders/TGALoader.html +++ b/docs/examples/en/loaders/TGALoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.TGALoader(); + var loader = new TGALoader(); // load a resource var texture = loader.load( @@ -84,7 +84,7 @@

[method:DataTexture load]( [param:String url], [param:Function onLoad], [par

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/TGALoader.js examples/js/loaders/TGALoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/TGALoader.js examples/jsm/loaders/TGALoader.js]

diff --git a/docs/examples/en/math/Lut.html b/docs/examples/en/math/Lut.html index 6cf1190d98c2b6..6332e7fd71aa61 100644 --- a/docs/examples/en/math/Lut.html +++ b/docs/examples/en/math/Lut.html @@ -18,7 +18,7 @@

[name]

Example

- var lut = new THREE.Lut( 'rainbow', 512 ); + var lut = new Lut( 'rainbow', 512 ); var color = lut.getColor( 0.5 ); @@ -140,7 +140,7 @@

[method:Lut getColor]( value ) [param:Lut this]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/[path].js examples/js/math/[path].js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/[path].js examples/jsm/math/[path].js]

diff --git a/docs/examples/en/math/MeshSurfaceSampler.html b/docs/examples/en/math/MeshSurfaceSampler.html index c637436b9481d3..9ce1bcd0aeaf99 100644 --- a/docs/examples/en/math/MeshSurfaceSampler.html +++ b/docs/examples/en/math/MeshSurfaceSampler.html @@ -18,7 +18,7 @@

Example

// Create a sampler for a Mesh surface. - var sampler = new THREE.MeshSurfaceSampler( surfaceMesh ) + var sampler = new MeshSurfaceSampler( surfaceMesh ) .setWeightAttribute( 'color' ) .build(); @@ -80,7 +80,7 @@

[method:this sample]( [param:Vector3 targetPosition], [param:Vector3 targetN

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/MeshSurfaceSampler.js examples/js/math/MeshSurfaceSampler.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/MeshSurfaceSampler.js examples/jsm/math/MeshSurfaceSampler.js]

diff --git a/docs/examples/en/math/convexhull/ConvexHull.html b/docs/examples/en/math/convexhull/ConvexHull.html index 68ca0d8e1e298d..31c4a420dd214d 100644 --- a/docs/examples/en/math/convexhull/ConvexHull.html +++ b/docs/examples/en/math/convexhull/ConvexHull.html @@ -187,7 +187,7 @@

[method:ConvexHull setFromPoints]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/ConvexHull.js]

diff --git a/docs/examples/en/math/convexhull/Face.html b/docs/examples/en/math/convexhull/Face.html index 98cf402834f89b..a3268f7ac26f88 100644 --- a/docs/examples/en/math/convexhull/Face.html +++ b/docs/examples/en/math/convexhull/Face.html @@ -85,7 +85,7 @@

[method:Float distanceToPoint]( [param:Vector3 point] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/en/math/convexhull/HalfEdge.html b/docs/examples/en/math/convexhull/HalfEdge.html index 200ed43442bcbd..d8a456ab85a87b 100644 --- a/docs/examples/en/math/convexhull/HalfEdge.html +++ b/docs/examples/en/math/convexhull/HalfEdge.html @@ -75,7 +75,7 @@

[method:HalfEdge setTwin]( [param:HalfEdge edge] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/en/math/convexhull/VertexList.html b/docs/examples/en/math/convexhull/VertexList.html index 54fc759aefcbe9..09687dbb46edf5 100644 --- a/docs/examples/en/math/convexhull/VertexList.html +++ b/docs/examples/en/math/convexhull/VertexList.html @@ -87,7 +87,7 @@

[method:Boolean isEmpty]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/en/math/convexhull/VertexNode.html b/docs/examples/en/math/convexhull/VertexNode.html index 179dc88c3bfdcc..0a0a63bf81ab54 100644 --- a/docs/examples/en/math/convexhull/VertexNode.html +++ b/docs/examples/en/math/convexhull/VertexNode.html @@ -48,7 +48,7 @@

[property:Face face]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/en/objects/Lensflare.html b/docs/examples/en/objects/Lensflare.html index fe594b80aac5f2..b2b259bb04b981 100644 --- a/docs/examples/en/objects/Lensflare.html +++ b/docs/examples/en/objects/Lensflare.html @@ -31,11 +31,11 @@

Example

var textureFlare1 = textureLoader.load( "textures/lensflare/lensflare2.png" ); var textureFlare2 = textureLoader.load( "textures/lensflare/lensflare3.png" ); -var lensflare = new THREE.Lensflare(); +var lensflare = new Lensflare(); -lensflare.addElement( new THREE.LensflareElement( textureFlare0, 512, 0 ) ); -lensflare.addElement( new THREE.LensflareElement( textureFlare1, 512, 0 ) ); -lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) ); +lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); +lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); +lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); light.add( lensflare );
@@ -58,7 +58,7 @@

Properties

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/objects/Lensflare.js examples/js/objects/Lensflare.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js examples/jsm/objects/Lensflare.js]

diff --git a/docs/examples/en/postprocessing/EffectComposer.html b/docs/examples/en/postprocessing/EffectComposer.html index 4c2f9a56280f1f..8e6ebc8927a661 100644 --- a/docs/examples/en/postprocessing/EffectComposer.html +++ b/docs/examples/en/postprocessing/EffectComposer.html @@ -151,7 +151,7 @@

[method:void swapBuffers]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/postprocessing/EffectComposer.js examples/js/postprocessing/EffectComposer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/EffectComposer.js examples/jsm/postprocessing/EffectComposer.js]

diff --git a/docs/examples/en/renderers/CSS2DRenderer.html b/docs/examples/en/renderers/CSS2DRenderer.html index 646744d7f324f2..492e65c621f7c9 100644 --- a/docs/examples/en/renderers/CSS2DRenderer.html +++ b/docs/examples/en/renderers/CSS2DRenderer.html @@ -61,7 +61,7 @@

[method:null setSize]([param:Number width], [param:Number height])

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS2DRenderer.js examples/js/renderers/CSS2DRenderer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS2DRenderer.js examples/jsm/renderers/CSS2DRenderer.js]

diff --git a/docs/examples/en/renderers/CSS3DRenderer.html b/docs/examples/en/renderers/CSS3DRenderer.html index 00d9d44ad3d658..e8c59ea3d2c6ab 100644 --- a/docs/examples/en/renderers/CSS3DRenderer.html +++ b/docs/examples/en/renderers/CSS3DRenderer.html @@ -73,7 +73,7 @@

[method:null setSize]([param:Number width], [param:Number height])

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS3DRenderer.js examples/js/renderers/CSS3DRenderer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS3DRenderer.js examples/jsm/renderers/CSS3DRenderer.js]

diff --git a/docs/examples/en/renderers/SVGRenderer.html b/docs/examples/en/renderers/SVGRenderer.html index e1c61481f36d6e..f834ca2ffd93f6 100644 --- a/docs/examples/en/renderers/SVGRenderer.html +++ b/docs/examples/en/renderers/SVGRenderer.html @@ -103,7 +103,7 @@

[method:null setSize]( [param:Number width], [param:Number height] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/SVGRenderer.js examples/js/renderers/SVGRenderer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/SVGRenderer.js examples/jsm/renderers/SVGRenderer.js]

diff --git a/docs/examples/en/utils/BufferGeometryUtils.html b/docs/examples/en/utils/BufferGeometryUtils.html index 4f2b3abf37d5b1..595e9cf194abc0 100644 --- a/docs/examples/en/utils/BufferGeometryUtils.html +++ b/docs/examples/en/utils/BufferGeometryUtils.html @@ -86,7 +86,7 @@

[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/BufferGeometryUtils.js examples/js/utils/BufferGeometryUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js examples/jsm/utils/BufferGeometryUtils.js]

diff --git a/docs/examples/en/utils/SceneUtils.html b/docs/examples/en/utils/SceneUtils.html index 5c5670bd09c60d..3538519c923747 100644 --- a/docs/examples/en/utils/SceneUtils.html +++ b/docs/examples/en/utils/SceneUtils.html @@ -36,7 +36,7 @@

[method:Group createMultiMaterialObject]( [param:Geometry geometry], [param:

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/SceneUtils.js examples/js/utils/SceneUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SceneUtils.js examples/jsm/utils/SceneUtils.js]

diff --git a/docs/examples/en/utils/SkeletonUtils.html b/docs/examples/en/utils/SkeletonUtils.html index ba9ed261a60502..f9adec5a1e2835 100644 --- a/docs/examples/en/utils/SkeletonUtils.html +++ b/docs/examples/en/utils/SkeletonUtils.html @@ -56,7 +56,7 @@

[method:AnimationClip retargetClip]( [param:SkeletonHelper target], [param:S

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/SkeletonUtils.js examples/js/utils/SkeletonUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SkeletonUtils.js examples/jsm/utils/SkeletonUtils.js]

diff --git a/docs/examples/zh/animations/CCDIKSolver.html b/docs/examples/zh/animations/CCDIKSolver.html index 3592789821e327..69b6a74f6e0bfa 100644 --- a/docs/examples/zh/animations/CCDIKSolver.html +++ b/docs/examples/zh/animations/CCDIKSolver.html @@ -21,7 +21,7 @@

Example

var ikSolver; // Load MMD resources and instantiate CCDIKSolver - new THREE.MMDLoader().load( + new MMDLoader().load( 'models/mmd/miku.pmd', function ( mesh ) { @@ -98,7 +98,7 @@

[method:CCDIKSolver update]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/CCDIKSolver.js examples/js/animation/CCDIKSolver.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/CCDIKSolver.js examples/jsm/animation/CCDIKSolver.js]

diff --git a/docs/examples/zh/animations/MMDAnimationHelper.html b/docs/examples/zh/animations/MMDAnimationHelper.html index 5fa9c9d8329641..2ff68faea16839 100644 --- a/docs/examples/zh/animations/MMDAnimationHelper.html +++ b/docs/examples/zh/animations/MMDAnimationHelper.html @@ -19,10 +19,10 @@

Example

// Instantiate a helper - var helper = new THREE.MMDAnimationHelper(); + var helper = new MMDAnimationHelper(); // Load MMD resources and add to helper - new THREE.MMDLoader().loadWithAnimation( + new MMDLoader().loadWithAnimation( 'models/mmd/miku.pmd', 'models/mmd/dance.vmd', function ( mmd ) { @@ -165,7 +165,7 @@

[method:MMDAnimationHelper update]( [param:Nummber delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/MMDAnimationHelper.js examples/js/animation/MMDAnimationHelper.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/MMDAnimationHelper.js examples/jsm/animation/MMDAnimationHelper.js]

diff --git a/docs/examples/zh/animations/MMDPhysics.html b/docs/examples/zh/animations/MMDPhysics.html index be52ce0518cb6a..0d5863cee93bff 100644 --- a/docs/examples/zh/animations/MMDPhysics.html +++ b/docs/examples/zh/animations/MMDPhysics.html @@ -20,11 +20,11 @@

Example

var physics; // Load MMD resources and instantiate MMDPhysics - new THREE.MMDLoader().load( + new MMDLoader().load( 'models/mmd/miku.pmd', function ( mesh ) { - physics = new THREE.MMDPhysics( mesh ) + physics = new MMDPhysics( mesh ) scene.add( mesh ); } @@ -108,7 +108,7 @@

[method:CCDIKSolver warmup]( [param:Integer cycles] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/animation/MMDPhysics.js examples/js/animation/MMDPhysics.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/animation/MMDPhysics.js examples/jsm/animation/MMDPhysics.js]

diff --git a/docs/examples/zh/controls/DeviceOrientationControls.html b/docs/examples/zh/controls/DeviceOrientationControls.html index 34cdd9ea0cb4b8..3ad924fc97b4da 100644 --- a/docs/examples/zh/controls/DeviceOrientationControls.html +++ b/docs/examples/zh/controls/DeviceOrientationControls.html @@ -83,7 +83,7 @@

[method:null update] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DeviceOrientationControls.js examples/js/controls/DeviceOrientationControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/DeviceOrientationControls.js examples/jsm/controls/DeviceOrientationControls.js]

diff --git a/docs/examples/zh/controls/DragControls.html b/docs/examples/zh/controls/DragControls.html index f9999b90bfa8a1..86b839533d45ad 100644 --- a/docs/examples/zh/controls/DragControls.html +++ b/docs/examples/zh/controls/DragControls.html @@ -21,7 +21,7 @@

Example

[example:misc_controls_drag misc / controls / drag ]

-var controls = new THREE.DragControls( objects, camera, renderer.domElement ); +var controls = new DragControls( objects, camera, renderer.domElement ); // add event listener to highlight dragged objects @@ -124,7 +124,7 @@

[method:Array getObjects] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/DragControls.js examples/js/controls/DragControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/DragControls.js examples/jsm/controls/DragControls.js]

diff --git a/docs/examples/zh/controls/FirstPersonControls.html b/docs/examples/zh/controls/FirstPersonControls.html index 4445b2b96eb944..66d3bd5e4bb864 100644 --- a/docs/examples/zh/controls/FirstPersonControls.html +++ b/docs/examples/zh/controls/FirstPersonControls.html @@ -159,7 +159,7 @@

[method:null update] ( [param:Number delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FirstPersonControls.js examples/js/controls/FirstPersonControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FirstPersonControls.js examples/jsm/controls/FirstPersonControls.js]

diff --git a/docs/examples/zh/controls/FlyControls.html b/docs/examples/zh/controls/FlyControls.html index 58e6e9d33f22fc..b9bd9711931d10 100644 --- a/docs/examples/zh/controls/FlyControls.html +++ b/docs/examples/zh/controls/FlyControls.html @@ -88,7 +88,7 @@

[method:null update] ( [param:Number delta] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/FlyControls.js examples/js/controls/FlyControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/FlyControls.js examples/jsm/controls/FlyControls.js]

diff --git a/docs/examples/zh/controls/OrbitControls.html b/docs/examples/zh/controls/OrbitControls.html index 42b9d8b3093b8e..4a5ea5b307fdf6 100644 --- a/docs/examples/zh/controls/OrbitControls.html +++ b/docs/examples/zh/controls/OrbitControls.html @@ -32,7 +32,7 @@

示例

var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 ); -var controls = new THREE.OrbitControls( camera, renderer.domElement ); +var controls = new OrbitControls( camera, renderer.domElement ); //controls.update() must be called after any manual changes to the camera's transform camera.position.set( 0, 20, 100 ); @@ -291,7 +291,7 @@

[method:Boolean update] ()

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/OrbitControls.js examples/js/controls/OrbitControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/OrbitControls.js examples/jsm/controls/OrbitControls.js]

diff --git a/docs/examples/zh/controls/PointerLockControls.html b/docs/examples/zh/controls/PointerLockControls.html index 34962c31319193..66ca16057d9027 100644 --- a/docs/examples/zh/controls/PointerLockControls.html +++ b/docs/examples/zh/controls/PointerLockControls.html @@ -143,7 +143,7 @@

[method:null unlock] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/PointerLockControls.js examples/js/controls/PointerLockControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/PointerLockControls.js examples/jsm/controls/PointerLockControls.js]

diff --git a/docs/examples/zh/controls/TrackballControls.html b/docs/examples/zh/controls/TrackballControls.html index 2428f5db5a8979..08d326879c3927 100644 --- a/docs/examples/zh/controls/TrackballControls.html +++ b/docs/examples/zh/controls/TrackballControls.html @@ -201,7 +201,7 @@

[method:null zoomCamera] ()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TrackballControls.js examples/js/controls/TrackballControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TrackballControls.js examples/jsm/controls/TrackballControls.js]

diff --git a/docs/examples/zh/controls/TransformControls.html b/docs/examples/zh/controls/TransformControls.html index 5ca6328e2b3fb2..ada7579d7a798a 100644 --- a/docs/examples/zh/controls/TransformControls.html +++ b/docs/examples/zh/controls/TransformControls.html @@ -220,7 +220,7 @@

[method:null setTranslationSnap] ( [param:Number translationSnap] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/controls/TransformControls.js examples/js/controls/TransformControls.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/controls/TransformControls.js examples/jsm/controls/TransformControls.js]

diff --git a/docs/examples/zh/exporters/ColladaExporter.html b/docs/examples/zh/exporters/ColladaExporter.html index f049e391d78e6c..77f03d098e7bb8 100644 --- a/docs/examples/zh/exporters/ColladaExporter.html +++ b/docs/examples/zh/exporters/ColladaExporter.html @@ -22,7 +22,7 @@

Example

// Instantiate an exporter - var exporter = new THREE.ColladaExporter(); + var exporter = new ColladaExporter(); // Parse the input and generate the ply output var data = exporter.parse( scene, null, options ); @@ -77,7 +77,7 @@

[method:null parse]( [param:Object3D input], [param:Function onCompleted], [

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/ColladaExporter.js examples/js/exporters/ColladaExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/ColladaExporter.js examples/jsm/exporters/ColladaExporter.js]

diff --git a/docs/examples/zh/exporters/GLTFExporter.html b/docs/examples/zh/exporters/GLTFExporter.html index 6560fa1e789f6d..c8ce1af481c22b 100644 --- a/docs/examples/zh/exporters/GLTFExporter.html +++ b/docs/examples/zh/exporters/GLTFExporter.html @@ -38,7 +38,7 @@

Example

// Instantiate a exporter - var exporter = new THREE.GLTFExporter(); + var exporter = new GLTFExporter(); // Parse the input and generate the glTF output exporter.parse( scene, function ( gltf ) { @@ -108,7 +108,7 @@

[method:null parse]( [param:Object3D input], [param:Function onCompleted], [

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/GLTFExporter.js examples/js/exporters/GLTFExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/GLTFExporter.js examples/jsm/exporters/GLTFExporter.js]

diff --git a/docs/examples/zh/exporters/PLYExporter.html b/docs/examples/zh/exporters/PLYExporter.html index 68dcbb9a67d0d0..61335e4cb8033b 100644 --- a/docs/examples/zh/exporters/PLYExporter.html +++ b/docs/examples/zh/exporters/PLYExporter.html @@ -23,7 +23,7 @@

Example

// Instantiate an exporter - var exporter = new THREE.PLYExporter(); + var exporter = new PLYExporter(); // Parse the input and generate the ply output var data = exporter.parse( scene, options ); @@ -60,7 +60,7 @@

[method:null parse]( [param:Object3D input], [param:Function onDone], [param

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/exporters/PLYExporter.js examples/js/exporters/PLYExporter.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/exporters/PLYExporter.js examples/jsm/exporters/PLYExporter.js]

diff --git a/docs/examples/zh/geometries/ConvexBufferGeometry.html b/docs/examples/zh/geometries/ConvexBufferGeometry.html index d222caa6d23ae0..e5bf0d4239ae53 100644 --- a/docs/examples/zh/geometries/ConvexBufferGeometry.html +++ b/docs/examples/zh/geometries/ConvexBufferGeometry.html @@ -36,7 +36,7 @@

Example

[example:webgl_geometry_convex geometry / convex ]

- var geometry = new THREE.ConvexBufferGeometry( points ); + var geometry = new ConvexBufferGeometry( points ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -53,7 +53,7 @@

[name]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/ConvexGeometry.js examples/js/geometries/ConvexGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ConvexGeometry.js examples/jsm/geometries/ConvexGeometry.js]

diff --git a/docs/examples/zh/geometries/ConvexGeometry.html b/docs/examples/zh/geometries/ConvexGeometry.html index a6bb891b3ae48d..8763a0f7484b3e 100644 --- a/docs/examples/zh/geometries/ConvexGeometry.html +++ b/docs/examples/zh/geometries/ConvexGeometry.html @@ -35,7 +35,7 @@

Example

[example:webgl_geometry_convex geometry / convex ]

- var geometry = new THREE.ConvexGeometry( points ); + var geometry = new ConvexGeometry( points ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -52,7 +52,7 @@

[name]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/ConvexGeometry.js examples/js/geometries/ConvexGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/ConvexGeometry.js examples/jsm/geometries/ConvexGeometry.js]

diff --git a/docs/examples/zh/geometries/DecalGeometry.html b/docs/examples/zh/geometries/DecalGeometry.html index 2d7a06f4378ef6..2476cc18d798b2 100644 --- a/docs/examples/zh/geometries/DecalGeometry.html +++ b/docs/examples/zh/geometries/DecalGeometry.html @@ -34,7 +34,7 @@

Example

[example:webgl_decals WebGL / decals]

- var geometry = new THREE.DecalGeometry( mesh, position, orientation, size ); + var geometry = new DecalGeometry( mesh, position, orientation, size ); var material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); @@ -53,7 +53,7 @@

[name]( [param:Mesh mesh], [param:Vector3 position], [param:Euler orientatio

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/DecalGeometry.js examples/js/geometries/DecalGeometry.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/DecalGeometry.js examples/jsm/geometries/DecalGeometry.js]

diff --git a/docs/examples/zh/helpers/FaceNormalsHelper.html b/docs/examples/zh/helpers/FaceNormalsHelper.html index c2a8c89787ccdb..799b519bbb605e 100644 --- a/docs/examples/zh/helpers/FaceNormalsHelper.html +++ b/docs/examples/zh/helpers/FaceNormalsHelper.html @@ -31,7 +31,7 @@

例子

material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); box = new THREE.Mesh( geometry, material ); - helper = new THREE.FaceNormalsHelper( box, 2, 0x00ff00, 1 ); + helper = new FaceNormalsHelper( box, 2, 0x00ff00, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/zh/helpers/RectAreaLightHelper.html b/docs/examples/zh/helpers/RectAreaLightHelper.html index 593c7f779f330d..6dce0804655cf4 100644 --- a/docs/examples/zh/helpers/RectAreaLightHelper.html +++ b/docs/examples/zh/helpers/RectAreaLightHelper.html @@ -21,7 +21,7 @@

例子

var light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 ); -var helper = new THREE.RectAreaLightHelper( light ); +var helper = new RectAreaLightHelper( light ); scene.add( helper ); diff --git a/docs/examples/zh/helpers/VertexNormalsHelper.html b/docs/examples/zh/helpers/VertexNormalsHelper.html index 29025e198fa907..9d2c864e667265 100644 --- a/docs/examples/zh/helpers/VertexNormalsHelper.html +++ b/docs/examples/zh/helpers/VertexNormalsHelper.html @@ -30,7 +30,7 @@

例子

var material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); var box = new THREE.Mesh( geometry, material ); - var helper = new THREE.VertexNormalsHelper( box, 2, 0x00ff00, 1 ); + var helper = new VertexNormalsHelper( box, 2, 0x00ff00, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/zh/helpers/VertexTangentsHelper.html b/docs/examples/zh/helpers/VertexTangentsHelper.html index 19a4c8bd9f5604..c34b7673c06217 100644 --- a/docs/examples/zh/helpers/VertexTangentsHelper.html +++ b/docs/examples/zh/helpers/VertexTangentsHelper.html @@ -30,7 +30,7 @@

Example

var material = new THREE.MeshNormalMaterial(); var box = new THREE.Mesh( geometry, material ); - var helper = new THREE.VertexTangentsHelper( box, 1, 0x00ffff, 1 ); + var helper = new VertexTangentsHelper( box, 1, 0x00ffff, 1 ); scene.add( box ); scene.add( helper ); diff --git a/docs/examples/zh/loaders/BasisTextureLoader.html b/docs/examples/zh/loaders/BasisTextureLoader.html index a986252938702b..773229b6cf5560 100644 --- a/docs/examples/zh/loaders/BasisTextureLoader.html +++ b/docs/examples/zh/loaders/BasisTextureLoader.html @@ -25,15 +25,15 @@

[name]

This loader parallelizes the transcoding process across a configurable number of web workers, before transferring the transcoded compressed texture back to the main thread. The required WASM transcoder and JS wrapper are available from the - [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/basis examples/js/libs/basis] + [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/basis examples/jsm/libs/basis] directory.

Example

- var basisLoader = new THREE.BasisTextureLoader(); - basisLoader.setTranscoderPath( 'examples/js/libs/basis/' ); + var basisLoader = new BasisTextureLoader(); + basisLoader.setTranscoderPath( 'examples/jsm/libs/basis/' ); basisLoader.detectSupport( renderer ); basisLoader.load( 'diffuse.basis', function ( texture ) { @@ -114,7 +114,7 @@

[method:this setTranscoderPath]( [param:String path] )

The WASM transcoder and JS wrapper are available from the - [link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/basis examples/js/libs/basis] + [link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/basis examples/jsm/libs/basis] directory.

@@ -134,7 +134,7 @@

[method:this dispose]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/BasisTextureLoader.js examples/js/loaders/BasisTextureLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/BasisTextureLoader.js examples/jsm/loaders/BasisTextureLoader.js]

diff --git a/docs/examples/zh/loaders/DRACOLoader.html b/docs/examples/zh/loaders/DRACOLoader.html index a84a6488eabf13..502cadfcf61fb3 100644 --- a/docs/examples/zh/loaders/DRACOLoader.html +++ b/docs/examples/zh/loaders/DRACOLoader.html @@ -31,10 +31,10 @@

Example

// Instantiate a loader - var loader = new THREE.DRACOLoader(); + var loader = new DRACOLoader(); // Specify path to a folder containing WASM/JS decoding libraries. - loader.setDecoderPath( '/examples/js/libs/draco/' ); + loader.setDecoderPath( '/examples/jsm/libs/draco/' ); // Optional: Pre-fetch Draco WASM/JS module. loader.preload(); @@ -145,7 +145,7 @@

[method:this dispose]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/DRACOLoader.js examples/js/loaders/DRACOLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/DRACOLoader.js examples/jsm/loaders/DRACOLoader.js]

diff --git a/docs/examples/zh/loaders/GLTFLoader.html b/docs/examples/zh/loaders/GLTFLoader.html index cc1920d577ac66..0568e961823f4d 100644 --- a/docs/examples/zh/loaders/GLTFLoader.html +++ b/docs/examples/zh/loaders/GLTFLoader.html @@ -54,11 +54,11 @@

示例

// Instantiate a loader - var loader = new THREE.GLTFLoader(); + var loader = new GLTFLoader(); // Optional: Provide a DRACOLoader instance to decode compressed mesh data - var dracoLoader = new THREE.DRACOLoader(); - dracoLoader.setDecoderPath( '/examples/js/libs/draco/' ); + var dracoLoader = new DRACOLoader(); + dracoLoader.setDecoderPath( '/examples/jsm/libs/draco/' ); loader.setDRACOLoader( dracoLoader ); // Load a glTF resource @@ -178,7 +178,7 @@

[method:null setDRACOLoader]( [param:DRACOLoader dracoLoader] )

[page:DRACOLoader dracoLoader] — THREE.DRACOLoader的实例,用于解码使用KHR_draco_mesh_compression扩展压缩过的文件。

- 请参阅[link:https://github.com/mrdoob/three.js/tree/dev/examples/js/libs/draco#readme readme]来了解Draco及其解码器的详细信息。 + 请参阅[link:https://github.com/mrdoob/three.js/tree/dev/examples/jsm/libs/draco#readme readme]来了解Draco及其解码器的详细信息。

[method:null setDDSLoader]( [param:DDSLoader ddsLoader] )

@@ -200,7 +200,7 @@

[method:null parse]( [param:ArrayBuffer data], [param:String path], [param:F

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/GLTFLoader.js examples/js/loaders/GLTFLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/GLTFLoader.js examples/jsm/loaders/GLTFLoader.js]

diff --git a/docs/examples/zh/loaders/MMDLoader.html b/docs/examples/zh/loaders/MMDLoader.html index b4ad1bd84ec060..1d9f509156bbc4 100644 --- a/docs/examples/zh/loaders/MMDLoader.html +++ b/docs/examples/zh/loaders/MMDLoader.html @@ -22,7 +22,7 @@

示例

// Instantiate a loader - var loader = new THREE.MMDLoader(); + var loader = new MMDLoader(); // Load a MMD model loader.load( @@ -118,7 +118,7 @@

[method:MMDLoader setAnimationPath]( [param:String animationPath] )

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/MMDLoader.js examples/js/loaders/MMDLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/MMDLoader.js examples/jsm/loaders/MMDLoader.js]

diff --git a/docs/examples/zh/loaders/MTLLoader.html b/docs/examples/zh/loaders/MTLLoader.html index cb33f2009ffae4..aab6afa1af6746 100644 --- a/docs/examples/zh/loaders/MTLLoader.html +++ b/docs/examples/zh/loaders/MTLLoader.html @@ -73,7 +73,7 @@

[method:MTLLoaderMaterialCreator parse]( [param:String text, param:String pa

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/[name].js examples/js/loaders/[name].js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/[name].js examples/jsm/loaders/[name].js]

diff --git a/docs/examples/zh/loaders/OBJLoader.html b/docs/examples/zh/loaders/OBJLoader.html index 28ec22bda53e1b..c5f60904bc6ebd 100644 --- a/docs/examples/zh/loaders/OBJLoader.html +++ b/docs/examples/zh/loaders/OBJLoader.html @@ -24,7 +24,7 @@

Example

// instantiate a loader - var loader = new THREE.OBJLoader(); + var loader = new OBJLoader(); // load a resource loader.load( @@ -102,7 +102,7 @@

[method:OBJLoader setMaterials]( [param:MTLLoader.MaterialCreator materials]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJLoader.js examples/js/loaders/OBJLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/OBJLoader.js examples/jsm/loaders/OBJLoader.js]

diff --git a/docs/examples/zh/loaders/OBJLoader2.html b/docs/examples/zh/loaders/OBJLoader2.html index f84e429a606316..c38b14bcff2ad1 100644 --- a/docs/examples/zh/loaders/OBJLoader2.html +++ b/docs/examples/zh/loaders/OBJLoader2.html @@ -22,7 +22,7 @@

Examples

// instantiate the loader - let loader = new THREE.OBJLoader2(); + let loader = new OBJLoader2(); // function called on successful load function callbackOnLoad ( object3d ) { diff --git a/docs/examples/zh/loaders/PCDLoader.html b/docs/examples/zh/loaders/PCDLoader.html index 4d341a17f0de7d..cd87162112f0bf 100644 --- a/docs/examples/zh/loaders/PCDLoader.html +++ b/docs/examples/zh/loaders/PCDLoader.html @@ -22,7 +22,7 @@

Example

// instantiate a loader - var loader = new THREE.PCDLoader(); + var loader = new PCDLoader(); // load a resource loader.load( @@ -99,7 +99,7 @@

[method:Object3D parse]( [param:Arraybuffer data],[param:String url] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PCDLoader.js examples/js/loaders/PCDLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PCDLoader.js examples/jsm/loaders/PCDLoader.js]

diff --git a/docs/examples/zh/loaders/PDBLoader.html b/docs/examples/zh/loaders/PDBLoader.html index 46bd0cf7ca0203..80b8302692d57a 100644 --- a/docs/examples/zh/loaders/PDBLoader.html +++ b/docs/examples/zh/loaders/PDBLoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.PDBLoader(); + var loader = new PDBLoader(); // load a PDB resource loader.load( @@ -92,7 +92,7 @@

[method:Object parse]( [param:String text] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PDBLoader.js examples/js/loaders/PDBLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PDBLoader.js examples/jsm/loaders/PDBLoader.js]

diff --git a/docs/examples/zh/loaders/PRWMLoader.html b/docs/examples/zh/loaders/PRWMLoader.html index 4e58a4b5d9ea82..efd49dffd64d23 100644 --- a/docs/examples/zh/loaders/PRWMLoader.html +++ b/docs/examples/zh/loaders/PRWMLoader.html @@ -24,7 +24,7 @@

Example

// instantiate a loader - var loader = new THREE.PRWMLoader(); + var loader = new PRWMLoader(); // load a resource loader.load( @@ -99,7 +99,7 @@

PRWMLoader.isBigEndianPlatform( )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/PRWMLoader.js examples/js/loaders/PRWMLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/PRWMLoader.js examples/jsm/loaders/PRWMLoader.js]

diff --git a/docs/examples/zh/loaders/SVGLoader.html b/docs/examples/zh/loaders/SVGLoader.html index 55148bdaf1894c..ee51fa1557b230 100644 --- a/docs/examples/zh/loaders/SVGLoader.html +++ b/docs/examples/zh/loaders/SVGLoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.SVGLoader(); + var loader = new SVGLoader(); // load a SVG resource loader.load( @@ -105,7 +105,7 @@

[method:null load]( [param:String url], [param:Function onLoad], [param:Func

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/SVGLoader.js examples/js/loaders/SVGLoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/SVGLoader.js examples/jsm/loaders/SVGLoader.js]

diff --git a/docs/examples/zh/loaders/TGALoader.html b/docs/examples/zh/loaders/TGALoader.html index 1101c3b681adc8..7db28036a9e555 100644 --- a/docs/examples/zh/loaders/TGALoader.html +++ b/docs/examples/zh/loaders/TGALoader.html @@ -20,7 +20,7 @@

Example

// instantiate a loader - var loader = new THREE.TGALoader(); + var loader = new TGALoader(); // load a resource var texture = loader.load( @@ -84,7 +84,7 @@

[method:DataTexture load]( [param:String url], [param:Function onLoad], [par

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/TGALoader.js examples/js/loaders/TGALoader.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/loaders/TGALoader.js examples/jsm/loaders/TGALoader.js]

diff --git a/docs/examples/zh/math/Lut.html b/docs/examples/zh/math/Lut.html index 24ffc0507364ab..381a97f7499780 100644 --- a/docs/examples/zh/math/Lut.html +++ b/docs/examples/zh/math/Lut.html @@ -17,7 +17,7 @@

[name]

Example

- var lut = new THREE.Lut( 'rainbow', 512 ); + var lut = new Lut( 'rainbow', 512 ); var color = lut.getColor( 0.5 ); @@ -139,7 +139,7 @@

[method:Lut getColor]( value ) [param:Lut this]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/[path].js examples/js/math/[path].js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/[path].js examples/jsm/math/[path].js]

diff --git a/docs/examples/zh/math/MeshSurfaceSampler.html b/docs/examples/zh/math/MeshSurfaceSampler.html index 9d186032233f21..14e4ab35b80ea4 100644 --- a/docs/examples/zh/math/MeshSurfaceSampler.html +++ b/docs/examples/zh/math/MeshSurfaceSampler.html @@ -18,7 +18,7 @@

Example

// Create a sampler for a BufferGeometry surface. - var sampler = new THREE.MeshSurfaceSampler( surfaceMesh ) + var sampler = new MeshSurfaceSampler( surfaceMesh ) .setWeightAttribute( 'color' ) .build(); @@ -80,7 +80,7 @@

[method:this sample]( [param:Vector3 targetPosition], [param:Vector3 targetN

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/MeshSurfaceSampler.js examples/js/math/MeshSurfaceSampler.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/MeshSurfaceSampler.js examples/jsm/math/MeshSurfaceSampler.js]

diff --git a/docs/examples/zh/math/convexhull/ConvexHull.html b/docs/examples/zh/math/convexhull/ConvexHull.html index 68ca0d8e1e298d..31c4a420dd214d 100644 --- a/docs/examples/zh/math/convexhull/ConvexHull.html +++ b/docs/examples/zh/math/convexhull/ConvexHull.html @@ -187,7 +187,7 @@

[method:ConvexHull setFromPoints]( [param:Array points] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/ConvexHull.js]

diff --git a/docs/examples/zh/math/convexhull/Face.html b/docs/examples/zh/math/convexhull/Face.html index 98cf402834f89b..a3268f7ac26f88 100644 --- a/docs/examples/zh/math/convexhull/Face.html +++ b/docs/examples/zh/math/convexhull/Face.html @@ -85,7 +85,7 @@

[method:Float distanceToPoint]( [param:Vector3 point] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/zh/math/convexhull/HalfEdge.html b/docs/examples/zh/math/convexhull/HalfEdge.html index 200ed43442bcbd..d8a456ab85a87b 100644 --- a/docs/examples/zh/math/convexhull/HalfEdge.html +++ b/docs/examples/zh/math/convexhull/HalfEdge.html @@ -75,7 +75,7 @@

[method:HalfEdge setTwin]( [param:HalfEdge edge] )

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/zh/math/convexhull/VertexList.html b/docs/examples/zh/math/convexhull/VertexList.html index 54fc759aefcbe9..09687dbb46edf5 100644 --- a/docs/examples/zh/math/convexhull/VertexList.html +++ b/docs/examples/zh/math/convexhull/VertexList.html @@ -87,7 +87,7 @@

[method:Boolean isEmpty]()

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/zh/math/convexhull/VertexNode.html b/docs/examples/zh/math/convexhull/VertexNode.html index 179dc88c3bfdcc..0a0a63bf81ab54 100644 --- a/docs/examples/zh/math/convexhull/VertexNode.html +++ b/docs/examples/zh/math/convexhull/VertexNode.html @@ -48,7 +48,7 @@

[property:Face face]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/math/ConvexHull.js examples/js/math/ConvexHull.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/math/ConvexHull.js examples/jsm/math/ConvexHull.js]

diff --git a/docs/examples/zh/objects/Lensflare.html b/docs/examples/zh/objects/Lensflare.html index b070898771cc97..34f0f0ed67cf29 100644 --- a/docs/examples/zh/objects/Lensflare.html +++ b/docs/examples/zh/objects/Lensflare.html @@ -31,11 +31,11 @@

示例

var textureFlare1 = textureLoader.load( "textures/lensflare/lensflare2.png" ); var textureFlare2 = textureLoader.load( "textures/lensflare/lensflare3.png" ); -var lensflare = new THREE.Lensflare(); +var lensflare = new Lensflare(); -lensflare.addElement( new THREE.LensflareElement( textureFlare0, 512, 0 ) ); -lensflare.addElement( new THREE.LensflareElement( textureFlare1, 512, 0 ) ); -lensflare.addElement( new THREE.LensflareElement( textureFlare2, 60, 0.6 ) ); +lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); +lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); +lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); light.add( lensflare );
@@ -58,7 +58,7 @@

属性

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/objects/Lensflare.js examples/js/objects/Lensflare.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js examples/jsm/objects/Lensflare.js]

diff --git a/docs/examples/zh/postprocessing/EffectComposer.html b/docs/examples/zh/postprocessing/EffectComposer.html index 01b80ee40870be..c92f63abef9107 100644 --- a/docs/examples/zh/postprocessing/EffectComposer.html +++ b/docs/examples/zh/postprocessing/EffectComposer.html @@ -152,7 +152,7 @@

[method:void swapBuffers]()

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/postprocessing/EffectComposer.js examples/js/postprocessing/EffectComposer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/EffectComposer.js examples/jsm/postprocessing/EffectComposer.js]

diff --git a/docs/examples/zh/renderers/CSS2DRenderer.html b/docs/examples/zh/renderers/CSS2DRenderer.html index 5fbada5783a825..be18208ea9f310 100644 --- a/docs/examples/zh/renderers/CSS2DRenderer.html +++ b/docs/examples/zh/renderers/CSS2DRenderer.html @@ -61,7 +61,7 @@

[method:null setSize]([param:Number width], [param:Number height])

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS2DRenderer.js examples/js/renderers/CSS2DRenderer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS2DRenderer.js examples/jsm/renderers/CSS2DRenderer.js]

diff --git a/docs/examples/zh/renderers/CSS3DRenderer.html b/docs/examples/zh/renderers/CSS3DRenderer.html index e4376cb28d7e6d..a91a7cafa791b7 100644 --- a/docs/examples/zh/renderers/CSS3DRenderer.html +++ b/docs/examples/zh/renderers/CSS3DRenderer.html @@ -74,7 +74,7 @@

[method:null setSize]([param:Number width], [param:Number height])

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/renderers/CSS3DRenderer.js examples/js/renderers/CSS3DRenderer.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/CSS3DRenderer.js examples/jsm/renderers/CSS3DRenderer.js]

diff --git a/docs/examples/zh/renderers/SVGRenderer.html b/docs/examples/zh/renderers/SVGRenderer.html index 27fc606c67e46f..b80784b2125aa2 100644 --- a/docs/examples/zh/renderers/SVGRenderer.html +++ b/docs/examples/zh/renderers/SVGRenderer.html @@ -95,6 +95,8 @@

[method:null setSize]( [param:Number width], [param:Number height] )

源代码

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/[path].js examples/js/[path].js] +

+ [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/SVGRenderer.js examples/jsm/renderers/SVGRenderer.js] +

diff --git a/docs/examples/zh/utils/BufferGeometryUtils.html b/docs/examples/zh/utils/BufferGeometryUtils.html index 4f2b3abf37d5b1..595e9cf194abc0 100644 --- a/docs/examples/zh/utils/BufferGeometryUtils.html +++ b/docs/examples/zh/utils/BufferGeometryUtils.html @@ -86,7 +86,7 @@

[method:BufferGeometry toTrianglesDrawMode]( [param:BufferGeometry geometry]

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/BufferGeometryUtils.js examples/js/utils/BufferGeometryUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/BufferGeometryUtils.js examples/jsm/utils/BufferGeometryUtils.js]

diff --git a/docs/examples/zh/utils/SceneUtils.html b/docs/examples/zh/utils/SceneUtils.html index f17fc4923ec154..c50671497eb146 100644 --- a/docs/examples/zh/utils/SceneUtils.html +++ b/docs/examples/zh/utils/SceneUtils.html @@ -29,7 +29,7 @@

[method:Group createMultiMaterialObject]( [param:Geometry geometry], [param:

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/SceneUtils.js examples/js/utils/SceneUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SceneUtils.js examples/jsm/utils/SceneUtils.js]

diff --git a/docs/examples/zh/utils/SkeletonUtils.html b/docs/examples/zh/utils/SkeletonUtils.html index ba9ed261a60502..f9adec5a1e2835 100644 --- a/docs/examples/zh/utils/SkeletonUtils.html +++ b/docs/examples/zh/utils/SkeletonUtils.html @@ -56,7 +56,7 @@

[method:AnimationClip retargetClip]( [param:SkeletonHelper target], [param:S

Source

- [link:https://github.com/mrdoob/three.js/blob/master/examples/js/utils/SkeletonUtils.js examples/js/utils/SkeletonUtils.js] + [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/utils/SkeletonUtils.js examples/jsm/utils/SkeletonUtils.js]

diff --git a/docs/manual/en/introduction/Browser-support.html b/docs/manual/en/introduction/Browser-support.html index 6b24cef5848248..0b63f829920b6f 100644 --- a/docs/manual/en/introduction/Browser-support.html +++ b/docs/manual/en/introduction/Browser-support.html @@ -13,7 +13,7 @@

[name]

Overview

- Three.js can use WebGL to render your scenes on all modern browsers. For older browsers, especially Internet Explorer 10 and below, you may have to fallback to one of the other [link:https://github.com/mrdoob/three.js/tree/master/examples/js/renderers renderers] (CSS2DRenderer, CSS3DRenderer, SVGRenderer). Additionally, you may have to include some polyfills, especially if you are using files from the [link:https://github.com/mrdoob/three.js/tree/master/examples /examples] folder. + Three.js can use WebGL to render your scenes on all modern browsers. For older browsers, especially Internet Explorer 10 and below, you may have to fallback to one of the other [link:https://github.com/mrdoob/three.js/tree/master/examples/jsm/renderers renderers] (CSS2DRenderer, CSS3DRenderer, SVGRenderer). Additionally, you may have to include some polyfills, especially if you are using files from the [link:https://github.com/mrdoob/three.js/tree/master/examples /examples] folder.

Note: if you don't need to support these old browsers, then it is not recommended to use the other renderers as they are slower and support less features than the WebGLRenderer. diff --git a/docs/manual/en/introduction/How-to-create-VR-content.html b/docs/manual/en/introduction/How-to-create-VR-content.html index e431d0de98554b..723f795dba50f9 100644 --- a/docs/manual/en/introduction/How-to-create-VR-content.html +++ b/docs/manual/en/introduction/How-to-create-VR-content.html @@ -69,7 +69,6 @@

Next Steps

[example:webxr_vr_cubes WebXR / VR / cubes]
[example:webxr_vr_dragging WebXR / VR / dragging]
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
- [example:webxr_vr_multiview WebXR / VR / multiview]
[example:webxr_vr_paint WebXR / VR / paint]
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
[example:webxr_vr_panorama WebXR / VR / panorama]
diff --git a/docs/manual/en/introduction/Loading-3D-models.html b/docs/manual/en/introduction/Loading-3D-models.html index e965d80a67cda4..cd6e529b3b2451 100644 --- a/docs/manual/en/introduction/Loading-3D-models.html +++ b/docs/manual/en/introduction/Loading-3D-models.html @@ -15,7 +15,7 @@

[name]

3D models are available in hundreds of file formats, each with different purposes, assorted features, and varying complexity. Although - + three.js provides many loaders, choosing the right format and workflow will save time and frustration later on. Some formats are difficult to work with, inefficient for realtime experiences, or simply not diff --git a/docs/manual/zh/introduction/Browser-support.html b/docs/manual/zh/introduction/Browser-support.html index 6e815876e76b59..cdaebaa73f9d29 100644 --- a/docs/manual/zh/introduction/Browser-support.html +++ b/docs/manual/zh/introduction/Browser-support.html @@ -13,7 +13,7 @@

浏览器支持([name])

总览

- 在所有现代浏览器中,Three.js可以使用WebGL来渲染场景。对于较旧的浏览器,特别是Internet Explorer 10或者更低版本浏览器,你将需要回落到其它[link:https://github.com/mrdoob/three.js/tree/master/examples/js/renderers renderers](CSS2DRenderer、CSS3DRenderer、SVGRenderer)。此外,你或许不得不包含一些额外的“填充物”来解决兼容性问题,特别是当你使用[link:https://github.com/mrdoob/three.js/tree/master/examples /examples]目录中的文件时。 + 在所有现代浏览器中,Three.js可以使用WebGL来渲染场景。对于较旧的浏览器,特别是Internet Explorer 10或者更低版本浏览器,你将需要回落到其它[link:https://github.com/mrdoob/three.js/tree/master/examples/jsm/renderers renderers](CSS2DRenderer、CSS3DRenderer、SVGRenderer)。此外,你或许不得不包含一些额外的“填充物”来解决兼容性问题,特别是当你使用[link:https://github.com/mrdoob/three.js/tree/master/examples /examples]目录中的文件时。

注意:如果你并不需要支持较旧的浏览器,那就不推荐使用其他渲染器来进行渲染,因为与WebGLRenderer相比,其它渲染器渲染较慢,并且不支持WebGL的诸多特性。 diff --git a/docs/manual/zh/introduction/How-to-create-VR-content.html b/docs/manual/zh/introduction/How-to-create-VR-content.html index 5497172bde2586..66384de35d0505 100644 --- a/docs/manual/zh/introduction/How-to-create-VR-content.html +++ b/docs/manual/zh/introduction/How-to-create-VR-content.html @@ -69,7 +69,6 @@

接下来的步骤

[example:webxr_vr_cubes WebXR / VR / cubes]
[example:webxr_vr_dragging WebXR / VR / dragging]
[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]
- [example:webxr_vr_multiview WebXR / VR / multiview]
[example:webxr_vr_paint WebXR / VR / paint]
[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]
[example:webxr_vr_panorama WebXR / VR / panorama]
diff --git a/docs/manual/zh/introduction/Loading-3D-models.html b/docs/manual/zh/introduction/Loading-3D-models.html index a890b6e696ca8b..7c8be22506278e 100644 --- a/docs/manual/zh/introduction/Loading-3D-models.html +++ b/docs/manual/zh/introduction/Loading-3D-models.html @@ -14,7 +14,7 @@

载入3D模型([name])

目前,3D模型的格式有成千上万种可供选择,但每一种格式都具有不同的目的、用途以及复杂性。 - 虽然 + 虽然 three.js已经提供了多种导入工具, 但是选择正确的文件格式以及工作流程将可以节省很多时间,以及避免遭受很多挫折。某些格式难以使用,或者实时体验效率低下,或者目前尚未得到完全支持。

diff --git a/editor/js/Config.js b/editor/js/Config.js index ebfa8a8f9d63f8..bfc12e77b1d43b 100644 --- a/editor/js/Config.js +++ b/editor/js/Config.js @@ -8,6 +8,7 @@ var Config = function () { var storage = { 'language': 'en', + 'exportPrecision': 6, 'autosave': true, diff --git a/editor/js/Menubar.File.js b/editor/js/Menubar.File.js index 1da4255f4d70d3..730b39ec73d51f 100644 --- a/editor/js/Menubar.File.js +++ b/editor/js/Menubar.File.js @@ -14,11 +14,11 @@ import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js'; var MenubarFile = function ( editor ) { - var NUMBER_PRECISION = 6; - function parseNumber( key, value ) { - return typeof value === 'number' ? parseFloat( value.toFixed( NUMBER_PRECISION ) ) : value; + var precision = config.getKey( 'exportPrecision' ); + + return typeof value === 'number' ? parseFloat( value.toFixed( precision ) ) : value; } diff --git a/editor/js/Sidebar.Settings.js b/editor/js/Sidebar.Settings.js index feb0485a2c6a13..4d15aea1c5ba43 100644 --- a/editor/js/Sidebar.Settings.js +++ b/editor/js/Sidebar.Settings.js @@ -2,7 +2,7 @@ * @author mrdoob / http://mrdoob.com/ */ -import { UIPanel, UIRow, UISelect, UIText } from './libs/ui.js'; +import { UIPanel, UIRow, UISelect, UIText, UIInteger } from './libs/ui.js'; import { SidebarSettingsViewport } from './Sidebar.Settings.Viewport.js'; import { SidebarSettingsShortcuts } from './Sidebar.Settings.Shortcuts.js'; @@ -47,6 +47,26 @@ var SidebarSettings = function ( editor ) { container.add( languageRow ); + // export precision + + var exportPrecisionRow = new UIRow(); + var exportPrecision = new UIInteger( config.getKey( 'exportPrecision' ) ).setRange( 2, Infinity ); + + exportPrecision.onChange( function () { + + var value = this.getValue(); + + editor.config.setKey( 'exportPrecision', value ); + + } ); + + exportPrecisionRow.add( new UIText( strings.getKey( 'sidebar/settings/exportPrecision' ) ).setWidth( '90px' ) ); + exportPrecisionRow.add( exportPrecision ); + + container.add( exportPrecisionRow ); + + // + container.add( new SidebarSettingsShortcuts( editor ) ); container.add( new SidebarSettingsViewport( editor ) ); diff --git a/editor/js/Strings.js b/editor/js/Strings.js index da10bec8f6eb35..ca80fc8572f6ae 100644 --- a/editor/js/Strings.js +++ b/editor/js/Strings.js @@ -295,6 +295,7 @@ var Strings = function ( config ) { 'sidebar/settings': 'Settings', 'sidebar/settings/language': 'Language', + 'sidebar/settings/exportPrecision': 'Export Precision', 'sidebar/settings/shortcuts/translate': 'Translate', 'sidebar/settings/shortcuts/rotate': 'Rotate', @@ -580,6 +581,7 @@ var Strings = function ( config ) { 'sidebar/settings': '设置', 'sidebar/settings/language': '语言', + 'sidebar/settings/exportPrecision': 'Export Precision', 'sidebar/settings/shortcuts/translate': '移动', 'sidebar/settings/shortcuts/rotate': '旋转', diff --git a/examples/files.js b/examples/files.js index 4cddf82dfcae6b..c8fb5e1eed88e0 100644 --- a/examples/files.js +++ b/examples/files.js @@ -329,7 +329,6 @@ var files = { "webxr_vr_cubes", "webxr_vr_dragging", "webxr_vr_lorenzattractor", - "webxr_vr_multiview", "webxr_vr_panorama", "webxr_vr_panorama_depth", "webxr_vr_paint", diff --git a/examples/js/offscreen/jank.js b/examples/js/offscreen/jank.js deleted file mode 100644 index e2a0528f2008c1..00000000000000 --- a/examples/js/offscreen/jank.js +++ /dev/null @@ -1,38 +0,0 @@ -var interval = null; - -var button = document.getElementById( 'button' ); -button.addEventListener( 'click', function () { - - if ( interval === null ) { - - interval = setInterval( jank, 1000 / 60 ); - - button.textContent = 'STOP JANK'; - - } else { - - clearInterval( interval ); - interval = null; - - button.textContent = 'START JANK'; - result.textContent = ''; - - } - -} ); - -var result = document.getElementById( 'result' ); - -function jank() { - - var number = 0; - - for ( var i = 0; i < 10000000; i ++ ) { - - number += Math.random(); - - } - - result.textContent = number; - -} diff --git a/examples/js/postprocessing/RenderPass.js b/examples/js/postprocessing/RenderPass.js index e159aaecf5a7df..921824e775d275 100644 --- a/examples/js/postprocessing/RenderPass.js +++ b/examples/js/postprocessing/RenderPass.js @@ -29,9 +29,15 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype var oldAutoClear = renderer.autoClear; renderer.autoClear = false; - this.scene.overrideMaterial = this.overrideMaterial; + var oldClearColor, oldClearAlpha, oldOverrideMaterial; - var oldClearColor, oldClearAlpha; + if ( this.overrideMaterial !== undefined ) { + + oldOverrideMaterial = this.scene.overrideMaterial; + + this.scene.overrideMaterial = this.overrideMaterial; + + } if ( this.clearColor ) { @@ -60,7 +66,12 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype } - this.scene.overrideMaterial = null; + if ( this.overrideMaterial !== undefined ) { + + this.scene.overrideMaterial = oldOverrideMaterial; + + } + renderer.autoClear = oldAutoClear; } diff --git a/examples/js/utils/ShadowMapViewer.js b/examples/js/utils/ShadowMapViewer.js index e944234c04274e..06a0c126303903 100644 --- a/examples/js/utils/ShadowMapViewer.js +++ b/examples/js/utils/ShadowMapViewer.js @@ -2,19 +2,19 @@ * @author arya-s / https://github.com/arya-s * * This is a helper for visualising a given light's shadow map. - * It works for shadow casting lights: THREE.DirectionalLight and THREE.SpotLight. + * It works for shadow casting lights: DirectionalLight and SpotLight. * It renders out the shadow map and displays it on a HUD. * * Example usage: - * 1) Include - - - - - - - diff --git a/src/Three.Legacy.js b/src/Three.Legacy.js index eba2dc476769cc..e029c3099fcee4 100644 --- a/src/Three.Legacy.js +++ b/src/Three.Legacy.js @@ -2139,19 +2139,19 @@ export var SceneUtils = { createMultiMaterialObject: function ( /* geometry, materials */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, detach: function ( /* child, parent, scene */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); }, attach: function ( /* child, scene, parent */ ) { - console.error( 'THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js' ); + console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); } @@ -2161,6 +2161,6 @@ export var SceneUtils = { export function LensFlare() { - console.error( 'THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js' ); + console.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' ); } diff --git a/src/core/InstancedBufferAttribute.d.ts b/src/core/InstancedBufferAttribute.d.ts index 6e7eaa5bab8819..5a41cf72a146b9 100644 --- a/src/core/InstancedBufferAttribute.d.ts +++ b/src/core/InstancedBufferAttribute.d.ts @@ -2,7 +2,7 @@ import { BufferGeometry } from './BufferGeometry'; import { BufferAttribute } from './BufferAttribute'; /** - * @see examples/js/BufferGeometryUtils.js + * @see examples/jsm/utils/BufferGeometryUtils.js */ export namespace BufferGeometryUtils { export function mergeBufferGeometries( diff --git a/src/math/Box3.js b/src/math/Box3.js index 65947706015157..9086616869cff2 100644 --- a/src/math/Box3.js +++ b/src/math/Box3.js @@ -262,8 +262,7 @@ Object.assign( Box3.prototype, { _box.copy( geometry.boundingBox ); _box.applyMatrix4( object.matrixWorld ); - this.expandByPoint( _box.min ); - this.expandByPoint( _box.max ); + this.union( _box ); } diff --git a/src/renderers/WebGLMultiviewRenderTarget.d.ts b/src/renderers/WebGLMultiviewRenderTarget.d.ts deleted file mode 100644 index 7858937e5f66eb..00000000000000 --- a/src/renderers/WebGLMultiviewRenderTarget.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - WebGLRenderTarget, - WebGLRenderTargetOptions, -} from './WebGLRenderTarget'; - -export class WebGLMultiviewRenderTarget extends WebGLRenderTarget { - - constructor( - width: number, - height: number, - numViews: number, - options?: WebGLRenderTargetOptions - ); - - readonly isWebGLMultiviewRenderTarget: true; - setNumViews( numViews: number ): this; - -} diff --git a/src/renderers/WebGLMultiviewRenderTarget.js b/src/renderers/WebGLMultiviewRenderTarget.js deleted file mode 100644 index fc3e22a576ecec..00000000000000 --- a/src/renderers/WebGLMultiviewRenderTarget.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - -import { WebGLRenderTarget } from './WebGLRenderTarget.js'; - -function WebGLMultiviewRenderTarget( width, height, numViews, options ) { - - WebGLRenderTarget.call( this, width, height, options ); - - this.depthBuffer = false; - this.stencilBuffer = false; - - this.numViews = numViews; - -} - -WebGLMultiviewRenderTarget.prototype = Object.assign( Object.create( WebGLRenderTarget.prototype ), { - - constructor: WebGLMultiviewRenderTarget, - - isWebGLMultiviewRenderTarget: true, - - copy: function ( source ) { - - WebGLRenderTarget.prototype.copy.call( this, source ); - - this.numViews = source.numViews; - - return this; - - }, - - setNumViews: function ( numViews ) { - - if ( this.numViews !== numViews ) { - - this.numViews = numViews; - this.dispose(); - - } - - return this; - - } - -} ); - -export { WebGLMultiviewRenderTarget }; diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 640d3884d75515..555c746657ab20 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -45,7 +45,6 @@ import { WebGLState } from './webgl/WebGLState.js'; import { WebGLTextures } from './webgl/WebGLTextures.js'; import { WebGLUniforms } from './webgl/WebGLUniforms.js'; import { WebGLUtils } from './webgl/WebGLUtils.js'; -import { WebGLMultiview } from './webgl/WebGLMultiview.js'; import { WebXRManager } from './webxr/WebXRManager.js'; function WebGLRenderer( parameters ) { @@ -310,10 +309,6 @@ function WebGLRenderer( parameters ) { this.xr = xr; - // Multiview - - var multiview = new WebGLMultiview( _this, _gl ); - // shadow map var shadowMap = new WebGLShadowMap( _this, objects, capabilities.maxTextureSize ); @@ -1211,12 +1206,6 @@ function WebGLRenderer( parameters ) { } - if ( xr.enabled && multiview.isAvailable() ) { - - multiview.attachCamera( camera ); - - } - // background.render( currentRenderList, scene, camera, forceClear ); @@ -1271,16 +1260,6 @@ function WebGLRenderer( parameters ) { state.setPolygonOffset( false ); - if ( xr.enabled ) { - - if ( multiview.isAvailable() ) { - - multiview.detachCamera( camera ); - - } - - } - // _gl.finish(); currentRenderList = null; @@ -1428,27 +1407,19 @@ function WebGLRenderer( parameters ) { _currentArrayCamera = camera; - if ( xr.enabled && multiview.isAvailable() ) { + var cameras = camera.cameras; - renderObject( object, scene, camera, geometry, material, group ); - - } else { + for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { - var cameras = camera.cameras; + var camera2 = cameras[ j ]; - for ( var j = 0, jl = cameras.length; j < jl; j ++ ) { + if ( object.layers.test( camera2.layers ) ) { - var camera2 = cameras[ j ]; + state.viewport( _currentViewport.copy( camera2.viewport ) ); - if ( object.layers.test( camera2.layers ) ) { + currentRenderState.setupLights( camera2 ); - state.viewport( _currentViewport.copy( camera2.viewport ) ); - - currentRenderState.setupLights( camera2 ); - - renderObject( object, scene, camera2, geometry, material, group ); - - } + renderObject( object, scene, camera2, geometry, material, group ); } @@ -1730,15 +1701,7 @@ function WebGLRenderer( parameters ) { if ( refreshProgram || _currentCamera !== camera ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraProjectionMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); - - } + p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); if ( capabilities.logarithmicDepthBuffer ) { @@ -1799,15 +1762,7 @@ function WebGLRenderer( parameters ) { material.isShaderMaterial || material.skinning ) { - if ( program.numMultiviewViews > 0 ) { - - multiview.updateCameraViewMatricesUniform( camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); - - } + p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); } @@ -2012,17 +1967,8 @@ function WebGLRenderer( parameters ) { // common matrices - if ( program.numMultiviewViews > 0 ) { - - multiview.updateObjectMatricesUniforms( object, camera, p_uniforms ); - - } else { - - p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); - p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); - - } - + p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); + p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); return program; diff --git a/src/renderers/webgl/WebGLMultiview.d.ts b/src/renderers/webgl/WebGLMultiview.d.ts deleted file mode 100644 index 58ebd06e63dfa3..00000000000000 --- a/src/renderers/webgl/WebGLMultiview.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Camera } from './../../cameras/Camera'; -import { Object3D } from './../../core/Object3D'; -import { WebGLRenderer } from '../WebGLRenderer'; -import { WebGLUniforms } from './WebGLUniforms'; - -export class WebGLMultiview { - - constructor( renderer: WebGLRenderer, gl: WebGLRenderingContext ); - - isAvailable(): boolean; - attachCamera( camera: Camera ): void; - detachCamera( camera: Camera ): void; - updateCameraProjectionMatricesUniform( camera: Camera, uniforms: WebGLUniforms ): void; - updateCameraViewMatricesUniform( camera: Camera, uniforms: WebGLUniforms ): void; - updateObjectMatricesUniforms( object: Object3D, camera: Camera, uniforms: WebGLUniforms ): void; - -} diff --git a/src/renderers/webgl/WebGLMultiview.js b/src/renderers/webgl/WebGLMultiview.js deleted file mode 100644 index 142879461618f0..00000000000000 --- a/src/renderers/webgl/WebGLMultiview.js +++ /dev/null @@ -1,224 +0,0 @@ -/** - * @author fernandojsg / http://fernandojsg.com - * @author Takahiro https://github.com/takahirox - */ - -import { WebGLMultiviewRenderTarget } from '../WebGLMultiviewRenderTarget.js'; -import { Matrix3 } from '../../math/Matrix3.js'; -import { Matrix4 } from '../../math/Matrix4.js'; -import { Vector2 } from '../../math/Vector2.js'; - -function WebGLMultiview( renderer, gl ) { - - var DEFAULT_NUMVIEWS = 2; - - var extensions = renderer.extensions; - var properties = renderer.properties; - - var renderTarget, currentRenderTarget; - var mat3, mat4, cameraArray, renderSize; - - var available; - var maxNumViews = 0; - - // - - function isAvailable() { - - if ( available === undefined ) { - - var extension = extensions.get( 'OVR_multiview2' ); - - available = extension !== null && gl.getContextAttributes().antialias === false; - - if ( available ) { - - maxNumViews = gl.getParameter( extension.MAX_VIEWS_OVR ); - renderTarget = new WebGLMultiviewRenderTarget( 0, 0, DEFAULT_NUMVIEWS ); - - renderSize = new Vector2(); - mat4 = []; - mat3 = []; - cameraArray = []; - - for ( var i = 0; i < maxNumViews; i ++ ) { - - mat4[ i ] = new Matrix4(); - mat3[ i ] = new Matrix3(); - - } - - } - - } - - return available; - - } - - function getCameraArray( camera ) { - - if ( camera.isArrayCamera ) return camera.cameras; - - cameraArray[ 0 ] = camera; - - return cameraArray; - - } - - function updateCameraProjectionMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].projectionMatrix ); - - } - - uniforms.setValue( gl, 'projectionMatrices', mat4 ); - - } - - function updateCameraViewMatricesUniform( camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].copy( cameras[ i ].matrixWorldInverse ); - - } - - uniforms.setValue( gl, 'viewMatrices', mat4 ); - - } - - function updateObjectMatricesUniforms( object, camera, uniforms ) { - - var cameras = getCameraArray( camera ); - - for ( var i = 0; i < cameras.length; i ++ ) { - - mat4[ i ].multiplyMatrices( cameras[ i ].matrixWorldInverse, object.matrixWorld ); - mat3[ i ].getNormalMatrix( mat4[ i ] ); - - } - - uniforms.setValue( gl, 'modelViewMatrices', mat4 ); - uniforms.setValue( gl, 'normalMatrices', mat3 ); - - } - - function isMultiviewCompatible( camera ) { - - if ( camera.isArrayCamera === undefined ) return true; - - var cameras = camera.cameras; - - if ( cameras.length > maxNumViews ) return false; - - for ( var i = 1, il = cameras.length; i < il; i ++ ) { - - if ( cameras[ 0 ].viewport.z !== cameras[ i ].viewport.z || - cameras[ 0 ].viewport.w !== cameras[ i ].viewport.w ) return false; - - } - - return true; - - } - - function resizeRenderTarget( camera ) { - - if ( currentRenderTarget ) { - - renderSize.set( currentRenderTarget.width, currentRenderTarget.height ); - - } else { - - renderer.getDrawingBufferSize( renderSize ); - - } - - if ( camera.isArrayCamera ) { - - var viewport = camera.cameras[ 0 ].viewport; - - renderTarget.setSize( viewport.z, viewport.w ); - renderTarget.setNumViews( camera.cameras.length ); - - } else { - - renderTarget.setSize( renderSize.x, renderSize.y ); - renderTarget.setNumViews( DEFAULT_NUMVIEWS ); - - } - - } - - function attachCamera( camera ) { - - if ( isMultiviewCompatible( camera ) === false ) return; - - currentRenderTarget = renderer.getRenderTarget(); - resizeRenderTarget( camera ); - renderer.setRenderTarget( renderTarget ); - - } - - function detachCamera( camera ) { - - if ( renderTarget !== renderer.getRenderTarget() ) return; - - renderer.setRenderTarget( currentRenderTarget ); - - flush( camera ); - - } - - function flush( camera ) { - - var srcRenderTarget = renderTarget; - var numViews = srcRenderTarget.numViews; - - var srcFramebuffers = properties.get( srcRenderTarget ).__webglViewFramebuffers; - - var viewWidth = srcRenderTarget.width; - var viewHeight = srcRenderTarget.height; - - if ( camera.isArrayCamera ) { - - for ( var i = 0; i < numViews; i ++ ) { - - var viewport = camera.cameras[ i ].viewport; - - var x1 = viewport.x; - var y1 = viewport.y; - var x2 = x1 + viewport.z; - var y2 = y1 + viewport.w; - - gl.bindFramebuffer( gl.READ_FRAMEBUFFER, srcFramebuffers[ i ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, x1, y1, x2, y2, gl.COLOR_BUFFER_BIT, gl.NEAREST ); - - } - - } else { - - gl.bindFramebuffer( gl.READ_FRAMEBUFFER, srcFramebuffers[ 0 ] ); - gl.blitFramebuffer( 0, 0, viewWidth, viewHeight, 0, 0, renderSize.x, renderSize.y, gl.COLOR_BUFFER_BIT, gl.NEAREST ); - - } - - } - - this.isAvailable = isAvailable; - this.attachCamera = attachCamera; - this.detachCamera = detachCamera; - this.updateCameraProjectionMatricesUniform = updateCameraProjectionMatricesUniform; - this.updateCameraViewMatricesUniform = updateCameraViewMatricesUniform; - this.updateObjectMatricesUniforms = updateObjectMatricesUniforms; - -} - -export { WebGLMultiview }; diff --git a/src/renderers/webgl/WebGLProgram.d.ts b/src/renderers/webgl/WebGLProgram.d.ts index 84bf9b6fecf0bc..334aeb4d93c826 100644 --- a/src/renderers/webgl/WebGLProgram.d.ts +++ b/src/renderers/webgl/WebGLProgram.d.ts @@ -17,7 +17,6 @@ export class WebGLProgram { program: any; vertexShader: WebGLShader; fragmentShader: WebGLShader; - numMultiviewViews: number; /** * @deprecated Use {@link WebGLProgram#getUniforms getUniforms()} instead. */ diff --git a/src/renderers/webgl/WebGLProgram.js b/src/renderers/webgl/WebGLProgram.js index eab285fa85b3c5..6c5e6c71fa92f1 100644 --- a/src/renderers/webgl/WebGLProgram.js +++ b/src/renderers/webgl/WebGLProgram.js @@ -399,8 +399,6 @@ function WebGLProgram( renderer, cacheKey, parameters ) { var prefixVertex, prefixFragment; - var numMultiviewViews = parameters.numMultiviewViews; - if ( parameters.isRawShaderMaterial ) { prefixVertex = [ @@ -698,59 +696,6 @@ function WebGLProgram( renderer, cacheKey, parameters ) { '#define textureCubeGradEXT textureGrad' ].join( '\n' ) + '\n' + prefixFragment; - // Multiview - - if ( numMultiviewViews > 0 ) { - - prefixVertex = prefixVertex.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - 'layout(num_views = ' + numMultiviewViews + ') in;', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixVertex = prefixVertex.replace( - [ - 'uniform mat4 modelViewMatrix;', - 'uniform mat4 projectionMatrix;', - 'uniform mat4 viewMatrix;', - 'uniform mat3 normalMatrix;' - ].join( '\n' ), - [ - 'uniform mat4 modelViewMatrices[' + numMultiviewViews + '];', - 'uniform mat4 projectionMatrices[' + numMultiviewViews + '];', - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - 'uniform mat3 normalMatrices[' + numMultiviewViews + '];', - - '#define modelViewMatrix modelViewMatrices[VIEW_ID]', - '#define projectionMatrix projectionMatrices[VIEW_ID]', - '#define viewMatrix viewMatrices[VIEW_ID]', - '#define normalMatrix normalMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - '#version 300 es\n', - [ - '#version 300 es\n', - '#extension GL_OVR_multiview2 : require', - '#define VIEW_ID gl_ViewID_OVR' - ].join( '\n' ) - ); - - prefixFragment = prefixFragment.replace( - 'uniform mat4 viewMatrix;', - [ - 'uniform mat4 viewMatrices[' + numMultiviewViews + '];', - '#define viewMatrix viewMatrices[VIEW_ID]' - ].join( '\n' ) - ); - - } - } var vertexGlsl = prefixVertex + vertexShader; @@ -895,7 +840,6 @@ function WebGLProgram( renderer, cacheKey, parameters ) { this.program = program; this.vertexShader = glVertexShader; this.fragmentShader = glFragmentShader; - this.numMultiviewViews = numMultiviewViews; return this; diff --git a/src/renderers/webgl/WebGLPrograms.js b/src/renderers/webgl/WebGLPrograms.js index 3535eed00dc3e4..e11235a079d4b8 100644 --- a/src/renderers/webgl/WebGLPrograms.js +++ b/src/renderers/webgl/WebGLPrograms.js @@ -37,7 +37,7 @@ function WebGLPrograms( renderer, extensions, capabilities ) { }; var parameterNames = [ - "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "numMultiviewViews", + "precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding", "envMapCubeUV", "lightMap", "lightMapEncoding", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "tangentSpaceNormalMap", "clearcoatNormalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", @@ -171,7 +171,6 @@ function WebGLPrograms( renderer, extensions, capabilities ) { material.onBeforeCompile( shaderobject, renderer ); var currentRenderTarget = renderer.getRenderTarget(); - var numMultiviewViews = currentRenderTarget && currentRenderTarget.isWebGLMultiviewRenderTarget ? currentRenderTarget.numViews : 0; var parameters = { @@ -193,7 +192,6 @@ function WebGLPrograms( renderer, extensions, capabilities ) { instancing: object.isInstancedMesh === true, supportsVertexTextures: vertexTextures, - numMultiviewViews: numMultiviewViews, outputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding, map: !! material.map, mapEncoding: getTextureEncodingFromMap( material.map ), diff --git a/src/renderers/webgl/WebGLTextures.js b/src/renderers/webgl/WebGLTextures.js index be82fa0a6190ee..03f51a751cd0c2 100644 --- a/src/renderers/webgl/WebGLTextures.js +++ b/src/renderers/webgl/WebGLTextures.js @@ -285,21 +285,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - if ( renderTarget.isWebGLMultiviewRenderTarget ) { - - _gl.deleteTexture( renderTargetProperties.__webglColorTexture ); - _gl.deleteTexture( renderTargetProperties.__webglDepthStencilTexture ); - - info.memory.textures -= 2; - - for ( var i = 0, il = renderTargetProperties.__webglViewFramebuffers.length; i < il; i ++ ) { - - _gl.deleteFramebuffer( renderTargetProperties.__webglViewFramebuffers[ i ] ); - - } - - } - properties.remove( renderTarget.texture ); properties.remove( renderTarget ); @@ -1000,7 +985,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, var isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); var isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true ); - var isMultiview = ( renderTarget.isWebGLMultiviewRenderTarget === true ); var supportsMips = isPowerOfTwo( renderTarget ) || isWebGL2; // Setup framebuffer @@ -1054,48 +1038,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, } - } else if ( isMultiview ) { - - var width = renderTarget.width; - var height = renderTarget.height; - var numViews = renderTarget.numViews; - - _gl.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); - - var ext = extensions.get( 'OVR_multiview2' ); - - info.memory.textures += 2; - - var colorTexture = _gl.createTexture(); - _gl.bindTexture( _gl.TEXTURE_2D_ARRAY, colorTexture ); - _gl.texParameteri( _gl.TEXTURE_2D_ARRAY, _gl.TEXTURE_MAG_FILTER, _gl.NEAREST ); - _gl.texParameteri( _gl.TEXTURE_2D_ARRAY, _gl.TEXTURE_MIN_FILTER, _gl.NEAREST ); - _gl.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, _gl.RGBA8, width, height, numViews, 0, _gl.RGBA, _gl.UNSIGNED_BYTE, null ); - ext.framebufferTextureMultiviewOVR( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, colorTexture, 0, 0, numViews ); - - var depthStencilTexture = _gl.createTexture(); - _gl.bindTexture( _gl.TEXTURE_2D_ARRAY, depthStencilTexture ); - _gl.texParameteri( _gl.TEXTURE_2D_ARRAY, _gl.TEXTURE_MAG_FILTER, _gl.NEAREST ); - _gl.texParameteri( _gl.TEXTURE_2D_ARRAY, _gl.TEXTURE_MIN_FILTER, _gl.NEAREST ); - _gl.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, _gl.DEPTH24_STENCIL8, width, height, numViews, 0, _gl.DEPTH_STENCIL, _gl.UNSIGNED_INT_24_8, null ); - ext.framebufferTextureMultiviewOVR( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, depthStencilTexture, 0, 0, numViews ); - - var viewFramebuffers = new Array( numViews ); - for ( var i = 0; i < numViews; ++ i ) { - - viewFramebuffers[ i ] = _gl.createFramebuffer(); - _gl.bindFramebuffer( _gl.FRAMEBUFFER, viewFramebuffers[ i ] ); - _gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, colorTexture, 0, i ); - - } - - renderTargetProperties.__webglColorTexture = colorTexture; - renderTargetProperties.__webglDepthStencilTexture = depthStencilTexture; - renderTargetProperties.__webglViewFramebuffers = viewFramebuffers; - - _gl.bindFramebuffer( _gl.FRAMEBUFFER, null ); - _gl.bindTexture( _gl.TEXTURE_2D_ARRAY, null ); - } } @@ -1121,7 +1063,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, state.bindTexture( _gl.TEXTURE_CUBE_MAP, null ); - } else if ( ! isMultiview ) { + } else { state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture ); setTextureParameters( _gl.TEXTURE_2D, renderTarget.texture, supportsMips ); diff --git a/test/diff/puppeteer.js b/test/diff/puppeteer.js index 61df95628655f3..0bdbeab1adacbb 100644 --- a/test/diff/puppeteer.js +++ b/test/diff/puppeteer.js @@ -17,6 +17,7 @@ const maxFailedPixels = 0.05; // total failed pixels const exceptionList = [ 'index', + 'css3d_youtube', 'webgl_loader_texture_pvrtc', // not supported in CI, useless 'webgl_materials_envmaps_parallax', 'webgl_test_memory2', // gives fatal error in puppeteer diff --git a/utils/converters/README.md b/utils/converters/README.md index fe819b864cf8b8..447b776973cde9 100644 --- a/utils/converters/README.md +++ b/utils/converters/README.md @@ -1,11 +1,12 @@ Utilities for converting model files to the Three.js JSON format. +It's necessary to install the [esm](https://www.npmjs.com/package/esm) npm package before you can use the converters. ## obj2three.js Usage: ``` -node obj2three.js model.obj +node -r esm obj2three.js model.obj ``` ## fbx2three.js @@ -13,5 +14,5 @@ node obj2three.js model.obj Usage: ``` -node fbx2three.js model.fbx +node -r esm fbx2three.js model.fbx ``` diff --git a/utils/converters/fbx2three.js b/utils/converters/fbx2three.js index 9d0375724e890a..ddbc80f626f798 100644 --- a/utils/converters/fbx2three.js +++ b/utils/converters/fbx2three.js @@ -1,5 +1,8 @@ -var fs = require( 'fs' ); -var path = require( 'path' ); +import fs from 'fs'; +import path from 'path'; + +import { FBXLoader } from '../../examples/jsm/loaders/FBXLoader.js'; +import { ImageLoader, ImageUtils, LoaderUtils } from '../../build/three.module.js'; if ( process.argv.length <= 2 ) { @@ -10,7 +13,7 @@ if ( process.argv.length <= 2 ) { // -var PRECISION = 6; +const PRECISION = 6; function parseNumber( key, value ) { @@ -18,12 +21,6 @@ function parseNumber( key, value ) { } -THREE = require( '../../build/three.js' ); -require( '../../examples/js/curves/NURBSCurve.js' ); -require( '../../examples/js/curves/NURBSUtils.js' ); -require( '../../examples/js/loaders/FBXLoader.js' ); -global.Zlib = require( '../../examples/js/libs/inflate.min.js' ).Zlib; - global.window = { innerWidth: 1024, innerHeight: 768, @@ -39,7 +36,7 @@ global.window = { }; // HTML Images are not available, so use a Buffer instead. -THREE.ImageLoader.prototype.load = function ( url, onLoad ) { +ImageLoader.prototype.load = function ( url, onLoad ) { if ( this.path !== undefined ) url = this.path + url; @@ -56,7 +53,7 @@ THREE.ImageLoader.prototype.load = function ( url, onLoad ) { }; // Convert image buffer to data URL. -THREE.ImageUtils.getDataURL = function ( image ) { +ImageUtils.getDataURL = function ( image ) { if ( ! ( image instanceof Buffer ) ) { @@ -64,7 +61,7 @@ THREE.ImageUtils.getDataURL = function ( image ) { } - var dataURL = 'data:'; + let dataURL = 'data:'; dataURL += this.format === THREE.RGBAFormat ? 'image/png' : 'image/jpeg'; dataURL += ';base64,'; dataURL += image.toString( 'base64' ); @@ -74,11 +71,11 @@ THREE.ImageUtils.getDataURL = function ( image ) { // -var file = process.argv[ 2 ]; -var resourceDirectory = THREE.LoaderUtils.extractUrlBase( file ); -var loader = new THREE.FBXLoader(); +const file = process.argv[ 2 ]; +const resourceDirectory = LoaderUtils.extractUrlBase( file ); +const loader = new FBXLoader(); -var arraybuffer = fs.readFileSync( file ).buffer; -var object = loader.parse( arraybuffer, resourceDirectory ); -var content = JSON.stringify( object.toJSON(), parseNumber ); +const arraybuffer = fs.readFileSync( file ).buffer; +const object = loader.parse( arraybuffer, resourceDirectory ); +const content = JSON.stringify( object.toJSON(), parseNumber ); fs.writeFileSync( path.basename( file, '.fbx' ) + '.json', content, 'utf8' ); diff --git a/utils/converters/obj2three.js b/utils/converters/obj2three.js index 82a9a9a12a1ca5..d98f4c41216794 100644 --- a/utils/converters/obj2three.js +++ b/utils/converters/obj2three.js @@ -1,5 +1,7 @@ -var fs = require( 'fs' ); -var path = require( 'path' ); +import fs from 'fs'; +import path from 'path'; + +import { OBJLoader } from '../../examples/jsm/loaders/OBJLoader.js'; if ( process.argv.length <= 2 ) { @@ -10,7 +12,7 @@ if ( process.argv.length <= 2 ) { // -var PRECISION = 6; +const PRECISION = 6; function parseNumber( key, value ) { @@ -18,13 +20,10 @@ function parseNumber( key, value ) { } -THREE = require( '../../build/three.js' ); -require( '../../examples/js/loaders/OBJLoader.js' ); - -var file = process.argv[ 2 ]; -var loader = new THREE.OBJLoader(); +const file = process.argv[ 2 ]; +const loader = new OBJLoader(); -var text = fs.readFileSync( file, 'utf8' ); +const text = fs.readFileSync( file, 'utf8' ); -var content = JSON.stringify( loader.parse( text ).toJSON(), parseNumber ); +const content = JSON.stringify( loader.parse( text ).toJSON(), parseNumber ); fs.writeFileSync( path.basename( file, '.obj' ) + '.json', content, 'utf8' ); diff --git a/utils/modularize.js b/utils/modularize.js index 5bb9ea32caa9f2..c746b637394c58 100644 --- a/utils/modularize.js +++ b/utils/modularize.js @@ -226,7 +226,7 @@ var files = [ { path: 'utils/BufferGeometryUtils.js', dependencies: [], ignoreList: [] }, { path: 'utils/GeometryUtils.js', dependencies: [], ignoreList: [] }, { path: 'utils/SceneUtils.js', dependencies: [], ignoreList: [] }, - { path: 'utils/ShadowMapViewer.js', dependencies: [ { name: 'UnpackDepthRGBAShader', path: 'shaders/UnpackDepthRGBAShader.js' } ], ignoreList: [ 'DirectionalLight', 'SpotLight' ] }, + { path: 'utils/ShadowMapViewer.js', dependencies: [ { name: 'UnpackDepthRGBAShader', path: 'shaders/UnpackDepthRGBAShader.js' } ], ignoreList: [] }, { path: 'utils/SkeletonUtils.js', dependencies: [], ignoreList: [] }, { path: 'utils/TypedArrayUtils.js', dependencies: [], ignoreList: [] }, { path: 'utils/UVsDebug.js', dependencies: [], ignoreList: [ 'SphereBufferGeometry' ] },