From 42445d3e2e68c65a734511bf8d90fba603e6ea1a Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Fri, 2 Aug 2019 14:18:02 -0400 Subject: [PATCH 01/11] PerspectiveLineMaterial and LineGeometry raycasting --- build/three.js | 329 ++++----- build/three.min.js | 1069 +++++++++++++-------------- build/three.module.js | 329 ++++----- examples/jsm/lines/LineSegments2.js | 75 +- examples/webgl_lines_fat.html | 141 +++- package-lock.json | 2 +- 6 files changed, 1020 insertions(+), 925 deletions(-) diff --git a/build/three.js b/build/three.js index b0756334b7dd34..e01951488702f7 100644 --- a/build/three.js +++ b/build/three.js @@ -1635,6 +1635,8 @@ * @author WestLangley / http://github.com/WestLangley */ + var _vector, _quaternion; + function Vector3( x, y, z ) { this.x = x || 0; @@ -1856,35 +1858,27 @@ }, - applyEuler: function () { - - var quaternion = new Quaternion(); - - return function applyEuler( euler ) { - - if ( ! ( euler && euler.isEuler ) ) { + applyEuler: function ( euler ) { - console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' ); - - } + if ( _quaternion === undefined ) _quaternion = new Quaternion(); - return this.applyQuaternion( quaternion.setFromEuler( euler ) ); + if ( ! ( euler && euler.isEuler ) ) { - }; + console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' ); - }(), + } - applyAxisAngle: function () { + return this.applyQuaternion( _quaternion.setFromEuler( euler ) ); - var quaternion = new Quaternion(); + }, - return function applyAxisAngle( axis, angle ) { + applyAxisAngle: function ( axis, angle ) { - return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) ); + if ( _quaternion === undefined ) _quaternion = new Quaternion(); - }; + return this.applyQuaternion( _quaternion.setFromAxisAngle( axis, angle ) ); - }(), + }, applyMatrix3: function ( m ) { @@ -2168,34 +2162,26 @@ }, - projectOnPlane: function () { + projectOnPlane: function ( planeNormal ) { - var v1 = new Vector3(); + if ( _vector === undefined ) _vector = new Vector3(); - return function projectOnPlane( planeNormal ) { + _vector.copy( this ).projectOnVector( planeNormal ); - v1.copy( this ).projectOnVector( planeNormal ); + return this.sub( _vector ); - return this.sub( v1 ); + }, - }; + reflect: function ( normal ) { - }(), - - reflect: function () { + if ( _vector === undefined ) _vector = new Vector3(); // reflect incident vector off plane orthogonal to normal // normal is assumed to have unit length - var v1 = new Vector3(); - - return function reflect( normal ) { + return this.sub( _vector.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); - return this.sub( v1.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); - - }; - - }(), + }, angleTo: function ( v ) { @@ -2349,7 +2335,7 @@ * @author tschw */ - var _vector; + var _vector$1; function Matrix3() { @@ -2436,17 +2422,17 @@ applyToBufferAttribute: function ( attribute ) { - if ( _vector === undefined ) _vector = new Vector3(); + if ( _vector$1 === undefined ) _vector$1 = new Vector3(); for ( var i = 0, l = attribute.count; i < l; i ++ ) { - _vector.x = attribute.getX( i ); - _vector.y = attribute.getY( i ); - _vector.z = attribute.getZ( i ); + _vector$1.x = attribute.getX( i ); + _vector$1.y = attribute.getY( i ); + _vector$1.z = attribute.getZ( i ); - _vector.applyMatrix3( this ); + _vector$1.applyMatrix3( this ); - attribute.setXYZ( i, _vector.x, _vector.y, _vector.z ); + attribute.setXYZ( i, _vector$1.x, _vector$1.y, _vector$1.z ); } @@ -4823,7 +4809,7 @@ * @author bhouston / http://clara.io */ - var _matrix, _quaternion; + var _matrix, _quaternion$1; function Euler( x, y, z, order ) { @@ -5089,11 +5075,11 @@ // WARNING: this discards revolution information -bhouston - if ( _quaternion === undefined ) _quaternion = new Quaternion(); + if ( _quaternion$1 === undefined ) _quaternion$1 = new Quaternion(); - _quaternion.setFromEuler( this ); + _quaternion$1.setFromEuler( this ); - return this.setFromQuaternion( _quaternion, newOrder ); + return this.setFromQuaternion( _quaternion$1, newOrder ); }, @@ -7881,7 +7867,7 @@ * @author mrdoob / http://mrdoob.com/ */ - var ColorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, + var _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2, 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50, 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B, @@ -7906,6 +7892,9 @@ 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0, 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 }; + var _hslA = { h: 0, s: 0, l: 0 }; + var _hslB = { h: 0, s: 0, l: 0 }; + function Color( r, g, b ) { if ( g === undefined && b === undefined ) { @@ -8136,7 +8125,7 @@ if ( style && style.length > 0 ) { // color keywords - var hex = ColorKeywords[ style ]; + var hex = _colorKeywords[ style ]; if ( hex !== undefined ) { @@ -8318,23 +8307,17 @@ }, - offsetHSL: function () { - - var hsl = {}; + offsetHSL: function ( h, s, l ) { - return function ( h, s, l ) { + this.getHSL( _hslA ); - this.getHSL( hsl ); + _hslA.h += h; _hslA.s += s; _hslA.l += l; - hsl.h += h; hsl.s += s; hsl.l += l; + this.setHSL( _hslA.h, _hslA.s, _hslA.l ); - this.setHSL( hsl.h, hsl.s, hsl.l ); - - return this; - - }; + return this; - }(), + }, add: function ( color ) { @@ -8406,27 +8389,20 @@ }, - lerpHSL: function () { - - var hslA = { h: 0, s: 0, l: 0 }; - var hslB = { h: 0, s: 0, l: 0 }; - - return function lerpHSL( color, alpha ) { + lerpHSL: function ( color, alpha ) { - this.getHSL( hslA ); - color.getHSL( hslB ); + this.getHSL( _hslA ); + color.getHSL( _hslB ); - var h = _Math.lerp( hslA.h, hslB.h, alpha ); - var s = _Math.lerp( hslA.s, hslB.s, alpha ); - var l = _Math.lerp( hslA.l, hslB.l, alpha ); + var h = _Math.lerp( _hslA.h, _hslB.h, alpha ); + var s = _Math.lerp( _hslA.s, _hslB.s, alpha ); + var l = _Math.lerp( _hslA.l, _hslB.l, alpha ); - this.setHSL( h, s, l ); + this.setHSL( h, s, l ); - return this; - - }; + return this; - }(), + }, equals: function ( c ) { @@ -13918,6 +13894,8 @@ * @author bhouston / http://clara.io */ + var _vector1, _vector2, _normalMatrix; + function Plane( normal, constant ) { // normal is assumed to be normalized @@ -13958,24 +13936,24 @@ }, - setFromCoplanarPoints: function () { + setFromCoplanarPoints: function ( a, b, c ) { - var v1 = new Vector3(); - var v2 = new Vector3(); + if ( _vector1 === undefined ) { - return function setFromCoplanarPoints( a, b, c ) { + _vector1 = new Vector3(); + _vector2 = new Vector3(); - var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize(); + } - // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + var normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); - this.setFromNormalAndCoplanarPoint( normal, a ); + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - return this; + this.setFromNormalAndCoplanarPoint( normal, a ); - }; + return this; - }(), + }, clone: function () { @@ -14038,50 +14016,46 @@ }, - intersectLine: function () { - - var v1 = new Vector3(); - - return function intersectLine( line, target ) { + intersectLine: function ( line, target ) { - if ( target === undefined ) { - - console.warn( 'THREE.Plane: .intersectLine() target is now required' ); - target = new Vector3(); + if ( _vector1 === undefined ) _vector1 = new Vector3(); - } + if ( target === undefined ) { - var direction = line.delta( v1 ); + console.warn( 'THREE.Plane: .intersectLine() target is now required' ); + target = new Vector3(); - var denominator = this.normal.dot( direction ); + } - if ( denominator === 0 ) { + var direction = line.delta( _vector1 ); - // line is coplanar, return origin - if ( this.distanceToPoint( line.start ) === 0 ) { + var denominator = this.normal.dot( direction ); - return target.copy( line.start ); + if ( denominator === 0 ) { - } + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { - // Unsure if this is the correct method to handle this case. - return undefined; + return target.copy( line.start ); } - var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + // Unsure if this is the correct method to handle this case. + return undefined; - if ( t < 0 || t > 1 ) { + } - return undefined; + var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; - } + if ( t < 0 || t > 1 ) { - return target.copy( direction ).multiplyScalar( t ).add( line.start ); + return undefined; - }; + } - }(), + return target.copy( direction ).multiplyScalar( t ).add( line.start ); + + }, intersectsLine: function ( line ) { @@ -14119,26 +14093,26 @@ }, - applyMatrix4: function () { + applyMatrix4: function ( matrix, optionalNormalMatrix ) { - var v1 = new Vector3(); - var m1 = new Matrix3(); + if ( _normalMatrix === undefined ) { - return function applyMatrix4( matrix, optionalNormalMatrix ) { + _normalMatrix = new Matrix3(); + _vector1 = new Vector3(); - var normalMatrix = optionalNormalMatrix || m1.getNormalMatrix( matrix ); + } - var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix ); + var normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); - var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + var referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); - this.constant = - referencePoint.dot( normal ); + var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); - return this; + this.constant = - referencePoint.dot( normal ); - }; + return this; - }(), + }, translate: function ( offset ) { @@ -14162,6 +14136,9 @@ * @author bhouston / http://clara.io */ + var _sphere; + var _vector$2; + function Frustum( p0, p1, p2, p3, p4, p5 ) { this.planes = [ @@ -14234,41 +14211,29 @@ }, - intersectsObject: function () { - - var sphere = new Sphere(); - - return function intersectsObject( object ) { - - var geometry = object.geometry; + intersectsObject: function ( object ) { - if ( geometry.boundingSphere === null ) - geometry.computeBoundingSphere(); + if ( _sphere === undefined ) _sphere = new Sphere(); - sphere.copy( geometry.boundingSphere ) - .applyMatrix4( object.matrixWorld ); - - return this.intersectsSphere( sphere ); - - }; + var geometry = object.geometry; - }(), + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - intersectsSprite: function () { + _sphere.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); - var sphere = new Sphere(); + return this.intersectsSphere( _sphere ); - return function intersectsSprite( sprite ) { + }, - sphere.center.set( 0, 0, 0 ); - sphere.radius = 0.7071067811865476; - sphere.applyMatrix4( sprite.matrixWorld ); + intersectsSprite: function ( sprite ) { - return this.intersectsSphere( sphere ); + _sphere.center.set( 0, 0, 0 ); + _sphere.radius = 0.7071067811865476; + _sphere.applyMatrix4( sprite.matrixWorld ); - }; + return this.intersectsSphere( _sphere ); - }(), + }, intersectsSphere: function ( sphere ) { @@ -14292,37 +14257,33 @@ }, - intersectsBox: function () { - - var p = new Vector3(); - - return function intersectsBox( box ) { + intersectsBox: function ( box ) { - var planes = this.planes; + if ( _vector$2 === undefined ) _vector$2 = new Vector3(); - for ( var i = 0; i < 6; i ++ ) { + var planes = this.planes; - var plane = planes[ i ]; + for ( var i = 0; i < 6; i ++ ) { - // corner at max distance + var plane = planes[ i ]; - p.x = plane.normal.x > 0 ? box.max.x : box.min.x; - p.y = plane.normal.y > 0 ? box.max.y : box.min.y; - p.z = plane.normal.z > 0 ? box.max.z : box.min.z; + // corner at max distance - if ( plane.distanceToPoint( p ) < 0 ) { + _vector$2.x = plane.normal.x > 0 ? box.max.x : box.min.x; + _vector$2.y = plane.normal.y > 0 ? box.max.y : box.min.y; + _vector$2.z = plane.normal.z > 0 ? box.max.z : box.min.z; - return false; + if ( plane.distanceToPoint( _vector$2 ) < 0 ) { - } + return false; } - return true; + } - }; + return true; - }(), + }, containsPoint: function ( point ) { @@ -44967,6 +44928,8 @@ * @author bhouston / http://clara.io */ + var _vector$3; + function Box2( min, max ) { this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity ); @@ -44999,21 +44962,17 @@ }, - setFromCenterAndSize: function () { - - var v1 = new Vector2(); - - return function setFromCenterAndSize( center, size ) { + setFromCenterAndSize: function ( center, size ) { - var halfSize = v1.copy( size ).multiplyScalar( 0.5 ); - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); + if ( _vector$3 === undefined ) _vector$3 = new Vector2(); - return this; + var halfSize = _vector$3.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); - }; + return this; - }(), + }, clone: function () { @@ -45155,18 +45114,14 @@ }, - distanceToPoint: function () { - - var v1 = new Vector2(); + distanceToPoint: function ( point ) { - return function distanceToPoint( point ) { + if ( _vector$3 === undefined ) _vector$3 = new Vector2(); - var clampedPoint = v1.copy( point ).clamp( this.min, this.max ); - return clampedPoint.sub( point ).length(); + var clampedPoint = _vector$3.copy( point ).clamp( this.min, this.max ); + return clampedPoint.sub( point ).length(); - }; - - }(), + }, intersect: function ( box ) { diff --git a/build/three.min.js b/build/three.min.js index 8097b089e061f7..db1356f06cc44f 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,127 +1,126 @@ -// threejs.org/license (function(l,oa){"object"===typeof exports&&"undefined"!==typeof module?oa(exports):"function"===typeof define&&define.amd?define(["exports"],oa):(l=l||self,oa(l.THREE={}))})(this,function(l){function oa(){}function C(a,b){this.x=a||0;this.y=b||0}function ja(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ka(){this.elements=[1,0,0,0,1,0,0,0,1];0c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function pe(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function qe(a){return.0031308> -a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Sb(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 O(){Object.defineProperty(this,"id",{value:jg++});this.uuid=M.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors= +function V(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,"id",{value:rg++});this.uuid=M.generateUUID();this.name="";this.image=void 0!==a?a:V.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:V.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new C(0,0);this.repeat=new C(1,1);this.center=new C(0,0);this.rotation= +0;this.matrixAutoUpdate=!0;this.matrix=new ka;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ha(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Wa(a,b,c){this.width=a;this.height=b;this.scissor=new ha(0,0,a,b);this.scissorTest=!1;this.viewport=new ha(0,0,a,b);c=c||{};this.texture=new V(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy, +c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function ue(a,b,c){Wa.call(this,a,b,c);this.samples=4}function Q(){this.elements=[1,0,0,0,0, +1,0,0,0,0,1,0,0,0,0,1];0c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function xe(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function ye(a){return.0031308> +a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Wb(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 O(){Object.defineProperty(this,"id",{value:tg++});this.uuid=M.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors= 0;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.stencilFunc=519;this.stencilRef=0;this.stencilMask=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.visible=!0;this.userData={};this.needsUpdate=!0}function ma(a){O.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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function N(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.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Dc(a,b,c){N.call(this,new Int8Array(a),b,c)}function Ec(a,b,c){N.call(this,new Uint8Array(a),b,c)}function Fc(a,b, -c){N.call(this,new Uint8ClampedArray(a),b,c)}function Gc(a,b,c){N.call(this,new Int16Array(a),b,c)}function wb(a,b,c){N.call(this,new Uint16Array(a),b,c)}function Hc(a,b,c){N.call(this,new Int32Array(a),b,c)}function xb(a,b,c){N.call(this,new Uint32Array(a),b,c)}function E(a,b,c){N.call(this,new Float32Array(a),b,c)}function Ic(a,b,c){N.call(this,new Float64Array(a),b,c)}function ff(){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 gf(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function B(){Object.defineProperty(this,"id",{value:kg+=2});this.uuid=M.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere= -this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function ta(a,b){G.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new ma({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function P(){Object.defineProperty(this,"id",{value:lg+=2});this.uuid=M.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights= -[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Tb(a,b,c,d,e,f){P.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new kb(a,b,c,d,e,f));this.mergeVertices()}function kb(a,b,c,d,e,f){function g(a, +this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.visible=!0;this.userData={};this.needsUpdate=!0}function pa(a){O.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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function N(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.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Kc(a,b,c){N.call(this,new Int8Array(a),b,c)}function Lc(a,b,c){N.call(this,new Uint8Array(a),b,c)}function Mc(a,b, +c){N.call(this,new Uint8ClampedArray(a),b,c)}function Nc(a,b,c){N.call(this,new Int16Array(a),b,c)}function zb(a,b,c){N.call(this,new Uint16Array(a),b,c)}function Oc(a,b,c){N.call(this,new Int32Array(a),b,c)}function Ab(a,b,c){N.call(this,new Uint32Array(a),b,c)}function E(a,b,c){N.call(this,new Float32Array(a),b,c)}function Pc(a,b,c){N.call(this,new Float64Array(a),b,c)}function pf(){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 qf(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function B(){Object.defineProperty(this,"id",{value:ug+=2});this.uuid=M.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere= +this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function ta(a,b){G.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new pa({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function P(){Object.defineProperty(this,"id",{value:vg+=2});this.uuid=M.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights= +[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Xb(a,b,c,d,e,f){P.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new lb(a,b,c,d,e,f));this.mergeVertices()}function lb(a,b,c,d,e,f){function g(a, b,c,d,e,f,g,t,W,Y,C){var q=f/W,v=g/Y,x=f/2,D=g/2,w=t/2;g=W+1;var y=Y+1,Fa=f=0,S,F,z=new n;for(F=0;Fg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function lb(a,b,c){Va.call(this,a,b,c)}function zb(a,b,c,d,e,f,g,h,k,m,r,p){V.call(this,null,f,g,h,k,m,d,e,r,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Ya(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== -b?b:0}function Ed(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ya,void 0!==b?b:new Ya,void 0!==c?c:new Ya,void 0!==d?d:new Ya,void 0!==e?e:new Ya,void 0!==f?f:new Ya]}function re(){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 mg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer(); +new mb(c,c,d);this.renderTarget.texture.name="CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,r=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,h);a.setRenderTarget(d,4);a.render(b,k);d.texture.generateMipmaps=r;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)}; +this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function mb(a,b,c){Wa.call(this,a,b,c)}function Cb(a,b,c,d,e,f,g,h,k,m,r,p){V.call(this,null,f,g,h,k,m,d,e,r,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Ya(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== +b?b:0}function Ld(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ya,void 0!==b?b:new Ya,void 0!==c?c:new Ya,void 0!==d?d:new Ya,void 0!==e?e:new Ya,void 0!==f?f:new Ya]}function ze(){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 wg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer(); a.bindBuffer(c,h);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:h,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&& (a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.versionm;m++){if(p=d[m])if(h=p[0],k=p[1]){r&&e.addAttribute("morphTarget"+m,r[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function xg(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function db(a,b,c,d,e,f,g,h,k,m){a= -void 0!==a?a:[];V.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,k,m);this.flipY=!1}function Vb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function Wb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function Xb(a,b,c){var d=a[0];if(0>=d||0/gm,function(a,c){a=U[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return te(a)})}function yf(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c< -parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]").replace(/UNROLLED_LOOP_INDEX/g,c);return a})}function ih(a,b,c,d,e,f,g){var h=a.getContext(),k=d.defines,m=e.vertexShader,r=e.fragmentShader,p="SHADOWMAP_TYPE_BASIC";1===f.shadowMapType?p="SHADOWMAP_TYPE_PCF":2===f.shadowMapType&&(p="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",l="ENVMAP_MODE_REFLECTION",q="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV"; -break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case 302:case 304:l="ENVMAP_MODE_REFRACTION"}switch(d.combine){case 0:q="ENVMAP_BLENDING_MULTIPLY";break;case 1:q="ENVMAP_BLENDING_MIX";break;case 2:q="ENVMAP_BLENDING_ADD"}}var v=0m;m++){if(p=d[m])if(h=p[0],k=p[1]){r&&e.addAttribute("morphTarget"+m,r[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Hg(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function eb(a,b,c,d,e,f,g,h,k,m){a= +void 0!==a?a:[];V.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,k,m);this.flipY=!1}function Zb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function $b(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function ac(a,b,c){var d=a[0];if(0>=d||0/gm,function(a,c){a=U[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Be(a)})}function Hf(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c< +parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]").replace(/UNROLLED_LOOP_INDEX/g,c);return a})}function sh(a,b,c,d,e,f,g){var h=a.getContext(),k=d.defines,m=e.vertexShader,r=e.fragmentShader,p="SHADOWMAP_TYPE_BASIC";1===f.shadowMapType?p="SHADOWMAP_TYPE_PCF":2===f.shadowMapType&&(p="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",l="ENVMAP_MODE_REFLECTION",q="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV"; +break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case 302:case 304:l="ENVMAP_MODE_REFRACTION"}switch(d.combine){case 0:q="ENVMAP_BLENDING_MULTIPLY";break;case 1:q="ENVMAP_BLENDING_MIX";break;case 2:q="ENVMAP_BLENDING_ADD"}}var v=0c;c++)b.probe.push(new n);var d=new n,e=new Q,f=new Q;return{setup:function(c,h,k){for(var g=0,r=0,p=0,u=0;9>u;u++)b.probe[u].set(0, -0,0);var l=h=0,q=0,v=0,n=0,y=0,w=0,F=0;k=k.matrixWorldInverse;c.sort(qh);u=0;for(var z=c.length;uya;ya++)b.probe[ya].addScaledVector(D.sh.coefficients[ya],Y);else if(D.isDirectionalLight){var H=a.get(D);H.color.copy(D.color).multiplyScalar(D.intensity);H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); -H.direction.sub(d);H.direction.transformDirection(k);if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.directionalShadowMap[h]=ya,b.directionalShadowMatrix[h]=D.shadow.matrix,y++;b.directional[h]=H;h++}else if(D.isSpotLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(W).multiplyScalar(Y);H.distance=C;H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); -H.direction.sub(d);H.direction.transformDirection(k);H.coneCos=Math.cos(D.angle);H.penumbraCos=Math.cos(D.angle*(1-D.penumbra));H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.spotShadowMap[q]=ya,b.spotShadowMatrix[q]=D.shadow.matrix,F++;b.spot[q]=H;q++}else if(D.isRectAreaLight)H=a.get(D),H.color.copy(W).multiplyScalar(Y),H.position.setFromMatrixPosition(D.matrixWorld),H.position.applyMatrix4(k),f.identity(),e.copy(D.matrixWorld), +0,0);var l=h=0,q=0,v=0,n=0,y=0,w=0,F=0;k=k.matrixWorldInverse;c.sort(Ah);u=0;for(var z=c.length;uza;za++)b.probe[za].addScaledVector(D.sh.coefficients[za],Y);else if(D.isDirectionalLight){var H=a.get(D);H.color.copy(D.color).multiplyScalar(D.intensity);H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); +H.direction.sub(d);H.direction.transformDirection(k);if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.directionalShadowMap[h]=za,b.directionalShadowMatrix[h]=D.shadow.matrix,y++;b.directional[h]=H;h++}else if(D.isSpotLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(W).multiplyScalar(Y);H.distance=C;H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); +H.direction.sub(d);H.direction.transformDirection(k);H.coneCos=Math.cos(D.angle);H.penumbraCos=Math.cos(D.angle*(1-D.penumbra));H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.spotShadowMap[q]=za,b.spotShadowMatrix[q]=D.shadow.matrix,F++;b.spot[q]=H;q++}else if(D.isRectAreaLight)H=a.get(D),H.color.copy(W).multiplyScalar(Y),H.position.setFromMatrixPosition(D.matrixWorld),H.position.applyMatrix4(k),f.identity(),e.copy(D.matrixWorld), e.premultiply(k),f.extractRotation(e),H.halfWidth.set(.5*D.width,0,0),H.halfHeight.set(0,.5*D.height,0),H.halfWidth.applyMatrix4(f),H.halfHeight.applyMatrix4(f),b.rectArea[v]=H,v++;else if(D.isPointLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(D.color).multiplyScalar(D.intensity);H.distance=D.distance;H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,H.shadowCameraNear= -Y.camera.near,H.shadowCameraFar=Y.camera.far,b.pointShadowMap[l]=ya,b.pointShadowMatrix[l]=D.shadow.matrix,w++;b.point[l]=H;l++}else D.isHemisphereLight&&(H=a.get(D),H.direction.setFromMatrixPosition(D.matrixWorld),H.direction.transformDirection(k),H.direction.normalize(),H.skyColor.copy(D.color).multiplyScalar(Y),H.groundColor.copy(D.groundColor).multiplyScalar(Y),b.hemi[n]=H,n++)}b.ambient[0]=g;b.ambient[1]=r;b.ambient[2]=p;c=b.hash;if(c.directionalLength!==h||c.pointLength!==l||c.spotLength!== +Y.camera.near,H.shadowCameraFar=Y.camera.far,b.pointShadowMap[l]=za,b.pointShadowMatrix[l]=D.shadow.matrix,w++;b.point[l]=H;l++}else D.isHemisphereLight&&(H=a.get(D),H.direction.setFromMatrixPosition(D.matrixWorld),H.direction.transformDirection(k),H.direction.normalize(),H.skyColor.copy(D.color).multiplyScalar(Y),H.groundColor.copy(D.groundColor).multiplyScalar(Y),b.hemi[n]=H,n++)}b.ambient[0]=g;b.ambient[1]=r;b.ambient[2]=p;c=b.hash;if(c.directionalLength!==h||c.pointLength!==l||c.spotLength!== q||c.rectAreaLength!==v||c.hemiLength!==n||c.numDirectionalShadows!==y||c.numPointShadows!==w||c.numSpotShadows!==F)b.directional.length=h,b.spot.length=q,b.rectArea.length=v,b.point.length=l,b.hemi.length=n,b.directionalShadowMap.length=y,b.pointShadowMap.length=w,b.spotShadowMap.length=F,b.directionalShadowMatrix.length=y,b.pointShadowMatrix.length=w,b.spotShadowMatrix.length=F,c.directionalLength=h,c.pointLength=l,c.spotLength=q,c.rectAreaLength=v,c.hemiLength=n,c.numDirectionalShadows=y,c.numPointShadows= -w,c.numSpotShadows=F,b.version=sh++},state:b}}function Af(){var a=new rh,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 th(){function a(c){c=c.target;c.removeEventListener("dispose",a);delete b[c.id]}var b={};return{get:function(c,d){if(void 0===b[c.id]){var e=new Af;b[c.id]={};b[c.id][d.id]=e;c.addEventListener("dispose",a)}else void 0=== -b[c.id][d.id]?(e=new Af,b[c.id][d.id]=e):e=b[c.id][d.id];return e},dispose:function(){b={}}}}function nb(a){O.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.lights=this.fog=!1;this.setValues(a)}function ob(a){O.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.lights=this.fog=!1;this.setValues(a)}function Bf(a,b,c){function d(b,c,d,e,f,g){var h=b.geometry;var k=p;var m=b.customDepthMaterial;d&&(k=l,m=b.customDistanceMaterial);m?k=m:(m=!1,c.morphTargets&&(h&&h.isBufferGeometry?m=h.morphAttributes&&h.morphAttributes.position&&0d||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 +w[b]=0);z={};A=D=null;J={};Ha=S=C=W=null;t.reset();q.reset();v.reset()}}}function Fh(a,b,c,d,e,f,g){function h(a,b){return Qc?new OffscreenCanvas(a,b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function k(a,b,c,d){var e=1;if(a.width>d||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?M.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===H&&(H=h(b,e)),c=c?h(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 M.isPowerOfTwo(a.width)&&M.isPowerOfTwo(a.height)}function r(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 l(a,c){if(!e.isWebGL2)return a;var d=a;6403===a&&(5126===c&&(d=33326),5131===c&&(d=33325),5121===c&&(d=33321));6407===a&&(5126===c&&(d=34837),5131===c&&(d=34843),5121===c&&(d=32849));6408===a&&(5126===c&&(d=34836),5131===c&&(d=34842),5121===c&&(d=32856));33325===d||33326===d||34842===d||34836===d?b.get("EXT_color_buffer_float"):(34843===d||34837===d)&& -console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return d}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&&delete ya[b.id];g.memory.textures--}function v(b){b=b.target;b.removeEventListener("dispose",v);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.isWebGLRenderTargetCube)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=a.id,h=g.render.frame;ya[f]!==h&&(ya[f]=h,a.update())}if(0< +console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return d}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&&delete za[b.id];g.memory.textures--}function v(b){b=b.target;b.removeEventListener("dispose",v);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.isWebGLRenderTargetCube)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=a.id,h=g.render.frame;za[f]!==h&&(za[f]=h,a.update())}if(0< a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{D(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function y(b,g){var h=d.get(b);if(6===b.image.length)if(0q;q++)t[q]=g||u?u?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,e.maxCubemapSize);var v=t[0],n=m(v)||e.isWebGL2,x=f.convert(b.format),D=f.convert(b.type),S=l(x,D);F(34067,b,n);for(q=0;6>q;q++)if(g)for(var w,y=t[q].mipmaps,Fa=0,H=y.length;Fa=e.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+e.maxTextures);E+=1;return a};this.resetTextureUnits=function(){E=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0q;q++)h.__webglFramebuffer[q]=a.createFramebuffer();else if(h.__webglFramebuffer=a.createFramebuffer(),q)if(e.isWebGL2){h.__webglMultisampledFramebuffer= a.createFramebuffer();h.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,h.__webglColorRenderbuffer);q=f.convert(b.texture.format);var x=f.convert(b.texture.type);q=l(q,x);x=C(b);a.renderbufferStorageMultisample(36161,x,q,b.width,b.height);a.bindFramebuffer(36160,h.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,h.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);b.depthBuffer&&(h.__webglDepthRenderbuffer=a.createRenderbuffer(),Y(h.__webglDepthRenderbuffer, @@ -142,45 +141,45 @@ null);if(b.depthBuffer){h=d.get(b);k=!0===b.isWebGLRenderTargetCube;if(b.depthTe 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);h=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,h,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,h,0);else throw Error("Unknown depthTexture format");}else if(k)for(h.__webglDepthbuffer=[],k=0;6>k;k++)a.bindFramebuffer(36160,h.__webglFramebuffer[k]), h.__webglDepthbuffer[k]=a.createRenderbuffer(),Y(h.__webglDepthbuffer[k],b);else a.bindFramebuffer(36160,h.__webglFramebuffer),h.__webglDepthbuffer=a.createRenderbuffer(),Y(h.__webglDepthbuffer,b);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,f=m(a)||e.isWebGL2;if(r(b,f)){f=a.isWebGLRenderTargetCube?34067:3553;var g=d.get(b).__webglTexture;c.bindTexture(f,g);p(f,b,a.width,a.height);c.bindTexture(f,null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(e.isWebGL2){var c= d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var f=b.height,g=16384;b.depthBuffer&&(g|=256);b.stencilBuffer&&(g|=1024);a.blitFramebuffer(0,0,c,f,0,0,c,f,g,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&(!1===G&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."), -G=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?y(a,b):w(a,b)}}function Df(a,b,c){return{convert:function(a){if(1E3===a)return 10497;if(1001===a)return 33071;if(1002===a)return 33648;if(1003===a)return 9728;if(1004===a)return 9984; +G=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?y(a,b):w(a,b)}}function Mf(a,b,c){return{convert:function(a){if(1E3===a)return 10497;if(1001===a)return 33071;if(1002===a)return 33648;if(1003===a)return 9728;if(1004===a)return 9984; if(1005===a)return 9986;if(1006===a)return 9729;if(1007===a)return 9985;if(1008===a)return 9987;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(c.isWebGL2)return 5131;var d=b.get("OES_texture_half_float");if(null!==d)return d.HALF_FLOAT_OES}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(100===a)return 32774;if(101===a)return 32778;if(102===a)return 32779;if(200===a)return 0;if(201===a)return 1;if(202===a)return 768;if(203===a)return 769;if(204===a)return 770;if(205===a)return 771;if(206===a)return 772;if(207===a)return 773;if(208===a)return 774;if(209===a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"), null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196=== a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;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)if(d=b.get("WEBGL_compressed_texture_astc"),null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042; -d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Yb(){G.call(this);this.type="Group"}function Oc(a){la.call(this);this.cameras=a||[]}function Ef(a,b,c){Ff.setFromMatrixPosition(b.matrixWorld);Gf.setFromMatrixPosition(c.matrixWorld);var d=Ff.distanceTo(Gf),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],k=(e[9]-1)/e[5],m=(e[8]-1)/e[0],r=(f[8]+1)/f[0];e=g*m;f=g*r;r=d/(-m+r);m=r*-m;b.matrixWorld.decompose(a.position, -a.quaternion,a.scale);a.translateX(m);a.translateZ(r);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+r;g=c+r;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,k*c/g*b,b,g)}function ue(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*t;f=c.renderHeight*t;W=a.getPixelRatio();a.getSize(D);a.setDrawingBufferSize(e,f,1);w.viewport.set(0,0,e/2,f);F.viewport.set(e/2, +d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function bc(){G.call(this);this.type="Group"}function Vc(a){la.call(this);this.cameras=a||[]}function Nf(a,b,c){Of.setFromMatrixPosition(b.matrixWorld);Pf.setFromMatrixPosition(c.matrixWorld);var d=Of.distanceTo(Pf),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],k=(e[9]-1)/e[5],m=(e[8]-1)/e[0],r=(f[8]+1)/f[0];e=g*m;f=g*r;r=d/(-m+r);m=r*-m;b.matrixWorld.decompose(a.position, +a.quaternion,a.scale);a.translateX(m);a.translateZ(r);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+r;g=c+r;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,k*c/g*b,b,g)}function Ce(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*t;f=c.renderHeight*t;W=a.getPixelRatio();a.getSize(D);a.setDrawingBufferSize(e,f,1);w.viewport.set(0,0,e/2,f);F.viewport.set(e/2, 0,e/2,f);E.start();g.dispatchEvent({type:"sessionstart"})}else g.enabled&&a.setDrawingBufferSize(D.width,D.height,W),E.stop(),g.dispatchEvent({type:"sessionend"})}function d(a,b){null!==b&&4===b.length&&a.set(b[0]*e,b[1]*f,b[2]*e,b[3]*f)}var e,f,g=this,h=null,k=null,m=null,r=[],p=new Q,l=new Q,t=1,q="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(k=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var v=new Q,x=new ja,y=new n,w=new la;w.viewport=new ha; -w.layers.enable(1);var F=new la;F.viewport=new ha;F.layers.enable(2);var z=new Oc([w,F]);z.layers.enable(1);z.layers.enable(2);var D=new C,W,Y=[];this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new Yb,b.matrixAutoUpdate=!1,b.visible=!1,r[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);E.setContext(a)};this.setFramebufferScaleFactor=function(a){t=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!== +w.layers.enable(1);var F=new la;F.viewport=new ha;F.layers.enable(2);var z=new Vc([w,F]);z.layers.enable(1);z.layers.enable(2);var D=new C,W,Y=[];this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new bc,b.matrixAutoUpdate=!1,b.visible=!1,r[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);E.setContext(a)};this.setFramebufferScaleFactor=function(a){t=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!== a&&(m=a)};this.getCamera=function(a){var c="local-floor"===q?1.6:0;if(!1===b())return a.position.set(0,c,0),a.rotation.set(0,0,0),a;h.depthNear=a.near;h.depthFar=a.far;h.getFrameData(k);if("local-floor"===q){var e=h.stageParameters;e?p.fromArray(e.sittingToStandingTransform):p.makeTranslation(0,c,0)}c=k.pose;e=null!==m?m:a;e.matrix.copy(p);e.matrix.decompose(e.position,e.quaternion,e.scale);null!==c.orientation&&(x.fromArray(c.orientation),e.quaternion.multiply(x));null!==c.position&&(x.setFromRotationMatrix(p), y.fromArray(c.position),y.applyQuaternion(x),e.position.add(y));e.updateMatrixWorld();w.near=a.near;F.near=a.near;w.far=a.far;F.far=a.far;w.matrixWorldInverse.fromArray(k.leftViewMatrix);F.matrixWorldInverse.fromArray(k.rightViewMatrix);l.getInverse(p);"local-floor"===q&&(w.matrixWorldInverse.multiply(l),F.matrixWorldInverse.multiply(l));a=e.parent;null!==a&&(v.getInverse(a.matrixWorld),w.matrixWorldInverse.multiply(v),F.matrixWorldInverse.multiply(v));w.matrixWorld.getInverse(w.matrixWorldInverse); -F.matrixWorld.getInverse(F.matrixWorldInverse);w.projectionMatrix.fromArray(k.leftProjectionMatrix);F.projectionMatrix.fromArray(k.rightProjectionMatrix);Ef(z,w,F);a=h.getLayers();a.length&&(a=a[0],d(w.viewport,a.leftBounds),d(F.viewport,a.rightBounds));a:for(a=0;af.matrixWorld.determinant();ea.setMaterial(e, -h);var k=l(a,c,e,f),m=!1;if(b!==d.id||U!==k.id||R!==(!0===e.wireframe))b=d.id,U=k.id,R=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(Aa.update(f,d,e,k),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c=2);a=Ba;if(null!==h){var p=ua.get(h);a=Da;a.setIndex(p)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ga.isWebGL2&&null===na.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); +h);var k=l(a,c,e,f),m=!1;if(b!==d.id||U!==k.id||R!==(!0===e.wireframe))b=d.id,U=k.id,R=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(Aa.update(f,d,e,k),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c=2);a=Ca;if(null!==h){var p=ua.get(h);a=Da;a.setIndex(p)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ga.isWebGL2&&null===na.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); else{ea.initAttributes();m=d.attributes;k=k.getAttributes();var u=e.defaultAttributeValues;for(z in k){var q=k[z];if(0<=q){var t=m[z];if(void 0!==t){var n=t.normalized,v=t.itemSize,x=ua.get(t);if(void 0!==x){var D=x.buffer,w=x.type;x=x.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,F=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(ea.enableAttributeAndDivisor(q,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):ea.enableAttribute(q); L.bindBuffer(34962,D);L.vertexAttribPointer(q,v,w,n,F*x,t*x)}else t.isInstancedBufferAttribute?(ea.enableAttributeAndDivisor(q,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):ea.enableAttribute(q),L.bindBuffer(34962,D),L.vertexAttribPointer(q,v,w,n,0,0)}}else if(void 0!==u&&(n=u[z],void 0!==n))switch(n.length){case 2:L.vertexAttrib2fv(q,n);break;case 3:L.vertexAttrib3fv(q,n);break;case 4:L.vertexAttrib4fv(q,n);break;default:L.vertexAttrib1fv(q,n)}}}ea.disableUnusedAttributes()}null!== h&&L.bindBuffer(34963,p.buffer)}p=Infinity;null!==h?p=h.count:void 0!==r&&(p=r.count);h=d.drawRange.start*c;r=null!==g?g.start*c:0;var z=Math.max(h,r);g=Math.max(0,Math.min(p,h+d.drawRange.count*c,r+(null!==g?g.count*c:Infinity))-1-z+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ea.setLineWidth(e.wireframeLinewidth*(null===Ha?da:1)),a.setMode(1);else switch(f.drawMode){case 0:a.setMode(4);break;case 1:a.setMode(5);break;case 2:a.setMode(6)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ea.setLineWidth(e* (null===Ha?da:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0c;c++){var p=r[h[c]];var l=r[h[(c+1)%3]];f[0]=Math.min(p,l);f[1]=Math.max(p,l);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;r=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:r.count,materialIndex:0}]); a=0;for(e=t.length;ac;c++)p=r.getX(m+c),l=r.getX(m+(c+1)%3),f[0]=Math.min(p,l),f[1]=Math.max(p,l),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k, -g),b.push(h.x,h.y,h.z);this.addAttribute("position",new E(b,3))}function Vc(a,b,c){P.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new cc(a,b,c));this.mergeVertices()}function cc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,r=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); +g),b.push(h.x,h.y,h.z);this.addAttribute("position",new E(b,3))}function bd(a,b,c){P.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new gc(a,b,c));this.mergeVertices()}function gc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,r=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); var q=b+1;for(l=0;l<=c;l++){var v=l/c;for(t=0;t<=b;t++){var x=t/b;a(x,v,k);e.push(k.x,k.y,k.z);0<=x-1E-5?(a(x-1E-5,v,m),r.subVectors(k,m)):(a(x+1E-5,v,m),r.subVectors(m,k));0<=v-1E-5?(a(x,v-1E-5,m),p.subVectors(k,m)):(a(x,v+1E-5,m),p.subVectors(m,k));h.crossVectors(r,p).normalize();f.push(h.x,h.y,h.z);g.push(x,v)}}for(l=0;ld&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}B.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a, +new E(f,3));this.addAttribute("uv",new E(g,2))}function cd(a,b,c,d){P.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Aa(a,b,c,d));this.mergeVertices()}function Aa(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[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 h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;he&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new E(h,3));this.addAttribute("normal",new E(h.slice(),3));this.addAttribute("uv",new E(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xc(a, -b){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(a,b){Aa.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 Yc(a,b){P.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Cb(a,b));this.mergeVertices()}function Cb(a,b){Aa.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 Zc(a,b){P.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 $c(a,b){P.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 ad(a,b,c,d,e,f){P.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 Db(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Db(a,b,c,d,e){function f(e){r=a.getPointAt(e/b,r);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=r.x+c*k.x;h.y=r.y+c*k.y;h.z= +k[y+1]);f.set(k[y+2],k[y+3]);l.set(k[y+4],k[y+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,y+0,a,w);g(f,y+2,b,w);g(l,y+4,c,w)}for(a=0;ae&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new E(h,3));this.addAttribute("normal",new E(h.slice(),3));this.addAttribute("uv",new E(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function dd(a, +b){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new hc(a,b));this.mergeVertices()}function hc(a,b){Aa.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 ed(a,b){P.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Fb(a,b));this.mergeVertices()}function Fb(a,b){Aa.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 fd(a,b){P.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ic(a,b));this.mergeVertices()}function ic(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 gd(a,b){P.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new jc(a,b));this.mergeVertices()}function jc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 hd(a,b,c,d,e,f){P.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 Gb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Gb(a,b,c,d,e){function f(e){r=a.getPointAt(e/b,r);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=r.x+c*k.x;h.y=r.y+c*k.y;h.z= r.z+c*k.z;t.push(h.x,h.y,h.z)}}B.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 h=new n,k=new n,m=new C,r=new n,p,l,t=[],q=[],v=[],x=[];for(p=0;p=b;e-=d)f=Kf(e,a[e],a[e+1],f);f&&Eb(f,f.next)&&(dd(f),f=f.next);return f}function ed(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Eb(a,a.next)&&0!==ca(a.prev,a,a.next))a=a.next;else{dd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} -function fd(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=ye(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,r,p,l,t=1;do{k=h;var q=h=null;for(r=0;k;){r++;var n=k;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&&(r=!r),q=q.next;while(q!==k);q=r}k=q}if(k){a=Mf(g,h);g=ed(g,g.next);a=ed(a,a.next);fd(g,b,c,d,e,f);fd(a,b,c,d,e,f);break a}h= -h.next}g=g.next}while(g!==a)}break}}}}function wh(a,b,c,d){var e=a.prev,f=a.next;if(0<=ca(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,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=ye(e.x=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&ic(e.x,e.y,a.x,a.y, -f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function xh(a,b){return a.x-b.x}function yh(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 h=c.x=c.x&&c.x>=g&&d!==c.x&&ic(eh.x)&&gd(c,a)&&(h=c,m=r)}c=c.next}return h}function ye(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 zh(a){var b=a,c=a;do{if(b.xca(a.prev,a,a.next)?0<=ca(a,b,a.next)&&0<=ca(a,a.prev,b):0>ca(a,b,a.prev)||0>ca(a,a.next,b)}function Mf(a,b){var c=new ze(a.i,a.x,a.y),d=new ze(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 Kf(a,b,c,d){a=new ze(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 dd(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 ze(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 Nf(a){var b=a.length;2=b;e-=d)f=Tf(e,a[e],a[e+1],f);f&&Hb(f,f.next)&&(kd(f),f=f.next);return f}function ld(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Hb(a,a.next)&&0!==ca(a.prev,a,a.next))a=a.next;else{kd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} +function md(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=Ge(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,r,p,l,t=1;do{k=h;var q=h=null;for(r=0;k;){r++;var n=k;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&&(r=!r),q=q.next;while(q!==k);q=r}k=q}if(k){a=Vf(g,h);g=ld(g,g.next);a=ld(a,a.next);md(g,b,c,d,e,f);md(a,b,c,d,e,f);break a}h= +h.next}g=g.next}while(g!==a)}break}}}}function Gh(a,b,c,d){var e=a.prev,f=a.next;if(0<=ca(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,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=Ge(e.x=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&mc(e.x,e.y,a.x,a.y, +f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Hh(a,b){return a.x-b.x}function Ih(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 h=c.x=c.x&&c.x>=g&&d!==c.x&&mc(eh.x)&&nd(c,a)&&(h=c,m=r)}c=c.next}return h}function Ge(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 Jh(a){var b=a,c=a;do{if(b.xca(a.prev,a,a.next)?0<=ca(a,b,a.next)&&0<=ca(a,a.prev,b):0>ca(a,b,a.prev)||0>ca(a,a.next,b)}function Vf(a,b){var c=new He(a.i,a.x,a.y),d=new He(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 Tf(a,b,c,d){a=new He(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 kd(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 He(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 Wf(a){var b=a.length;2Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new C(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(h)):(f=d,d=e,e=Math.sqrt(h/2));return new C(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=w+2*E;for(g=0;gl;l++){var p=m[f[l]];var n=m[f[(l+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}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.addAttribute("position",new E(c,3))}function Ib(a,b,c,d, -e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new fb(a,b,c,d,e,f,g,h));this.mergeVertices()}function fb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,r=0,v=!0===c?a:b,w=!0===c?1:-1;var E=q;for(e=1;e<=d;e++)p.push(0,x*w,0),u.push(0,w,0),t.push(.5,.5),q++;var H=q;for(e=0;e<=d;e++){var A=e/d*h+g,B=Math.cos(A);A=Math.sin(A);k.x=v*A;k.y=x*w; +d[l+0]=d[c+l+0]=g.x,d[l+1]=d[c+l+1]=g.y,d[l+2]=d[c+l+2]=g.z}function Jb(a,b){P.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new Kb(a,b));this.mergeVertices()}function Kb(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,l=a.holes;!1===fb.isClockWise(m)&&(m=m.reverse());a=0;for(c=l.length;al;l++){var p=m[f[l]];var n=m[f[(l+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}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.addAttribute("position",new E(c,3))}function Lb(a,b,c,d, +e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new gb(a,b,c,d,e,f,g,h));this.mergeVertices()}function gb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,r=0,v=!0===c?a:b,w=!0===c?1:-1;var E=q;for(e=1;e<=d;e++)p.push(0,x*w,0),u.push(0,w,0),t.push(.5,.5),q++;var H=q;for(e=0;e<=d;e++){var A=e/d*h+g,B=Math.cos(A);A=Math.sin(A);k.x=v*A;k.y=x*w; k.z=v*B;p.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*B+.5;f.y=.5*A*w+.5;t.push(f.x,f.y);q++}for(e=0;ethis.duration&&this.resetDuration()}function Bh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return pc;case "vector":case "vector2":case "vector3":case "vector4":return qc; -case "color":return Od;case "quaternion":return pd;case "bool":case "boolean":return Nd;case "string":return Qd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Ch(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Bh(a.type);if(void 0===a.times){var c=[],d=[];fa.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 Ae(a,b,c){var d=this,e= -!1,f=0,g=0,h=void 0;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 h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Na(a){this.manager=void 0!==a?a:Ba}function Rf(a){this.manager= -void 0!==a?a:Ba}function Sf(a){this.manager=void 0!==a?a:Ba;this._parser=null}function Be(a){this.manager=void 0!==a?a:Ba;this._parser=null}function qd(a){this.manager=void 0!==a?a:Ba}function Ce(a){this.manager=void 0!==a?a:Ba}function Rd(a){this.manager=void 0!==a?a:Ba}function J(){this.type="Curve";this.arcLengthDivisions=200}function Ca(a,b,c,d,e,f,g,h){J.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2* -Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function rc(a,b,c,d,e,f){Ca.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function De(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function xa(a,b,c,d){J.call(this); -this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Tf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function rd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function sd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Oa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function bb(a, -b,c,d){J.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){J.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Pa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Qa(a,b,c){J.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function cb(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b|| -new n;this.v2=c||new n}function Ra(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function gb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Sa(a){gb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function sb(a){Sa.call(this,a);this.uuid=M.generateUUID();this.type="Shape";this.holes=[]}function Z(a,b){G.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Sd(a,b,c){Z.call(this, -a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function Qb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new Q}function Td(){Qb.call(this,new la(50,1,.5,500))}function Ud(a,b,c,d,e,f){Z.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity* -Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Td}function Vd(a,b,c,d){Z.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Qb(new la(90,1,.5,500))}function td(a,b,c,d,e,f){Xa.call(this); -this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Wd(){Qb.call(this,new td(-5,5,5,-5,.5,500))}function Xd(a,b){Z.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new Wd}function Yd(a,b){Z.call(this,a,b);this.type="AmbientLight"; -this.castShadow=void 0}function Zd(a,b,c,d){Z.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function $d(a){this.manager=void 0!==a?a:Ba;this.textures={}}function ae(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function be(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute= -d||1}function Ee(a){this.manager=void 0!==a?a:Ba}function Fe(a){this.manager=void 0!==a?a:Ba;this.resourcePath=""}function Ge(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ba;this.options=void 0}function He(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Ie(a){this.type= -"Font";this.data=a}function Uf(a){this.manager=void 0!==a?a:Ba}function ud(){}function Je(a){this.manager=void 0!==a?a:Ba}function ce(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ta(a,b){Z.call(this,void 0,b);this.sh=void 0!==a?a:new ce}function Ke(a,b,c){Ta.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 Le(a,b){Ta.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 Vf(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new la;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new la;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Me(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ne(){G.call(this); -this.type="AudioListener";this.context=Oe.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function sc(a){G.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.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty"; -this.filters=[]}function Pe(a){sc.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Qe(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 Re(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 Wf(a,b,c){c=c||ra.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ra(a,b,c){this.path=b;this.parsedPath=c||ra.parseTrackName(b);this.node=ra.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function Xf(){this.uuid=M.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 Yf(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 Se(a){this._root=a;this._initMemoryManager(); -this.time=this._accuIndex=0;this.timeScale=1}function de(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Te(a,b,c){Bb.call(this,a,b);this.meshPerAttribute=c||1}function Zf(a,b,c,d){this.ray=new vb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},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 $f(a,b){return a.distance-b.distance}function Ue(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!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.addAttribute("position",new E(b,3));b=new R({fog:!1});this.cone=new aa(a,b);this.add(this.cone);this.update()}function cg(a){var b=[];a&&a.isBone&&b.push(a);for(var c= -0;cthis.duration&&this.resetDuration()}function Lh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return tc;case "vector":case "vector2":case "vector3":case "vector4":return uc; +case "color":return Vd;case "quaternion":return wd;case "bool":case "boolean":return Ud;case "string":return Xd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Mh(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Lh(a.type);if(void 0===a.times){var c=[],d=[];fa.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 Ie(a,b,c){var d=this,e= +!1,f=0,g=0,h=void 0;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 h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Oa(a){this.manager=void 0!==a?a:Ca}function $f(a){this.manager= +void 0!==a?a:Ca}function ag(a){this.manager=void 0!==a?a:Ca;this._parser=null}function Je(a){this.manager=void 0!==a?a:Ca;this._parser=null}function xd(a){this.manager=void 0!==a?a:Ca}function Ke(a){this.manager=void 0!==a?a:Ca}function Yd(a){this.manager=void 0!==a?a:Ca}function J(){this.type="Curve";this.arcLengthDivisions=200}function ya(a,b,c,d,e,f,g,h){J.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2* +Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function vc(a,b,c,d,e,f){ya.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Le(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function xa(a,b,c,d){J.call(this); +this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function bg(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function yd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function zd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Pa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function bb(a, +b,c,d){J.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){J.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Qa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ra(a,b,c){J.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function cb(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b|| +new n;this.v2=c||new n}function Sa(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function hb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Ta(a){hb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function tb(a){Ta.call(this,a);this.uuid=M.generateUUID();this.type="Shape";this.holes=[]}function Z(a,b){G.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Zd(a,b,c){Z.call(this, +a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function Tb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new Q}function $d(){Tb.call(this,new la(50,1,.5,500))}function ae(a,b,c,d,e,f){Z.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity* +Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new $d}function be(a,b,c,d){Z.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Tb(new la(90,1,.5,500))}function Ad(a,b,c,d,e,f){Xa.call(this); +this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function ce(){Tb.call(this,new Ad(-5,5,5,-5,.5,500))}function de(a,b){Z.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new ce}function ee(a,b){Z.call(this,a,b);this.type="AmbientLight"; +this.castShadow=void 0}function fe(a,b,c,d){Z.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function ge(a){this.manager=void 0!==a?a:Ca;this.textures={}}function he(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ie(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute= +d||1}function Me(a){this.manager=void 0!==a?a:Ca}function Ne(a){this.manager=void 0!==a?a:Ca;this.resourcePath=""}function Oe(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ca;this.options=void 0}function Pe(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Qe(a){this.type= +"Font";this.data=a}function cg(a){this.manager=void 0!==a?a:Ca}function Bd(){}function Re(a){this.manager=void 0!==a?a:Ca}function je(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ua(a,b){Z.call(this,void 0,b);this.sh=void 0!==a?a:new je}function Se(a,b,c){Ua.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 Te(a,b){Ua.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 dg(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new la;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new la;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Ue(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ve(){G.call(this); +this.type="AudioListener";this.context=We.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function wc(a){G.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.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty"; +this.filters=[]}function Xe(a){wc.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ye(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 Ze(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 eg(a,b,c){c=c||ra.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ra(a,b,c){this.path=b;this.parsedPath=c||ra.parseTrackName(b);this.node=ra.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function fg(){this.uuid=M.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 gg(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 $e(a){this._root=a;this._initMemoryManager(); +this.time=this._accuIndex=0;this.timeScale=1}function ke(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function af(a,b,c){Eb.call(this,a,b);this.meshPerAttribute=c||1}function hg(a,b,c,d){this.ray=new yb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},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 ig(a,b){return a.distance-b.distance}function bf(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!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.addAttribute("position",new E(b,3));b=new R({fog:!1});this.cone=new aa(a,b);this.add(this.cone);this.update()}function lg(a){var b=[];a&&a.isBone&&b.push(a);for(var c= +0;ca?-1:0b;b++)a[b]=(16>b?"0":"")+b.toString(16);return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295* @@ -343,33 +342,33 @@ b){var c=a.dot(b)+1;1E-6>c?(c=0,Math.abs(a.x)>Math.abs(a.z)?(this._x=-a.y,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,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;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 h=Math.atan2(a, g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/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(){}});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(){var a=new ja; -return function(b){b&&b.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new ja;return function(b,c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),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},applyMatrix4:function(a){var b= +3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});var Ub,Fc;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){void 0===Fc&&(Fc=new ja);a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(Fc.setFromEuler(a))},applyAxisAngle:function(a,b){void 0===Fc&&(Fc=new ja);return this.applyQuaternion(Fc.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},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 h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*-g+h*-f-k*-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));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b,this.y));this.z=Math.max(a,Math.min(b,this.z));return this},clampLength:function(a,b){var c=this.length();return this.divideScalar(c|| 1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=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.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=new n;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new n;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(M.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b= +projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(a){void 0===Ub&&(Ub=new n);Ub.copy(this).projectOnVector(a);return this.sub(Ub)},reflect:function(a){void 0===Ub&&(Ub=new n);return this.sub(Ub.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(M.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)},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 jb;Object.assign(ka.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements; +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 kb;Object.assign(ka.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements; m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;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},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},applyToBufferAttribute:function(a){void 0=== -jb&&(jb=new n);for(var b=0,c=a.count;bc;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 Bc,tb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===Bc&&(Bc=document.createElementNS("http://www.w3.org/1999/xhtml", -"canvas"));Bc.width=a.width;Bc.height=a.height;var b=Bc.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=Bc}return 2048c;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 Gc,ub={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===Gc&&(Gc=document.createElementNS("http://www.w3.org/1999/xhtml", +"canvas"));Gc.width=a.width;Gc.height=a.height;var b=Gc.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=Gc}return 2048a.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.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(ha.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(ha.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}, @@ -382,8 +381,8 @@ this.y));this.z=Math.max(a,Math.min(b,this.z));this.w=Math.max(a,Math.min(b,this 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}});Va.prototype=Object.assign(Object.create(oa.prototype),{constructor:Va,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"})}});me.prototype=Object.assign(Object.create(Va.prototype),{constructor:me,isWebGLMultisampleRenderTarget:!0,copy:function(a){Va.prototype.copy.call(this,a);this.samples=a.samples;return this}});Object.assign(Q.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,l,p,n,t,q,v){var r=this.elements;r[0]= +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(oa.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"})}});ue.prototype=Object.assign(Object.create(Wa.prototype),{constructor:ue,isWebGLMultisampleRenderTarget:!0,copy:function(a){Wa.prototype.copy.call(this,a);this.samples=a.samples;return this}});Object.assign(Q.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,l,p,n,t,q,v){var r=this.elements;r[0]= a;r[4]=b;r[8]=c;r[12]=d;r[1]=e;r[5]=f;r[9]=g;r[13]=h;r[2]=k;r[6]=m;r[10]=l;r[14]=p;r[3]=n;r[7]=t;r[11]=q;r[15]=v;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 Q).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(){var a=new n;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b, 2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[3]=0;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[7]=0;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[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 h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a= @@ -401,14 +400,14 @@ 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 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,h=b._w,k=e+e,m=f+f,l=g+g;b=e*k;var p=e*m;e*=l;var n=f*m;f*=l;g*=l;k*=h;m*=h;h*=l;l=c.x;var t=c.y;c=c.z;d[0]=(1-(n+g))*l;d[1]=(p+h)*l;d[2]=(e-m)*l;d[3]=0;d[4]=(p-h)*t;d[5]=(1-(b+g))*t;d[6]=(f+k)*t;d[7]=0;d[8]=(e+m)*c;d[9]=(f-k)*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(){var a=new n,b=new Q;return function(c,d,e){var f= this.elements,g=a.set(f[0],f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),k=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;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,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);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 he,ie;ub.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "); -ub.DefaultOrder="XYZ";Object.defineProperties(ub.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(ub.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y= +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 oe,pe;xb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "); +xb.DefaultOrder="XYZ";Object.defineProperties(xb.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(xb.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=M.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],l=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,k),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(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.9999999>Math.abs(p)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l,-1,1)),.9999999>Math.abs(l)?(this._x=Math.atan2(p,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f, -k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.9999999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,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,k),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){void 0===he&&(he=new Q); -he.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(he,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){void 0===ie&&(ie=new ja);ie.setFromEuler(this);return this.setFromQuaternion(ie,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(ne.prototype,{set:function(a){this.mask=1<Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,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,k),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){void 0===oe&&(oe=new Q); +oe.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(oe,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){void 0===pe&&(pe=new ja);pe.setFromEuler(this);return this.setFromQuaternion(pe,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(ve.prototype,{set:function(a){this.mask=1<e&&(e=m);l>f&&(f=l);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,h=0,k=a.count;he&&(e=m);l>f&&(f=l);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;b=-a.constant},inte k);b.subVectors(h.a,k);c.subVectors(h.b,k);d.subVectors(h.c,k);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h=[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0,0,1];if(!a(h))return!1;l.crossVectors(e,f);h=[l.x,l.y,l.z];return a(h)}}(),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(){var a= new n;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new n;return function(b){void 0===b&&console.error("THREE.Box3: .getBoundingSphere() target is now required");this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),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(){var a= [new n,new n,new n,new n,new n,new n,new n,new n];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b); -a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);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 Ze;Object.assign(Wa.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(a,b){void 0===Ze&&(Ze=new Ja);var c=this.center;void 0!==b?c.copy(b):Ze.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 Ja);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}});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); +a=new Ka);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}});Object.assign(yb.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(){var a=new n;return function(b){this.origin.copy(this.at(b,a));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(){var a=new n;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a= new n,b=new n,c=new n;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),p=c.lengthSq(),n=Math.abs(1-k*k);if(0=-t?e<=t?(h=1/n,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+p):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+p):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+p):e<=-t?(d=Math.max(0,-(-k*h+m)),e=0=p&&0>=u)return h.copy(k); e.subVectors(g,m);var t=a.dot(e),q=b.dot(e);if(0<=t&&q<=t)return h.copy(m);var v=p*q-t*u;if(0>=v&&0<=p&&0>=t)return m=p/(p-t),h.copy(k).addScaledVector(a,m);f.subVectors(g,l);g=a.dot(f);var x=b.dot(f);if(0<=x&&g<=x)return h.copy(l);p=g*u-p*x;if(0>=p&&0<=u&&0>=x)return v=u/(u-x),h.copy(k).addScaledVector(b,v);u=t*x-g*q;if(0>=u&&0<=q-t&&0<=g-x)return c.subVectors(l,m),v=(q-t)/(q-t+(g-x)),h.copy(m).addScaledVector(c,v);l=1/(u+p+v);m=p*l;v*=l;return h.copy(k).addScaledVector(a,m).addScaledVector(b,v)}}(), -equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Dh={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, +equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Nh={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};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=M.euclideanModulo(a,1);b=M.clamp(b,0,1);c=M.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=oe(c,b,a+1/3),this.g=oe(c,b,a),this.b=oe(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}a&&0>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=M.euclideanModulo(a,1);b=M.clamp(b,0,1);c=M.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=we(c,b,a+1/3),this.g=we(c,b,a),this.b=we(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}a&&0=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(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.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilMask=this.stencilMask;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);0c.far?null:{distance:b, -point:w.clone(),object:a}}function b(b,c,d,e,r,n,w,A,E,B,G){f.fromBufferAttribute(r,E);g.fromBufferAttribute(r,B);h.fromBufferAttribute(r,G);r=b.morphTargetInfluences;if(c.morphTargets&&n&&r){p.set(0,0,0);u.set(0,0,0);t.set(0,0,0);for(var D=0,F=n.length;D=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(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.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilMask=this.stencilMask;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);0c.far?null:{distance:b,point:w.clone(),object:a}}function b(b, +c,d,e,r,n,w,A,E,B,G){f.fromBufferAttribute(r,E);g.fromBufferAttribute(r,B);h.fromBufferAttribute(r,G);r=b.morphTargetInfluences;if(c.morphTargets&&n&&r){p.set(0,0,0);u.set(0,0,0);t.set(0,0,0);for(var D=0,F=n.length;Dg;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 ta(new kb(5,5,5),d);c.add(b);d=new Ub(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};zb.prototype=Object.create(V.prototype);zb.prototype.constructor=zb;zb.prototype.isDataTexture=!0;Object.assign(Ya.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(){var a=new n,b=new n;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);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(){var a=new n; -return function(b,c){void 0===c&&(console.warn("THREE.Plane: .intersectLine() target is now required"),c=new n);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/e,!(0>e||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix: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], -h=c[5],k=c[6],m=c[7],l=c[8],p=c[9],n=c[10],t=c[11],q=c[12],v=c[13],x=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-l,c-q).normalize();b[1].setComponents(f+a,m+g,t+l,c+q).normalize();b[2].setComponents(f+d,m+h,t+p,c+v).normalize();b[3].setComponents(f-d,m-h,t-p,c-v).normalize();b[4].setComponents(f-e,m-k,t-n,c-x).normalize();b[5].setComponents(f+e,m+k,t+n,c+x).normalize();return this},intersectsObject:function(){var a=new Wa;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere(); -a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Wa;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),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)d;d++){var e=c[d]; -a.x=0e.distanceToPoint(a))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 U={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", +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}});Yb.prototype=Object.create(G.prototype);Yb.prototype.constructor=Yb;mb.prototype=Object.create(Wa.prototype);mb.prototype.constructor=mb;mb.prototype.isWebGLRenderTargetCube=!0;mb.prototype.fromEquirectangularTexture= +function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new Jc,d=new wa({type:"CubemapFromEquirect",uniforms:Bb({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 ta(new lb(5,5,5),d);c.add(b);d=new Yb(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Cb.prototype=Object.create(V.prototype);Cb.prototype.constructor=Cb;Cb.prototype.isDataTexture=!0;var vb,og,hf;Object.assign(Ya.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){void 0===vb&&(vb=new n,og=new n);b=vb.subVectors(c,b).cross(og.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=== +vb&&(vb=new n);void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(vb),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&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix: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],h=c[5],k=c[6],m=c[7],l=c[8],p=c[9],n=c[10],t=c[11],q=c[12],v=c[13],x=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-l,c-q).normalize();b[1].setComponents(f+a,m+g,t+l,c+q).normalize();b[2].setComponents(f+d,m+h,t+p,c+v).normalize();b[3].setComponents(f-d,m-h,t-p,c-v).normalize();b[4].setComponents(f-e,m-k,t-n,c-x).normalize();b[5].setComponents(f+e,m+k,t+n,c+x).normalize();return this},intersectsObject:function(a){void 0===wb&&(wb=new db);var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere(); +wb.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(wb)},intersectsSprite:function(a){wb.center.set(0,0,0);wb.radius=.7071067811865476;wb.applyMatrix4(a.matrixWorld);return this.intersectsSphere(wb)},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];Hc.x=0d.distanceToPoint(Hc))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 U={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( PHYSICAL )\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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, 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_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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.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}", 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", @@ -638,139 +637,139 @@ I={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uv normalScale:{value:new C(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:{},shadow:{},shadowBias:{}, shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},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},uvTransform:{value:new ka}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new C(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new ka}}}, -Za={basic:{uniforms:pa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.fog]),vertexShader:U.meshbasic_vert,fragmentShader:U.meshbasic_frag},lambert:{uniforms:pa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.fog,I.lights,{emissive:{value:new A(0)}}]),vertexShader:U.meshlambert_vert,fragmentShader:U.meshlambert_frag},phong:{uniforms:pa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.gradientmap,I.fog,I.lights,{emissive:{value:new A(0)}, -specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:U.meshphong_vert,fragmentShader:U.meshphong_frag},standard:{uniforms:pa([I.common,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.roughnessmap,I.metalnessmap,I.fog,I.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:U.meshphysical_vert,fragmentShader:U.meshphysical_frag},matcap:{uniforms:pa([I.common,I.bumpmap,I.normalmap,I.displacementmap, -I.fog,{matcap:{value:null}}]),vertexShader:U.meshmatcap_vert,fragmentShader:U.meshmatcap_frag},points:{uniforms:pa([I.points,I.fog]),vertexShader:U.points_vert,fragmentShader:U.points_frag},dashed:{uniforms:pa([I.common,I.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:U.linedashed_vert,fragmentShader:U.linedashed_frag},depth:{uniforms:pa([I.common,I.displacementmap]),vertexShader:U.depth_vert,fragmentShader:U.depth_frag},normal:{uniforms:pa([I.common,I.bumpmap,I.normalmap, -I.displacementmap,{opacity:{value:1}}]),vertexShader:U.normal_vert,fragmentShader:U.normal_frag},sprite:{uniforms:pa([I.sprite,I.fog]),vertexShader:U.sprite_vert,fragmentShader:U.sprite_frag},background:{uniforms:{uvTransform:{value:new ka},t2D:{value:null}},vertexShader:U.background_vert,fragmentShader:U.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:U.cube_vert,fragmentShader:U.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:U.equirect_vert, -fragmentShader:U.equirect_frag},distanceRGBA:{uniforms:pa([I.common,I.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:U.distanceRGBA_vert,fragmentShader:U.distanceRGBA_frag},shadow:{uniforms:pa([I.lights,I.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:U.shadow_vert,fragmentShader:U.shadow_frag}};Za.physical={uniforms:pa([Za.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:U.meshphysical_vert, -fragmentShader:U.meshphysical_frag};Kc.prototype=Object.create(P.prototype);Kc.prototype.constructor=Kc;Ab.prototype=Object.create(B.prototype);Ab.prototype.constructor=Ab;db.prototype=Object.create(V.prototype);db.prototype.constructor=db;db.prototype.isCubeTexture=!0;Object.defineProperty(db.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Vb.prototype=Object.create(V.prototype);Vb.prototype.constructor=Vb;Vb.prototype.isDataTexture2DArray=!0;Wb.prototype=Object.create(V.prototype); -Wb.prototype.constructor=Wb;Wb.prototype.isDataTexture3D=!0;var pf=new V,Hg=new Vb,Jg=new Wb,qf=new db,jf=[],lf=[],of=new Float32Array(16),nf=new Float32Array(9),mf=new Float32Array(4);rf.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));qa(b,a)};sf.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 se=/([\w\d_]+)(\])?(\[|\.)?/g;mb.prototype.setValue= -function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};mb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};mb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};mb.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 jh=0,sh=0;nb.prototype=Object.create(O.prototype);nb.prototype.constructor=nb;nb.prototype.isMeshDepthMaterial=!0; -nb.prototype.copy=function(a){O.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};ob.prototype=Object.create(O.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshDistanceMaterial= -!0;ob.prototype.copy=function(a){O.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};Yb.prototype=Object.assign(Object.create(G.prototype),{constructor:Yb,isGroup:!0});Oc.prototype= -Object.assign(Object.create(la.prototype),{constructor:Oc,isArrayCamera:!0});var Ff=new n,Gf=new n;Object.assign(ue.prototype,oa.prototype);Object.assign(Hf.prototype,oa.prototype);Object.assign(Hd.prototype,{isFogExp2:!0,clone:function(){return new Hd(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Id.prototype,{isFog:!0,clone:function(){return new Id(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog", -color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(Bb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Bb.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==a?a.length/this.stride:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array); -this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;de.far||f.push({distance:q,point:b.clone(),uv:sa.getUV(b,h,k,m,l,p,u,new C),face:null, -object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){G.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});Rc.prototype=Object.assign(Object.create(G.prototype),{constructor:Rc,isLOD:!0,copy:function(a){G.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,q=t.length/3-1;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld), index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});aa.prototype=Object.assign(Object.create(T.prototype), {constructor:aa,isLineSegments:!0,computeLineDistances:function(){var a=new n,b=new n;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:p.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&& +c.vertices,e=c.lineDistances,f=0,g=d.length;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:p.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&& h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var l=m*m;m=new n;var p=new n;if(h.isBufferGeometry){var u=h.index;h=h.attributes.position.array;if(null!==u){var t=u.array;u=0;for(var q=t.length;u=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});ac.prototype=Object.create(V.prototype);ac.prototype.constructor=ac;ac.prototype.isCompressedTexture=!0;Tc.prototype=Object.create(V.prototype);Tc.prototype.constructor=Tc;Tc.prototype.isCanvasTexture=!0;Uc.prototype=Object.create(V.prototype); -Uc.prototype.constructor=Uc;Uc.prototype.isDepthTexture=!0;bc.prototype=Object.create(B.prototype);bc.prototype.constructor=bc;Vc.prototype=Object.create(P.prototype);Vc.prototype.constructor=Vc;cc.prototype=Object.create(B.prototype);cc.prototype.constructor=cc;Wc.prototype=Object.create(P.prototype);Wc.prototype.constructor=Wc;Aa.prototype=Object.create(B.prototype);Aa.prototype.constructor=Aa;Xc.prototype=Object.create(P.prototype);Xc.prototype.constructor=Xc;dc.prototype=Object.create(Aa.prototype); -dc.prototype.constructor=dc;Yc.prototype=Object.create(P.prototype);Yc.prototype.constructor=Yc;Cb.prototype=Object.create(Aa.prototype);Cb.prototype.constructor=Cb;Zc.prototype=Object.create(P.prototype);Zc.prototype.constructor=Zc;ec.prototype=Object.create(Aa.prototype);ec.prototype.constructor=ec;$c.prototype=Object.create(P.prototype);$c.prototype.constructor=$c;fc.prototype=Object.create(Aa.prototype);fc.prototype.constructor=fc;ad.prototype=Object.create(P.prototype);ad.prototype.constructor= -ad;Db.prototype=Object.create(B.prototype);Db.prototype.constructor=Db;Db.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};bd.prototype=Object.create(P.prototype);bd.prototype.constructor=bd;gc.prototype=Object.create(B.prototype);gc.prototype.constructor=gc;cd.prototype=Object.create(P.prototype);cd.prototype.constructor=cd;hc.prototype=Object.create(B.prototype);hc.prototype.constructor=hc;var Fh={triangulate:function(a,b,c){c=c||2;var d= -b&&b.length,e=d?b[0]*c:a.length,f=Jf(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var k=c;d=[];var m;var l=0;for(m=b.length;l80*c){var t=h=a[0];var q=d=a[1];for(k=c;kh&&(h=l),b>d&&(d=b);h=Math.max(h-t,d-q);h=0!==h?1/h: -0}fd(f,g,c,t,q,h);return g}},eb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;eeb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Nf(a);Of(c,a);var f=a.length;b.forEach(Nf);for(a=0;aMath.abs(g-k)?[new C(a,1-c),new C(h,1-d),new C(m,1-e),new C(n,1-b)]:[new C(g,1-c),new C(k,1-d),new C(l,1-e),new C(u,1-b)]}};hd.prototype=Object.create(P.prototype);hd.prototype.constructor=hd;jc.prototype=Object.create($a.prototype);jc.prototype.constructor=jc;id.prototype=Object.create(P.prototype);id.prototype.constructor=id;rb.prototype=Object.create(B.prototype);rb.prototype.constructor= -rb;jd.prototype=Object.create(P.prototype);jd.prototype.constructor=jd;kc.prototype=Object.create(B.prototype);kc.prototype.constructor=kc;kd.prototype=Object.create(P.prototype);kd.prototype.constructor=kd;lc.prototype=Object.create(B.prototype);lc.prototype.constructor=lc;Gb.prototype=Object.create(P.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=function(){var a=P.prototype.toJSON.call(this);return Qf(this.parameters.shapes,a)};Hb.prototype=Object.create(B.prototype);Hb.prototype.constructor= -Hb;Hb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);return Qf(this.parameters.shapes,a)};mc.prototype=Object.create(B.prototype);mc.prototype.constructor=mc;Ib.prototype=Object.create(P.prototype);Ib.prototype.constructor=Ib;fb.prototype=Object.create(B.prototype);fb.prototype.constructor=fb;ld.prototype=Object.create(Ib.prototype);ld.prototype.constructor=ld;md.prototype=Object.create(fb.prototype);md.prototype.constructor=md;nd.prototype=Object.create(P.prototype);nd.prototype.constructor= -nd;nc.prototype=Object.create(B.prototype);nc.prototype.constructor=nc;var va=Object.freeze({WireframeGeometry:bc,ParametricGeometry:Vc,ParametricBufferGeometry:cc,TetrahedronGeometry:Xc,TetrahedronBufferGeometry:dc,OctahedronGeometry:Yc,OctahedronBufferGeometry:Cb,IcosahedronGeometry:Zc,IcosahedronBufferGeometry:ec,DodecahedronGeometry:$c,DodecahedronBufferGeometry:fc,PolyhedronGeometry:Wc,PolyhedronBufferGeometry:Aa,TubeGeometry:ad,TubeBufferGeometry:Db,TorusKnotGeometry:bd,TorusKnotBufferGeometry:gc, -TorusGeometry:cd,TorusBufferGeometry:hc,TextGeometry:hd,TextBufferGeometry:jc,SphereGeometry:id,SphereBufferGeometry:rb,RingGeometry:jd,RingBufferGeometry:kc,PlaneGeometry:Kc,PlaneBufferGeometry:Ab,LatheGeometry:kd,LatheBufferGeometry:lc,ShapeGeometry:Gb,ShapeBufferGeometry:Hb,ExtrudeGeometry:Fb,ExtrudeBufferGeometry:$a,EdgesGeometry:mc,ConeGeometry:ld,ConeBufferGeometry:md,CylinderGeometry:Ib,CylinderBufferGeometry:fb,CircleGeometry:nd,CircleBufferGeometry:nc,BoxGeometry:Tb,BoxBufferGeometry:kb}); -Jb.prototype=Object.create(O.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isShadowMaterial=!0;Jb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);return this};oc.prototype=Object.create(wa.prototype);oc.prototype.constructor=oc;oc.prototype.isRawShaderMaterial=!0;ab.prototype=Object.create(O.prototype);ab.prototype.constructor=ab;ab.prototype.isMeshStandardMaterial=!0;ab.prototype.copy=function(a){O.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color); +clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});Fe.prototype=Object.assign(Object.create(V.prototype),{constructor:Fe,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});ec.prototype=Object.create(V.prototype);ec.prototype.constructor=ec;ec.prototype.isCompressedTexture=!0;$c.prototype=Object.create(V.prototype);$c.prototype.constructor=$c;$c.prototype.isCanvasTexture=!0;ad.prototype=Object.create(V.prototype); +ad.prototype.constructor=ad;ad.prototype.isDepthTexture=!0;fc.prototype=Object.create(B.prototype);fc.prototype.constructor=fc;bd.prototype=Object.create(P.prototype);bd.prototype.constructor=bd;gc.prototype=Object.create(B.prototype);gc.prototype.constructor=gc;cd.prototype=Object.create(P.prototype);cd.prototype.constructor=cd;Aa.prototype=Object.create(B.prototype);Aa.prototype.constructor=Aa;dd.prototype=Object.create(P.prototype);dd.prototype.constructor=dd;hc.prototype=Object.create(Aa.prototype); +hc.prototype.constructor=hc;ed.prototype=Object.create(P.prototype);ed.prototype.constructor=ed;Fb.prototype=Object.create(Aa.prototype);Fb.prototype.constructor=Fb;fd.prototype=Object.create(P.prototype);fd.prototype.constructor=fd;ic.prototype=Object.create(Aa.prototype);ic.prototype.constructor=ic;gd.prototype=Object.create(P.prototype);gd.prototype.constructor=gd;jc.prototype=Object.create(Aa.prototype);jc.prototype.constructor=jc;hd.prototype=Object.create(P.prototype);hd.prototype.constructor= +hd;Gb.prototype=Object.create(B.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};id.prototype=Object.create(P.prototype);id.prototype.constructor=id;kc.prototype=Object.create(B.prototype);kc.prototype.constructor=kc;jd.prototype=Object.create(P.prototype);jd.prototype.constructor=jd;lc.prototype=Object.create(B.prototype);lc.prototype.constructor=lc;var Ph={triangulate:function(a,b,c){c=c||2;var d= +b&&b.length,e=d?b[0]*c:a.length,f=Sf(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var k=c;d=[];var m;var l=0;for(m=b.length;l80*c){var t=h=a[0];var q=d=a[1];for(k=c;kh&&(h=l),b>d&&(d=b);h=Math.max(h-t,d-q);h=0!==h?1/h: +0}md(f,g,c,t,q,h);return g}},fb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;efb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Wf(a);Xf(c,a);var f=a.length;b.forEach(Wf);for(a=0;aMath.abs(g-k)?[new C(a,1-c),new C(h,1-d),new C(m,1-e),new C(n,1-b)]:[new C(g,1-c),new C(k,1-d),new C(l,1-e),new C(u,1-b)]}};od.prototype=Object.create(P.prototype);od.prototype.constructor=od;nc.prototype=Object.create($a.prototype);nc.prototype.constructor=nc;pd.prototype=Object.create(P.prototype);pd.prototype.constructor=pd;sb.prototype=Object.create(B.prototype);sb.prototype.constructor= +sb;qd.prototype=Object.create(P.prototype);qd.prototype.constructor=qd;oc.prototype=Object.create(B.prototype);oc.prototype.constructor=oc;rd.prototype=Object.create(P.prototype);rd.prototype.constructor=rd;pc.prototype=Object.create(B.prototype);pc.prototype.constructor=pc;Jb.prototype=Object.create(P.prototype);Jb.prototype.constructor=Jb;Jb.prototype.toJSON=function(){var a=P.prototype.toJSON.call(this);return Zf(this.parameters.shapes,a)};Kb.prototype=Object.create(B.prototype);Kb.prototype.constructor= +Kb;Kb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);return Zf(this.parameters.shapes,a)};qc.prototype=Object.create(B.prototype);qc.prototype.constructor=qc;Lb.prototype=Object.create(P.prototype);Lb.prototype.constructor=Lb;gb.prototype=Object.create(B.prototype);gb.prototype.constructor=gb;sd.prototype=Object.create(Lb.prototype);sd.prototype.constructor=sd;td.prototype=Object.create(gb.prototype);td.prototype.constructor=td;ud.prototype=Object.create(P.prototype);ud.prototype.constructor= +ud;rc.prototype=Object.create(B.prototype);rc.prototype.constructor=rc;var va=Object.freeze({WireframeGeometry:fc,ParametricGeometry:bd,ParametricBufferGeometry:gc,TetrahedronGeometry:dd,TetrahedronBufferGeometry:hc,OctahedronGeometry:ed,OctahedronBufferGeometry:Fb,IcosahedronGeometry:fd,IcosahedronBufferGeometry:ic,DodecahedronGeometry:gd,DodecahedronBufferGeometry:jc,PolyhedronGeometry:cd,PolyhedronBufferGeometry:Aa,TubeGeometry:hd,TubeBufferGeometry:Gb,TorusKnotGeometry:id,TorusKnotBufferGeometry:kc, +TorusGeometry:jd,TorusBufferGeometry:lc,TextGeometry:od,TextBufferGeometry:nc,SphereGeometry:pd,SphereBufferGeometry:sb,RingGeometry:qd,RingBufferGeometry:oc,PlaneGeometry:Rc,PlaneBufferGeometry:Db,LatheGeometry:rd,LatheBufferGeometry:pc,ShapeGeometry:Jb,ShapeBufferGeometry:Kb,ExtrudeGeometry:Ib,ExtrudeBufferGeometry:$a,EdgesGeometry:qc,ConeGeometry:sd,ConeBufferGeometry:td,CylinderGeometry:Lb,CylinderBufferGeometry:gb,CircleGeometry:ud,CircleBufferGeometry:rc,BoxGeometry:Xb,BoxBufferGeometry:lb}); +Mb.prototype=Object.create(O.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isShadowMaterial=!0;Mb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);return this};sc.prototype=Object.create(wa.prototype);sc.prototype.constructor=sc;sc.prototype.isRawShaderMaterial=!0;ab.prototype=Object.create(O.prototype);ab.prototype.constructor=ab;ab.prototype.isMeshStandardMaterial=!0;ab.prototype.copy=function(a){O.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;return this}; -Kb.prototype=Object.create(ab.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isMeshPhysicalMaterial=!0;Kb.prototype.copy=function(a){ab.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ma.prototype=Object.create(O.prototype);Ma.prototype.constructor=Ma;Ma.prototype.isMeshPhongMaterial=!0;Ma.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color); +Nb.prototype=Object.create(ab.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshPhysicalMaterial=!0;Nb.prototype.copy=function(a){ab.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Na.prototype=Object.create(O.prototype);Na.prototype.constructor=Na;Na.prototype.isMeshPhongMaterial=!0;Na.prototype.copy=function(a){O.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};Lb.prototype= -Object.create(Ma.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isMeshToonMaterial=!0;Lb.prototype.copy=function(a){Ma.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Mb.prototype=Object.create(O.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isMeshNormalMaterial=!0;Mb.prototype.copy=function(a){O.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};Nb.prototype=Object.create(O.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshLambertMaterial=!0;Nb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map; +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};Ob.prototype= +Object.create(Na.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshToonMaterial=!0;Ob.prototype.copy=function(a){Na.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Pb.prototype=Object.create(O.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isMeshNormalMaterial=!0;Pb.prototype.copy=function(a){O.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};Qb.prototype=Object.create(O.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isMeshLambertMaterial=!0;Qb.prototype.copy=function(a){O.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};Ob.prototype=Object.create(O.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshMatcapMaterial=!0;Ob.prototype.copy=function(a){O.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};Pb.prototype=Object.create(R.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isLineDashedMaterial=!0;Pb.prototype.copy=function(a){R.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize= -a.gapSize;return this};var Gh=Object.freeze({ShadowMaterial:Jb,SpriteMaterial:qb,RawShaderMaterial:oc,ShaderMaterial:wa,PointsMaterial:La,MeshPhysicalMaterial:Kb,MeshStandardMaterial:ab,MeshPhongMaterial:Ma,MeshToonMaterial:Lb,MeshNormalMaterial:Mb,MeshLambertMaterial:Nb,MeshDepthMaterial:nb,MeshDistanceMaterial:ob,MeshBasicMaterial:ma,MeshMatcapMaterial:Ob,LineDashedMaterial:Pb,LineBasicMaterial:R,Material:O}),fa={arraySlice:function(a,b,c){return fa.isTypedArray(a)?new a.constructor(a.subarray(b, +this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Rb.prototype=Object.create(O.prototype);Rb.prototype.constructor=Rb;Rb.prototype.isMeshMatcapMaterial=!0;Rb.prototype.copy=function(a){O.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};Sb.prototype=Object.create(R.prototype);Sb.prototype.constructor=Sb;Sb.prototype.isLineDashedMaterial=!0;Sb.prototype.copy=function(a){R.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize= +a.gapSize;return this};var Qh=Object.freeze({ShadowMaterial:Mb,SpriteMaterial:rb,RawShaderMaterial:sc,ShaderMaterial:wa,PointsMaterial:Ma,MeshPhysicalMaterial:Nb,MeshStandardMaterial:ab,MeshPhongMaterial:Na,MeshToonMaterial:Ob,MeshNormalMaterial:Pb,MeshLambertMaterial:Qb,MeshDepthMaterial:ob,MeshDistanceMaterial:pb,MeshBasicMaterial:pa,MeshMatcapMaterial:Rb,LineDashedMaterial:Sb,LineBasicMaterial:R,Material:O}),fa={arraySlice:function(a,b,c){return fa.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 h=c[f]*b,k=0;k!== -b;++k)e[g++]=a[h+k];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)}}}};Object.assign(Ea.prototype,{evaluate:function(a){var b= +b;++k)e[g++]=a[h+k];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)}}}};Object.assign(Ba.prototype,{evaluate:function(a){var b= this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a=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=fa.arraySlice(c,e,f),this.values=fa.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&&fa.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=this.times,b=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(M.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(M.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>k&&(k=e);$e.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);af.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);bf.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&($e.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),af.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),bf.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set($e.calc(a), -af.calc(a),bf.calc(a));return b};xa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bd;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>k&&(k=e);jf.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);kf.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);lf.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&(jf.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),kf.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),lf.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(jf.calc(a), +kf.calc(a),lf.calc(a));return b};xa.prototype.copy=function(a){J.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(Tf(d,e.x,f.x,g.x,c.x),Tf(d,e.y,f.y,g.y,c.y));return b};Ra.prototype.copy=function(a){J.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(); +function(a,b){return this.getPoint(a,b)};Da.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};Da.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Da.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Da.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Qa.prototype= +Object.create(J.prototype);Qa.prototype.constructor=Qa;Qa.prototype.isLineCurve3=!0;Qa.prototype.getPoint=function(a,b){b=b||new n;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Qa.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Qa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Qa.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray(); +return a};Qa.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ra.prototype=Object.create(J.prototype);Ra.prototype.constructor=Ra;Ra.prototype.isQuadraticBezierCurve=!0;Ra.prototype.getPoint=function(a,b){b=b||new C;var c=this.v0,d=this.v1,e=this.v2;b.set(yd(a,c.x,d.x,e.x),yd(a,c.y,d.y,e.y));return b};Ra.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this}; +Ra.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Ra.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};cb.prototype=Object.create(J.prototype);cb.prototype.constructor=cb;cb.prototype.isQuadraticBezierCurve3=!0;cb.prototype.getPoint=function(a,b){b=b||new n;var c=this.v0,d=this.v1,e=this.v2;b.set(yd(a,c.x, +d.x,e.x),yd(a,c.y,d.y,e.y),yd(a,c.z,d.z,e.z));return b};cb.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};cb.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};cb.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Sa.prototype=Object.create(J.prototype); +Sa.prototype.constructor=Sa;Sa.prototype.isSplineCurve=!0;Sa.prototype.getPoint=function(a,b){b=b||new C;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(bg(d,e.x,f.x,g.x,c.x),bg(d,e.y,f.y,g.y,c.y));return b};Sa.prototype.copy=function(a){J.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>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(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=eb.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 sb;h.curves=g.curves; -b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var u=0,t=f.length;uNumber.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(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=fb.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 tb;h.curves=g.curves; +b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var u=0,t=f.length;ul.opacity&&(l.transparent=!0);d.setTextures(k);return d.parse(l)}}()});var ke,Oe={getContext:function(){void 0===ke&&(ke=new (window.AudioContext||window.webkitAudioContext));return ke},setContext:function(a){ke=a}};Object.assign(Je.prototype,{load:function(a,b,c,d){var e=new Na(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);Oe.getContext().decodeAudioData(a,function(a){b(a)})}, -c,d)},setPath:function(a){this.path=a;return this}});Object.assign(ce.prototype,{isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;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* +l.type&&delete l.emissive;"MeshPhongMaterial"!==l.type&&delete l.specular;1>l.opacity&&(l.transparent=!0);d.setTextures(k);return d.parse(l)}}()});var se,We={getContext:function(){void 0===se&&(se=new (window.AudioContext||window.webkitAudioContext));return se},setContext:function(a){se=a}};Object.assign(Re.prototype,{load:function(a,b,c,d){var e=new Oa(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);We.getContext().decodeAudioData(a,function(a){b(a)})}, +c,d)},setPath:function(a){this.path=a;return this}});Object.assign(je.prototype,{isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;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){for(var b= -this.coefficients,c=0;9>c;c++)b[c].fromArray(a,3*c);return this},toArray:function(){for(var a=[],b=this.coefficients,c=0;9>c;c++)b[c].toArray(a,3*c);return a}});Object.assign(ce,{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)}});Ta.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ta,isLightProbe:!0,copy:function(a){Z.prototype.copy.call(this, -a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return Z.prototype.toJSON.call(this,a)}});Ke.prototype=Object.assign(Object.create(Ta.prototype),{constructor:Ke,isHemisphereLightProbe:!0,copy:function(a){Ta.prototype.copy.call(this,a);return this},toJSON:function(a){return Ta.prototype.toJSON.call(this,a)}});Le.prototype=Object.assign(Object.create(Ta.prototype),{constructor:Le,isAmbientLightProbe:!0,copy:function(a){Ta.prototype.copy.call(this,a);return this},toJSON:function(a){return Ta.prototype.toJSON.call(this, -a)}});Object.assign(Vf.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new Q,l=new Q;return function(m){if(a!==this||b!==m.focus||c!==m.fov||d!==m.aspect*this.aspect||e!==m.near||f!==m.far||g!==m.zoom||h!==this.eyeSep){a=this;b=m.focus;c=m.fov;d=m.aspect*this.aspect;e=m.near;f=m.far;g=m.zoom;var n=m.projectionMatrix.clone();h=this.eyeSep/2;var r=h*e/b,t=e*Math.tan(M.DEG2RAD*c*.5)/g;l.elements[12]=-h;k.elements[12]=h;var q=-t*d+r;var v=t*d+r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraL.projectionMatrix.copy(n); -q=-t*d-r;v=t*d-r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(l);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(k)}}()});Object.assign(Me.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}});Ne.prototype=Object.assign(Object.create(G.prototype),{constructor:Ne,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.coefficients,c=0;9>c;c++)b[c].fromArray(a,3*c);return this},toArray:function(){for(var a=[],b=this.coefficients,c=0;9>c;c++)b[c].toArray(a,3*c);return a}});Object.assign(je,{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)}});Ua.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ua,isLightProbe:!0,copy:function(a){Z.prototype.copy.call(this, +a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return Z.prototype.toJSON.call(this,a)}});Se.prototype=Object.assign(Object.create(Ua.prototype),{constructor:Se,isHemisphereLightProbe:!0,copy:function(a){Ua.prototype.copy.call(this,a);return this},toJSON:function(a){return Ua.prototype.toJSON.call(this,a)}});Te.prototype=Object.assign(Object.create(Ua.prototype),{constructor:Te,isAmbientLightProbe:!0,copy:function(a){Ua.prototype.copy.call(this,a);return this},toJSON:function(a){return Ua.prototype.toJSON.call(this, +a)}});Object.assign(dg.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new Q,l=new Q;return function(m){if(a!==this||b!==m.focus||c!==m.fov||d!==m.aspect*this.aspect||e!==m.near||f!==m.far||g!==m.zoom||h!==this.eyeSep){a=this;b=m.focus;c=m.fov;d=m.aspect*this.aspect;e=m.near;f=m.far;g=m.zoom;var n=m.projectionMatrix.clone();h=this.eyeSep/2;var r=h*e/b,t=e*Math.tan(M.DEG2RAD*c*.5)/g;l.elements[12]=-h;k.elements[12]=h;var q=-t*d+r;var v=t*d+r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraL.projectionMatrix.copy(n); +q=-t*d-r;v=t*d-r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(l);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(k)}}()});Object.assign(Ue.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}});Ve.prototype=Object.assign(Object.create(G.prototype),{constructor:Ve,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(){var a=new n,b=new ja,c=new n,d=new n,e=new Me;return function(f){G.prototype.updateMatrixWorld.call(this,f);f=this.context.listener;var g=this.up;this.timeDelta=e.getDelta();this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);if(f.positionX){var h=this.context.currentTime+this.timeDelta;f.positionX.linearRampToValueAtTime(a.x,h);f.positionY.linearRampToValueAtTime(a.y,h);f.positionZ.linearRampToValueAtTime(a.z,h);f.forwardX.linearRampToValueAtTime(d.x,h); -f.forwardY.linearRampToValueAtTime(d.y,h);f.forwardZ.linearRampToValueAtTime(d.z,h);f.upX.linearRampToValueAtTime(g.x,h);f.upY.linearRampToValueAtTime(g.y,h);f.upZ.linearRampToValueAtTime(g.z,h)}else f.setPosition(a.x,a.y,a.z),f.setOrientation(d.x,d.y,d.z,g.x,g.y,g.z)}}()});sc.prototype=Object.assign(Object.create(G.prototype),{constructor:sc,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this}, +updateMatrixWorld:function(){var a=new n,b=new ja,c=new n,d=new n,e=new Ue;return function(f){G.prototype.updateMatrixWorld.call(this,f);f=this.context.listener;var g=this.up;this.timeDelta=e.getDelta();this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);if(f.positionX){var h=this.context.currentTime+this.timeDelta;f.positionX.linearRampToValueAtTime(a.x,h);f.positionY.linearRampToValueAtTime(a.y,h);f.positionZ.linearRampToValueAtTime(a.z,h);f.forwardX.linearRampToValueAtTime(d.x,h); +f.forwardY.linearRampToValueAtTime(d.y,h);f.forwardZ.linearRampToValueAtTime(d.z,h);f.upX.linearRampToValueAtTime(g.x,h);f.upY.linearRampToValueAtTime(g.y,h);f.upZ.linearRampToValueAtTime(g.z,h)}else f.setPosition(a.x,a.y,a.z),f.setOrientation(d.x,d.y,d.z,g.x,g.y,g.z)}}()});wc.prototype=Object.assign(Object.create(G.prototype),{constructor:wc,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},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){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{var a=this.context.createBufferSource(); a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);this.startTime=this.context.currentTime;a.start(this.startTime,this.offset);this.isPlaying=!0;this.source=a;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime- this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,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){ja.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}}});Object.assign(Wf.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(ra,{Composite:Wf,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ra.Composite(a,b,c):new ra(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", +e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(eg.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(ra,{Composite:eg,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ra.Composite(a,b,c):new ra(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", "[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),e=new RegExp("^"+b+a+c+d+"$"),f=["material","materials","bones"];return function(a){var b=e.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!==f.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||"root"===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]=l;a[l]=p;c[k]=n;a[n]=h;h=0;for(k=e;h!==k;++h){p= d[h];var u=p[l];p[l]=p[n];p[n]=u}}}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 k=arguments[g].uuid,l=d[k];if(void 0!==l)if(delete d[k],lc.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}});Se.prototype=Object.assign(Object.create(oa.prototype),{constructor:Se,_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,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],n=l.name,p=k[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 Re(ra.create(c,n,b&&b._propertyBindings[h].binding.parsedPath), +c;return this}});$e.prototype=Object.assign(Object.create(oa.prototype),{constructor:$e,_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,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],n=l.name,p=k[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 Ze(ra.create(c,n,b&&b._propertyBindings[h].binding.parsedPath), l.ValueTypeName,l.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 C);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.xthis.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 C);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new C; -return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).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 le,Cd;Object.assign(We.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)}, +b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new C);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.xthis.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 C);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){void 0===Ic&& +(Ic=new C);return Ic.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 te,Jd;Object.assign(df.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){void 0===le&&(le=new n,Cd=new n);le.subVectors(a,this.start);Cd.subVectors(this.end,this.start);a=Cd.dot(Cd);a=Cd.dot(le)/a;b&&(a=M.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)}});vd.prototype=Object.create(G.prototype);vd.prototype.constructor=vd;vd.prototype.isImmediateRenderObject=!0;wd.prototype=Object.create(aa.prototype);wd.prototype.constructor=wd;wd.prototype.update=function(){var a=new n,b=new n,c=new ka;return function(){var d=["a", +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){void 0===te&&(te=new n,Jd=new n);te.subVectors(a,this.start);Jd.subVectors(this.end,this.start);a=Jd.dot(Jd);a=Jd.dot(te)/a;b&&(a=M.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)}});Cd.prototype=Object.create(G.prototype);Cd.prototype.constructor=Cd;Cd.prototype.isImmediateRenderObject=!0;Dd.prototype=Object.create(aa.prototype);Dd.prototype.constructor=Dd;Dd.prototype.update=function(){var a=new n,b=new n,c=new ka;return function(){var d=["a", "b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,n=k.length;lMath.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);G.prototype.updateMatrixWorld.call(this,a)};var ge,Xe;ib.prototype=Object.create(G.prototype);ib.prototype.constructor=ib;ib.prototype.setDirection=function(){var a=new n,b;return function(c){.99999c.y?this.quaternion.set(1, -0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();ib.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(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};ib.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};ib.prototype.copy=function(a){G.prototype.copy.call(this,a,!1);this.line.copy(a.line); -this.cone.copy(a.cone);return this};ib.prototype.clone=function(){return(new this.constructor).copy(this)};Bd.prototype=Object.create(aa.prototype);Bd.prototype.constructor=Bd;J.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(J.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(gb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); +g.isBufferGeometry)for(d=g.attributes.position,h=g.attributes.normal,u=g=0,t=d.count;uMath.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);G.prototype.updateMatrixWorld.call(this,a)};var ne,ef;jb.prototype=Object.create(G.prototype);jb.prototype.constructor=jb;jb.prototype.setDirection=function(){var a=new n,b;return function(c){.99999c.y?this.quaternion.set(1, +0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();jb.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(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};jb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};jb.prototype.copy=function(a){G.prototype.copy.call(this,a,!1);this.line.copy(a.line); +this.cone.copy(a.cone);return this};jb.prototype.clone=function(){return(new this.constructor).copy(this)};Id.prototype=Object.create(aa.prototype);Id.prototype.constructor=Id;J.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(J.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(hb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new P,c=0,d=a.length;c 0 ) { // color keywords - var hex = ColorKeywords[ style ]; + var hex = _colorKeywords[ style ]; if ( hex !== undefined ) { @@ -8312,23 +8301,17 @@ Object.assign( Color.prototype, { }, - offsetHSL: function () { - - var hsl = {}; + offsetHSL: function ( h, s, l ) { - return function ( h, s, l ) { + this.getHSL( _hslA ); - this.getHSL( hsl ); + _hslA.h += h; _hslA.s += s; _hslA.l += l; - hsl.h += h; hsl.s += s; hsl.l += l; + this.setHSL( _hslA.h, _hslA.s, _hslA.l ); - this.setHSL( hsl.h, hsl.s, hsl.l ); - - return this; - - }; + return this; - }(), + }, add: function ( color ) { @@ -8400,27 +8383,20 @@ Object.assign( Color.prototype, { }, - lerpHSL: function () { - - var hslA = { h: 0, s: 0, l: 0 }; - var hslB = { h: 0, s: 0, l: 0 }; - - return function lerpHSL( color, alpha ) { + lerpHSL: function ( color, alpha ) { - this.getHSL( hslA ); - color.getHSL( hslB ); + this.getHSL( _hslA ); + color.getHSL( _hslB ); - var h = _Math.lerp( hslA.h, hslB.h, alpha ); - var s = _Math.lerp( hslA.s, hslB.s, alpha ); - var l = _Math.lerp( hslA.l, hslB.l, alpha ); + var h = _Math.lerp( _hslA.h, _hslB.h, alpha ); + var s = _Math.lerp( _hslA.s, _hslB.s, alpha ); + var l = _Math.lerp( _hslA.l, _hslB.l, alpha ); - this.setHSL( h, s, l ); + this.setHSL( h, s, l ); - return this; - - }; + return this; - }(), + }, equals: function ( c ) { @@ -13912,6 +13888,8 @@ DataTexture.prototype.isDataTexture = true; * @author bhouston / http://clara.io */ +var _vector1, _vector2, _normalMatrix; + function Plane( normal, constant ) { // normal is assumed to be normalized @@ -13952,24 +13930,24 @@ Object.assign( Plane.prototype, { }, - setFromCoplanarPoints: function () { + setFromCoplanarPoints: function ( a, b, c ) { - var v1 = new Vector3(); - var v2 = new Vector3(); + if ( _vector1 === undefined ) { - return function setFromCoplanarPoints( a, b, c ) { + _vector1 = new Vector3(); + _vector2 = new Vector3(); - var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize(); + } - // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + var normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); - this.setFromNormalAndCoplanarPoint( normal, a ); + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - return this; + this.setFromNormalAndCoplanarPoint( normal, a ); - }; + return this; - }(), + }, clone: function () { @@ -14032,50 +14010,46 @@ Object.assign( Plane.prototype, { }, - intersectLine: function () { - - var v1 = new Vector3(); - - return function intersectLine( line, target ) { + intersectLine: function ( line, target ) { - if ( target === undefined ) { - - console.warn( 'THREE.Plane: .intersectLine() target is now required' ); - target = new Vector3(); + if ( _vector1 === undefined ) _vector1 = new Vector3(); - } + if ( target === undefined ) { - var direction = line.delta( v1 ); + console.warn( 'THREE.Plane: .intersectLine() target is now required' ); + target = new Vector3(); - var denominator = this.normal.dot( direction ); + } - if ( denominator === 0 ) { + var direction = line.delta( _vector1 ); - // line is coplanar, return origin - if ( this.distanceToPoint( line.start ) === 0 ) { + var denominator = this.normal.dot( direction ); - return target.copy( line.start ); + if ( denominator === 0 ) { - } + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { - // Unsure if this is the correct method to handle this case. - return undefined; + return target.copy( line.start ); } - var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + // Unsure if this is the correct method to handle this case. + return undefined; - if ( t < 0 || t > 1 ) { + } - return undefined; + var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; - } + if ( t < 0 || t > 1 ) { - return target.copy( direction ).multiplyScalar( t ).add( line.start ); + return undefined; - }; + } - }(), + return target.copy( direction ).multiplyScalar( t ).add( line.start ); + + }, intersectsLine: function ( line ) { @@ -14113,26 +14087,26 @@ Object.assign( Plane.prototype, { }, - applyMatrix4: function () { + applyMatrix4: function ( matrix, optionalNormalMatrix ) { - var v1 = new Vector3(); - var m1 = new Matrix3(); + if ( _normalMatrix === undefined ) { - return function applyMatrix4( matrix, optionalNormalMatrix ) { + _normalMatrix = new Matrix3(); + _vector1 = new Vector3(); - var normalMatrix = optionalNormalMatrix || m1.getNormalMatrix( matrix ); + } - var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix ); + var normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); - var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + var referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); - this.constant = - referencePoint.dot( normal ); + var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); - return this; + this.constant = - referencePoint.dot( normal ); - }; + return this; - }(), + }, translate: function ( offset ) { @@ -14156,6 +14130,9 @@ Object.assign( Plane.prototype, { * @author bhouston / http://clara.io */ +var _sphere; +var _vector$2; + function Frustum( p0, p1, p2, p3, p4, p5 ) { this.planes = [ @@ -14228,41 +14205,29 @@ Object.assign( Frustum.prototype, { }, - intersectsObject: function () { - - var sphere = new Sphere(); - - return function intersectsObject( object ) { - - var geometry = object.geometry; + intersectsObject: function ( object ) { - if ( geometry.boundingSphere === null ) - geometry.computeBoundingSphere(); + if ( _sphere === undefined ) _sphere = new Sphere(); - sphere.copy( geometry.boundingSphere ) - .applyMatrix4( object.matrixWorld ); - - return this.intersectsSphere( sphere ); - - }; + var geometry = object.geometry; - }(), + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - intersectsSprite: function () { + _sphere.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); - var sphere = new Sphere(); + return this.intersectsSphere( _sphere ); - return function intersectsSprite( sprite ) { + }, - sphere.center.set( 0, 0, 0 ); - sphere.radius = 0.7071067811865476; - sphere.applyMatrix4( sprite.matrixWorld ); + intersectsSprite: function ( sprite ) { - return this.intersectsSphere( sphere ); + _sphere.center.set( 0, 0, 0 ); + _sphere.radius = 0.7071067811865476; + _sphere.applyMatrix4( sprite.matrixWorld ); - }; + return this.intersectsSphere( _sphere ); - }(), + }, intersectsSphere: function ( sphere ) { @@ -14286,37 +14251,33 @@ Object.assign( Frustum.prototype, { }, - intersectsBox: function () { - - var p = new Vector3(); - - return function intersectsBox( box ) { + intersectsBox: function ( box ) { - var planes = this.planes; + if ( _vector$2 === undefined ) _vector$2 = new Vector3(); - for ( var i = 0; i < 6; i ++ ) { + var planes = this.planes; - var plane = planes[ i ]; + for ( var i = 0; i < 6; i ++ ) { - // corner at max distance + var plane = planes[ i ]; - p.x = plane.normal.x > 0 ? box.max.x : box.min.x; - p.y = plane.normal.y > 0 ? box.max.y : box.min.y; - p.z = plane.normal.z > 0 ? box.max.z : box.min.z; + // corner at max distance - if ( plane.distanceToPoint( p ) < 0 ) { + _vector$2.x = plane.normal.x > 0 ? box.max.x : box.min.x; + _vector$2.y = plane.normal.y > 0 ? box.max.y : box.min.y; + _vector$2.z = plane.normal.z > 0 ? box.max.z : box.min.z; - return false; + if ( plane.distanceToPoint( _vector$2 ) < 0 ) { - } + return false; } - return true; + } - }; + return true; - }(), + }, containsPoint: function ( point ) { @@ -44961,6 +44922,8 @@ Object.assign( Cylindrical.prototype, { * @author bhouston / http://clara.io */ +var _vector$3; + function Box2( min, max ) { this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity ); @@ -44993,21 +44956,17 @@ Object.assign( Box2.prototype, { }, - setFromCenterAndSize: function () { - - var v1 = new Vector2(); - - return function setFromCenterAndSize( center, size ) { + setFromCenterAndSize: function ( center, size ) { - var halfSize = v1.copy( size ).multiplyScalar( 0.5 ); - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); + if ( _vector$3 === undefined ) _vector$3 = new Vector2(); - return this; + var halfSize = _vector$3.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); - }; + return this; - }(), + }, clone: function () { @@ -45149,18 +45108,14 @@ Object.assign( Box2.prototype, { }, - distanceToPoint: function () { - - var v1 = new Vector2(); + distanceToPoint: function ( point ) { - return function distanceToPoint( point ) { + if ( _vector$3 === undefined ) _vector$3 = new Vector2(); - var clampedPoint = v1.copy( point ).clamp( this.min, this.max ); - return clampedPoint.sub( point ).length(); + var clampedPoint = _vector$3.copy( point ).clamp( this.min, this.max ); + return clampedPoint.sub( point ).length(); - }; - - }(), + }, intersect: function ( box ) { diff --git a/examples/jsm/lines/LineSegments2.js b/examples/jsm/lines/LineSegments2.js index 319ec4ab57c905..81d5a0c09c0e3b 100644 --- a/examples/jsm/lines/LineSegments2.js +++ b/examples/jsm/lines/LineSegments2.js @@ -7,7 +7,10 @@ import { InstancedInterleavedBuffer, InterleavedBufferAttribute, Mesh, - Vector3 + Vector3, + Matrix4, + Ray, + Sphere } from "../../../build/three.module.js"; import { LineSegmentsGeometry } from "../lines/LineSegmentsGeometry.js"; import { LineMaterial } from "../lines/LineMaterial.js"; @@ -69,7 +72,75 @@ LineSegments2.prototype = Object.assign( Object.create( Mesh.prototype ), { return this; - } + }, + + + raycast: ( function () { + + var inverseMatrix = new Matrix4(); + var ray = new Ray(); + var sphere = new Sphere(); + + return function raycast( raycaster, intersects ) { + + var precision = raycaster.linePrecision; + + var geometry = this.geometry; + var matrixWorld = this.matrixWorld; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + sphere.copy( geometry.boundingSphere ); + sphere.applyMatrix4( matrixWorld ); + sphere.radius += precision; + + if ( raycaster.ray.intersectsSphere( sphere ) === false ) return; + + inverseMatrix.getInverse( matrixWorld ); + ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix ); + + var localPrecision = precision / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + var localPrecisionSq = localPrecision * localPrecision; + + var vStart = new Vector3(); + var vEnd = new Vector3(); + var interSegment = new Vector3(); + var interRay = new Vector3(); + + // Currently, the geometry is always a LineSegments2 geometry, which uses the instanceStart/instanceEnd to store segment locations + var starts = geometry.attributes.instanceStart; + var ends = geometry.attributes.instanceEnd; + + for(var i=0;i localPrecisionSq ) continue; + + interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation + + var distance = raycaster.ray.origin.distanceTo( interRay ); + + if ( distance < raycaster.near || distance > raycaster.far ) continue; + + intersects.push( { + + distance: distance, + // What do we want? intersection point on the ray or on the segment?? + // point: raycaster.ray.at( distance ), + point: interSegment.clone().applyMatrix4( this.matrixWorld ), + index: i, + face: null, + faceIndex: null, + object: this + } ); + + } + }; + }() ) + } ); diff --git a/examples/webgl_lines_fat.html b/examples/webgl_lines_fat.html index 626aad50545a65..ac886bfb3d40f8 100644 --- a/examples/webgl_lines_fat.html +++ b/examples/webgl_lines_fat.html @@ -23,12 +23,15 @@ import { OrbitControls } from './jsm/controls/OrbitControls.js'; import { Line2 } from './jsm/lines/Line2.js'; import { LineMaterial } from './jsm/lines/LineMaterial.js'; + import { PerspectiveLineMaterial } from './jsm/lines/PerspectiveLineMaterial.js'; import { LineGeometry } from './jsm/lines/LineGeometry.js'; import { GeometryUtils } from './jsm/utils/GeometryUtils.js'; var line, renderer, scene, camera, camera2, controls; var line1; var matLine, matLineBasic, matLineDashed; + var perline, perspectiveMatLine; + var marker, markergeo, markermat; var stats; var gui; @@ -100,10 +103,27 @@ line = new Line2( geometry, matLine ); line.computeLineDistances(); - line.scale.set( 1, 1, 1 ); + line.scale.set( 1, 1, 3 ); scene.add( line ); + + // perspective line + perspectiveMatLine = new PerspectiveLineMaterial( { + color: 0x00ff00, + vertexColors: THREE.VertexColors, + worldlinewidth : 0.2, + maxlinewidth: 100, + minlinewidth:0.1, + dashed: false + } ); + perline = new Line2( geometry, perspectiveMatLine ); + perline.computeLineDistances(); + perline.scale.set( 1, 1, 3 ); + + perline.visible = false; + scene.add( perline ); + // THREE.Line ( THREE.BufferGeometry, THREE.LineBasicMaterial ) - rendered with gl.LINE_STRIP var geo = new THREE.BufferGeometry(); @@ -116,9 +136,17 @@ line1 = new THREE.Line( geo, matLineBasic ); line1.computeLineDistances(); line1.visible = false; + line1.scale.set( 1, 1, 3 ); scene.add( line1 ); // + // A marker to show mouse intersect + markergeo = new THREE.SphereBufferGeometry(0.3); + markermat = new THREE.MeshBasicMaterial( {color: 0xff0000}); + marker = new THREE.Mesh(markergeo,markermat); + scene.add(marker); + // marker.visible=false; + window.addEventListener( 'resize', onWindowResize, false ); onWindowResize(); @@ -126,6 +154,8 @@ stats = new Stats(); document.body.appendChild( stats.dom ); + renderer.domElement.addEventListener( 'mousemove', onMouseMove, false ); + initGui(); } @@ -140,11 +170,46 @@ insetWidth = window.innerHeight / 4; // square insetHeight = window.innerHeight / 4; + camera2.aspect = insetWidth / insetHeight; camera2.updateProjectionMatrix(); } + var point = new THREE.Vector2(); + + var mouse = new THREE.Vector2(); + + var raycaster = new THREE.Raycaster(); + + function onMouseMove(evt) { + + var array = getMousePosition( renderer.domElement, evt.clientX, evt.clientY ); + point.fromArray( array ); + + mouse.set( ( point.x * 2 ) - 1, - ( point.y * 2 ) + 1 ); + + raycaster.setFromCamera( mouse, camera ); + + var intersects = raycaster.intersectObjects( [line,line1,perline] ); + + if ( intersects.length > 0 ) { + console.log(intersects[0].point); + marker.visible = true; + marker.position.copy(intersects[0].point); + } else { + // console.log("no intersects"); + marker.visible = false; + } + } + + var getMousePosition = function ( dom, x, y ) { + + var rect = dom.getBoundingClientRect(); + return [ ( x - rect.left ) / rect.width, ( y - rect.top ) / rect.height ]; + + }; + function animate() { requestAnimationFrame( animate ); @@ -159,6 +224,7 @@ // renderer will set this eventually matLine.resolution.set( window.innerWidth, window.innerHeight ); // resolution of the viewport + perspectiveMatLine.resolution.set( window.innerWidth, window.innerHeight ); // resolution of the viewport renderer.render( scene, camera ); @@ -179,6 +245,7 @@ // renderer will set this eventually matLine.resolution.set( insetWidth, insetHeight ); // resolution of the inset viewport + perspectiveMatLine.resolution.set( insetWidth, insetHeight ); // resolution of the inset viewport renderer.render( scene, camera2 ); @@ -197,47 +264,64 @@ 'width (px)': 5, 'dashed': false, 'dash scale': 1, - 'dash / gap': 1 + 'dash / gap': 1, + 'world width':0.2, + 'min width (px)':0.1, + 'max width (px)':10 }; - gui.add( param, 'line type', { 'LineGeometry': 0, 'gl.LINE': 1 } ).onChange( function ( val ) { + + gui.add( param, 'line type', { 'LineGeometry': 0, 'gl.LINE': 1, 'PerspectiveLineGeometry': 2 } ).onChange( function ( val ) { switch ( val ) { case '0': line.visible = true; - line1.visible = false; - + perline.visible = false; + subgui_linegeometry.open(); + // subgui_glines.close(); + subgui_perspective.close(); break; case '1': line.visible = false; - line1.visible = true; - + perline.visible = false; + subgui_linegeometry.close(); + // subgui_glines.open(); + subgui_perspective.close(); break; - } - - } ); + case '2': + line.visible = false; + line1.visible = false; + perline.visible = true; + subgui_linegeometry.close(); + // subgui_glines.close(); + subgui_perspective.open(); + break; - gui.add( param, 'width (px)', 1, 10 ).onChange( function ( val ) { - matLine.linewidth = val; + } } ); + gui.add( param, 'dashed' ).onChange( function ( val ) { matLine.dashed = val; + perspectiveMatLine.minlinewidth = val; + // dashed is implemented as a defines -- not as a uniform. this could be changed. - // ... or THREE.LineDashedMaterial could be implemented as a separate material + // ... or LineDashedMaterial could be implemented as a separate material // temporary hack - renderer should do this eventually if ( val ) matLine.defines.USE_DASH = ""; else delete matLine.defines.USE_DASH; + if ( val ) perspectiveMatLine.defines.USE_DASH = ""; else delete perspectiveMatLine.defines.USE_DASH; matLine.needsUpdate = true; + perspectiveMatLine.needsUpdate = true; line1.material = val ? matLineDashed : matLineBasic; @@ -247,6 +331,7 @@ matLine.dashScale = val; matLineDashed.scale = val; + perspectiveMatLine.dashScale = val; } ); @@ -261,6 +346,7 @@ matLineDashed.dashSize = 2; matLineDashed.gapSize = 1; + break; case '1': @@ -270,6 +356,7 @@ matLineDashed.dashSize = 1; matLineDashed.gapSize = 1; + break; case '2': @@ -279,12 +366,40 @@ matLineDashed.dashSize = 1; matLineDashed.gapSize = 2; + break; } } ); + var subgui_linegeometry = gui.addFolder("LineGeometry"); + subgui_linegeometry.add( param, 'width (px)', 1, 10 ).onChange( function ( val ) { + matLine.linewidth = val; + } ); + subgui_linegeometry.open(); + + + // Options valid for gl lines: + // var subgui_glines = gui.addFolder("gl.lines"); + + + // Options valid for PerspectiveGeometry: + var subgui_perspective = gui.addFolder("PerspectiveGeometry"); + + subgui_perspective.add( param, 'world width', 0.01, 1 ).onChange( function ( val ) { + perspectiveMatLine.worldlinewidth = val; + } ); + + subgui_perspective.add( param, 'min width (px)', 0, 10 ).onChange( function ( val ) { + perspectiveMatLine.minlinewidth = val; + } ); + subgui_perspective.add( param, 'max width (px)', 0, 10 ).onChange( function ( val ) { + perspectiveMatLine.maxlinewidth = val; + } ); + + + } diff --git a/package-lock.json b/package-lock.json index 307923f04d37e4..61fe9c02beba67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "three", - "version": "0.105.1", + "version": "0.107.0", "lockfileVersion": 1, "requires": true, "dependencies": { From 65f1878e9f4fe9cde8d420e5503d1c3f7fc68d78 Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Fri, 2 Aug 2019 14:20:21 -0400 Subject: [PATCH 02/11] Add the material --- .../jsm/lines/PerspectiveLineMaterial.d.ts | 32 ++ examples/jsm/lines/PerspectiveLineMaterial.js | 455 ++++++++++++++++++ 2 files changed, 487 insertions(+) create mode 100644 examples/jsm/lines/PerspectiveLineMaterial.d.ts create mode 100644 examples/jsm/lines/PerspectiveLineMaterial.js diff --git a/examples/jsm/lines/PerspectiveLineMaterial.d.ts b/examples/jsm/lines/PerspectiveLineMaterial.d.ts new file mode 100644 index 00000000000000..780401c7d180fc --- /dev/null +++ b/examples/jsm/lines/PerspectiveLineMaterial.d.ts @@ -0,0 +1,32 @@ +import { + Color, + MaterialParameters, + ShaderMaterial, + Vector2 +} from '../../../src/Three'; + +export interface PerspectiveLineMaterialParameters extends MaterialParameters { + color?: number; + worldlinewidth?: number; + minlinewidth?: number; + maxlinewidth?: number; + dashed?: boolean; + dashScale?: number; + dashSize?: number; + gapSize?: number; + resolution?: Vector2; +} + +export class PerspectiveLineMaterial extends ShaderMaterial { + constructor(parameters?: PerspectiveLineMaterialParameters); + color: Color; + worldlinewidth: number; + minlinewidth: number; + maxlinewidth: number; + dashed: boolean; + dashScale: number; + dashSize: number; + gapSize: number; + isPerspectiveLineMaterial: boolean; + resolution: Vector2; +} diff --git a/examples/jsm/lines/PerspectiveLineMaterial.js b/examples/jsm/lines/PerspectiveLineMaterial.js new file mode 100644 index 00000000000000..4ea188e9bf3e94 --- /dev/null +++ b/examples/jsm/lines/PerspectiveLineMaterial.js @@ -0,0 +1,455 @@ +/** + * @author WestLangley / http://github.com/WestLangley + * + * parameters = { + * color: , + * linewidth: , + * dashed: , + * dashScale: , + * dashSize: , + * gapSize: , + * resolution: , // to be set by renderer + * } + */ + +import { + ShaderLib, + ShaderMaterial, + UniformsLib, + UniformsUtils, + Vector2 +} from "../../../build/three.module.js"; + +UniformsLib.perspectiveline = { + + worldlinewidth: { value: 0.3 }, + maxlinewidth: { value: 20 }, + minlinewidth: { value: 0 }, + resolution: { value: new Vector2( 1, 1 ) }, + dashScale: { value: 1 }, + dashSize: { value: 1 }, + gapSize: { value: 1 } // todo FIX - maybe change to totalSize + +}; + +ShaderLib[ 'perspectiveline' ] = { + + uniforms: UniformsUtils.merge( [ + UniformsLib.common, + UniformsLib.fog, + UniformsLib.perspectiveline + ] ), + + vertexShader: + ` + #include + #include + #include + #include + #include + + uniform float worldlinewidth; + uniform float minlinewidth; + uniform float maxlinewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + + varying vec2 vUv; + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + + #endif + + float aspect = resolution.x / resolution.y; + + vUv = uv; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec2 ndcStart = clipStart.xy / clipStart.w; + vec2 ndcEnd = clipEnd.xy / clipEnd.w; + + // direction + vec2 dir = ndcEnd - ndcStart; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + // perpendicular to dir + vec2 offset = vec2( dir.y, - dir.x ); + + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // Adjust the line width according to how far this segment is away from us. I'm not 100% confident of my math here, but I believe that z/w is the + // distance away from us this point is. We muliply resolution.y/w to get to pixel space, which allows + // us to apply the linewidth clamp, then move back. + float linewidth = abs(2.0*resolution.y*worldlinewidth*( (position.y<0.5)? (start.z/clipStart.w/clipStart.w) : (end.z/clipEnd.w/clipEnd.w) )); + + linewidth = clamp(linewidth,minlinewidth,maxlinewidth); + + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `, + + fragmentShader: + ` + uniform vec3 diffuse; + uniform float opacity; + + #ifdef USE_DASH + + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #include + #include + #include + #include + #include + + varying vec2 vUv; + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + vec4 diffuseColor = vec4( diffuse, opacity ); + + #include + #include + + gl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a ); + + #include + #include + #include + #include + + } + ` +}; + +var PerspectiveLineMaterial = function ( parameters ) { + + ShaderMaterial.call( this, { + + type: 'PerspectiveLineMaterial', + + uniforms: UniformsUtils.clone( ShaderLib[ 'perspectiveline' ].uniforms ), + + vertexShader: ShaderLib[ 'perspectiveline' ].vertexShader, + fragmentShader: ShaderLib[ 'perspectiveline' ].fragmentShader + + } ); + + this.dashed = false; + + + Object.defineProperties( this, { + + color: { + + enumerable: true, + + get: function () { + + return this.uniforms.diffuse.value; + + }, + + set: function ( value ) { + + this.uniforms.diffuse.value = value; + + } + + }, + + worldlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.worldlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.worldlinewidth.value = value; + + } + + }, + + minlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.minlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.minlinewidth.value = value; + + } + + }, + + + maxlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.maxlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.maxlinewidth.value = value; + + } + + }, + + dashScale: { + + enumerable: true, + + get: function () { + + return this.uniforms.dashScale.value; + + }, + + set: function ( value ) { + + this.uniforms.dashScale.value = value; + + } + + }, + + dashSize: { + + enumerable: true, + + get: function () { + + return this.uniforms.dashSize.value; + + }, + + set: function ( value ) { + + this.uniforms.dashSize.value = value; + + } + + }, + + gapSize: { + + enumerable: true, + + get: function () { + + return this.uniforms.gapSize.value; + + }, + + set: function ( value ) { + + this.uniforms.gapSize.value = value; + + } + + }, + + resolution: { + + enumerable: true, + + get: function () { + + return this.uniforms.resolution.value; + + }, + + set: function ( value ) { + + this.uniforms.resolution.value.copy( value ); + + } + + } + + } ); + + this.setValues( parameters ); + + +}; + +PerspectiveLineMaterial.prototype = Object.create( ShaderMaterial.prototype ); +PerspectiveLineMaterial.prototype.constructor = PerspectiveLineMaterial; + +PerspectiveLineMaterial.prototype.isPerspectiveLineMaterial = true; + +PerspectiveLineMaterial.prototype.copy = function ( source ) { + + ShaderMaterial.prototype.copy.call( this, source ); + + this.color.copy( source.color ); + + this.worldlinewidth = source.worldlinewidth; + + this.minlinewidth = source.minlinewidth; + + this.maxlinewidth = source.maxlinewidth; + + this.resolution = source.resolution; + + // todo + + return this; + +}; + + +export { PerspectiveLineMaterial }; From cfb871873daa1ef35210e649a24742c4da2bd34c Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Fri, 2 Aug 2019 14:50:38 -0400 Subject: [PATCH 03/11] Get colors working correctly, add to regular /js directory --- examples/js/lines/LineSegments2.js | 69 ++- examples/js/lines/PerspectiveLineMaterial.js | 441 ++++++++++++++++++ examples/jsm/lines/PerspectiveLineMaterial.js | 14 +- examples/webgl_lines_fat.html | 10 +- 4 files changed, 522 insertions(+), 12 deletions(-) create mode 100644 examples/js/lines/PerspectiveLineMaterial.js diff --git a/examples/js/lines/LineSegments2.js b/examples/js/lines/LineSegments2.js index 179746f3d1941e..ef08c23afd63c2 100644 --- a/examples/js/lines/LineSegments2.js +++ b/examples/js/lines/LineSegments2.js @@ -60,6 +60,73 @@ THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy return this; - } + }, + + raycast: ( function () { + var inverseMatrix = new THREE.Matrix4(); + var ray = new THREE.Ray(); + var sphere = new THREE.Sphere(); + + return function raycast( raycaster, intersects ) { + + var precision = raycaster.linePrecision; + + var geometry = this.geometry; + var matrixWorld = this.matrixWorld; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + sphere.copy( geometry.boundingSphere ); + sphere.applyMatrix4( matrixWorld ); + sphere.radius += precision; + + if ( raycaster.ray.intersectsSphere( sphere ) === false ) return; + + inverseMatrix.getInverse( matrixWorld ); + ray.copy( raycaster.ray ).applyMatrix4( inverseMatrix ); + + var localPrecision = precision / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + var localPrecisionSq = localPrecision * localPrecision; + + var vStart = new THREE.Vector3(); + var vEnd = new THREE.Vector3(); + var interSegment = new THREE.Vector3(); + var interRay = new THREE.Vector3(); + + // Currently, the geometry is always a LineSegments2 geometry, which uses the instanceStart/instanceEnd to store segment locations + var starts = geometry.attributes.instanceStart; + var ends = geometry.attributes.instanceEnd; + + for(var i=0;i localPrecisionSq ) continue; + + interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation + + var distance = raycaster.ray.origin.distanceTo( interRay ); + + if ( distance < raycaster.near || distance > raycaster.far ) continue; + + intersects.push( { + + distance: distance, + // What do we want? intersection point on the ray or on the segment?? + // point: raycaster.ray.at( distance ), + point: interSegment.clone().applyMatrix4( this.matrixWorld ), + index: i, + face: null, + faceIndex: null, + object: this + } ); + + } + }; + }() ) } ); diff --git a/examples/js/lines/PerspectiveLineMaterial.js b/examples/js/lines/PerspectiveLineMaterial.js new file mode 100644 index 00000000000000..bf00b01ccdd7be --- /dev/null +++ b/examples/js/lines/PerspectiveLineMaterial.js @@ -0,0 +1,441 @@ +/** + * @author Nathaniel Tagg / http://github.com/nathanieltagg + * + * parameters = { + * color: , + * worldlinewidth: , // how fat is the line in 3d coordinates? + * minlinewidth: , // What is the miminum line width in pixels? (0 by default, set nonzero to keep line from vanishing no matter how far away) + * maxlinewidth: , // What is the maximum line width in pixels? (20 by default, keep the line from filling the screen) + * dashed: , + * dashScale: , + * dashSize: , + * gapSize: , + * resolution: , // to be set by renderer + * } + * Much of the code below from excellent work by WestLangley / http://github.com/WestLangley + */ + +THREE.UniformsLib.perspectiveline = { + worldlinewidth: { value: 0.3 }, + maxlinewidth: { value: 20 }, + minlinewidth: { value: 0 }, + resolution: { value: new THREE.Vector2( 1, 1 ) }, + dashScale: { value: 1 }, + dashSize: { value: 1 }, + gapSize: { value: 1 } // todo FIX - maybe change to totalSize +}; + +THREE.ShaderLib[ 'perspectiveline' ] = { + + uniforms: THREE.UniformsUtils.merge( [ + THREE.UniformsLib.common, + THREE.UniformsLib.fog, + THREE.UniformsLib.perspectiveline + ] ), + + vertexShader: + ` + #include + #include + #include + #include + #include + + uniform float worldlinewidth; + uniform float minlinewidth; + uniform float maxlinewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + + varying vec2 vUv; + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + + #endif + + float aspect = resolution.x / resolution.y; + + vUv = uv; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec2 ndcStart = clipStart.xy / clipStart.w; + vec2 ndcEnd = clipEnd.xy / clipEnd.w; + + // direction + vec2 dir = ndcEnd - ndcStart; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + // perpendicular to dir + vec2 offset = vec2( dir.y, - dir.x ); + + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // Adjust the line width according to how far this segment is away from us. I'm not 100% confident of my math here, but I believe that z/w is the + // distance away from us this point is. We muliply resolution.y/w to get to pixel space, which allows + // us to apply the linewidth clamp, then move back. + float linewidth = abs(2.0*resolution.y*worldlinewidth*( (position.y<0.5)? (start.z/clipStart.w/clipStart.w) : (end.z/clipEnd.w/clipEnd.w) )); + + linewidth = clamp(linewidth,minlinewidth,maxlinewidth); + + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `, + + fragmentShader: + ` + uniform vec3 diffuse; + uniform float opacity; + + #ifdef USE_DASH + + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #include + #include + #include + #include + #include + + varying vec2 vUv; + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + vec4 diffuseColor = vec4( diffuse, opacity ); + + #include + #include + + gl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a ); + + #include + #include + #include + #include + + } + ` +}; + +THREE.PerspectiveLineMaterial = function ( parameters ) { + + THREE.ShaderMaterial.call( this, { + + type: 'PerspectiveLineMaterial', + + uniforms: THREE.UniformsUtils.clone( THREE.ShaderLib[ 'perspectiveline' ].uniforms ), + + vertexShader: THREE.ShaderLib[ 'perspectiveline' ].vertexShader, + fragmentShader: THREE.ShaderLib[ 'perspectiveline' ].fragmentShader + + } ); + + this.dashed = false; + + Object.defineProperties( this, { + + color: { + + enumerable: true, + + get: function () { + + return this.uniforms.diffuse.value; + + }, + + set: function ( value ) { + + this.uniforms.diffuse.value = value; + + } + + }, + + worldlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.worldlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.worldlinewidth.value = value; + + } + + }, + + minlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.minlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.minlinewidth.value = value; + + } + + }, + + + maxlinewidth: { + + enumerable: true, + + get: function () { + + return this.uniforms.maxlinewidth.value; + + }, + + set: function ( value ) { + + this.uniforms.maxlinewidth.value = value; + + } + + }, + + dashScale: { + + enumerable: true, + + get: function () { + + return this.uniforms.dashScale.value; + + }, + + set: function ( value ) { + + this.uniforms.dashScale.value = value; + + } + + }, + + dashSize: { + + enumerable: true, + + get: function () { + + return this.uniforms.dashSize.value; + + }, + + set: function ( value ) { + + this.uniforms.dashSize.value = value; + + } + + }, + + gapSize: { + + enumerable: true, + + get: function () { + + return this.uniforms.gapSize.value; + + }, + + set: function ( value ) { + + this.uniforms.gapSize.value = value; + + } + + }, + + resolution: { + + enumerable: true, + + get: function () { + + return this.uniforms.resolution.value; + + }, + + set: function ( value ) { + + this.uniforms.resolution.value.copy( value ); + + } + + } + + } ); + + this.setValues( parameters ); + +}; + +THREE.PerspectiveLineMaterial.prototype = Object.create( THREE.ShaderMaterial.prototype ); +THREE.PerspectiveLineMaterial.prototype.constructor = THREE.PerspectiveLineMaterial; + +THREE.PerspectiveLineMaterial.prototype.isPerspectiveLineMaterial = true; + +THREE.PerspectiveLineMaterial.prototype.copy = function ( source ) { + + THREE.ShaderMaterial.prototype.copy.call( this, source ); + + this.color.copy( source.color ); + + this.worldlinewidth = source.worldlinewidth; + this.minlinewidth = source.minlinewidth; + this.maxlinewidth = source.maxlinewidth; + + this.resolution = source.resolution; + + // todo + + return this; + +}; + diff --git a/examples/jsm/lines/PerspectiveLineMaterial.js b/examples/jsm/lines/PerspectiveLineMaterial.js index 4ea188e9bf3e94..c791108eec96d3 100644 --- a/examples/jsm/lines/PerspectiveLineMaterial.js +++ b/examples/jsm/lines/PerspectiveLineMaterial.js @@ -1,15 +1,18 @@ /** - * @author WestLangley / http://github.com/WestLangley + * @author Nathaniel Tagg / http://github.com/nathanieltagg * * parameters = { - * color: , - * linewidth: , - * dashed: , + * color: , + * worldlinewidth: , // how fat is the line in 3d coordinates? + * minlinewidth: , // What is the miminum line width in pixels? (0 by default, set nonzero to keep line from vanishing no matter how far away) + * maxlinewidth: , // What is the maximum line width in pixels? (20 by default, keep the line from filling the screen) + * dashed: , * dashScale: , * dashSize: , * gapSize: , * resolution: , // to be set by renderer * } + * Much of the code below from excellent work by WestLangley / http://github.com/WestLangley */ import { @@ -28,8 +31,7 @@ UniformsLib.perspectiveline = { resolution: { value: new Vector2( 1, 1 ) }, dashScale: { value: 1 }, dashSize: { value: 1 }, - gapSize: { value: 1 } // todo FIX - maybe change to totalSize - + gapSize: { value: 1 } }; ShaderLib[ 'perspectiveline' ] = { diff --git a/examples/webgl_lines_fat.html b/examples/webgl_lines_fat.html index ac886bfb3d40f8..35f62abe3099b3 100644 --- a/examples/webgl_lines_fat.html +++ b/examples/webgl_lines_fat.html @@ -104,13 +104,13 @@ line = new Line2( geometry, matLine ); line.computeLineDistances(); line.scale.set( 1, 1, 3 ); + line.visible = false; scene.add( line ); + // perspective line, which gets narrower as it receeds into the distance - - // perspective line perspectiveMatLine = new PerspectiveLineMaterial( { - color: 0x00ff00, + color: 0xffffff, vertexColors: THREE.VertexColors, worldlinewidth : 0.2, maxlinewidth: 100, @@ -121,7 +121,7 @@ perline.computeLineDistances(); perline.scale.set( 1, 1, 3 ); - perline.visible = false; + perline.visible = true; scene.add( perline ); // THREE.Line ( THREE.BufferGeometry, THREE.LineBasicMaterial ) - rendered with gl.LINE_STRIP @@ -260,7 +260,7 @@ gui = new GUI(); var param = { - 'line type': 0, + 'line type': 2, 'width (px)': 5, 'dashed': false, 'dash scale': 1, From f26cae77fac4582853970b69dfad559851e795f1 Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Sat, 3 Aug 2019 19:37:44 -0400 Subject: [PATCH 04/11] remove package-lock --- package-lock.json | 2115 --------------------------------------------- 1 file changed, 2115 deletions(-) delete mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 61fe9c02beba67..00000000000000 --- a/package-lock.json +++ /dev/null @@ -1,2115 +0,0 @@ -{ - "name": "three", - "version": "0.107.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } - }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/node": { - "version": "12.0.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.10.tgz", - "integrity": "sha512-LcsGbPomWsad6wmMNv7nBLw7YYYyfdYcz6xryKYQhx89c3XXan+8Q6AJ43G5XDIaklaVkK3mE4fCb0SBvMiPSQ==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.11.0.tgz", - "integrity": "sha512-mXv9ccCou89C8/4avKHuPB2WkSZyY/XcTQUXd5LFZAcLw1I3mWYVjUu6eS9Ja0QkP/ClolbcW9tb3Ov/pMdcqw==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "1.11.0", - "eslint-utils": "^1.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^2.0.1", - "tsutils": "^3.7.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.11.0.tgz", - "integrity": "sha512-7LbfaqF6B8oa8cp/315zxKk8FFzosRzzhF8Kn/ZRsRsnpm7Qcu25cR/9RnAQo5utZ2KIWVgaALr+ZmcbG47ruw==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "1.11.0", - "eslint-scope": "^4.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.11.0.tgz", - "integrity": "sha512-5xBExyXaxVyczrZvbRKEXvaTUFFq7gIM9BynXukXZE0zF3IQP/FxF4mPmmh3gJ9egafZFqByCpPTFm3dk4SY7Q==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "1.11.0", - "@typescript-eslint/typescript-estree": "1.11.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.11.0.tgz", - "integrity": "sha512-fquUHF5tAx1sM2OeRCC7wVxFd1iMELWMGCzOSmJ3pLzArj9+kRixdlC4d5MncuzXpjEqc6045p3KwM0o/3FuUA==", - "dev": true, - "requires": { - "lodash.unescape": "4.0.1", - "semver": "5.5.0" - } - }, - "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", - "dev": true - }, - "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", - "dev": true - }, - "ajv": { - "version": "6.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", - "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", - "dev": true, - "requires": { - "fast-deep-equal": "^2.0.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - }, - "commander": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", - "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concurrently": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-4.1.1.tgz", - "integrity": "sha512-48+FE5RJ0qc8azwKv4keVQWlni1hZeSjcWr8shBelOBtBHcKj1aJFM9lHRiSc1x7lq416pkvsqfBMhSRja+Lhw==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "date-fns": "^1.23.0", - "lodash": "^4.17.10", - "read-pkg": "^4.0.1", - "rxjs": "^6.3.3", - "spawn-command": "^0.0.2-1", - "supports-color": "^4.5.0", - "tree-kill": "^1.1.0", - "yargs": "^12.0.1" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "corser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", - "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", - "dev": true - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "ecstatic": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz", - "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==", - "dev": true, - "requires": { - "he": "^1.1.1", - "mime": "^1.6.0", - "minimist": "^1.1.0", - "url-join": "^2.0.5" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.0.1.tgz", - "integrity": "sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^6.0.0", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^3.1.0", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", - "dev": true - } - } - }, - "eslint-config-mdcs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/eslint-config-mdcs/-/eslint-config-mdcs-4.2.3.tgz", - "integrity": "sha512-pSiX8roIR7KVZeKBrzQUiRAr2jxLn0H8WUHHCgq2TdoVGSLk/GRNeB78WG1IZnTwENgtSgDtMXq7/UVDBXls+Q==", - "dev": true - }, - "eslint-plugin-html": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.0.0.tgz", - "integrity": "sha512-PQcGippOHS+HTbQCStmH5MY1BF2MaU8qW/+Mvo/8xTa/ioeMXdSP+IiaBw2+nh0KEMfYQKuTz1Zo+vHynjwhbg==", - "dev": true, - "requires": { - "htmlparser2": "^3.10.1" - } - }, - "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", - "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", - "dev": true - }, - "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", - "dev": true - }, - "espree": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.0.0.tgz", - "integrity": "sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", - "dev": true, - "requires": { - "estraverse": "^4.0.0" - } - }, - "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", - "dev": true, - "requires": { - "estraverse": "^4.1.0" - } - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", - "dev": true - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", - "dev": true - }, - "eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", - "dev": true - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "external-editor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", - "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, - "failonlyreporter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/failonlyreporter/-/failonlyreporter-1.0.0.tgz", - "integrity": "sha512-daW559J4F/nWk0AiUPuxpCNCRXNa74yQdZNAVBIJt192VbsfKMNZocCqvRLjFIIp9BeBGu4gUhFJImmb4kSWOQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", - "dev": true, - "requires": { - "flat-cache": "^2.0.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", - "dev": true, - "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" - } - }, - "flatted": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", - "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", - "dev": true - }, - "follow-redirects": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz", - "integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==", - "dev": true, - "requires": { - "debug": "^3.2.6" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "google-closure-compiler": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20190618.0.0.tgz", - "integrity": "sha512-f5zJQSWnlawuQlGo9TxcuprBGxIS5ksikj/pjDxdlRTXWt3dOKqEFA3CN8QshNYDl6oEjtO/ehiNx64fqEgkUA==", - "dev": true, - "requires": { - "chalk": "2.x", - "google-closure-compiler-java": "^20190618.0.0", - "google-closure-compiler-js": "^20190618.0.0", - "google-closure-compiler-linux": "^20190618.0.0", - "google-closure-compiler-osx": "^20190618.0.0", - "google-closure-compiler-windows": "^20190618.0.0", - "minimist": "1.x", - "vinyl": "2.x", - "vinyl-sourcemaps-apply": "^0.2.0" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "google-closure-compiler-java": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20190618.0.0.tgz", - "integrity": "sha512-y6gAyJHMH5k2SM0qj/lyErEjmFGMvcT3glcx5Lsrl99CGwImJY0gDi+Cy9S0pczZvLG+wUW33AEfEW9MtdRZ6A==", - "dev": true - }, - "google-closure-compiler-js": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-js/-/google-closure-compiler-js-20190618.0.0.tgz", - "integrity": "sha512-Xc/84uN00GLUzRwWx25Lg11VuSTz/1odWy0d+pM3F/26fXqi16ZhhkVoe6VVFklSSMVDyGTPAH0ZkyfZhinKhA==", - "dev": true - }, - "google-closure-compiler-linux": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20190618.0.0.tgz", - "integrity": "sha512-idWJ/sFmOSYfCmDbCVMcaBX2NCUCxukjt2UzT5PJmpoVLmJuwwoVbpQZVfvgRvEH4bLzvvcvJRfn5nIiODjjaQ==", - "dev": true, - "optional": true - }, - "google-closure-compiler-osx": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20190618.0.0.tgz", - "integrity": "sha512-OzXMW+hKq76NJt9MIRQhV7pHTzHISCXtg+LZUPcqNT+V/tcvOlrSaflokmvyJPzEVk889QArYp8JgZ7mqHuY5g==", - "dev": true, - "optional": true - }, - "google-closure-compiler-windows": { - "version": "20190618.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20190618.0.0.tgz", - "integrity": "sha512-2qzY/fQneEg+zFvRGoNeJkAY6VU5OcmBT37l+xTBGQvy/AauCLWltSGcOYNEi7Qd3OEBVIcAJ+CzNOV9s3jfwA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", - "dev": true, - "requires": { - "eventemitter3": "^3.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - } - }, - "http-server": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.11.1.tgz", - "integrity": "sha512-6JeGDGoujJLmhjiRGlt8yK8Z9Kl0vnl/dQoQZlc4oeqaUoAKQg94NILLfrY3oWzSyFaQCVNTcKE5PZ3cH8VP9w==", - "dev": true, - "requires": { - "colors": "1.0.3", - "corser": "~2.0.0", - "ecstatic": "^3.0.0", - "http-proxy": "^1.8.1", - "opener": "~1.4.0", - "optimist": "0.6.x", - "portfinder": "^1.0.13", - "union": "~0.4.3" - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", - "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "inquirer": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.4.1.tgz", - "integrity": "sha512-/Jw+qPZx4EDYsaT6uz7F4GJRNFMRdKNeUZw3ZnKV8lyuUgz/YWRCSUAJMZSVhSq4Ec0R2oYnyi6b3d4JXcL5Nw==", - "dev": true, - "requires": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.11", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "js-reporters": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/js-reporters/-/js-reporters-1.2.1.tgz", - "integrity": "sha1-+IxgjjJKM3OpW8xFrTBeXJecRZs=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==", - "dev": true - }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", - "dev": true - }, - "map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node-watch": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.6.0.tgz", - "integrity": "sha512-XAgTL05z75ptd7JSVejH1a2Dm1zmXYhuDr9l230Qk6Z7/7GPcnAs/UyJJ4ggsXSvWil8iOzwQLW0zuGUvHpG8g==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - } - } - }, - "opener": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz", - "integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg=", - "dev": true - }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - }, - "dependencies": { - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - } - } - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "wordwrap": "~1.0.0" - } - }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "portfinder": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz", - "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==", - "dev": true, - "requires": { - "async": "^1.5.2", - "debug": "^2.2.0", - "mkdirp": "0.5.x" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz", - "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ=", - "dev": true - }, - "qunit": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.9.2.tgz", - "integrity": "sha512-wTOYHnioWHcx5wa85Wl15IE7D6zTZe2CQlsodS14yj7s2FZ3MviRnQluspBZsueIDEO7doiuzKlv05yfky1R7w==", - "dev": true, - "requires": { - "commander": "2.12.2", - "js-reporters": "1.2.1", - "minimatch": "3.0.4", - "node-watch": "0.6.0", - "resolve": "1.9.0" - }, - "dependencies": { - "resolve": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", - "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, - "read-pkg": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", - "dev": true, - "requires": { - "normalize-package-data": "^2.3.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0" - } - }, - "readable-stream": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", - "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", - "dev": true - }, - "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rollup": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.16.2.tgz", - "integrity": "sha512-UAZxaQvH0klYZdF+90xv9nGb+m4p8jdoaow1VL5/RzDK/gN/4CjvaMmJNcOIv1/+gtzswKhAg/467mzF0sLpAg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "@types/node": "^12.0.8", - "acorn": "^6.1.1" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rxjs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", - "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "spawn-command": { - "version": "0.0.2-1", - "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", - "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", - "dev": true - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz", - "integrity": "sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - } - } - }, - "table": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.1.tgz", - "integrity": "sha512-E6CK1/pZe2N75rGZQotFOdmzWQ1AILtgYbMAbAjvms0S1l5IDB47zG3nCnFGB/w+7nB3vKofbLXCH7HPBo864w==", - "dev": true, - "requires": { - "ajv": "^6.9.1", - "lodash": "^4.17.11", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "tree-kill": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.1.tgz", - "integrity": "sha512-4hjqbObwlh2dLyW4tcz0Ymw0ggoaVDMveUB9w8kFSQScdRLo0gxO9J7WFcUBo+W3C1TLdFIEwNOWebgZZ0RH9Q==", - "dev": true - }, - "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true - }, - "tsutils": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.14.0.tgz", - "integrity": "sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "typescript": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz", - "integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==", - "dev": true - }, - "union": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz", - "integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=", - "dev": true, - "requires": { - "qs": "~2.3.3" - } - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "url-join": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz", - "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-sourcemaps-apply": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", - "dev": true, - "requires": { - "source-map": "^0.5.1" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - } - } -} From 280031f568eda8739c7d5281ffbe459bf90ac7b6 Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Sat, 3 Aug 2019 19:40:54 -0400 Subject: [PATCH 05/11] Revert built files. --- build/three.js | 329 +++++++------ build/three.min.js | 1069 +++++++++++++++++++++-------------------- build/three.module.js | 329 +++++++------ 3 files changed, 909 insertions(+), 818 deletions(-) diff --git a/build/three.js b/build/three.js index e01951488702f7..b0756334b7dd34 100644 --- a/build/three.js +++ b/build/three.js @@ -1635,8 +1635,6 @@ * @author WestLangley / http://github.com/WestLangley */ - var _vector, _quaternion; - function Vector3( x, y, z ) { this.x = x || 0; @@ -1858,27 +1856,35 @@ }, - applyEuler: function ( euler ) { + applyEuler: function () { - if ( _quaternion === undefined ) _quaternion = new Quaternion(); + var quaternion = new Quaternion(); - if ( ! ( euler && euler.isEuler ) ) { + return function applyEuler( euler ) { - console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' ); + if ( ! ( euler && euler.isEuler ) ) { - } + console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' ); - return this.applyQuaternion( _quaternion.setFromEuler( euler ) ); + } - }, + return this.applyQuaternion( quaternion.setFromEuler( euler ) ); - applyAxisAngle: function ( axis, angle ) { + }; - if ( _quaternion === undefined ) _quaternion = new Quaternion(); + }(), - return this.applyQuaternion( _quaternion.setFromAxisAngle( axis, angle ) ); + applyAxisAngle: function () { - }, + var quaternion = new Quaternion(); + + return function applyAxisAngle( axis, angle ) { + + return this.applyQuaternion( quaternion.setFromAxisAngle( axis, angle ) ); + + }; + + }(), applyMatrix3: function ( m ) { @@ -2162,26 +2168,34 @@ }, - projectOnPlane: function ( planeNormal ) { + projectOnPlane: function () { - if ( _vector === undefined ) _vector = new Vector3(); + var v1 = new Vector3(); - _vector.copy( this ).projectOnVector( planeNormal ); + return function projectOnPlane( planeNormal ) { - return this.sub( _vector ); + v1.copy( this ).projectOnVector( planeNormal ); - }, + return this.sub( v1 ); - reflect: function ( normal ) { + }; - if ( _vector === undefined ) _vector = new Vector3(); + }(), + + reflect: function () { // reflect incident vector off plane orthogonal to normal // normal is assumed to have unit length - return this.sub( _vector.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); + var v1 = new Vector3(); - }, + return function reflect( normal ) { + + return this.sub( v1.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); + + }; + + }(), angleTo: function ( v ) { @@ -2335,7 +2349,7 @@ * @author tschw */ - var _vector$1; + var _vector; function Matrix3() { @@ -2422,17 +2436,17 @@ applyToBufferAttribute: function ( attribute ) { - if ( _vector$1 === undefined ) _vector$1 = new Vector3(); + if ( _vector === undefined ) _vector = new Vector3(); for ( var i = 0, l = attribute.count; i < l; i ++ ) { - _vector$1.x = attribute.getX( i ); - _vector$1.y = attribute.getY( i ); - _vector$1.z = attribute.getZ( i ); + _vector.x = attribute.getX( i ); + _vector.y = attribute.getY( i ); + _vector.z = attribute.getZ( i ); - _vector$1.applyMatrix3( this ); + _vector.applyMatrix3( this ); - attribute.setXYZ( i, _vector$1.x, _vector$1.y, _vector$1.z ); + attribute.setXYZ( i, _vector.x, _vector.y, _vector.z ); } @@ -4809,7 +4823,7 @@ * @author bhouston / http://clara.io */ - var _matrix, _quaternion$1; + var _matrix, _quaternion; function Euler( x, y, z, order ) { @@ -5075,11 +5089,11 @@ // WARNING: this discards revolution information -bhouston - if ( _quaternion$1 === undefined ) _quaternion$1 = new Quaternion(); + if ( _quaternion === undefined ) _quaternion = new Quaternion(); - _quaternion$1.setFromEuler( this ); + _quaternion.setFromEuler( this ); - return this.setFromQuaternion( _quaternion$1, newOrder ); + return this.setFromQuaternion( _quaternion, newOrder ); }, @@ -7867,7 +7881,7 @@ * @author mrdoob / http://mrdoob.com/ */ - var _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, + var ColorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2, 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50, 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B, @@ -7892,9 +7906,6 @@ 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0, 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 }; - var _hslA = { h: 0, s: 0, l: 0 }; - var _hslB = { h: 0, s: 0, l: 0 }; - function Color( r, g, b ) { if ( g === undefined && b === undefined ) { @@ -8125,7 +8136,7 @@ if ( style && style.length > 0 ) { // color keywords - var hex = _colorKeywords[ style ]; + var hex = ColorKeywords[ style ]; if ( hex !== undefined ) { @@ -8307,17 +8318,23 @@ }, - offsetHSL: function ( h, s, l ) { + offsetHSL: function () { - this.getHSL( _hslA ); + var hsl = {}; - _hslA.h += h; _hslA.s += s; _hslA.l += l; + return function ( h, s, l ) { - this.setHSL( _hslA.h, _hslA.s, _hslA.l ); + this.getHSL( hsl ); - return this; + hsl.h += h; hsl.s += s; hsl.l += l; - }, + this.setHSL( hsl.h, hsl.s, hsl.l ); + + return this; + + }; + + }(), add: function ( color ) { @@ -8389,20 +8406,27 @@ }, - lerpHSL: function ( color, alpha ) { + lerpHSL: function () { - this.getHSL( _hslA ); - color.getHSL( _hslB ); + var hslA = { h: 0, s: 0, l: 0 }; + var hslB = { h: 0, s: 0, l: 0 }; - var h = _Math.lerp( _hslA.h, _hslB.h, alpha ); - var s = _Math.lerp( _hslA.s, _hslB.s, alpha ); - var l = _Math.lerp( _hslA.l, _hslB.l, alpha ); + return function lerpHSL( color, alpha ) { - this.setHSL( h, s, l ); + this.getHSL( hslA ); + color.getHSL( hslB ); - return this; + var h = _Math.lerp( hslA.h, hslB.h, alpha ); + var s = _Math.lerp( hslA.s, hslB.s, alpha ); + var l = _Math.lerp( hslA.l, hslB.l, alpha ); - }, + this.setHSL( h, s, l ); + + return this; + + }; + + }(), equals: function ( c ) { @@ -13894,8 +13918,6 @@ * @author bhouston / http://clara.io */ - var _vector1, _vector2, _normalMatrix; - function Plane( normal, constant ) { // normal is assumed to be normalized @@ -13936,24 +13958,24 @@ }, - setFromCoplanarPoints: function ( a, b, c ) { + setFromCoplanarPoints: function () { - if ( _vector1 === undefined ) { + var v1 = new Vector3(); + var v2 = new Vector3(); - _vector1 = new Vector3(); - _vector2 = new Vector3(); + return function setFromCoplanarPoints( a, b, c ) { - } + var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize(); - var normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + this.setFromNormalAndCoplanarPoint( normal, a ); - this.setFromNormalAndCoplanarPoint( normal, a ); + return this; - return this; + }; - }, + }(), clone: function () { @@ -14016,46 +14038,50 @@ }, - intersectLine: function ( line, target ) { + intersectLine: function () { - if ( _vector1 === undefined ) _vector1 = new Vector3(); + var v1 = new Vector3(); - if ( target === undefined ) { + return function intersectLine( line, target ) { - console.warn( 'THREE.Plane: .intersectLine() target is now required' ); - target = new Vector3(); + if ( target === undefined ) { - } + console.warn( 'THREE.Plane: .intersectLine() target is now required' ); + target = new Vector3(); - var direction = line.delta( _vector1 ); + } - var denominator = this.normal.dot( direction ); + var direction = line.delta( v1 ); - if ( denominator === 0 ) { + var denominator = this.normal.dot( direction ); - // line is coplanar, return origin - if ( this.distanceToPoint( line.start ) === 0 ) { + if ( denominator === 0 ) { - return target.copy( line.start ); + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { - } + return target.copy( line.start ); - // Unsure if this is the correct method to handle this case. - return undefined; + } - } + // Unsure if this is the correct method to handle this case. + return undefined; - var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + } - if ( t < 0 || t > 1 ) { + var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; - return undefined; + if ( t < 0 || t > 1 ) { - } + return undefined; - return target.copy( direction ).multiplyScalar( t ).add( line.start ); + } - }, + return target.copy( direction ).multiplyScalar( t ).add( line.start ); + + }; + + }(), intersectsLine: function ( line ) { @@ -14093,26 +14119,26 @@ }, - applyMatrix4: function ( matrix, optionalNormalMatrix ) { + applyMatrix4: function () { - if ( _normalMatrix === undefined ) { + var v1 = new Vector3(); + var m1 = new Matrix3(); - _normalMatrix = new Matrix3(); - _vector1 = new Vector3(); + return function applyMatrix4( matrix, optionalNormalMatrix ) { - } + var normalMatrix = optionalNormalMatrix || m1.getNormalMatrix( matrix ); - var normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); + var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix ); - var referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); + var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); - var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + this.constant = - referencePoint.dot( normal ); - this.constant = - referencePoint.dot( normal ); + return this; - return this; + }; - }, + }(), translate: function ( offset ) { @@ -14136,9 +14162,6 @@ * @author bhouston / http://clara.io */ - var _sphere; - var _vector$2; - function Frustum( p0, p1, p2, p3, p4, p5 ) { this.planes = [ @@ -14211,29 +14234,41 @@ }, - intersectsObject: function ( object ) { + intersectsObject: function () { - if ( _sphere === undefined ) _sphere = new Sphere(); + var sphere = new Sphere(); - var geometry = object.geometry; + return function intersectsObject( object ) { - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + var geometry = object.geometry; - _sphere.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); + if ( geometry.boundingSphere === null ) + geometry.computeBoundingSphere(); - return this.intersectsSphere( _sphere ); + sphere.copy( geometry.boundingSphere ) + .applyMatrix4( object.matrixWorld ); - }, + return this.intersectsSphere( sphere ); - intersectsSprite: function ( sprite ) { + }; - _sphere.center.set( 0, 0, 0 ); - _sphere.radius = 0.7071067811865476; - _sphere.applyMatrix4( sprite.matrixWorld ); + }(), - return this.intersectsSphere( _sphere ); + intersectsSprite: function () { - }, + var sphere = new Sphere(); + + return function intersectsSprite( sprite ) { + + sphere.center.set( 0, 0, 0 ); + sphere.radius = 0.7071067811865476; + sphere.applyMatrix4( sprite.matrixWorld ); + + return this.intersectsSphere( sphere ); + + }; + + }(), intersectsSphere: function ( sphere ) { @@ -14257,33 +14292,37 @@ }, - intersectsBox: function ( box ) { + intersectsBox: function () { - if ( _vector$2 === undefined ) _vector$2 = new Vector3(); + var p = new Vector3(); - var planes = this.planes; + return function intersectsBox( box ) { - for ( var i = 0; i < 6; i ++ ) { + var planes = this.planes; - var plane = planes[ i ]; + for ( var i = 0; i < 6; i ++ ) { - // corner at max distance + var plane = planes[ i ]; - _vector$2.x = plane.normal.x > 0 ? box.max.x : box.min.x; - _vector$2.y = plane.normal.y > 0 ? box.max.y : box.min.y; - _vector$2.z = plane.normal.z > 0 ? box.max.z : box.min.z; + // corner at max distance - if ( plane.distanceToPoint( _vector$2 ) < 0 ) { + p.x = plane.normal.x > 0 ? box.max.x : box.min.x; + p.y = plane.normal.y > 0 ? box.max.y : box.min.y; + p.z = plane.normal.z > 0 ? box.max.z : box.min.z; - return false; + if ( plane.distanceToPoint( p ) < 0 ) { + + return false; + + } } - } + return true; - return true; + }; - }, + }(), containsPoint: function ( point ) { @@ -44928,8 +44967,6 @@ * @author bhouston / http://clara.io */ - var _vector$3; - function Box2( min, max ) { this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity ); @@ -44962,17 +44999,21 @@ }, - setFromCenterAndSize: function ( center, size ) { + setFromCenterAndSize: function () { - if ( _vector$3 === undefined ) _vector$3 = new Vector2(); + var v1 = new Vector2(); - var halfSize = _vector$3.copy( size ).multiplyScalar( 0.5 ); - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); + return function setFromCenterAndSize( center, size ) { - return this; + var halfSize = v1.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); - }, + return this; + + }; + + }(), clone: function () { @@ -45114,14 +45155,18 @@ }, - distanceToPoint: function ( point ) { + distanceToPoint: function () { - if ( _vector$3 === undefined ) _vector$3 = new Vector2(); + var v1 = new Vector2(); - var clampedPoint = _vector$3.copy( point ).clamp( this.min, this.max ); - return clampedPoint.sub( point ).length(); + return function distanceToPoint( point ) { - }, + var clampedPoint = v1.copy( point ).clamp( this.min, this.max ); + return clampedPoint.sub( point ).length(); + + }; + + }(), intersect: function ( box ) { diff --git a/build/three.min.js b/build/three.min.js index db1356f06cc44f..8097b089e061f7 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,126 +1,127 @@ +// threejs.org/license (function(l,oa){"object"===typeof exports&&"undefined"!==typeof module?oa(exports):"function"===typeof define&&define.amd?define(["exports"],oa):(l=l||self,oa(l.THREE={}))})(this,function(l){function oa(){}function C(a,b){this.x=a||0;this.y=b||0}function ja(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function n(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function ka(){this.elements=[1,0,0,0,1,0,0,0,1];0c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function xe(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function ye(a){return.0031308> -a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Wb(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 O(){Object.defineProperty(this,"id",{value:tg++});this.uuid=M.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors= +function V(a,b,c,d,e,f,g,h,k,m){Object.defineProperty(this,"id",{value:hg++});this.uuid=M.generateUUID();this.name="";this.image=void 0!==a?a:V.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:V.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new C(0,0);this.repeat=new C(1,1);this.center=new C(0,0);this.rotation= +0;this.matrixAutoUpdate=!0;this.matrix=new ka;this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ha(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Va(a,b,c){this.width=a;this.height=b;this.scissor=new ha(0,0,a,b);this.scissorTest=!1;this.viewport=new ha(0,0,a,b);c=c||{};this.texture=new V(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy, +c.encoding);this.texture.image={};this.texture.image.width=a;this.texture.image.height=b;this.texture.generateMipmaps=void 0!==c.generateMipmaps?c.generateMipmaps:!1;this.texture.minFilter=void 0!==c.minFilter?c.minFilter:1006;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function me(a,b,c){Va.call(this,a,b,c);this.samples=4}function Q(){this.elements=[1,0,0,0,0, +1,0,0,0,0,1,0,0,0,0,1];0c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a}function pe(a){return.04045>a?.0773993808*a:Math.pow(.9478672986*a+.0521327014,2.4)}function qe(a){return.0031308> +a?12.92*a:1.055*Math.pow(a,.41666)-.055}function Sb(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 O(){Object.defineProperty(this,"id",{value:jg++});this.uuid=M.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.vertexTangents=this.flatShading=!1;this.vertexColors= 0;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.stencilFunc=519;this.stencilRef=0;this.stencilMask=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.visible=!0;this.userData={};this.needsUpdate=!0}function pa(a){O.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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function N(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.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Kc(a,b,c){N.call(this,new Int8Array(a),b,c)}function Lc(a,b,c){N.call(this,new Uint8Array(a),b,c)}function Mc(a,b, -c){N.call(this,new Uint8ClampedArray(a),b,c)}function Nc(a,b,c){N.call(this,new Int16Array(a),b,c)}function zb(a,b,c){N.call(this,new Uint16Array(a),b,c)}function Oc(a,b,c){N.call(this,new Int32Array(a),b,c)}function Ab(a,b,c){N.call(this,new Uint32Array(a),b,c)}function E(a,b,c){N.call(this,new Float32Array(a),b,c)}function Pc(a,b,c){N.call(this,new Float64Array(a),b,c)}function pf(){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 qf(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function B(){Object.defineProperty(this,"id",{value:ug+=2});this.uuid=M.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere= -this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function ta(a,b){G.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new pa({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function P(){Object.defineProperty(this,"id",{value:vg+=2});this.uuid=M.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights= -[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Xb(a,b,c,d,e,f){P.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new lb(a,b,c,d,e,f));this.mergeVertices()}function lb(a,b,c,d,e,f){function g(a, +this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.visible=!0;this.userData={};this.needsUpdate=!0}function ma(a){O.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.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function N(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.dynamic=!1;this.updateRange={offset:0,count:-1};this.version=0}function Dc(a,b,c){N.call(this,new Int8Array(a),b,c)}function Ec(a,b,c){N.call(this,new Uint8Array(a),b,c)}function Fc(a,b, +c){N.call(this,new Uint8ClampedArray(a),b,c)}function Gc(a,b,c){N.call(this,new Int16Array(a),b,c)}function wb(a,b,c){N.call(this,new Uint16Array(a),b,c)}function Hc(a,b,c){N.call(this,new Int32Array(a),b,c)}function xb(a,b,c){N.call(this,new Uint32Array(a),b,c)}function E(a,b,c){N.call(this,new Float32Array(a),b,c)}function Ic(a,b,c){N.call(this,new Float64Array(a),b,c)}function ff(){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 gf(a){if(0===a.length)return-Infinity;for(var b=a[0],c=1,d=a.length;cb&&(b=a[c]);return b}function B(){Object.defineProperty(this,"id",{value:kg+=2});this.uuid=M.generateUUID();this.name="";this.type="BufferGeometry";this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere= +this.boundingBox=null;this.drawRange={start:0,count:Infinity};this.userData={}}function ta(a,b){G.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new B;this.material=void 0!==b?b:new ma({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function P(){Object.defineProperty(this,"id",{value:lg+=2});this.uuid=M.generateUUID();this.name="";this.type="Geometry";this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=[];this.morphNormals=[];this.skinWeights= +[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function Tb(a,b,c,d,e,f){P.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new kb(a,b,c,d,e,f));this.mergeVertices()}function kb(a,b,c,d,e,f){function g(a, b,c,d,e,f,g,t,W,Y,C){var q=f/W,v=g/Y,x=f/2,D=g/2,w=t/2;g=W+1;var y=Y+1,Fa=f=0,S,F,z=new n;for(F=0;Fg;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function mb(a,b,c){Wa.call(this,a,b,c)}function Cb(a,b,c,d,e,f,g,h,k,m,r,p){V.call(this,null,f,g,h,k,m,d,e,r,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Ya(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== -b?b:0}function Ld(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ya,void 0!==b?b:new Ya,void 0!==c?c:new Ya,void 0!==d?d:new Ya,void 0!==e?e:new Ya,void 0!==f?f:new Ya]}function ze(){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 wg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer(); +new lb(c,c,d);this.renderTarget.texture.name="CubeCamera";this.update=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=a.getRenderTarget(),d=this.renderTarget,r=d.texture.generateMipmaps;d.texture.generateMipmaps=!1;a.setRenderTarget(d,0);a.render(b,e);a.setRenderTarget(d,1);a.render(b,f);a.setRenderTarget(d,2);a.render(b,g);a.setRenderTarget(d,3);a.render(b,h);a.setRenderTarget(d,4);a.render(b,k);d.texture.generateMipmaps=r;a.setRenderTarget(d,5);a.render(b,m);a.setRenderTarget(c)}; +this.clear=function(a,b,c,d){for(var e=a.getRenderTarget(),f=this.renderTarget,g=0;6>g;g++)a.setRenderTarget(f,g),a.clear(b,c,d);a.setRenderTarget(e)}}function lb(a,b,c){Va.call(this,a,b,c)}function zb(a,b,c,d,e,f,g,h,k,m,r,p){V.call(this,null,f,g,h,k,m,d,e,r,p);this.image={data:a,width:b,height:c};this.magFilter=void 0!==k?k:1003;this.minFilter=void 0!==m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Ya(a,b){this.normal=void 0!==a?a:new n(1,0,0);this.constant=void 0!== +b?b:0}function Ed(a,b,c,d,e,f){this.planes=[void 0!==a?a:new Ya,void 0!==b?b:new Ya,void 0!==c?c:new Ya,void 0!==d?d:new Ya,void 0!==e?e:new Ya,void 0!==f?f:new Ya]}function re(){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 mg(a){function b(b,c){var d=b.array,e=b.dynamic?35048:35044,h=a.createBuffer(); a.bindBuffer(c,h);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:h,type:c,bytesPerElement:d.BYTES_PER_ELEMENT,version:b.version}}var c=new WeakMap;return{get:function(a){a.isInterleavedBufferAttribute&& (a=a.data);return c.get(a)},remove:function(b){b.isInterleavedBufferAttribute&&(b=b.data);var d=c.get(b);d&&(a.deleteBuffer(d.buffer),c.delete(b))},update:function(d,e){d.isInterleavedBufferAttribute&&(d=d.data);var f=c.get(d);if(void 0===f)c.set(d,b(d,e));else if(f.versionm;m++){if(p=d[m])if(h=p[0],k=p[1]){r&&e.addAttribute("morphTarget"+m,r[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function Hg(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function eb(a,b,c,d,e,f,g,h,k,m){a= -void 0!==a?a:[];V.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,k,m);this.flipY=!1}function Zb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function $b(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function ac(a,b,c){var d=a[0];if(0>=d||0/gm,function(a,c){a=U[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return Be(a)})}function Hf(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c< -parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]").replace(/UNROLLED_LOOP_INDEX/g,c);return a})}function sh(a,b,c,d,e,f,g){var h=a.getContext(),k=d.defines,m=e.vertexShader,r=e.fragmentShader,p="SHADOWMAP_TYPE_BASIC";1===f.shadowMapType?p="SHADOWMAP_TYPE_PCF":2===f.shadowMapType&&(p="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",l="ENVMAP_MODE_REFLECTION",q="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV"; -break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case 302:case 304:l="ENVMAP_MODE_REFRACTION"}switch(d.combine){case 0:q="ENVMAP_BLENDING_MULTIPLY";break;case 1:q="ENVMAP_BLENDING_MIX";break;case 2:q="ENVMAP_BLENDING_ADD"}}var v=0m;m++){if(p=d[m])if(h=p[0],k=p[1]){r&&e.addAttribute("morphTarget"+m,r[h]);f&&e.addAttribute("morphNormal"+m,f[h]);c[m]=k;continue}c[m]=0}g.getUniforms().setValue(a,"morphTargetInfluences",c)}}}function xg(a,b){var c={};return{update:function(d){var e=b.render.frame,f=d.geometry,g=a.get(d,f);c[g.id]!==e&&(f.isGeometry&&g.updateFromObject(d),a.update(g),c[g.id]=e);return g},dispose:function(){c={}}}}function db(a,b,c,d,e,f,g,h,k,m){a= +void 0!==a?a:[];V.call(this,a,void 0!==b?b:301,c,d,e,f,void 0!==g?g:1022,h,k,m);this.flipY=!1}function Vb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function Wb(a,b,c,d){V.call(this,null);this.image={data:a,width:b,height:c,depth:d};this.minFilter=this.magFilter=1003;this.wrapR=1001;this.flipY=this.generateMipmaps=!1}function Xb(a,b,c){var d=a[0];if(0>=d||0/gm,function(a,c){a=U[c];if(void 0===a)throw Error("Can not resolve #include <"+c+">");return te(a)})}function yf(a){return a.replace(/#pragma unroll_loop[\s]+?for \( int i = (\d+); i < (\d+); i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c< +parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]").replace(/UNROLLED_LOOP_INDEX/g,c);return a})}function ih(a,b,c,d,e,f,g){var h=a.getContext(),k=d.defines,m=e.vertexShader,r=e.fragmentShader,p="SHADOWMAP_TYPE_BASIC";1===f.shadowMapType?p="SHADOWMAP_TYPE_PCF":2===f.shadowMapType&&(p="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",l="ENVMAP_MODE_REFLECTION",q="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(d.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV"; +break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(d.envMap.mapping){case 302:case 304:l="ENVMAP_MODE_REFRACTION"}switch(d.combine){case 0:q="ENVMAP_BLENDING_MULTIPLY";break;case 1:q="ENVMAP_BLENDING_MIX";break;case 2:q="ENVMAP_BLENDING_ADD"}}var v=0c;c++)b.probe.push(new n);var d=new n,e=new Q,f=new Q;return{setup:function(c,h,k){for(var g=0,r=0,p=0,u=0;9>u;u++)b.probe[u].set(0, -0,0);var l=h=0,q=0,v=0,n=0,y=0,w=0,F=0;k=k.matrixWorldInverse;c.sort(Ah);u=0;for(var z=c.length;uza;za++)b.probe[za].addScaledVector(D.sh.coefficients[za],Y);else if(D.isDirectionalLight){var H=a.get(D);H.color.copy(D.color).multiplyScalar(D.intensity);H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); -H.direction.sub(d);H.direction.transformDirection(k);if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.directionalShadowMap[h]=za,b.directionalShadowMatrix[h]=D.shadow.matrix,y++;b.directional[h]=H;h++}else if(D.isSpotLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(W).multiplyScalar(Y);H.distance=C;H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); -H.direction.sub(d);H.direction.transformDirection(k);H.coneCos=Math.cos(D.angle);H.penumbraCos=Math.cos(D.angle*(1-D.penumbra));H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.spotShadowMap[q]=za,b.spotShadowMatrix[q]=D.shadow.matrix,F++;b.spot[q]=H;q++}else if(D.isRectAreaLight)H=a.get(D),H.color.copy(W).multiplyScalar(Y),H.position.setFromMatrixPosition(D.matrixWorld),H.position.applyMatrix4(k),f.identity(),e.copy(D.matrixWorld), +0,0);var l=h=0,q=0,v=0,n=0,y=0,w=0,F=0;k=k.matrixWorldInverse;c.sort(qh);u=0;for(var z=c.length;uya;ya++)b.probe[ya].addScaledVector(D.sh.coefficients[ya],Y);else if(D.isDirectionalLight){var H=a.get(D);H.color.copy(D.color).multiplyScalar(D.intensity);H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); +H.direction.sub(d);H.direction.transformDirection(k);if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.directionalShadowMap[h]=ya,b.directionalShadowMatrix[h]=D.shadow.matrix,y++;b.directional[h]=H;h++}else if(D.isSpotLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(W).multiplyScalar(Y);H.distance=C;H.direction.setFromMatrixPosition(D.matrixWorld);d.setFromMatrixPosition(D.target.matrixWorld); +H.direction.sub(d);H.direction.transformDirection(k);H.coneCos=Math.cos(D.angle);H.penumbraCos=Math.cos(D.angle*(1-D.penumbra));H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,b.spotShadowMap[q]=ya,b.spotShadowMatrix[q]=D.shadow.matrix,F++;b.spot[q]=H;q++}else if(D.isRectAreaLight)H=a.get(D),H.color.copy(W).multiplyScalar(Y),H.position.setFromMatrixPosition(D.matrixWorld),H.position.applyMatrix4(k),f.identity(),e.copy(D.matrixWorld), e.premultiply(k),f.extractRotation(e),H.halfWidth.set(.5*D.width,0,0),H.halfHeight.set(0,.5*D.height,0),H.halfWidth.applyMatrix4(f),H.halfHeight.applyMatrix4(f),b.rectArea[v]=H,v++;else if(D.isPointLight){H=a.get(D);H.position.setFromMatrixPosition(D.matrixWorld);H.position.applyMatrix4(k);H.color.copy(D.color).multiplyScalar(D.intensity);H.distance=D.distance;H.decay=D.decay;if(H.shadow=D.castShadow)Y=D.shadow,H.shadowBias=Y.bias,H.shadowRadius=Y.radius,H.shadowMapSize=Y.mapSize,H.shadowCameraNear= -Y.camera.near,H.shadowCameraFar=Y.camera.far,b.pointShadowMap[l]=za,b.pointShadowMatrix[l]=D.shadow.matrix,w++;b.point[l]=H;l++}else D.isHemisphereLight&&(H=a.get(D),H.direction.setFromMatrixPosition(D.matrixWorld),H.direction.transformDirection(k),H.direction.normalize(),H.skyColor.copy(D.color).multiplyScalar(Y),H.groundColor.copy(D.groundColor).multiplyScalar(Y),b.hemi[n]=H,n++)}b.ambient[0]=g;b.ambient[1]=r;b.ambient[2]=p;c=b.hash;if(c.directionalLength!==h||c.pointLength!==l||c.spotLength!== +Y.camera.near,H.shadowCameraFar=Y.camera.far,b.pointShadowMap[l]=ya,b.pointShadowMatrix[l]=D.shadow.matrix,w++;b.point[l]=H;l++}else D.isHemisphereLight&&(H=a.get(D),H.direction.setFromMatrixPosition(D.matrixWorld),H.direction.transformDirection(k),H.direction.normalize(),H.skyColor.copy(D.color).multiplyScalar(Y),H.groundColor.copy(D.groundColor).multiplyScalar(Y),b.hemi[n]=H,n++)}b.ambient[0]=g;b.ambient[1]=r;b.ambient[2]=p;c=b.hash;if(c.directionalLength!==h||c.pointLength!==l||c.spotLength!== q||c.rectAreaLength!==v||c.hemiLength!==n||c.numDirectionalShadows!==y||c.numPointShadows!==w||c.numSpotShadows!==F)b.directional.length=h,b.spot.length=q,b.rectArea.length=v,b.point.length=l,b.hemi.length=n,b.directionalShadowMap.length=y,b.pointShadowMap.length=w,b.spotShadowMap.length=F,b.directionalShadowMatrix.length=y,b.pointShadowMatrix.length=w,b.spotShadowMatrix.length=F,c.directionalLength=h,c.pointLength=l,c.spotLength=q,c.rectAreaLength=v,c.hemiLength=n,c.numDirectionalShadows=y,c.numPointShadows= -w,c.numSpotShadows=F,b.version=Ch++},state:b}}function Jf(){var a=new Bh,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 Dh(){function a(c){c=c.target;c.removeEventListener("dispose",a);delete b[c.id]}var b={};return{get:function(c,d){if(void 0===b[c.id]){var e=new Jf;b[c.id]={};b[c.id][d.id]=e;c.addEventListener("dispose",a)}else void 0=== -b[c.id][d.id]?(e=new Jf,b[c.id][d.id]=e):e=b[c.id][d.id];return e},dispose:function(){b={}}}}function ob(a){O.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.lights=this.fog=!1;this.setValues(a)}function pb(a){O.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.lights=this.fog=!1;this.setValues(a)}function Kf(a,b,c){function d(b,c,d,e,f,g){var h=b.geometry;var k=p;var m=b.customDepthMaterial;d&&(k=l,m=b.customDistanceMaterial);m?k=m:(m=!1,c.morphTargets&&(h&&h.isBufferGeometry?m=h.morphAttributes&&h.morphAttributes.position&&0d||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 +w[b]=0);z={};A=D=null;J={};Ha=S=C=W=null;t.reset();q.reset();v.reset()}}}function vh(a,b,c,d,e,f,g){function h(a,b){return Jc?new OffscreenCanvas(a,b):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function k(a,b,c,d){var e=1;if(a.width>d||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?M.floorPowerOfTwo:Math.floor,b=d(e*a.width),e=d(e*a.height),void 0===H&&(H=h(b,e)),c=c?h(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 M.isPowerOfTwo(a.width)&&M.isPowerOfTwo(a.height)}function r(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 l(a,c){if(!e.isWebGL2)return a;var d=a;6403===a&&(5126===c&&(d=33326),5131===c&&(d=33325),5121===c&&(d=33321));6407===a&&(5126===c&&(d=34837),5131===c&&(d=34843),5121===c&&(d=32849));6408===a&&(5126===c&&(d=34836),5131===c&&(d=34842),5121===c&&(d=32856));33325===d||33326===d||34842===d||34836===d?b.get("EXT_color_buffer_float"):(34843===d||34837===d)&& -console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return d}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&&delete za[b.id];g.memory.textures--}function v(b){b=b.target;b.removeEventListener("dispose",v);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.isWebGLRenderTargetCube)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=a.id,h=g.render.frame;za[f]!==h&&(za[f]=h,a.update())}if(0< +console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead.");return d}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&&delete ya[b.id];g.memory.textures--}function v(b){b=b.target;b.removeEventListener("dispose",v);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.isWebGLRenderTargetCube)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=a.id,h=g.render.frame;ya[f]!==h&&(ya[f]=h,a.update())}if(0< a.version&&e.__version!==a.version)if(f=a.image,void 0===f)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(!1===f.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{D(e,a,b);return}c.activeTexture(33984+b);c.bindTexture(3553,e.__webglTexture)}function y(b,g){var h=d.get(b);if(6===b.image.length)if(0q;q++)t[q]=g||u?u?b.image[q].image:b.image[q]:k(b.image[q],!1,!0,e.maxCubemapSize);var v=t[0],n=m(v)||e.isWebGL2,x=f.convert(b.format),D=f.convert(b.type),S=l(x,D);F(34067,b,n);for(q=0;6>q;q++)if(g)for(var w,y=t[q].mipmaps,Fa=0,H=y.length;Fa=e.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+a+" texture units while this GPU supports only "+e.maxTextures);E+=1;return a};this.resetTextureUnits=function(){E=0};this.setTexture2D=n;this.setTexture2DArray=function(a,b){var e=d.get(a);0q;q++)h.__webglFramebuffer[q]=a.createFramebuffer();else if(h.__webglFramebuffer=a.createFramebuffer(),q)if(e.isWebGL2){h.__webglMultisampledFramebuffer= a.createFramebuffer();h.__webglColorRenderbuffer=a.createRenderbuffer();a.bindRenderbuffer(36161,h.__webglColorRenderbuffer);q=f.convert(b.texture.format);var x=f.convert(b.texture.type);q=l(q,x);x=C(b);a.renderbufferStorageMultisample(36161,x,q,b.width,b.height);a.bindFramebuffer(36160,h.__webglMultisampledFramebuffer);a.framebufferRenderbuffer(36160,36064,36161,h.__webglColorRenderbuffer);a.bindRenderbuffer(36161,null);b.depthBuffer&&(h.__webglDepthRenderbuffer=a.createRenderbuffer(),Y(h.__webglDepthRenderbuffer, @@ -141,45 +142,45 @@ null);if(b.depthBuffer){h=d.get(b);k=!0===b.isWebGLRenderTargetCube;if(b.depthTe 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);h=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(36160,36096,3553,h,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(36160,33306,3553,h,0);else throw Error("Unknown depthTexture format");}else if(k)for(h.__webglDepthbuffer=[],k=0;6>k;k++)a.bindFramebuffer(36160,h.__webglFramebuffer[k]), h.__webglDepthbuffer[k]=a.createRenderbuffer(),Y(h.__webglDepthbuffer[k],b);else a.bindFramebuffer(36160,h.__webglFramebuffer),h.__webglDepthbuffer=a.createRenderbuffer(),Y(h.__webglDepthbuffer,b);a.bindFramebuffer(36160,null)}};this.updateRenderTargetMipmap=function(a){var b=a.texture,f=m(a)||e.isWebGL2;if(r(b,f)){f=a.isWebGLRenderTargetCube?34067:3553;var g=d.get(b).__webglTexture;c.bindTexture(f,g);p(f,b,a.width,a.height);c.bindTexture(f,null)}};this.updateMultisampleRenderTarget=function(b){if(b.isWebGLMultisampleRenderTarget)if(e.isWebGL2){var c= d.get(b);a.bindFramebuffer(36008,c.__webglMultisampledFramebuffer);a.bindFramebuffer(36009,c.__webglFramebuffer);c=b.width;var f=b.height,g=16384;b.depthBuffer&&(g|=256);b.stencilBuffer&&(g|=1024);a.blitFramebuffer(0,0,c,f,0,0,c,f,g,9728)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")};this.safeSetTexture2D=function(a,b){a&&a.isWebGLRenderTarget&&(!1===G&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."), -G=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?y(a,b):w(a,b)}}function Mf(a,b,c){return{convert:function(a){if(1E3===a)return 10497;if(1001===a)return 33071;if(1002===a)return 33648;if(1003===a)return 9728;if(1004===a)return 9984; +G=!0),a=a.texture);n(a,b)};this.safeSetTextureCube=function(a,b){a&&a.isWebGLRenderTargetCube&&(!1===B&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),B=!0),a=a.texture);a&&a.isCubeTexture||Array.isArray(a.image)&&6===a.image.length?y(a,b):w(a,b)}}function Df(a,b,c){return{convert:function(a){if(1E3===a)return 10497;if(1001===a)return 33071;if(1002===a)return 33648;if(1003===a)return 9728;if(1004===a)return 9984; if(1005===a)return 9986;if(1006===a)return 9729;if(1007===a)return 9985;if(1008===a)return 9987;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(c.isWebGL2)return 5131;var d=b.get("OES_texture_half_float");if(null!==d)return d.HALF_FLOAT_OES}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(100===a)return 32774;if(101===a)return 32778;if(102===a)return 32779;if(200===a)return 0;if(201===a)return 1;if(202===a)return 768;if(203===a)return 769;if(204===a)return 770;if(205===a)return 771;if(206===a)return 772;if(207===a)return 773;if(208===a)return 774;if(209===a)return 775;if(210===a)return 776;if(33776===a||33777===a||33778===a||33779===a)if(d=b.get("WEBGL_compressed_texture_s3tc"), null!==d){if(33776===a)return d.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===a)return d.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===a)return d.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===a)return d.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===a||35841===a||35842===a||35843===a)if(d=b.get("WEBGL_compressed_texture_pvrtc"),null!==d){if(35840===a)return d.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===a)return d.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===a)return d.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===a)return d.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196=== a&&(d=b.get("WEBGL_compressed_texture_etc1"),null!==d))return d.COMPRESSED_RGB_ETC1_WEBGL;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)if(d=b.get("WEBGL_compressed_texture_astc"),null!==d)return a;if(103===a||104===a){if(c.isWebGL2){if(103===a)return 32775;if(104===a)return 32776}d=b.get("EXT_blend_minmax");if(null!==d){if(103===a)return d.MIN_EXT;if(104===a)return d.MAX_EXT}}if(1020===a){if(c.isWebGL2)return 34042; -d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function bc(){G.call(this);this.type="Group"}function Vc(a){la.call(this);this.cameras=a||[]}function Nf(a,b,c){Of.setFromMatrixPosition(b.matrixWorld);Pf.setFromMatrixPosition(c.matrixWorld);var d=Of.distanceTo(Pf),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],k=(e[9]-1)/e[5],m=(e[8]-1)/e[0],r=(f[8]+1)/f[0];e=g*m;f=g*r;r=d/(-m+r);m=r*-m;b.matrixWorld.decompose(a.position, -a.quaternion,a.scale);a.translateX(m);a.translateZ(r);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+r;g=c+r;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,k*c/g*b,b,g)}function Ce(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*t;f=c.renderHeight*t;W=a.getPixelRatio();a.getSize(D);a.setDrawingBufferSize(e,f,1);w.viewport.set(0,0,e/2,f);F.viewport.set(e/2, +d=b.get("WEBGL_depth_texture");if(null!==d)return d.UNSIGNED_INT_24_8_WEBGL}return 0}}}function Yb(){G.call(this);this.type="Group"}function Oc(a){la.call(this);this.cameras=a||[]}function Ef(a,b,c){Ff.setFromMatrixPosition(b.matrixWorld);Gf.setFromMatrixPosition(c.matrixWorld);var d=Ff.distanceTo(Gf),e=b.projectionMatrix.elements,f=c.projectionMatrix.elements,g=e[14]/(e[10]-1);c=e[14]/(e[10]+1);var h=(e[9]+1)/e[5],k=(e[9]-1)/e[5],m=(e[8]-1)/e[0],r=(f[8]+1)/f[0];e=g*m;f=g*r;r=d/(-m+r);m=r*-m;b.matrixWorld.decompose(a.position, +a.quaternion,a.scale);a.translateX(m);a.translateZ(r);a.matrixWorld.compose(a.position,a.quaternion,a.scale);a.matrixWorldInverse.getInverse(a.matrixWorld);b=g+r;g=c+r;a.projectionMatrix.makePerspective(e-m,f+(d-m),h*c/g*b,k*c/g*b,b,g)}function ue(a){function b(){return null!==h&&!0===h.isPresenting}function c(){if(b()){var c=h.getEyeParameters("left");e=2*c.renderWidth*t;f=c.renderHeight*t;W=a.getPixelRatio();a.getSize(D);a.setDrawingBufferSize(e,f,1);w.viewport.set(0,0,e/2,f);F.viewport.set(e/2, 0,e/2,f);E.start();g.dispatchEvent({type:"sessionstart"})}else g.enabled&&a.setDrawingBufferSize(D.width,D.height,W),E.stop(),g.dispatchEvent({type:"sessionend"})}function d(a,b){null!==b&&4===b.length&&a.set(b[0]*e,b[1]*f,b[2]*e,b[3]*f)}var e,f,g=this,h=null,k=null,m=null,r=[],p=new Q,l=new Q,t=1,q="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(k=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",c,!1));var v=new Q,x=new ja,y=new n,w=new la;w.viewport=new ha; -w.layers.enable(1);var F=new la;F.viewport=new ha;F.layers.enable(2);var z=new Vc([w,F]);z.layers.enable(1);z.layers.enable(2);var D=new C,W,Y=[];this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new bc,b.matrixAutoUpdate=!1,b.visible=!1,r[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);E.setContext(a)};this.setFramebufferScaleFactor=function(a){t=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!== +w.layers.enable(1);var F=new la;F.viewport=new ha;F.layers.enable(2);var z=new Oc([w,F]);z.layers.enable(1);z.layers.enable(2);var D=new C,W,Y=[];this.enabled=!1;this.getController=function(a){var b=r[a];void 0===b&&(b=new Yb,b.matrixAutoUpdate=!1,b.visible=!1,r[a]=b);return b};this.getDevice=function(){return h};this.setDevice=function(a){void 0!==a&&(h=a);E.setContext(a)};this.setFramebufferScaleFactor=function(a){t=a};this.setReferenceSpaceType=function(a){q=a};this.setPoseTarget=function(a){void 0!== a&&(m=a)};this.getCamera=function(a){var c="local-floor"===q?1.6:0;if(!1===b())return a.position.set(0,c,0),a.rotation.set(0,0,0),a;h.depthNear=a.near;h.depthFar=a.far;h.getFrameData(k);if("local-floor"===q){var e=h.stageParameters;e?p.fromArray(e.sittingToStandingTransform):p.makeTranslation(0,c,0)}c=k.pose;e=null!==m?m:a;e.matrix.copy(p);e.matrix.decompose(e.position,e.quaternion,e.scale);null!==c.orientation&&(x.fromArray(c.orientation),e.quaternion.multiply(x));null!==c.position&&(x.setFromRotationMatrix(p), y.fromArray(c.position),y.applyQuaternion(x),e.position.add(y));e.updateMatrixWorld();w.near=a.near;F.near=a.near;w.far=a.far;F.far=a.far;w.matrixWorldInverse.fromArray(k.leftViewMatrix);F.matrixWorldInverse.fromArray(k.rightViewMatrix);l.getInverse(p);"local-floor"===q&&(w.matrixWorldInverse.multiply(l),F.matrixWorldInverse.multiply(l));a=e.parent;null!==a&&(v.getInverse(a.matrixWorld),w.matrixWorldInverse.multiply(v),F.matrixWorldInverse.multiply(v));w.matrixWorld.getInverse(w.matrixWorldInverse); -F.matrixWorld.getInverse(F.matrixWorldInverse);w.projectionMatrix.fromArray(k.leftProjectionMatrix);F.projectionMatrix.fromArray(k.rightProjectionMatrix);Nf(z,w,F);a=h.getLayers();a.length&&(a=a[0],d(w.viewport,a.leftBounds),d(F.viewport,a.rightBounds));a:for(a=0;af.matrixWorld.determinant();ea.setMaterial(e, -h);var k=l(a,c,e,f),m=!1;if(b!==d.id||U!==k.id||R!==(!0===e.wireframe))b=d.id,U=k.id,R=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(Aa.update(f,d,e,k),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c=2);a=Ca;if(null!==h){var p=ua.get(h);a=Da;a.setIndex(p)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ga.isWebGL2&&null===na.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); +h);var k=l(a,c,e,f),m=!1;if(b!==d.id||U!==k.id||R!==(!0===e.wireframe))b=d.id,U=k.id,R=!0===e.wireframe,m=!0;f.morphTargetInfluences&&(Aa.update(f,d,e,k),m=!0);h=d.index;var r=d.attributes.position;c=1;!0===e.wireframe&&(h=xa.getWireframeAttribute(d),c=2);a=Ba;if(null!==h){var p=ua.get(h);a=Da;a.setIndex(p)}if(m){if(d&&d.isInstancedBufferGeometry&&!Ga.isWebGL2&&null===na.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."); else{ea.initAttributes();m=d.attributes;k=k.getAttributes();var u=e.defaultAttributeValues;for(z in k){var q=k[z];if(0<=q){var t=m[z];if(void 0!==t){var n=t.normalized,v=t.itemSize,x=ua.get(t);if(void 0!==x){var D=x.buffer,w=x.type;x=x.bytesPerElement;if(t.isInterleavedBufferAttribute){var y=t.data,F=y.stride;t=t.offset;y&&y.isInstancedInterleavedBuffer?(ea.enableAttributeAndDivisor(q,y.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=y.meshPerAttribute*y.count)):ea.enableAttribute(q); L.bindBuffer(34962,D);L.vertexAttribPointer(q,v,w,n,F*x,t*x)}else t.isInstancedBufferAttribute?(ea.enableAttributeAndDivisor(q,t.meshPerAttribute),void 0===d.maxInstancedCount&&(d.maxInstancedCount=t.meshPerAttribute*t.count)):ea.enableAttribute(q),L.bindBuffer(34962,D),L.vertexAttribPointer(q,v,w,n,0,0)}}else if(void 0!==u&&(n=u[z],void 0!==n))switch(n.length){case 2:L.vertexAttrib2fv(q,n);break;case 3:L.vertexAttrib3fv(q,n);break;case 4:L.vertexAttrib4fv(q,n);break;default:L.vertexAttrib1fv(q,n)}}}ea.disableUnusedAttributes()}null!== h&&L.bindBuffer(34963,p.buffer)}p=Infinity;null!==h?p=h.count:void 0!==r&&(p=r.count);h=d.drawRange.start*c;r=null!==g?g.start*c:0;var z=Math.max(h,r);g=Math.max(0,Math.min(p,h+d.drawRange.count*c,r+(null!==g?g.count*c:Infinity))-1-z+1);if(0!==g){if(f.isMesh)if(!0===e.wireframe)ea.setLineWidth(e.wireframeLinewidth*(null===Ha?da:1)),a.setMode(1);else switch(f.drawMode){case 0:a.setMode(4);break;case 1:a.setMode(5);break;case 2:a.setMode(6)}else f.isLine?(e=e.linewidth,void 0===e&&(e=1),ea.setLineWidth(e* (null===Ha?da:1)),f.isLineSegments?a.setMode(1):f.isLineLoop?a.setMode(2):a.setMode(3)):f.isPoints?a.setMode(0):f.isSprite&&a.setMode(4);d&&d.isInstancedBufferGeometry?0c;c++){var p=r[h[c]];var l=r[h[(c+1)%3]];f[0]=Math.min(p,l);f[1]=Math.max(p,l);p=f[0]+","+f[1];void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]})}}for(p in g)m=g[p],h=a.vertices[m.index1],b.push(h.x,h.y,h.z),h=a.vertices[m.index2],b.push(h.x,h.y,h.z)}else if(a&&a.isBufferGeometry)if(h=new n,null!==a.index){k=a.attributes.position;r=a.index;var t=a.groups;0===t.length&&(t=[{start:0,count:r.count,materialIndex:0}]); a=0;for(e=t.length;ac;c++)p=r.getX(m+c),l=r.getX(m+(c+1)%3),f[0]=Math.min(p,l),f[1]=Math.max(p,l),p=f[0]+","+f[1],void 0===g[p]&&(g[p]={index1:f[0],index2:f[1]});for(p in g)m=g[p],h.fromBufferAttribute(k,m.index1),b.push(h.x,h.y,h.z),h.fromBufferAttribute(k,m.index2),b.push(h.x,h.y,h.z)}else for(k=a.attributes.position,m=0,d=k.count/3;mc;c++)g=3*m+c,h.fromBufferAttribute(k,g),b.push(h.x,h.y,h.z),g=3*m+(c+1)%3,h.fromBufferAttribute(k, -g),b.push(h.x,h.y,h.z);this.addAttribute("position",new E(b,3))}function bd(a,b,c){P.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new gc(a,b,c));this.mergeVertices()}function gc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,r=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); +g),b.push(h.x,h.y,h.z);this.addAttribute("position",new E(b,3))}function Vc(a,b,c){P.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new cc(a,b,c));this.mergeVertices()}function cc(a,b,c){B.call(this);this.type="ParametricBufferGeometry";this.parameters={func:a,slices:b,stacks:c};var d=[],e=[],f=[],g=[],h=new n,k=new n,m=new n,r=new n,p=new n,l,t;3>a.length&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter."); var q=b+1;for(l=0;l<=c;l++){var v=l/c;for(t=0;t<=b;t++){var x=t/b;a(x,v,k);e.push(k.x,k.y,k.z);0<=x-1E-5?(a(x-1E-5,v,m),r.subVectors(k,m)):(a(x+1E-5,v,m),r.subVectors(m,k));0<=v-1E-5?(a(x,v-1E-5,m),p.subVectors(k,m)):(a(x,v+1E-5,m),p.subVectors(m,k));h.crossVectors(r,p).normalize();f.push(h.x,h.y,h.z);g.push(x,v)}}for(l=0;ld&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[b]=d/2/Math.PI+.5)}B.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a, +new E(f,3));this.addAttribute("uv",new E(g,2))}function Wc(a,b,c,d){P.call(this);this.type="PolyhedronGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};this.fromBufferGeometry(new Aa(a,b,c,d));this.mergeVertices()}function Aa(a,b,c,d){function e(a){h.push(a.x,a.y,a.z)}function f(b,c){b*=3;c.x=a[b+0];c.y=a[b+1];c.z=a[b+2]}function g(a,b,c,d){0>d&&1===a.x&&(k[b]=a.x-1);0===c.x&&0===c.z&&(k[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 h=[],k=[];(function(a){for(var c=new n,d=new n,g=new n,h=0;he&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new E(h,3));this.addAttribute("normal",new E(h.slice(),3));this.addAttribute("uv",new E(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function dd(a, -b){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new hc(a,b));this.mergeVertices()}function hc(a,b){Aa.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 ed(a,b){P.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Fb(a,b));this.mergeVertices()}function Fb(a,b){Aa.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 fd(a,b){P.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ic(a,b));this.mergeVertices()}function ic(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 gd(a,b){P.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new jc(a,b));this.mergeVertices()}function jc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 hd(a,b,c,d,e,f){P.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 Gb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Gb(a,b,c,d,e){function f(e){r=a.getPointAt(e/b,r);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=r.x+c*k.x;h.y=r.y+c*k.y;h.z= +k[y+1]);f.set(k[y+2],k[y+3]);l.set(k[y+4],k[y+5]);d.copy(a).add(b).add(c).divideScalar(3);var w=Math.atan2(d.z,-d.x);g(e,y+0,a,w);g(f,y+2,b,w);g(l,y+4,c,w)}for(a=0;ae&&(.2>b&&(k[a+0]+=1),.2>c&&(k[a+2]+=1),.2>d&&(k[a+4]+=1))})();this.addAttribute("position",new E(h,3));this.addAttribute("normal",new E(h.slice(),3));this.addAttribute("uv",new E(k,2));0===d?this.computeVertexNormals():this.normalizeNormals()}function Xc(a, +b){P.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new dc(a,b));this.mergeVertices()}function dc(a,b){Aa.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 Yc(a,b){P.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Cb(a,b));this.mergeVertices()}function Cb(a,b){Aa.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 Zc(a,b){P.call(this);this.type="IcosahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new ec(a,b));this.mergeVertices()}function ec(a,b){var c=(1+Math.sqrt(5))/2;Aa.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 $c(a,b){P.call(this);this.type="DodecahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new fc(a,b));this.mergeVertices()}function fc(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;Aa.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 ad(a,b,c,d,e,f){P.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 Db(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()}function Db(a,b,c,d,e){function f(e){r=a.getPointAt(e/b,r);var f=g.normals[e];e=g.binormals[e];for(l=0;l<=d;l++){var m=l/d*Math.PI*2,p=Math.sin(m);m=-Math.cos(m);k.x=m*f.x+p*e.x;k.y=m*f.y+p*e.y;k.z=m*f.z+p*e.z;k.normalize();q.push(k.x,k.y,k.z);h.x=r.x+c*k.x;h.y=r.y+c*k.y;h.z= r.z+c*k.z;t.push(h.x,h.y,h.z)}}B.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 h=new n,k=new n,m=new C,r=new n,p,l,t=[],q=[],v=[],x=[];for(p=0;p=b;e-=d)f=Tf(e,a[e],a[e+1],f);f&&Hb(f,f.next)&&(kd(f),f=f.next);return f}function ld(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Hb(a,a.next)&&0!==ca(a.prev,a,a.next))a=a.next;else{kd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} -function md(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=Ge(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,r,p,l,t=1;do{k=h;var q=h=null;for(r=0;k;){r++;var n=k;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&&(r=!r),q=q.next;while(q!==k);q=r}k=q}if(k){a=Vf(g,h);g=ld(g,g.next);a=ld(a,a.next);md(g,b,c,d,e,f);md(a,b,c,d,e,f);break a}h= -h.next}g=g.next}while(g!==a)}break}}}}function Gh(a,b,c,d){var e=a.prev,f=a.next;if(0<=ca(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,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=Ge(e.x=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&mc(e.x,e.y,a.x,a.y, -f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&mc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function Hh(a,b){return a.x-b.x}function Ih(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 h=c.x=c.x&&c.x>=g&&d!==c.x&&mc(eh.x)&&nd(c,a)&&(h=c,m=r)}c=c.next}return h}function Ge(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 Jh(a){var b=a,c=a;do{if(b.xca(a.prev,a,a.next)?0<=ca(a,b,a.next)&&0<=ca(a,a.prev,b):0>ca(a,b,a.prev)||0>ca(a,a.next,b)}function Vf(a,b){var c=new He(a.i,a.x,a.y),d=new He(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 Tf(a,b,c,d){a=new He(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 kd(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 He(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 Wf(a){var b=a.length;2=b;e-=d)f=Kf(e,a[e],a[e+1],f);f&&Eb(f,f.next)&&(dd(f),f=f.next);return f}function ed(a,b){if(!a)return a;b||(b=a);do{var c=!1;if(a.steiner||!Eb(a,a.next)&&0!==ca(a.prev,a,a.next))a=a.next;else{dd(a);a=b=a.prev;if(a===a.next)break;c=!0}}while(c||a!==b);return b} +function fd(a,b,c,d,e,f,g){if(a){if(!g&&f){var h=a,k=h;do null===k.z&&(k.z=ye(k.x,k.y,d,e,f)),k.prevZ=k.prev,k=k.nextZ=k.next;while(k!==h);k.prevZ.nextZ=null;k.prevZ=null;h=k;var m,r,p,l,t=1;do{k=h;var q=h=null;for(r=0;k;){r++;var n=k;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&&(r=!r),q=q.next;while(q!==k);q=r}k=q}if(k){a=Mf(g,h);g=ed(g,g.next);a=ed(a,a.next);fd(g,b,c,d,e,f);fd(a,b,c,d,e,f);break a}h= +h.next}g=g.next}while(g!==a)}break}}}}function wh(a,b,c,d){var e=a.prev,f=a.next;if(0<=ca(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,h=e.y>a.y?e.y>f.y?e.y:f.y:a.y>f.y?a.y:f.y,k=ye(e.x=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&ic(e.x,e.y,a.x,a.y, +f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=ca(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&ic(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=ca(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function xh(a,b){return a.x-b.x}function yh(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 h=c.x=c.x&&c.x>=g&&d!==c.x&&ic(eh.x)&&gd(c,a)&&(h=c,m=r)}c=c.next}return h}function ye(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 zh(a){var b=a,c=a;do{if(b.xca(a.prev,a,a.next)?0<=ca(a,b,a.next)&&0<=ca(a,a.prev,b):0>ca(a,b,a.prev)||0>ca(a,a.next,b)}function Mf(a,b){var c=new ze(a.i,a.x,a.y),d=new ze(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 Kf(a,b,c,d){a=new ze(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 dd(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 ze(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 Nf(a){var b=a.length;2Number.EPSILON){var k=Math.sqrt(h),m=Math.sqrt(f*f+g*g);h=b.x-e/k;b=b.y+d/k;g=((c.x-g/m-h)*g-(c.y+f/m-b)*f)/(d*g-e*f);f=h+d*g-a.x;d=b+e*g-a.y;e=f*f+d*d;if(2>=e)return new C(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(h)):(f=d,d=e,e=Math.sqrt(h/2));return new C(f/e,d/e)}function h(a,b){for(K=a.length;0<=--K;){var c=K;var f=K-1;0>f&&(f=a.length-1);var g,h=w+2*E;for(g=0;gl;l++){var p=m[f[l]];var n=m[f[(l+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}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.addAttribute("position",new E(c,3))}function Lb(a,b,c,d, -e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new gb(a,b,c,d,e,f,g,h));this.mergeVertices()}function gb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,r=0,v=!0===c?a:b,w=!0===c?1:-1;var E=q;for(e=1;e<=d;e++)p.push(0,x*w,0),u.push(0,w,0),t.push(.5,.5),q++;var H=q;for(e=0;e<=d;e++){var A=e/d*h+g,B=Math.cos(A);A=Math.sin(A);k.x=v*A;k.y=x*w; +d[l+0]=d[c+l+0]=g.x,d[l+1]=d[c+l+1]=g.y,d[l+2]=d[c+l+2]=g.z}function Gb(a,b){P.call(this);this.type="ShapeGeometry";"object"===typeof b&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),b=b.curveSegments);this.parameters={shapes:a,curveSegments:b};this.fromBufferGeometry(new Hb(a,b));this.mergeVertices()}function Hb(a,b){function c(a){var c,h=e.length/3;a=a.extractPoints(b);var m=a.shape,l=a.holes;!1===eb.isClockWise(m)&&(m=m.reverse());a=0;for(c=l.length;al;l++){var p=m[f[l]];var n=m[f[(l+1)%3]];d[0]=Math.min(p,n);d[1]=Math.max(p,n);p=d[0]+","+d[1];void 0===e[p]?e[p]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[p].face2=h}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.addAttribute("position",new E(c,3))}function Ib(a,b,c,d, +e,f,g,h){P.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new fb(a,b,c,d,e,f,g,h));this.mergeVertices()}function fb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,r=0,v=!0===c?a:b,w=!0===c?1:-1;var E=q;for(e=1;e<=d;e++)p.push(0,x*w,0),u.push(0,w,0),t.push(.5,.5),q++;var H=q;for(e=0;e<=d;e++){var A=e/d*h+g,B=Math.cos(A);A=Math.sin(A);k.x=v*A;k.y=x*w; k.z=v*B;p.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*B+.5;f.y=.5*A*w+.5;t.push(f.x,f.y);q++}for(e=0;ethis.duration&&this.resetDuration()}function Lh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return tc;case "vector":case "vector2":case "vector3":case "vector4":return uc; -case "color":return Vd;case "quaternion":return wd;case "bool":case "boolean":return Ud;case "string":return Xd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Mh(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Lh(a.type);if(void 0===a.times){var c=[],d=[];fa.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 Ie(a,b,c){var d=this,e= -!1,f=0,g=0,h=void 0;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 h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Oa(a){this.manager=void 0!==a?a:Ca}function $f(a){this.manager= -void 0!==a?a:Ca}function ag(a){this.manager=void 0!==a?a:Ca;this._parser=null}function Je(a){this.manager=void 0!==a?a:Ca;this._parser=null}function xd(a){this.manager=void 0!==a?a:Ca}function Ke(a){this.manager=void 0!==a?a:Ca}function Yd(a){this.manager=void 0!==a?a:Ca}function J(){this.type="Curve";this.arcLengthDivisions=200}function ya(a,b,c,d,e,f,g,h){J.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2* -Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function vc(a,b,c,d,e,f){ya.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function Le(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function xa(a,b,c,d){J.call(this); -this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function bg(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function yd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function zd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Pa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function bb(a, -b,c,d){J.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){J.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Qa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Ra(a,b,c){J.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function cb(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b|| -new n;this.v2=c||new n}function Sa(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function hb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Ta(a){hb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function tb(a){Ta.call(this,a);this.uuid=M.generateUUID();this.type="Shape";this.holes=[]}function Z(a,b){G.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Zd(a,b,c){Z.call(this, -a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function Tb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new Q}function $d(){Tb.call(this,new la(50,1,.5,500))}function ae(a,b,c,d,e,f){Z.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity* -Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new $d}function be(a,b,c,d){Z.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Tb(new la(90,1,.5,500))}function Ad(a,b,c,d,e,f){Xa.call(this); -this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function ce(){Tb.call(this,new Ad(-5,5,5,-5,.5,500))}function de(a,b){Z.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new ce}function ee(a,b){Z.call(this,a,b);this.type="AmbientLight"; -this.castShadow=void 0}function fe(a,b,c,d){Z.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function ge(a){this.manager=void 0!==a?a:Ca;this.textures={}}function he(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ie(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute= -d||1}function Me(a){this.manager=void 0!==a?a:Ca}function Ne(a){this.manager=void 0!==a?a:Ca;this.resourcePath=""}function Oe(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ca;this.options=void 0}function Pe(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Qe(a){this.type= -"Font";this.data=a}function cg(a){this.manager=void 0!==a?a:Ca}function Bd(){}function Re(a){this.manager=void 0!==a?a:Ca}function je(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ua(a,b){Z.call(this,void 0,b);this.sh=void 0!==a?a:new je}function Se(a,b,c){Ua.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 Te(a,b){Ua.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 dg(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new la;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new la;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Ue(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ve(){G.call(this); -this.type="AudioListener";this.context=We.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function wc(a){G.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.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty"; -this.filters=[]}function Xe(a){wc.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Ye(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 Ze(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 eg(a,b,c){c=c||ra.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ra(a,b,c){this.path=b;this.parsedPath=c||ra.parseTrackName(b);this.node=ra.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function fg(){this.uuid=M.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 gg(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 $e(a){this._root=a;this._initMemoryManager(); -this.time=this._accuIndex=0;this.timeScale=1}function ke(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function af(a,b,c){Eb.call(this,a,b);this.meshPerAttribute=c||1}function hg(a,b,c,d){this.ray=new yb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},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 ig(a,b){return a.distance-b.distance}function bf(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!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.addAttribute("position",new E(b,3));b=new R({fog:!1});this.cone=new aa(a,b);this.add(this.cone);this.update()}function lg(a){var b=[];a&&a.isBone&&b.push(a);for(var c= -0;cthis.duration&&this.resetDuration()}function Bh(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return pc;case "vector":case "vector2":case "vector3":case "vector4":return qc; +case "color":return Od;case "quaternion":return pd;case "bool":case "boolean":return Nd;case "string":return Qd}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+a);}function Ch(a){if(void 0===a.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");var b=Bh(a.type);if(void 0===a.times){var c=[],d=[];fa.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 Ae(a,b,c){var d=this,e= +!1,f=0,g=0,h=void 0;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 h?h(a):a};this.setURLModifier=function(a){h=a;return this}}function Na(a){this.manager=void 0!==a?a:Ba}function Rf(a){this.manager= +void 0!==a?a:Ba}function Sf(a){this.manager=void 0!==a?a:Ba;this._parser=null}function Be(a){this.manager=void 0!==a?a:Ba;this._parser=null}function qd(a){this.manager=void 0!==a?a:Ba}function Ce(a){this.manager=void 0!==a?a:Ba}function Rd(a){this.manager=void 0!==a?a:Ba}function J(){this.type="Curve";this.arcLengthDivisions=200}function Ca(a,b,c,d,e,f,g,h){J.call(this);this.type="EllipseCurve";this.aX=a||0;this.aY=b||0;this.xRadius=c||1;this.yRadius=d||1;this.aStartAngle=e||0;this.aEndAngle=f||2* +Math.PI;this.aClockwise=g||!1;this.aRotation=h||0}function rc(a,b,c,d,e,f){Ca.call(this,a,b,c,c,d,e,f);this.type="ArcCurve"}function De(){var a=0,b=0,c=0,d=0;return{initCatmullRom:function(e,f,g,h,k){e=k*(g-e);h=k*(h-f);a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},initNonuniformCatmullRom:function(e,f,g,h,k,m,l){e=((f-e)/k-(g-e)/(k+m)+(g-f)/m)*m;h=((g-f)/m-(h-f)/(m+l)+(h-g)/l)*m;a=f;b=e;c=-3*f+3*g-2*e-h;d=2*f-2*g+e+h},calc:function(e){var f=e*e;return a+b*e+c*f+d*f*e}}}function xa(a,b,c,d){J.call(this); +this.type="CatmullRomCurve3";this.points=a||[];this.closed=b||!1;this.curveType=c||"centripetal";this.tension=d||.5}function Tf(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function rd(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function sd(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Oa(a,b,c,d){J.call(this);this.type="CubicBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C;this.v3=d||new C}function bb(a, +b,c,d){J.call(this);this.type="CubicBezierCurve3";this.v0=a||new n;this.v1=b||new n;this.v2=c||new n;this.v3=d||new n}function Da(a,b){J.call(this);this.type="LineCurve";this.v1=a||new C;this.v2=b||new C}function Pa(a,b){J.call(this);this.type="LineCurve3";this.v1=a||new n;this.v2=b||new n}function Qa(a,b,c){J.call(this);this.type="QuadraticBezierCurve";this.v0=a||new C;this.v1=b||new C;this.v2=c||new C}function cb(a,b,c){J.call(this);this.type="QuadraticBezierCurve3";this.v0=a||new n;this.v1=b|| +new n;this.v2=c||new n}function Ra(a){J.call(this);this.type="SplineCurve";this.points=a||[]}function gb(){J.call(this);this.type="CurvePath";this.curves=[];this.autoClose=!1}function Sa(a){gb.call(this);this.type="Path";this.currentPoint=new C;a&&this.setFromPoints(a)}function sb(a){Sa.call(this,a);this.uuid=M.generateUUID();this.type="Shape";this.holes=[]}function Z(a,b){G.call(this);this.type="Light";this.color=new A(a);this.intensity=void 0!==b?b:1;this.receiveShadow=void 0}function Sd(a,b,c){Z.call(this, +a,c);this.type="HemisphereLight";this.castShadow=void 0;this.position.copy(G.DefaultUp);this.updateMatrix();this.groundColor=new A(b)}function Qb(a){this.camera=a;this.bias=0;this.radius=1;this.mapSize=new C(512,512);this.map=null;this.matrix=new Q}function Td(){Qb.call(this,new la(50,1,.5,500))}function Ud(a,b,c,d,e,f){Z.call(this,a,b);this.type="SpotLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;Object.defineProperty(this,"power",{get:function(){return this.intensity* +Math.PI},set:function(a){this.intensity=a/Math.PI}});this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.penumbra=void 0!==e?e:0;this.decay=void 0!==f?f:1;this.shadow=new Td}function Vd(a,b,c,d){Z.call(this,a,b);this.type="PointLight";Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(a){this.intensity=a/(4*Math.PI)}});this.distance=void 0!==c?c:0;this.decay=void 0!==d?d:1;this.shadow=new Qb(new la(90,1,.5,500))}function td(a,b,c,d,e,f){Xa.call(this); +this.type="OrthographicCamera";this.zoom=1;this.view=null;this.left=void 0!==a?a:-1;this.right=void 0!==b?b:1;this.top=void 0!==c?c:1;this.bottom=void 0!==d?d:-1;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Wd(){Qb.call(this,new td(-5,5,5,-5,.5,500))}function Xd(a,b){Z.call(this,a,b);this.type="DirectionalLight";this.position.copy(G.DefaultUp);this.updateMatrix();this.target=new G;this.shadow=new Wd}function Yd(a,b){Z.call(this,a,b);this.type="AmbientLight"; +this.castShadow=void 0}function Zd(a,b,c,d){Z.call(this,a,b);this.type="RectAreaLight";this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function $d(a){this.manager=void 0!==a?a:Ba;this.textures={}}function ae(){B.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function be(a,b,c,d){"number"===typeof c&&(d=c,c=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument."));N.call(this,a,b,c);this.meshPerAttribute= +d||1}function Ee(a){this.manager=void 0!==a?a:Ba}function Fe(a){this.manager=void 0!==a?a:Ba;this.resourcePath=""}function Ge(a){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported.");"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported.");this.manager=void 0!==a?a:Ba;this.options=void 0}function He(){this.type="ShapePath";this.color=new A;this.subPaths=[];this.currentPath=null}function Ie(a){this.type= +"Font";this.data=a}function Uf(a){this.manager=void 0!==a?a:Ba}function ud(){}function Je(a){this.manager=void 0!==a?a:Ba}function ce(){this.coefficients=[];for(var a=0;9>a;a++)this.coefficients.push(new n)}function Ta(a,b){Z.call(this,void 0,b);this.sh=void 0!==a?a:new ce}function Ke(a,b,c){Ta.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 Le(a,b){Ta.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 Vf(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new la;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new la;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Me(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}function Ne(){G.call(this); +this.type="AudioListener";this.context=Oe.getContext();this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.filter=null;this.timeDelta=0}function sc(a){G.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.startTime=0;this.playbackRate=1;this.isPlaying=!1;this.hasPlaybackControl=!0;this.sourceType="empty"; +this.filters=[]}function Pe(a){sc.call(this,a);this.panner=this.context.createPanner();this.panner.panningModel="HRTF";this.panner.connect(this.gain)}function Qe(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 Re(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 Wf(a,b,c){c=c||ra.parseTrackName(b);this._targetGroup=a;this._bindings=a.subscribe_(b,c)}function ra(a,b,c){this.path=b;this.parsedPath=c||ra.parseTrackName(b);this.node=ra.findNode(a,this.parsedPath.nodeName)||a;this.rootNode=a}function Xf(){this.uuid=M.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 Yf(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 Se(a){this._root=a;this._initMemoryManager(); +this.time=this._accuIndex=0;this.timeScale=1}function de(a,b){"string"===typeof a&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),a=b);this.value=a}function Te(a,b,c){Bb.call(this,a,b);this.meshPerAttribute=c||1}function Zf(a,b,c,d){this.ray=new vb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},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 $f(a,b){return a.distance-b.distance}function Ue(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!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.addAttribute("position",new E(b,3));b=new R({fog:!1});this.cone=new aa(a,b);this.add(this.cone);this.update()}function cg(a){var b=[];a&&a.isBone&&b.push(a);for(var c= +0;ca?-1:0b;b++)a[b]=(16>b?"0":"")+b.toString(16);return function(){var b=4294967295*Math.random()|0,d=4294967295*Math.random()|0,e=4294967295* @@ -342,33 +343,33 @@ b){var c=a.dot(b)+1;1E-6>c?(c=0,Math.abs(a.x)>Math.abs(a.z)?(this._x=-a.y,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,h=b._z;b=b._w;this._x=c*b+a*f+d*h-e*g;this._y=d*b+a*g+e*f-c*h;this._z=e*b+a*h+c*g-d*f;this._w=a*b-c*f-d*g-e*h;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 h=Math.atan2(a, g);g=Math.sin((1-b)*h)/a;b=Math.sin(b*h)/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 Ub,Fc;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){void 0===Fc&&(Fc=new ja);a&&a.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(Fc.setFromEuler(a))},applyAxisAngle:function(a,b){void 0===Fc&&(Fc=new ja);return this.applyQuaternion(Fc.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},applyMatrix4:function(a){var b= +3]=this._w;return a},_onChange:function(a){this._onChangeCallback=a;return this},_onChangeCallback:function(){}});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(){var a=new ja; +return function(b){b&&b.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.");return this.applyQuaternion(a.setFromEuler(b))}}(),applyAxisAngle:function(){var a=new ja;return function(b,c){return this.applyQuaternion(a.setFromAxisAngle(b,c))}}(),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},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 h=a*b+f*d-g*c,k=a*c+g*b-e*d,m=a*d+e*c-f*b;b=-e*b-f*c-g*d;this.x=h*a+b*-e+k*-g-m*-f;this.y=k*a+b*-f+m*-e-h*-g;this.z=m*a+b*-g+h*-f-k*-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));this.y=Math.max(a.y,Math.min(b.y,this.y));this.z=Math.max(a.z,Math.min(b.z,this.z));return this},clampScalar:function(a,b){this.x=Math.max(a,Math.min(b,this.x));this.y=Math.max(a,Math.min(b,this.y));this.z=Math.max(a,Math.min(b,this.z));return this},clampLength:function(a,b){var c=this.length();return this.divideScalar(c|| 1).multiplyScalar(Math.max(a,Math.min(b,c)))},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);this.z=Math.floor(this.z);return this},ceil:function(){this.x=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.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(a){void 0===Ub&&(Ub=new n);Ub.copy(this).projectOnVector(a);return this.sub(Ub)},reflect:function(a){void 0===Ub&&(Ub=new n);return this.sub(Ub.copy(a).multiplyScalar(2*this.dot(a)))},angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(M.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b= +projectOnVector:function(a){var b=a.dot(this)/a.lengthSq();return this.copy(a).multiplyScalar(b)},projectOnPlane:function(){var a=new n;return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new n;return function(b){return this.sub(a.copy(b).multiplyScalar(2*this.dot(b)))}}(),angleTo:function(a){a=this.dot(a)/Math.sqrt(this.lengthSq()*a.lengthSq());return Math.acos(M.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)},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 kb;Object.assign(ka.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements; +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 jb;Object.assign(ka.prototype,{isMatrix3:!0,set:function(a,b,c,d,e,f,g,h,k){var m=this.elements; m[0]=a;m[1]=d;m[2]=g;m[3]=b;m[4]=e;m[5]=h;m[6]=c;m[7]=f;m[8]=k;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},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},applyToBufferAttribute:function(a){void 0=== -kb&&(kb=new n);for(var b=0,c=a.count;bc;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 Gc,ub={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===Gc&&(Gc=document.createElementNS("http://www.w3.org/1999/xhtml", -"canvas"));Gc.width=a.width;Gc.height=a.height;var b=Gc.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=Gc}return 2048c;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 Bc,tb={getDataURL:function(a){if("undefined"==typeof HTMLCanvasElement)return a.src;if(!(a instanceof HTMLCanvasElement)){void 0===Bc&&(Bc=document.createElementNS("http://www.w3.org/1999/xhtml", +"canvas"));Bc.width=a.width;Bc.height=a.height;var b=Bc.getContext("2d");a instanceof ImageData?b.putImageData(a,0,0):b.drawImage(a,0,0,a.width,a.height);a=Bc}return 2048a.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.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(ha.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(ha.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}, @@ -381,8 +382,8 @@ this.y));this.z=Math.max(a,Math.min(b,this.z));this.w=Math.max(a,Math.min(b,this 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(oa.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"})}});ue.prototype=Object.assign(Object.create(Wa.prototype),{constructor:ue,isWebGLMultisampleRenderTarget:!0,copy:function(a){Wa.prototype.copy.call(this,a);this.samples=a.samples;return this}});Object.assign(Q.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,l,p,n,t,q,v){var r=this.elements;r[0]= +this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Va.prototype=Object.assign(Object.create(oa.prototype),{constructor:Va,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"})}});me.prototype=Object.assign(Object.create(Va.prototype),{constructor:me,isWebGLMultisampleRenderTarget:!0,copy:function(a){Va.prototype.copy.call(this,a);this.samples=a.samples;return this}});Object.assign(Q.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,k,m,l,p,n,t,q,v){var r=this.elements;r[0]= a;r[4]=b;r[8]=c;r[12]=d;r[1]=e;r[5]=f;r[9]=g;r[13]=h;r[2]=k;r[6]=m;r[10]=l;r[14]=p;r[3]=n;r[7]=t;r[11]=q;r[15]=v;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 Q).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(){var a=new n;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b, 2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[3]=0;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[7]=0;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;c[11]=0;c[12]=0;c[13]=0;c[14]=0;c[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 h=Math.cos(e);e=Math.sin(e);if("XYZ"===a.order){a= @@ -400,14 +401,14 @@ 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 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,h=b._w,k=e+e,m=f+f,l=g+g;b=e*k;var p=e*m;e*=l;var n=f*m;f*=l;g*=l;k*=h;m*=h;h*=l;l=c.x;var t=c.y;c=c.z;d[0]=(1-(n+g))*l;d[1]=(p+h)*l;d[2]=(e-m)*l;d[3]=0;d[4]=(p-h)*t;d[5]=(1-(b+g))*t;d[6]=(f+k)*t;d[7]=0;d[8]=(e+m)*c;d[9]=(f-k)*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(){var a=new n,b=new Q;return function(c,d,e){var f= this.elements,g=a.set(f[0],f[1],f[2]).length(),h=a.set(f[4],f[5],f[6]).length(),k=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[13];c.z=f[14];b.copy(this);c=1/g;f=1/h;var m=1/k;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=m;b.elements[9]*=m;b.elements[10]*=m;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=k;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,h=1/(b-a),k=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*k;g[9]=0;g[13]=-((c+d)*k);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 oe,pe;xb.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "); -xb.DefaultOrder="XYZ";Object.defineProperties(xb.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(xb.prototype,{isEuler:!0,set:function(a,b,c,d){this._x=a;this._y= +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 he,ie;ub.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "); +ub.DefaultOrder="XYZ";Object.defineProperties(ub.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(ub.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=M.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],k=e[5],m=e[9],l=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,k),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(h,k)):(this._y=Math.atan2(-l,a),this._z=0)):"ZXY"===b?(this._x=Math.asin(d(p,-1,1)),.9999999>Math.abs(p)?(this._y=Math.atan2(-l,e),this._z=Math.atan2(-f,k)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(l,-1,1)),.9999999>Math.abs(l)?(this._x=Math.atan2(p,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f, -k))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.9999999>Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,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,k),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){void 0===oe&&(oe=new Q); -oe.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(oe,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){void 0===pe&&(pe=new ja);pe.setFromEuler(this);return this.setFromQuaternion(pe,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(ve.prototype,{set:function(a){this.mask=1<Math.abs(h)?(this._x=Math.atan2(-m,k),this._y=Math.atan2(-l,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,k),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){void 0===he&&(he=new Q); +he.makeRotationFromQuaternion(a);return this.setFromRotationMatrix(he,b,c)},setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(a){void 0===ie&&(ie=new ja);ie.setFromEuler(this);return this.setFromQuaternion(ie,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(ne.prototype,{set:function(a){this.mask=1<e&&(e=m);l>f&&(f=l);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,h=0,k=a.count;he&&(e=m);l>f&&(f=l);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;b=-a.constant},inte k);b.subVectors(h.a,k);c.subVectors(h.b,k);d.subVectors(h.c,k);e.subVectors(c,b);f.subVectors(d,c);g.subVectors(b,d);h=[0,-e.z,e.y,0,-f.z,f.y,0,-g.z,g.y,e.z,0,-e.x,f.z,0,-f.x,g.z,0,-g.x,-e.y,e.x,0,-f.y,f.x,0,-g.y,g.x,0];if(!a(h))return!1;h=[1,0,0,0,1,0,0,0,1];if(!a(h))return!1;l.crossVectors(e,f);h=[l.x,l.y,l.z];return a(h)}}(),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(){var a= new n;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new n;return function(b){void 0===b&&console.error("THREE.Box3: .getBoundingSphere() target is now required");this.getCenter(b.center);b.radius=.5*this.getSize(a).length();return b}}(),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(){var a= [new n,new n,new n,new n,new n,new n,new n,new n];return function(b){if(this.isEmpty())return this;a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(b); -a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.setFromPoints(a);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 gf;Object.assign(db.prototype,{set:function(a,b){this.center.copy(a);this.radius=b;return this},setFromPoints:function(a,b){void 0===gf&&(gf=new Ka);var c=this.center;void 0!==b?c.copy(b):gf.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 Ka);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}});Object.assign(yb.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); +a=new Ja);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}});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(){var a=new n;return function(b){this.origin.copy(this.at(b,a));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(){var a=new n;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b);a.copy(this.direction).multiplyScalar(c).add(this.origin);return a.distanceToSquared(b)}}(),distanceSqToSegment:function(){var a= new n,b=new n,c=new n;return function(d,e,f,g){a.copy(d).add(e).multiplyScalar(.5);b.copy(e).sub(d).normalize();c.copy(this.origin).sub(a);var h=.5*d.distanceTo(e),k=-this.direction.dot(b),m=c.dot(this.direction),l=-c.dot(b),p=c.lengthSq(),n=Math.abs(1-k*k);if(0=-t?e<=t?(h=1/n,d*=h,e*=h,k=d*(d+k*e+2*m)+e*(k*d+e+2*l)+p):(e=h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+p):(e=-h,d=Math.max(0,-(k*e+m)),k=-d*d+e*(e+2*l)+p):e<=-t?(d=Math.max(0,-(-k*h+m)),e=0=p&&0>=u)return h.copy(k); e.subVectors(g,m);var t=a.dot(e),q=b.dot(e);if(0<=t&&q<=t)return h.copy(m);var v=p*q-t*u;if(0>=v&&0<=p&&0>=t)return m=p/(p-t),h.copy(k).addScaledVector(a,m);f.subVectors(g,l);g=a.dot(f);var x=b.dot(f);if(0<=x&&g<=x)return h.copy(l);p=g*u-p*x;if(0>=p&&0<=u&&0>=x)return v=u/(u-x),h.copy(k).addScaledVector(b,v);u=t*x-g*q;if(0>=u&&0<=q-t&&0<=g-x)return c.subVectors(l,m),v=(q-t)/(q-t+(g-x)),h.copy(m).addScaledVector(c,v);l=1/(u+p+v);m=p*l;v*=l;return h.copy(k).addScaledVector(a,m).addScaledVector(b,v)}}(), -equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Nh={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, +equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}});var Dh={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},ma={h:0,s:0,l:0},qe={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=M.euclideanModulo(a,1);b=M.clamp(b,0,1);c=M.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=we(c,b,a+1/3),this.g=we(c,b,a),this.b=we(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}a&&0>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=M.euclideanModulo(a,1);b=M.clamp(b,0,1);c=M.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=oe(c,b,a+1/3),this.g=oe(c,b,a),this.b=oe(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}a&&0=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(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.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilMask=this.stencilMask;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);0c.far?null:{distance:b,point:w.clone(),object:a}}function b(b, -c,d,e,r,n,w,A,E,B,G){f.fromBufferAttribute(r,E);g.fromBufferAttribute(r,B);h.fromBufferAttribute(r,G);r=b.morphTargetInfluences;if(c.morphTargets&&n&&r){p.set(0,0,0);u.set(0,0,0);t.set(0,0,0);for(var D=0,F=n.length;D=h?k/(e+f):k/(2-e-f);switch(e){case b:g=(c-d)/k+(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.stencilFunc=this.stencilFunc;d.stencilRef=this.stencilRef;d.stencilMask=this.stencilMask;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);0c.far?null:{distance:b, +point:w.clone(),object:a}}function b(b,c,d,e,r,n,w,A,E,B,G){f.fromBufferAttribute(r,E);g.fromBufferAttribute(r,B);h.fromBufferAttribute(r,G);r=b.morphTargetInfluences;if(c.morphTargets&&n&&r){p.set(0,0,0);u.set(0,0,0);t.set(0,0,0);for(var D=0,F=n.length;Dg;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 ta(new lb(5,5,5),d);c.add(b);d=new Yb(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};Cb.prototype=Object.create(V.prototype);Cb.prototype.constructor=Cb;Cb.prototype.isDataTexture=!0;var vb,og,hf;Object.assign(Ya.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){void 0===vb&&(vb=new n,og=new n);b=vb.subVectors(c,b).cross(og.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=== -vb&&(vb=new n);void 0===b&&(console.warn("THREE.Plane: .intersectLine() target is now required"),b=new n);var c=a.delta(vb),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&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix: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],h=c[5],k=c[6],m=c[7],l=c[8],p=c[9],n=c[10],t=c[11],q=c[12],v=c[13],x=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-l,c-q).normalize();b[1].setComponents(f+a,m+g,t+l,c+q).normalize();b[2].setComponents(f+d,m+h,t+p,c+v).normalize();b[3].setComponents(f-d,m-h,t-p,c-v).normalize();b[4].setComponents(f-e,m-k,t-n,c-x).normalize();b[5].setComponents(f+e,m+k,t+n,c+x).normalize();return this},intersectsObject:function(a){void 0===wb&&(wb=new db);var b=a.geometry;null===b.boundingSphere&&b.computeBoundingSphere(); -wb.copy(b.boundingSphere).applyMatrix4(a.matrixWorld);return this.intersectsSphere(wb)},intersectsSprite:function(a){wb.center.set(0,0,0);wb.radius=.7071067811865476;wb.applyMatrix4(a.matrixWorld);return this.intersectsSphere(wb)},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];Hc.x=0d.distanceToPoint(Hc))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 U={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", +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}});Ub.prototype=Object.create(G.prototype);Ub.prototype.constructor=Ub;lb.prototype=Object.create(Va.prototype);lb.prototype.constructor=lb;lb.prototype.isWebGLRenderTargetCube=!0;lb.prototype.fromEquirectangularTexture= +function(a,b){this.texture.type=b.type;this.texture.format=b.format;this.texture.encoding=b.encoding;var c=new Cc,d=new wa({type:"CubemapFromEquirect",uniforms:yb({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 ta(new kb(5,5,5),d);c.add(b);d=new Ub(1,10,1);d.renderTarget=this;d.renderTarget.texture.name="CubeCameraTexture";d.update(a,c);b.geometry.dispose();b.material.dispose();return this};zb.prototype=Object.create(V.prototype);zb.prototype.constructor=zb;zb.prototype.isDataTexture=!0;Object.assign(Ya.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(){var a=new n,b=new n;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d,c);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(){var a=new n; +return function(b,c){void 0===c&&(console.warn("THREE.Plane: .intersectLine() target is now required"),c=new n);var d=b.delta(a),e=this.normal.dot(d);if(0===e){if(0===this.distanceToPoint(b.start))return c.copy(b.start)}else if(e=-(b.start.dot(this.normal)+this.constant)/e,!(0>e||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix: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], +h=c[5],k=c[6],m=c[7],l=c[8],p=c[9],n=c[10],t=c[11],q=c[12],v=c[13],x=c[14];c=c[15];b[0].setComponents(f-a,m-g,t-l,c-q).normalize();b[1].setComponents(f+a,m+g,t+l,c+q).normalize();b[2].setComponents(f+d,m+h,t+p,c+v).normalize();b[3].setComponents(f-d,m-h,t-p,c-v).normalize();b[4].setComponents(f-e,m-k,t-n,c-x).normalize();b[5].setComponents(f+e,m+k,t+n,c+x).normalize();return this},intersectsObject:function(){var a=new Wa;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere(); +a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Wa;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),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)d;d++){var e=c[d]; +a.x=0e.distanceToPoint(a))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 U={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( PHYSICAL )\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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, 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_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 GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.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}", 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", @@ -637,139 +638,139 @@ I={common:{diffuse:{value:new A(15658734)},opacity:{value:1},map:{value:null},uv normalScale:{value:new C(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:{},shadow:{},shadowBias:{}, shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},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},uvTransform:{value:new ka}},sprite:{diffuse:{value:new A(15658734)},opacity:{value:1},center:{value:new C(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new ka}}}, -Za={basic:{uniforms:qa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.fog]),vertexShader:U.meshbasic_vert,fragmentShader:U.meshbasic_frag},lambert:{uniforms:qa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.fog,I.lights,{emissive:{value:new A(0)}}]),vertexShader:U.meshlambert_vert,fragmentShader:U.meshlambert_frag},phong:{uniforms:qa([I.common,I.specularmap,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.gradientmap,I.fog,I.lights,{emissive:{value:new A(0)}, -specular:{value:new A(1118481)},shininess:{value:30}}]),vertexShader:U.meshphong_vert,fragmentShader:U.meshphong_frag},standard:{uniforms:qa([I.common,I.envmap,I.aomap,I.lightmap,I.emissivemap,I.bumpmap,I.normalmap,I.displacementmap,I.roughnessmap,I.metalnessmap,I.fog,I.lights,{emissive:{value:new A(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:U.meshphysical_vert,fragmentShader:U.meshphysical_frag},matcap:{uniforms:qa([I.common,I.bumpmap,I.normalmap,I.displacementmap, -I.fog,{matcap:{value:null}}]),vertexShader:U.meshmatcap_vert,fragmentShader:U.meshmatcap_frag},points:{uniforms:qa([I.points,I.fog]),vertexShader:U.points_vert,fragmentShader:U.points_frag},dashed:{uniforms:qa([I.common,I.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:U.linedashed_vert,fragmentShader:U.linedashed_frag},depth:{uniforms:qa([I.common,I.displacementmap]),vertexShader:U.depth_vert,fragmentShader:U.depth_frag},normal:{uniforms:qa([I.common,I.bumpmap,I.normalmap, -I.displacementmap,{opacity:{value:1}}]),vertexShader:U.normal_vert,fragmentShader:U.normal_frag},sprite:{uniforms:qa([I.sprite,I.fog]),vertexShader:U.sprite_vert,fragmentShader:U.sprite_frag},background:{uniforms:{uvTransform:{value:new ka},t2D:{value:null}},vertexShader:U.background_vert,fragmentShader:U.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:U.cube_vert,fragmentShader:U.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:U.equirect_vert, -fragmentShader:U.equirect_frag},distanceRGBA:{uniforms:qa([I.common,I.displacementmap,{referencePosition:{value:new n},nearDistance:{value:1},farDistance:{value:1E3}}]),vertexShader:U.distanceRGBA_vert,fragmentShader:U.distanceRGBA_frag},shadow:{uniforms:qa([I.lights,I.fog,{color:{value:new A(0)},opacity:{value:1}}]),vertexShader:U.shadow_vert,fragmentShader:U.shadow_frag}};Za.physical={uniforms:qa([Za.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:U.meshphysical_vert, -fragmentShader:U.meshphysical_frag};Rc.prototype=Object.create(P.prototype);Rc.prototype.constructor=Rc;Db.prototype=Object.create(B.prototype);Db.prototype.constructor=Db;eb.prototype=Object.create(V.prototype);eb.prototype.constructor=eb;eb.prototype.isCubeTexture=!0;Object.defineProperty(eb.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});Zb.prototype=Object.create(V.prototype);Zb.prototype.constructor=Zb;Zb.prototype.isDataTexture2DArray=!0;$b.prototype=Object.create(V.prototype); -$b.prototype.constructor=$b;$b.prototype.isDataTexture3D=!0;var yf=new V,Rg=new Zb,Tg=new $b,zf=new eb,sf=[],uf=[],xf=new Float32Array(16),wf=new Float32Array(9),vf=new Float32Array(4);Af.prototype.updateCache=function(a){var b=this.cache;a instanceof Float32Array&&b.length!==a.length&&(this.cache=new Float32Array(a.length));Ea(b,a)};Bf.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 Ae=/([\w\d_]+)(\])?(\[|\.)?/g;nb.prototype.setValue= -function(a,b,c,d){b=this.map[b];void 0!==b&&b.setValue(a,c,d)};nb.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};nb.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};nb.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 th=0,Ch=0;ob.prototype=Object.create(O.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshDepthMaterial=!0; -ob.prototype.copy=function(a){O.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};pb.prototype=Object.create(O.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshDistanceMaterial= -!0;pb.prototype.copy=function(a){O.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};bc.prototype=Object.assign(Object.create(G.prototype),{constructor:bc,isGroup:!0});Vc.prototype= -Object.assign(Object.create(la.prototype),{constructor:Vc,isArrayCamera:!0});var Of=new n,Pf=new n;Object.assign(Ce.prototype,oa.prototype);Object.assign(Qf.prototype,oa.prototype);Object.assign(Od.prototype,{isFogExp2:!0,clone:function(){return new Od(this.color,this.density)},toJSON:function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}});Object.assign(Pd.prototype,{isFog:!0,clone:function(){return new Pd(this.color,this.near,this.far)},toJSON:function(){return{type:"Fog", -color:this.color.getHex(),near:this.near,far:this.far}}});Object.defineProperty(Eb.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(Eb.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==a?a.length/this.stride:0;this.array=a;return this},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array); -this.count=a.count;this.stride=a.stride;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.stride;c*=b.stride;for(var d=0,e=this.stride;de.far||f.push({distance:q,point:b.clone(),uv:sa.getUV(b,h,k,m,l,p,u,new C),face:null, -object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)},copy:function(a){G.prototype.copy.call(this,a);void 0!==a.center&&this.center.copy(a.center);return this}});Yc.prototype=Object.assign(Object.create(G.prototype),{constructor:Yc,isLOD:!0,copy:function(a){G.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;e=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}else for(g=0,q=t.length/3-1;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld), index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.vertices,m=k.length,g=0;gf||(l.applyMatrix4(this.matrixWorld),v=d.ray.origin.distanceTo(l),vd.far||e.push({distance:v,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});aa.prototype=Object.assign(Object.create(T.prototype), {constructor:aa,isLineSegments:!0,computeLineDistances:function(){var a=new n,b=new n;return function(){var c=this.geometry;if(c.isBufferGeometry)if(null===c.index){for(var d=c.attributes.position,e=[],f=0,g=d.count;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:p.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&& +c.vertices,e=c.lineDistances,f=0,g=d.length;fd.far||e.push({distance:a,distanceToRay:Math.sqrt(f),point:p.clone(),index:c,face:null,object:g}))}var g=this,h=this.geometry,k=this.matrixWorld,m=d.params.Points.threshold;null===h.boundingSphere&& h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(k);c.radius+=m;if(!1!==d.ray.intersectsSphere(c)){a.getInverse(k);b.copy(d.ray).applyMatrix4(a);m/=(this.scale.x+this.scale.y+this.scale.z)/3;var l=m*m;m=new n;var p=new n;if(h.isBufferGeometry){var u=h.index;h=h.attributes.position.array;if(null!==u){var t=u.array;u=0;for(var q=t.length;u=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});ec.prototype=Object.create(V.prototype);ec.prototype.constructor=ec;ec.prototype.isCompressedTexture=!0;$c.prototype=Object.create(V.prototype);$c.prototype.constructor=$c;$c.prototype.isCanvasTexture=!0;ad.prototype=Object.create(V.prototype); -ad.prototype.constructor=ad;ad.prototype.isDepthTexture=!0;fc.prototype=Object.create(B.prototype);fc.prototype.constructor=fc;bd.prototype=Object.create(P.prototype);bd.prototype.constructor=bd;gc.prototype=Object.create(B.prototype);gc.prototype.constructor=gc;cd.prototype=Object.create(P.prototype);cd.prototype.constructor=cd;Aa.prototype=Object.create(B.prototype);Aa.prototype.constructor=Aa;dd.prototype=Object.create(P.prototype);dd.prototype.constructor=dd;hc.prototype=Object.create(Aa.prototype); -hc.prototype.constructor=hc;ed.prototype=Object.create(P.prototype);ed.prototype.constructor=ed;Fb.prototype=Object.create(Aa.prototype);Fb.prototype.constructor=Fb;fd.prototype=Object.create(P.prototype);fd.prototype.constructor=fd;ic.prototype=Object.create(Aa.prototype);ic.prototype.constructor=ic;gd.prototype=Object.create(P.prototype);gd.prototype.constructor=gd;jc.prototype=Object.create(Aa.prototype);jc.prototype.constructor=jc;hd.prototype=Object.create(P.prototype);hd.prototype.constructor= -hd;Gb.prototype=Object.create(B.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};id.prototype=Object.create(P.prototype);id.prototype.constructor=id;kc.prototype=Object.create(B.prototype);kc.prototype.constructor=kc;jd.prototype=Object.create(P.prototype);jd.prototype.constructor=jd;lc.prototype=Object.create(B.prototype);lc.prototype.constructor=lc;var Ph={triangulate:function(a,b,c){c=c||2;var d= -b&&b.length,e=d?b[0]*c:a.length,f=Sf(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var k=c;d=[];var m;var l=0;for(m=b.length;l80*c){var t=h=a[0];var q=d=a[1];for(k=c;kh&&(h=l),b>d&&(d=b);h=Math.max(h-t,d-q);h=0!==h?1/h: -0}md(f,g,c,t,q,h);return g}},fb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;efb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Wf(a);Xf(c,a);var f=a.length;b.forEach(Wf);for(a=0;aMath.abs(g-k)?[new C(a,1-c),new C(h,1-d),new C(m,1-e),new C(n,1-b)]:[new C(g,1-c),new C(k,1-d),new C(l,1-e),new C(u,1-b)]}};od.prototype=Object.create(P.prototype);od.prototype.constructor=od;nc.prototype=Object.create($a.prototype);nc.prototype.constructor=nc;pd.prototype=Object.create(P.prototype);pd.prototype.constructor=pd;sb.prototype=Object.create(B.prototype);sb.prototype.constructor= -sb;qd.prototype=Object.create(P.prototype);qd.prototype.constructor=qd;oc.prototype=Object.create(B.prototype);oc.prototype.constructor=oc;rd.prototype=Object.create(P.prototype);rd.prototype.constructor=rd;pc.prototype=Object.create(B.prototype);pc.prototype.constructor=pc;Jb.prototype=Object.create(P.prototype);Jb.prototype.constructor=Jb;Jb.prototype.toJSON=function(){var a=P.prototype.toJSON.call(this);return Zf(this.parameters.shapes,a)};Kb.prototype=Object.create(B.prototype);Kb.prototype.constructor= -Kb;Kb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);return Zf(this.parameters.shapes,a)};qc.prototype=Object.create(B.prototype);qc.prototype.constructor=qc;Lb.prototype=Object.create(P.prototype);Lb.prototype.constructor=Lb;gb.prototype=Object.create(B.prototype);gb.prototype.constructor=gb;sd.prototype=Object.create(Lb.prototype);sd.prototype.constructor=sd;td.prototype=Object.create(gb.prototype);td.prototype.constructor=td;ud.prototype=Object.create(P.prototype);ud.prototype.constructor= -ud;rc.prototype=Object.create(B.prototype);rc.prototype.constructor=rc;var va=Object.freeze({WireframeGeometry:fc,ParametricGeometry:bd,ParametricBufferGeometry:gc,TetrahedronGeometry:dd,TetrahedronBufferGeometry:hc,OctahedronGeometry:ed,OctahedronBufferGeometry:Fb,IcosahedronGeometry:fd,IcosahedronBufferGeometry:ic,DodecahedronGeometry:gd,DodecahedronBufferGeometry:jc,PolyhedronGeometry:cd,PolyhedronBufferGeometry:Aa,TubeGeometry:hd,TubeBufferGeometry:Gb,TorusKnotGeometry:id,TorusKnotBufferGeometry:kc, -TorusGeometry:jd,TorusBufferGeometry:lc,TextGeometry:od,TextBufferGeometry:nc,SphereGeometry:pd,SphereBufferGeometry:sb,RingGeometry:qd,RingBufferGeometry:oc,PlaneGeometry:Rc,PlaneBufferGeometry:Db,LatheGeometry:rd,LatheBufferGeometry:pc,ShapeGeometry:Jb,ShapeBufferGeometry:Kb,ExtrudeGeometry:Ib,ExtrudeBufferGeometry:$a,EdgesGeometry:qc,ConeGeometry:sd,ConeBufferGeometry:td,CylinderGeometry:Lb,CylinderBufferGeometry:gb,CircleGeometry:ud,CircleBufferGeometry:rc,BoxGeometry:Xb,BoxBufferGeometry:lb}); -Mb.prototype=Object.create(O.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isShadowMaterial=!0;Mb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);return this};sc.prototype=Object.create(wa.prototype);sc.prototype.constructor=sc;sc.prototype.isRawShaderMaterial=!0;ab.prototype=Object.create(O.prototype);ab.prototype.constructor=ab;ab.prototype.isMeshStandardMaterial=!0;ab.prototype.copy=function(a){O.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color); +clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});xe.prototype=Object.assign(Object.create(V.prototype),{constructor:xe,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});ac.prototype=Object.create(V.prototype);ac.prototype.constructor=ac;ac.prototype.isCompressedTexture=!0;Tc.prototype=Object.create(V.prototype);Tc.prototype.constructor=Tc;Tc.prototype.isCanvasTexture=!0;Uc.prototype=Object.create(V.prototype); +Uc.prototype.constructor=Uc;Uc.prototype.isDepthTexture=!0;bc.prototype=Object.create(B.prototype);bc.prototype.constructor=bc;Vc.prototype=Object.create(P.prototype);Vc.prototype.constructor=Vc;cc.prototype=Object.create(B.prototype);cc.prototype.constructor=cc;Wc.prototype=Object.create(P.prototype);Wc.prototype.constructor=Wc;Aa.prototype=Object.create(B.prototype);Aa.prototype.constructor=Aa;Xc.prototype=Object.create(P.prototype);Xc.prototype.constructor=Xc;dc.prototype=Object.create(Aa.prototype); +dc.prototype.constructor=dc;Yc.prototype=Object.create(P.prototype);Yc.prototype.constructor=Yc;Cb.prototype=Object.create(Aa.prototype);Cb.prototype.constructor=Cb;Zc.prototype=Object.create(P.prototype);Zc.prototype.constructor=Zc;ec.prototype=Object.create(Aa.prototype);ec.prototype.constructor=ec;$c.prototype=Object.create(P.prototype);$c.prototype.constructor=$c;fc.prototype=Object.create(Aa.prototype);fc.prototype.constructor=fc;ad.prototype=Object.create(P.prototype);ad.prototype.constructor= +ad;Db.prototype=Object.create(B.prototype);Db.prototype.constructor=Db;Db.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};bd.prototype=Object.create(P.prototype);bd.prototype.constructor=bd;gc.prototype=Object.create(B.prototype);gc.prototype.constructor=gc;cd.prototype=Object.create(P.prototype);cd.prototype.constructor=cd;hc.prototype=Object.create(B.prototype);hc.prototype.constructor=hc;var Fh={triangulate:function(a,b,c){c=c||2;var d= +b&&b.length,e=d?b[0]*c:a.length,f=Jf(a,0,e,c,!0),g=[];if(!f||f.next===f.prev)return g;var h;if(d){var k=c;d=[];var m;var l=0;for(m=b.length;l80*c){var t=h=a[0];var q=d=a[1];for(k=c;kh&&(h=l),b>d&&(d=b);h=Math.max(h-t,d-q);h=0!==h?1/h: +0}fd(f,g,c,t,q,h);return g}},eb={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;eeb.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Nf(a);Of(c,a);var f=a.length;b.forEach(Nf);for(a=0;aMath.abs(g-k)?[new C(a,1-c),new C(h,1-d),new C(m,1-e),new C(n,1-b)]:[new C(g,1-c),new C(k,1-d),new C(l,1-e),new C(u,1-b)]}};hd.prototype=Object.create(P.prototype);hd.prototype.constructor=hd;jc.prototype=Object.create($a.prototype);jc.prototype.constructor=jc;id.prototype=Object.create(P.prototype);id.prototype.constructor=id;rb.prototype=Object.create(B.prototype);rb.prototype.constructor= +rb;jd.prototype=Object.create(P.prototype);jd.prototype.constructor=jd;kc.prototype=Object.create(B.prototype);kc.prototype.constructor=kc;kd.prototype=Object.create(P.prototype);kd.prototype.constructor=kd;lc.prototype=Object.create(B.prototype);lc.prototype.constructor=lc;Gb.prototype=Object.create(P.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=function(){var a=P.prototype.toJSON.call(this);return Qf(this.parameters.shapes,a)};Hb.prototype=Object.create(B.prototype);Hb.prototype.constructor= +Hb;Hb.prototype.toJSON=function(){var a=B.prototype.toJSON.call(this);return Qf(this.parameters.shapes,a)};mc.prototype=Object.create(B.prototype);mc.prototype.constructor=mc;Ib.prototype=Object.create(P.prototype);Ib.prototype.constructor=Ib;fb.prototype=Object.create(B.prototype);fb.prototype.constructor=fb;ld.prototype=Object.create(Ib.prototype);ld.prototype.constructor=ld;md.prototype=Object.create(fb.prototype);md.prototype.constructor=md;nd.prototype=Object.create(P.prototype);nd.prototype.constructor= +nd;nc.prototype=Object.create(B.prototype);nc.prototype.constructor=nc;var va=Object.freeze({WireframeGeometry:bc,ParametricGeometry:Vc,ParametricBufferGeometry:cc,TetrahedronGeometry:Xc,TetrahedronBufferGeometry:dc,OctahedronGeometry:Yc,OctahedronBufferGeometry:Cb,IcosahedronGeometry:Zc,IcosahedronBufferGeometry:ec,DodecahedronGeometry:$c,DodecahedronBufferGeometry:fc,PolyhedronGeometry:Wc,PolyhedronBufferGeometry:Aa,TubeGeometry:ad,TubeBufferGeometry:Db,TorusKnotGeometry:bd,TorusKnotBufferGeometry:gc, +TorusGeometry:cd,TorusBufferGeometry:hc,TextGeometry:hd,TextBufferGeometry:jc,SphereGeometry:id,SphereBufferGeometry:rb,RingGeometry:jd,RingBufferGeometry:kc,PlaneGeometry:Kc,PlaneBufferGeometry:Ab,LatheGeometry:kd,LatheBufferGeometry:lc,ShapeGeometry:Gb,ShapeBufferGeometry:Hb,ExtrudeGeometry:Fb,ExtrudeBufferGeometry:$a,EdgesGeometry:mc,ConeGeometry:ld,ConeBufferGeometry:md,CylinderGeometry:Ib,CylinderBufferGeometry:fb,CircleGeometry:nd,CircleBufferGeometry:nc,BoxGeometry:Tb,BoxBufferGeometry:kb}); +Jb.prototype=Object.create(O.prototype);Jb.prototype.constructor=Jb;Jb.prototype.isShadowMaterial=!0;Jb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);return this};oc.prototype=Object.create(wa.prototype);oc.prototype.constructor=oc;oc.prototype.isRawShaderMaterial=!0;ab.prototype=Object.create(O.prototype);ab.prototype.constructor=ab;ab.prototype.isMeshStandardMaterial=!0;ab.prototype.copy=function(a){O.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;return this}; -Nb.prototype=Object.create(ab.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshPhysicalMaterial=!0;Nb.prototype.copy=function(a){ab.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Na.prototype=Object.create(O.prototype);Na.prototype.constructor=Na;Na.prototype.isMeshPhongMaterial=!0;Na.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color); +Kb.prototype=Object.create(ab.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isMeshPhysicalMaterial=!0;Kb.prototype.copy=function(a){ab.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ma.prototype=Object.create(O.prototype);Ma.prototype.constructor=Ma;Ma.prototype.isMeshPhongMaterial=!0;Ma.prototype.copy=function(a){O.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};Ob.prototype= -Object.create(Na.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshToonMaterial=!0;Ob.prototype.copy=function(a){Na.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Pb.prototype=Object.create(O.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isMeshNormalMaterial=!0;Pb.prototype.copy=function(a){O.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};Qb.prototype=Object.create(O.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isMeshLambertMaterial=!0;Qb.prototype.copy=function(a){O.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map; +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};Lb.prototype= +Object.create(Ma.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isMeshToonMaterial=!0;Lb.prototype.copy=function(a){Ma.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Mb.prototype=Object.create(O.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isMeshNormalMaterial=!0;Mb.prototype.copy=function(a){O.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};Nb.prototype=Object.create(O.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshLambertMaterial=!0;Nb.prototype.copy=function(a){O.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};Rb.prototype=Object.create(O.prototype);Rb.prototype.constructor=Rb;Rb.prototype.isMeshMatcapMaterial=!0;Rb.prototype.copy=function(a){O.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};Sb.prototype=Object.create(R.prototype);Sb.prototype.constructor=Sb;Sb.prototype.isLineDashedMaterial=!0;Sb.prototype.copy=function(a){R.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize= -a.gapSize;return this};var Qh=Object.freeze({ShadowMaterial:Mb,SpriteMaterial:rb,RawShaderMaterial:sc,ShaderMaterial:wa,PointsMaterial:Ma,MeshPhysicalMaterial:Nb,MeshStandardMaterial:ab,MeshPhongMaterial:Na,MeshToonMaterial:Ob,MeshNormalMaterial:Pb,MeshLambertMaterial:Qb,MeshDepthMaterial:ob,MeshDistanceMaterial:pb,MeshBasicMaterial:pa,MeshMatcapMaterial:Rb,LineDashedMaterial:Sb,LineBasicMaterial:R,Material:O}),fa={arraySlice:function(a,b,c){return fa.isTypedArray(a)?new a.constructor(a.subarray(b, +this.wireframeLinejoin=a.wireframeLinejoin;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};Ob.prototype=Object.create(O.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshMatcapMaterial=!0;Ob.prototype.copy=function(a){O.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};Pb.prototype=Object.create(R.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isLineDashedMaterial=!0;Pb.prototype.copy=function(a){R.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize= +a.gapSize;return this};var Gh=Object.freeze({ShadowMaterial:Jb,SpriteMaterial:qb,RawShaderMaterial:oc,ShaderMaterial:wa,PointsMaterial:La,MeshPhysicalMaterial:Kb,MeshStandardMaterial:ab,MeshPhongMaterial:Ma,MeshToonMaterial:Lb,MeshNormalMaterial:Mb,MeshLambertMaterial:Nb,MeshDepthMaterial:nb,MeshDistanceMaterial:ob,MeshBasicMaterial:ma,MeshMatcapMaterial:Ob,LineDashedMaterial:Pb,LineBasicMaterial:R,Material:O}),fa={arraySlice:function(a,b,c){return fa.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 h=c[f]*b,k=0;k!== -b;++k)e[g++]=a[h+k];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)}}}};Object.assign(Ba.prototype,{evaluate:function(a){var b= +b;++k)e[g++]=a[h+k];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)}}}};Object.assign(Ea.prototype,{evaluate:function(a){var b= this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a=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=fa.arraySlice(c,e,f),this.values=fa.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&&fa.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=this.times,b=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(M.clamp(d[k-1].dot(d[k]),-1,1)),e[k].applyMatrix4(h.makeRotationAxis(g,c))),f[k].crossVectors(d[k],e[k]);if(!0===b)for(c=Math.acos(M.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>k&&(k=e);jf.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);kf.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);lf.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&(jf.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),kf.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),lf.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set(jf.calc(a), -kf.calc(a),lf.calc(a));return b};xa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.points=[];for(var b=0,c=a.points.length;bd;)d+=c;for(;d>c;)d-=c;de&&(e=1);1E-4>d&&(d=e);1E-4>k&&(k=e);$e.initNonuniformCatmullRom(f.x,g.x,h.x,c.x,d,e,k);af.initNonuniformCatmullRom(f.y,g.y,h.y,c.y,d,e,k);bf.initNonuniformCatmullRom(f.z,g.z,h.z,c.z,d,e,k)}else"catmullrom"===this.curveType&&($e.initCatmullRom(f.x,g.x,h.x,c.x,this.tension),af.initCatmullRom(f.y,g.y,h.y,c.y,this.tension),bf.initCatmullRom(f.z,g.z,h.z,c.z,this.tension));b.set($e.calc(a), +af.calc(a),bf.calc(a));return b};xa.prototype.copy=function(a){J.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(bg(d,e.x,f.x,g.x,c.x),bg(d,e.y,f.y,g.y,c.y));return b};Sa.prototype.copy=function(a){J.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(); +function(a,b){return this.getPoint(a,b)};Da.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};Da.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Da.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Da.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Pa.prototype= +Object.create(J.prototype);Pa.prototype.constructor=Pa;Pa.prototype.isLineCurve3=!0;Pa.prototype.getPoint=function(a,b){b=b||new n;1===a?b.copy(this.v2):(b.copy(this.v2).sub(this.v1),b.multiplyScalar(a).add(this.v1));return b};Pa.prototype.getPointAt=function(a,b){return this.getPoint(a,b)};Pa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};Pa.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v1=this.v1.toArray();a.v2=this.v2.toArray(); +return a};Pa.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Qa.prototype=Object.create(J.prototype);Qa.prototype.constructor=Qa;Qa.prototype.isQuadraticBezierCurve=!0;Qa.prototype.getPoint=function(a,b){b=b||new C;var c=this.v0,d=this.v1,e=this.v2;b.set(rd(a,c.x,d.x,e.x),rd(a,c.y,d.y,e.y));return b};Qa.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this}; +Qa.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};Qa.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};cb.prototype=Object.create(J.prototype);cb.prototype.constructor=cb;cb.prototype.isQuadraticBezierCurve3=!0;cb.prototype.getPoint=function(a,b){b=b||new n;var c=this.v0,d=this.v1,e=this.v2;b.set(rd(a,c.x, +d.x,e.x),rd(a,c.y,d.y,e.y),rd(a,c.z,d.z,e.z));return b};cb.prototype.copy=function(a){J.prototype.copy.call(this,a);this.v0.copy(a.v0);this.v1.copy(a.v1);this.v2.copy(a.v2);return this};cb.prototype.toJSON=function(){var a=J.prototype.toJSON.call(this);a.v0=this.v0.toArray();a.v1=this.v1.toArray();a.v2=this.v2.toArray();return a};cb.prototype.fromJSON=function(a){J.prototype.fromJSON.call(this,a);this.v0.fromArray(a.v0);this.v1.fromArray(a.v1);this.v2.fromArray(a.v2);return this};Ra.prototype=Object.create(J.prototype); +Ra.prototype.constructor=Ra;Ra.prototype.isSplineCurve=!0;Ra.prototype.getPoint=function(a,b){b=b||new C;var c=this.points,d=(c.length-1)*a;a=Math.floor(d);d-=a;var e=c[0===a?a:a-1],f=c[a],g=c[a>c.length-2?c.length-1:a+1];c=c[a>c.length-3?c.length-1:a+2];b.set(Tf(d,e.x,f.x,g.x,c.x),Tf(d,e.y,f.y,g.y,c.y));return b};Ra.prototype.copy=function(a){J.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>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(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=fb.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 tb;h.curves=g.curves; -b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var u=0,t=f.length;uNumber.EPSILON){if(0>m&&(g=b[f],k=-k,h=b[e],m=-m),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=m*(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=eb.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 sb;h.curves=g.curves; +b.push(h);return b}var k=!e(f[0].getPoints());k=a?!k:k;h=[];var m=[],l=[],n=0;m[n]=void 0;l[n]=[];for(var u=0,t=f.length;ul.opacity&&(l.transparent=!0);d.setTextures(k);return d.parse(l)}}()});var se,We={getContext:function(){void 0===se&&(se=new (window.AudioContext||window.webkitAudioContext));return se},setContext:function(a){se=a}};Object.assign(Re.prototype,{load:function(a,b,c,d){var e=new Oa(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);We.getContext().decodeAudioData(a,function(a){b(a)})}, -c,d)},setPath:function(a){this.path=a;return this}});Object.assign(je.prototype,{isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;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* +l.type&&delete l.emissive;"MeshPhongMaterial"!==l.type&&delete l.specular;1>l.opacity&&(l.transparent=!0);d.setTextures(k);return d.parse(l)}}()});var ke,Oe={getContext:function(){void 0===ke&&(ke=new (window.AudioContext||window.webkitAudioContext));return ke},setContext:function(a){ke=a}};Object.assign(Je.prototype,{load:function(a,b,c,d){var e=new Na(this.manager);e.setResponseType("arraybuffer");e.setPath(this.path);e.load(a,function(a){a=a.slice(0);Oe.getContext().decodeAudioData(a,function(a){b(a)})}, +c,d)},setPath:function(a){this.path=a;return this}});Object.assign(ce.prototype,{isSphericalHarmonics3:!0,set:function(a){for(var b=0;9>b;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){for(var b= -this.coefficients,c=0;9>c;c++)b[c].fromArray(a,3*c);return this},toArray:function(){for(var a=[],b=this.coefficients,c=0;9>c;c++)b[c].toArray(a,3*c);return a}});Object.assign(je,{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)}});Ua.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ua,isLightProbe:!0,copy:function(a){Z.prototype.copy.call(this, -a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return Z.prototype.toJSON.call(this,a)}});Se.prototype=Object.assign(Object.create(Ua.prototype),{constructor:Se,isHemisphereLightProbe:!0,copy:function(a){Ua.prototype.copy.call(this,a);return this},toJSON:function(a){return Ua.prototype.toJSON.call(this,a)}});Te.prototype=Object.assign(Object.create(Ua.prototype),{constructor:Te,isAmbientLightProbe:!0,copy:function(a){Ua.prototype.copy.call(this,a);return this},toJSON:function(a){return Ua.prototype.toJSON.call(this, -a)}});Object.assign(dg.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new Q,l=new Q;return function(m){if(a!==this||b!==m.focus||c!==m.fov||d!==m.aspect*this.aspect||e!==m.near||f!==m.far||g!==m.zoom||h!==this.eyeSep){a=this;b=m.focus;c=m.fov;d=m.aspect*this.aspect;e=m.near;f=m.far;g=m.zoom;var n=m.projectionMatrix.clone();h=this.eyeSep/2;var r=h*e/b,t=e*Math.tan(M.DEG2RAD*c*.5)/g;l.elements[12]=-h;k.elements[12]=h;var q=-t*d+r;var v=t*d+r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraL.projectionMatrix.copy(n); -q=-t*d-r;v=t*d-r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(l);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(k)}}()});Object.assign(Ue.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}});Ve.prototype=Object.assign(Object.create(G.prototype),{constructor:Ve,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.coefficients,c=0;9>c;c++)b[c].fromArray(a,3*c);return this},toArray:function(){for(var a=[],b=this.coefficients,c=0;9>c;c++)b[c].toArray(a,3*c);return a}});Object.assign(ce,{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)}});Ta.prototype=Object.assign(Object.create(Z.prototype),{constructor:Ta,isLightProbe:!0,copy:function(a){Z.prototype.copy.call(this, +a);this.sh.copy(a.sh);this.intensity=a.intensity;return this},toJSON:function(a){return Z.prototype.toJSON.call(this,a)}});Ke.prototype=Object.assign(Object.create(Ta.prototype),{constructor:Ke,isHemisphereLightProbe:!0,copy:function(a){Ta.prototype.copy.call(this,a);return this},toJSON:function(a){return Ta.prototype.toJSON.call(this,a)}});Le.prototype=Object.assign(Object.create(Ta.prototype),{constructor:Le,isAmbientLightProbe:!0,copy:function(a){Ta.prototype.copy.call(this,a);return this},toJSON:function(a){return Ta.prototype.toJSON.call(this, +a)}});Object.assign(Vf.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new Q,l=new Q;return function(m){if(a!==this||b!==m.focus||c!==m.fov||d!==m.aspect*this.aspect||e!==m.near||f!==m.far||g!==m.zoom||h!==this.eyeSep){a=this;b=m.focus;c=m.fov;d=m.aspect*this.aspect;e=m.near;f=m.far;g=m.zoom;var n=m.projectionMatrix.clone();h=this.eyeSep/2;var r=h*e/b,t=e*Math.tan(M.DEG2RAD*c*.5)/g;l.elements[12]=-h;k.elements[12]=h;var q=-t*d+r;var v=t*d+r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraL.projectionMatrix.copy(n); +q=-t*d-r;v=t*d-r;n.elements[0]=2*e/(v-q);n.elements[8]=(v+q)/(v-q);this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(m.matrixWorld).multiply(l);this.cameraR.matrixWorld.copy(m.matrixWorld).multiply(k)}}()});Object.assign(Me.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}});Ne.prototype=Object.assign(Object.create(G.prototype),{constructor:Ne,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(){var a=new n,b=new ja,c=new n,d=new n,e=new Ue;return function(f){G.prototype.updateMatrixWorld.call(this,f);f=this.context.listener;var g=this.up;this.timeDelta=e.getDelta();this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);if(f.positionX){var h=this.context.currentTime+this.timeDelta;f.positionX.linearRampToValueAtTime(a.x,h);f.positionY.linearRampToValueAtTime(a.y,h);f.positionZ.linearRampToValueAtTime(a.z,h);f.forwardX.linearRampToValueAtTime(d.x,h); -f.forwardY.linearRampToValueAtTime(d.y,h);f.forwardZ.linearRampToValueAtTime(d.z,h);f.upX.linearRampToValueAtTime(g.x,h);f.upY.linearRampToValueAtTime(g.y,h);f.upZ.linearRampToValueAtTime(g.z,h)}else f.setPosition(a.x,a.y,a.z),f.setOrientation(d.x,d.y,d.z,g.x,g.y,g.z)}}()});wc.prototype=Object.assign(Object.create(G.prototype),{constructor:wc,getOutput:function(){return this.gain},setNodeSource:function(a){this.hasPlaybackControl=!1;this.sourceType="audioNode";this.source=a;this.connect();return this}, +updateMatrixWorld:function(){var a=new n,b=new ja,c=new n,d=new n,e=new Me;return function(f){G.prototype.updateMatrixWorld.call(this,f);f=this.context.listener;var g=this.up;this.timeDelta=e.getDelta();this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);if(f.positionX){var h=this.context.currentTime+this.timeDelta;f.positionX.linearRampToValueAtTime(a.x,h);f.positionY.linearRampToValueAtTime(a.y,h);f.positionZ.linearRampToValueAtTime(a.z,h);f.forwardX.linearRampToValueAtTime(d.x,h); +f.forwardY.linearRampToValueAtTime(d.y,h);f.forwardZ.linearRampToValueAtTime(d.z,h);f.upX.linearRampToValueAtTime(g.x,h);f.upY.linearRampToValueAtTime(g.y,h);f.upZ.linearRampToValueAtTime(g.z,h)}else f.setPosition(a.x,a.y,a.z),f.setOrientation(d.x,d.y,d.z,g.x,g.y,g.z)}}()});sc.prototype=Object.assign(Object.create(G.prototype),{constructor:sc,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},setBuffer:function(a){this.buffer=a;this.sourceType="buffer";this.autoplay&&this.play();return this},play:function(){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{var a=this.context.createBufferSource(); a.buffer=this.buffer;a.loop=this.loop;a.onended=this.onEnded.bind(this);this.startTime=this.context.currentTime;a.start(this.startTime,this.offset);this.isPlaying=!0;this.source=a;this.setDetune(this.detune);this.setPlaybackRate(this.playbackRate);return this.connect()}},pause:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return!0===this.isPlaying&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime- this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(!1===this.hasPlaybackControl)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,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){ja.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}}});Object.assign(eg.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(ra,{Composite:eg,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ra.Composite(a,b,c):new ra(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", +e){for(var f=1-d,g=0;g!==e;++g){var h=b+g;a[h]=a[h]*f+a[c+g]*d}}});Object.assign(Wf.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(ra,{Composite:Wf,create:function(a,b,c){return a&&a.isAnimationObjectGroup?new ra.Composite(a,b,c):new ra(a,b,c)},sanitizeNodeName:function(){var a=/[\[\]\.:\/]/g;return function(b){return b.replace(/\s/g,"_").replace(a,"")}}(),parseTrackName:function(){var a="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",b=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");a=/(WCOD+)?/.source.replace("WCOD",a);var c=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", "[^\\[\\]\\.:\\/]"),d=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),e=new RegExp("^"+b+a+c+d+"$"),f=["material","materials","bones"];return function(a){var b=e.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!==f.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||"root"===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]=l;a[l]=p;c[k]=n;a[n]=h;h=0;for(k=e;h!==k;++h){p= d[h];var u=p[l];p[l]=p[n];p[n]=u}}}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 k=arguments[g].uuid,l=d[k];if(void 0!==l)if(delete d[k],lc.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}});$e.prototype=Object.assign(Object.create(oa.prototype),{constructor:$e,_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,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],n=l.name,p=k[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 Ze(ra.create(c,n,b&&b._propertyBindings[h].binding.parsedPath), +c;return this}});Se.prototype=Object.assign(Object.create(oa.prototype),{constructor:Se,_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,k=h[g];void 0===k&&(k={},h[g]=k);for(h=0;h!==e;++h){var l=d[h],n=l.name,p=k[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 Re(ra.create(c,n,b&&b._propertyBindings[h].binding.parsedPath), l.ValueTypeName,l.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 C);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.xthis.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 C);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(a){void 0===Ic&& -(Ic=new C);return Ic.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 te,Jd;Object.assign(df.prototype,{set:function(a,b){this.start.copy(a);this.end.copy(b);return this},clone:function(){return(new this.constructor).copy(this)}, +b){void 0===b&&(console.warn("THREE.Box2: .getParameter() target is now required"),b=new C);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.xthis.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 C);return b.copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new C; +return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).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 le,Cd;Object.assign(We.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){void 0===te&&(te=new n,Jd=new n);te.subVectors(a,this.start);Jd.subVectors(this.end,this.start);a=Jd.dot(Jd);a=Jd.dot(te)/a;b&&(a=M.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)}});Cd.prototype=Object.create(G.prototype);Cd.prototype.constructor=Cd;Cd.prototype.isImmediateRenderObject=!0;Dd.prototype=Object.create(aa.prototype);Dd.prototype.constructor=Dd;Dd.prototype.update=function(){var a=new n,b=new n,c=new ka;return function(){var d=["a", +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){void 0===le&&(le=new n,Cd=new n);le.subVectors(a,this.start);Cd.subVectors(this.end,this.start);a=Cd.dot(Cd);a=Cd.dot(le)/a;b&&(a=M.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)}});vd.prototype=Object.create(G.prototype);vd.prototype.constructor=vd;vd.prototype.isImmediateRenderObject=!0;wd.prototype=Object.create(aa.prototype);wd.prototype.constructor=wd;wd.prototype.update=function(){var a=new n,b=new n,c=new ka;return function(){var d=["a", "b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,n=k.length;lMath.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);G.prototype.updateMatrixWorld.call(this,a)};var ne,ef;jb.prototype=Object.create(G.prototype);jb.prototype.constructor=jb;jb.prototype.setDirection=function(){var a=new n,b;return function(c){.99999c.y?this.quaternion.set(1, -0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();jb.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(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};jb.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};jb.prototype.copy=function(a){G.prototype.copy.call(this,a,!1);this.line.copy(a.line); -this.cone.copy(a.cone);return this};jb.prototype.clone=function(){return(new this.constructor).copy(this)};Id.prototype=Object.create(aa.prototype);Id.prototype.constructor=Id;J.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(J.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(hb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); +g.isBufferGeometry)for(d=g.attributes.position,h=g.attributes.normal,u=g=0,t=d.count;uMath.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);G.prototype.updateMatrixWorld.call(this,a)};var ge,Xe;ib.prototype=Object.create(G.prototype);ib.prototype.constructor=ib;ib.prototype.setDirection=function(){var a=new n,b;return function(c){.99999c.y?this.quaternion.set(1, +0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();ib.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(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};ib.prototype.setColor=function(a){this.line.material.color.set(a);this.cone.material.color.set(a)};ib.prototype.copy=function(a){G.prototype.copy.call(this,a,!1);this.line.copy(a.line); +this.cone.copy(a.cone);return this};ib.prototype.clone=function(){return(new this.constructor).copy(this)};Bd.prototype=Object.create(aa.prototype);Bd.prototype.constructor=Bd;J.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(J.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Object.assign(gb.prototype,{createPointsGeometry:function(a){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); a=this.getPoints(a);return this.createGeometry(a)},createSpacedPointsGeometry:function(a){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");a=this.getSpacedPoints(a);return this.createGeometry(a)},createGeometry:function(a){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var b=new P,c=0,d=a.length;c 0 ) { // color keywords - var hex = _colorKeywords[ style ]; + var hex = ColorKeywords[ style ]; if ( hex !== undefined ) { @@ -8301,17 +8312,23 @@ Object.assign( Color.prototype, { }, - offsetHSL: function ( h, s, l ) { + offsetHSL: function () { - this.getHSL( _hslA ); + var hsl = {}; - _hslA.h += h; _hslA.s += s; _hslA.l += l; + return function ( h, s, l ) { - this.setHSL( _hslA.h, _hslA.s, _hslA.l ); + this.getHSL( hsl ); - return this; + hsl.h += h; hsl.s += s; hsl.l += l; - }, + this.setHSL( hsl.h, hsl.s, hsl.l ); + + return this; + + }; + + }(), add: function ( color ) { @@ -8383,20 +8400,27 @@ Object.assign( Color.prototype, { }, - lerpHSL: function ( color, alpha ) { + lerpHSL: function () { - this.getHSL( _hslA ); - color.getHSL( _hslB ); + var hslA = { h: 0, s: 0, l: 0 }; + var hslB = { h: 0, s: 0, l: 0 }; - var h = _Math.lerp( _hslA.h, _hslB.h, alpha ); - var s = _Math.lerp( _hslA.s, _hslB.s, alpha ); - var l = _Math.lerp( _hslA.l, _hslB.l, alpha ); + return function lerpHSL( color, alpha ) { - this.setHSL( h, s, l ); + this.getHSL( hslA ); + color.getHSL( hslB ); - return this; + var h = _Math.lerp( hslA.h, hslB.h, alpha ); + var s = _Math.lerp( hslA.s, hslB.s, alpha ); + var l = _Math.lerp( hslA.l, hslB.l, alpha ); - }, + this.setHSL( h, s, l ); + + return this; + + }; + + }(), equals: function ( c ) { @@ -13888,8 +13912,6 @@ DataTexture.prototype.isDataTexture = true; * @author bhouston / http://clara.io */ -var _vector1, _vector2, _normalMatrix; - function Plane( normal, constant ) { // normal is assumed to be normalized @@ -13930,24 +13952,24 @@ Object.assign( Plane.prototype, { }, - setFromCoplanarPoints: function ( a, b, c ) { + setFromCoplanarPoints: function () { - if ( _vector1 === undefined ) { + var v1 = new Vector3(); + var v2 = new Vector3(); - _vector1 = new Vector3(); - _vector2 = new Vector3(); + return function setFromCoplanarPoints( a, b, c ) { - } + var normal = v1.subVectors( c, b ).cross( v2.subVectors( a, b ) ).normalize(); - var normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + this.setFromNormalAndCoplanarPoint( normal, a ); - this.setFromNormalAndCoplanarPoint( normal, a ); + return this; - return this; + }; - }, + }(), clone: function () { @@ -14010,46 +14032,50 @@ Object.assign( Plane.prototype, { }, - intersectLine: function ( line, target ) { + intersectLine: function () { - if ( _vector1 === undefined ) _vector1 = new Vector3(); + var v1 = new Vector3(); - if ( target === undefined ) { + return function intersectLine( line, target ) { - console.warn( 'THREE.Plane: .intersectLine() target is now required' ); - target = new Vector3(); + if ( target === undefined ) { - } + console.warn( 'THREE.Plane: .intersectLine() target is now required' ); + target = new Vector3(); - var direction = line.delta( _vector1 ); + } - var denominator = this.normal.dot( direction ); + var direction = line.delta( v1 ); - if ( denominator === 0 ) { + var denominator = this.normal.dot( direction ); - // line is coplanar, return origin - if ( this.distanceToPoint( line.start ) === 0 ) { + if ( denominator === 0 ) { - return target.copy( line.start ); + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { - } + return target.copy( line.start ); - // Unsure if this is the correct method to handle this case. - return undefined; + } - } + // Unsure if this is the correct method to handle this case. + return undefined; - var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + } - if ( t < 0 || t > 1 ) { + var t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; - return undefined; + if ( t < 0 || t > 1 ) { - } + return undefined; - return target.copy( direction ).multiplyScalar( t ).add( line.start ); + } - }, + return target.copy( direction ).multiplyScalar( t ).add( line.start ); + + }; + + }(), intersectsLine: function ( line ) { @@ -14087,26 +14113,26 @@ Object.assign( Plane.prototype, { }, - applyMatrix4: function ( matrix, optionalNormalMatrix ) { + applyMatrix4: function () { - if ( _normalMatrix === undefined ) { + var v1 = new Vector3(); + var m1 = new Matrix3(); - _normalMatrix = new Matrix3(); - _vector1 = new Vector3(); + return function applyMatrix4( matrix, optionalNormalMatrix ) { - } + var normalMatrix = optionalNormalMatrix || m1.getNormalMatrix( matrix ); - var normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); + var referencePoint = this.coplanarPoint( v1 ).applyMatrix4( matrix ); - var referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); + var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); - var normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + this.constant = - referencePoint.dot( normal ); - this.constant = - referencePoint.dot( normal ); + return this; - return this; + }; - }, + }(), translate: function ( offset ) { @@ -14130,9 +14156,6 @@ Object.assign( Plane.prototype, { * @author bhouston / http://clara.io */ -var _sphere; -var _vector$2; - function Frustum( p0, p1, p2, p3, p4, p5 ) { this.planes = [ @@ -14205,29 +14228,41 @@ Object.assign( Frustum.prototype, { }, - intersectsObject: function ( object ) { + intersectsObject: function () { - if ( _sphere === undefined ) _sphere = new Sphere(); + var sphere = new Sphere(); - var geometry = object.geometry; + return function intersectsObject( object ) { - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + var geometry = object.geometry; - _sphere.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); + if ( geometry.boundingSphere === null ) + geometry.computeBoundingSphere(); - return this.intersectsSphere( _sphere ); + sphere.copy( geometry.boundingSphere ) + .applyMatrix4( object.matrixWorld ); - }, + return this.intersectsSphere( sphere ); - intersectsSprite: function ( sprite ) { + }; - _sphere.center.set( 0, 0, 0 ); - _sphere.radius = 0.7071067811865476; - _sphere.applyMatrix4( sprite.matrixWorld ); + }(), - return this.intersectsSphere( _sphere ); + intersectsSprite: function () { - }, + var sphere = new Sphere(); + + return function intersectsSprite( sprite ) { + + sphere.center.set( 0, 0, 0 ); + sphere.radius = 0.7071067811865476; + sphere.applyMatrix4( sprite.matrixWorld ); + + return this.intersectsSphere( sphere ); + + }; + + }(), intersectsSphere: function ( sphere ) { @@ -14251,33 +14286,37 @@ Object.assign( Frustum.prototype, { }, - intersectsBox: function ( box ) { + intersectsBox: function () { - if ( _vector$2 === undefined ) _vector$2 = new Vector3(); + var p = new Vector3(); - var planes = this.planes; + return function intersectsBox( box ) { - for ( var i = 0; i < 6; i ++ ) { + var planes = this.planes; - var plane = planes[ i ]; + for ( var i = 0; i < 6; i ++ ) { - // corner at max distance + var plane = planes[ i ]; - _vector$2.x = plane.normal.x > 0 ? box.max.x : box.min.x; - _vector$2.y = plane.normal.y > 0 ? box.max.y : box.min.y; - _vector$2.z = plane.normal.z > 0 ? box.max.z : box.min.z; + // corner at max distance - if ( plane.distanceToPoint( _vector$2 ) < 0 ) { + p.x = plane.normal.x > 0 ? box.max.x : box.min.x; + p.y = plane.normal.y > 0 ? box.max.y : box.min.y; + p.z = plane.normal.z > 0 ? box.max.z : box.min.z; - return false; + if ( plane.distanceToPoint( p ) < 0 ) { + + return false; + + } } - } + return true; - return true; + }; - }, + }(), containsPoint: function ( point ) { @@ -44922,8 +44961,6 @@ Object.assign( Cylindrical.prototype, { * @author bhouston / http://clara.io */ -var _vector$3; - function Box2( min, max ) { this.min = ( min !== undefined ) ? min : new Vector2( + Infinity, + Infinity ); @@ -44956,17 +44993,21 @@ Object.assign( Box2.prototype, { }, - setFromCenterAndSize: function ( center, size ) { + setFromCenterAndSize: function () { - if ( _vector$3 === undefined ) _vector$3 = new Vector2(); + var v1 = new Vector2(); - var halfSize = _vector$3.copy( size ).multiplyScalar( 0.5 ); - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); + return function setFromCenterAndSize( center, size ) { - return this; + var halfSize = v1.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); - }, + return this; + + }; + + }(), clone: function () { @@ -45108,14 +45149,18 @@ Object.assign( Box2.prototype, { }, - distanceToPoint: function ( point ) { + distanceToPoint: function () { - if ( _vector$3 === undefined ) _vector$3 = new Vector2(); + var v1 = new Vector2(); - var clampedPoint = _vector$3.copy( point ).clamp( this.min, this.max ); - return clampedPoint.sub( point ).length(); + return function distanceToPoint( point ) { - }, + var clampedPoint = v1.copy( point ).clamp( this.min, this.max ); + return clampedPoint.sub( point ).length(); + + }; + + }(), intersect: function ( box ) { From f5cab974d13ed11264943f7de26d4b51dd6dcfa5 Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Thu, 8 Aug 2019 10:26:02 -0400 Subject: [PATCH 06/11] mrdoob approved autofix --- examples/js/lines/PerspectiveLineMaterial.js | 12 ++++++------ examples/jsm/lines/PerspectiveLineMaterial.js | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/js/lines/PerspectiveLineMaterial.js b/examples/js/lines/PerspectiveLineMaterial.js index bf00b01ccdd7be..88b47081259d8f 100644 --- a/examples/js/lines/PerspectiveLineMaterial.js +++ b/examples/js/lines/PerspectiveLineMaterial.js @@ -2,11 +2,11 @@ * @author Nathaniel Tagg / http://github.com/nathanieltagg * * parameters = { - * color: , - * worldlinewidth: , // how fat is the line in 3d coordinates? + * color: , + * worldlinewidth: , // how fat is the line in 3d coordinates? * minlinewidth: , // What is the miminum line width in pixels? (0 by default, set nonzero to keep line from vanishing no matter how far away) * maxlinewidth: , // What is the maximum line width in pixels? (20 by default, keep the line from filling the screen) - * dashed: , + * dashed: , * dashScale: , * dashSize: , * gapSize: , @@ -163,7 +163,7 @@ THREE.ShaderLib[ 'perspectiveline' ] = { float linewidth = abs(2.0*resolution.y*worldlinewidth*( (position.y<0.5)? (start.z/clipStart.w/clipStart.w) : (end.z/clipEnd.w/clipEnd.w) )); linewidth = clamp(linewidth,minlinewidth,maxlinewidth); - + offset *= linewidth; // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... @@ -428,8 +428,8 @@ THREE.PerspectiveLineMaterial.prototype.copy = function ( source ) { this.color.copy( source.color ); this.worldlinewidth = source.worldlinewidth; - this.minlinewidth = source.minlinewidth; - this.maxlinewidth = source.maxlinewidth; + this.minlinewidth = source.minlinewidth; + this.maxlinewidth = source.maxlinewidth; this.resolution = source.resolution; diff --git a/examples/jsm/lines/PerspectiveLineMaterial.js b/examples/jsm/lines/PerspectiveLineMaterial.js index c791108eec96d3..b87f64e6840479 100644 --- a/examples/jsm/lines/PerspectiveLineMaterial.js +++ b/examples/jsm/lines/PerspectiveLineMaterial.js @@ -2,11 +2,11 @@ * @author Nathaniel Tagg / http://github.com/nathanieltagg * * parameters = { - * color: , - * worldlinewidth: , // how fat is the line in 3d coordinates? + * color: , + * worldlinewidth: , // how fat is the line in 3d coordinates? * minlinewidth: , // What is the miminum line width in pixels? (0 by default, set nonzero to keep line from vanishing no matter how far away) * maxlinewidth: , // What is the maximum line width in pixels? (20 by default, keep the line from filling the screen) - * dashed: , + * dashed: , * dashScale: , * dashSize: , * gapSize: , @@ -31,7 +31,7 @@ UniformsLib.perspectiveline = { resolution: { value: new Vector2( 1, 1 ) }, dashScale: { value: 1 }, dashSize: { value: 1 }, - gapSize: { value: 1 } + gapSize: { value: 1 } }; ShaderLib[ 'perspectiveline' ] = { @@ -173,7 +173,7 @@ ShaderLib[ 'perspectiveline' ] = { float linewidth = abs(2.0*resolution.y*worldlinewidth*( (position.y<0.5)? (start.z/clipStart.w/clipStart.w) : (end.z/clipEnd.w/clipEnd.w) )); linewidth = clamp(linewidth,minlinewidth,maxlinewidth); - + offset *= linewidth; // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... @@ -441,9 +441,9 @@ PerspectiveLineMaterial.prototype.copy = function ( source ) { this.worldlinewidth = source.worldlinewidth; - this.minlinewidth = source.minlinewidth; + this.minlinewidth = source.minlinewidth; - this.maxlinewidth = source.maxlinewidth; + this.maxlinewidth = source.maxlinewidth; this.resolution = source.resolution; From 6fc1e4f68953062add8c3ce6e1f2407b60904cc3 Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Thu, 8 Aug 2019 11:28:39 -0400 Subject: [PATCH 07/11] Add a new demo. Minor fixes. --- examples/js/lines/LineSegments2.js | 38 +++-- examples/jsm/lines/LineSegments2.js | 35 +++-- examples/webgl_lines_fat.html | 66 +++++---- examples/webgl_raycast_line.html | 206 ++++++++++++++++++++++++++++ 4 files changed, 292 insertions(+), 53 deletions(-) create mode 100644 examples/webgl_raycast_line.html diff --git a/examples/js/lines/LineSegments2.js b/examples/js/lines/LineSegments2.js index ef08c23afd63c2..2f16c21ffc95c6 100644 --- a/examples/js/lines/LineSegments2.js +++ b/examples/js/lines/LineSegments2.js @@ -60,9 +60,10 @@ THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy return this; - }, - + }, + raycast: ( function () { + var inverseMatrix = new THREE.Matrix4(); var ray = new THREE.Ray(); var sphere = new THREE.Sphere(); @@ -71,6 +72,12 @@ THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy var precision = raycaster.linePrecision; + // If using a persepective-line material, there is a known precision: + // This doesn't work correctly though; the collision distance turns out too large. + // if(this.material && this.material.worldlinewidth) precision = this.material.worldlinewidth; + + if(this.material.) + var geometry = this.geometry; var matrixWorld = this.matrixWorld; @@ -97,24 +104,25 @@ THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy // Currently, the geometry is always a LineSegments2 geometry, which uses the instanceStart/instanceEnd to store segment locations var starts = geometry.attributes.instanceStart; - var ends = geometry.attributes.instanceEnd; - - for(var i=0;i localPrecisionSq ) continue; - + interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation - + var distance = raycaster.ray.origin.distanceTo( interRay ); - + if ( distance < raycaster.near || distance > raycaster.far ) continue; - + intersects.push( { - + distance: distance, // What do we want? intersection point on the ray or on the segment?? // point: raycaster.ray.at( distance ), @@ -124,9 +132,11 @@ THREE.LineSegments2.prototype = Object.assign( Object.create( THREE.Mesh.prototy faceIndex: null, object: this } ); - + } + }; - }() ) + + }() ) } ); diff --git a/examples/jsm/lines/LineSegments2.js b/examples/jsm/lines/LineSegments2.js index 81d5a0c09c0e3b..2776259941701e 100644 --- a/examples/jsm/lines/LineSegments2.js +++ b/examples/jsm/lines/LineSegments2.js @@ -74,7 +74,7 @@ LineSegments2.prototype = Object.assign( Object.create( Mesh.prototype ), { }, - + raycast: ( function () { var inverseMatrix = new Matrix4(); @@ -85,6 +85,10 @@ LineSegments2.prototype = Object.assign( Object.create( Mesh.prototype ), { var precision = raycaster.linePrecision; + // If using a persepective-line material, there is a known precision: + // This doesn't work correctly though; the collision distance turns out too large. + // if(this.material && this.material.worldlinewidth) precision = this.material.worldlinewidth; + var geometry = this.geometry; var matrixWorld = this.matrixWorld; @@ -110,23 +114,24 @@ LineSegments2.prototype = Object.assign( Object.create( Mesh.prototype ), { // Currently, the geometry is always a LineSegments2 geometry, which uses the instanceStart/instanceEnd to store segment locations var starts = geometry.attributes.instanceStart; - var ends = geometry.attributes.instanceEnd; - - for(var i=0;i localPrecisionSq ) continue; - + interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation - + var distance = raycaster.ray.origin.distanceTo( interRay ); - + if ( distance < raycaster.near || distance > raycaster.far ) continue; - + intersects.push( { - + distance: distance, // What do we want? intersection point on the ray or on the segment?? // point: raycaster.ray.at( distance ), @@ -136,11 +141,13 @@ LineSegments2.prototype = Object.assign( Object.create( Mesh.prototype ), { faceIndex: null, object: this } ); - + } + }; - }() ) - + + }() ) + } ); diff --git a/examples/webgl_lines_fat.html b/examples/webgl_lines_fat.html index 35f62abe3099b3..8c26439f70f033 100644 --- a/examples/webgl_lines_fat.html +++ b/examples/webgl_lines_fat.html @@ -13,6 +13,9 @@
three.js - fat lines
+ + + + + From d1563c8ec07b7d8a4a56854cf066814d0e67198b Mon Sep 17 00:00:00 2001 From: Nathaniel Tagg Date: Thu, 8 Aug 2019 11:35:05 -0400 Subject: [PATCH 08/11] Remove raycast example code from lines example. --- examples/webgl_lines_fat.html | 52 ++--------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/examples/webgl_lines_fat.html b/examples/webgl_lines_fat.html index 8c26439f70f033..bc0dfc34accffa 100644 --- a/examples/webgl_lines_fat.html +++ b/examples/webgl_lines_fat.html @@ -13,9 +13,7 @@
three.js - fat lines
- +