瀏覽代碼

Upstream merge conflict

Guilherme Avila 6 年之前
父節點
當前提交
93963725f9
共有 100 個文件被更改,包括 1303 次插入351 次删除
  1. 46 18
      build/three.js
  2. 115 115
      build/three.min.js
  3. 42 18
      build/three.module.js
  4. 17 0
      docs/api/en/objects/Points.html
  5. 3 3
      docs/api/en/renderers/WebGLRenderer.html
  6. 16 0
      docs/api/zh/objects/Points.html
  7. 2 2
      docs/manual/en/introduction/How-to-use-WebGL2.html
  8. 1 1
      docs/manual/en/introduction/WebGL-compatibility-check.html
  9. 2 2
      docs/manual/zh/introduction/How-to-use-WebGL2.html
  10. 1 1
      docs/manual/zh/introduction/WebGL-compatibility-check.html
  11. 1 1
      examples/js/WebGL.js
  12. 19 1
      examples/js/controls/OrthographicTrackballControls.js
  13. 38 17
      examples/js/controls/TrackballControls.js
  14. 2 2
      examples/js/controls/TransformControls.js
  15. 0 2
      examples/js/exporters/GLTFExporter.js
  16. 3 3
      examples/js/geometries/LightningStrike.js
  17. 22 9
      examples/js/interactive/SelectionBox.js
  18. 12 0
      examples/js/libs/dat.gui.min.js
  19. 5 0
      examples/js/libs/stats.min.js
  20. 9 1
      examples/js/loaders/EXRLoader.js
  21. 12 4
      examples/js/loaders/HDRCubeTextureLoader.js
  22. 0 2
      examples/js/loaders/LDrawLoader.js
  23. 9 1
      examples/js/loaders/RGBELoader.js
  24. 6 12
      examples/js/loaders/SVGLoader.js
  25. 0 2
      examples/js/utils/SkeletonUtils.js
  26. 0 21
      examples/js/vr/WebVR.js
  27. 9 0
      examples/jsm/WebGL.d.ts
  28. 98 0
      examples/jsm/WebGL.js
  29. 19 1
      examples/jsm/controls/OrthographicTrackballControls.js
  30. 39 17
      examples/jsm/controls/TrackballControls.js
  31. 2 2
      examples/jsm/controls/TransformControls.js
  32. 0 2
      examples/jsm/exporters/GLTFExporter.js
  33. 4 5
      examples/jsm/geometries/LightningStrike.js
  34. 22 9
      examples/jsm/interactive/SelectionBox.js
  35. 1 1
      examples/jsm/loaders/EXRLoader.d.ts
  36. 9 1
      examples/jsm/loaders/EXRLoader.js
  37. 1 1
      examples/jsm/loaders/HDRCubeTextureLoader.d.ts
  38. 12 4
      examples/jsm/loaders/HDRCubeTextureLoader.js
  39. 0 2
      examples/jsm/loaders/LDrawLoader.js
  40. 1 1
      examples/jsm/loaders/MMDLoader.d.ts
  41. 45 0
      examples/jsm/loaders/OBJLoader2.d.ts
  42. 48 2
      examples/jsm/loaders/OBJLoader2.js
  43. 19 0
      examples/jsm/loaders/OBJLoader2Parallel.d.ts
  44. 28 4
      examples/jsm/loaders/OBJLoader2Parallel.js
  45. 1 1
      examples/jsm/loaders/RGBELoader.d.ts
  46. 9 1
      examples/jsm/loaders/RGBELoader.js
  47. 1 1
      examples/jsm/loaders/SVGLoader.d.ts
  48. 6 12
      examples/jsm/loaders/SVGLoader.js
  49. 4 0
      examples/jsm/loaders/obj2/bridge/MtlObjBridge.d.ts
  50. 6 2
      examples/jsm/loaders/obj2/bridge/MtlObjBridge.js
  51. 22 0
      examples/jsm/loaders/obj2/shared/MaterialHandler.d.ts
  52. 23 2
      examples/jsm/loaders/obj2/shared/MaterialHandler.js
  53. 22 0
      examples/jsm/loaders/obj2/shared/MeshReceiver.d.ts
  54. 23 6
      examples/jsm/loaders/obj2/shared/MeshReceiver.js
  55. 4 0
      examples/jsm/loaders/obj2/utils/CodeSerializer.d.ts
  56. 8 3
      examples/jsm/loaders/obj2/utils/CodeSerializer.js
  57. 3 0
      examples/jsm/loaders/obj2/utils/ObjectManipulator.d.ts
  58. 5 1
      examples/jsm/loaders/obj2/utils/ObjectManipulator.js
  59. 59 0
      examples/jsm/loaders/obj2/worker/main/WorkerExecutionSupport.d.ts
  60. 78 5
      examples/jsm/loaders/obj2/worker/main/WorkerExecutionSupport.js
  61. 81 0
      examples/jsm/loaders/obj2/worker/parallel/OBJLoader2Parser.d.ts
  62. 94 20
      examples/jsm/loaders/obj2/worker/parallel/OBJLoader2Parser.js
  63. 24 0
      examples/jsm/loaders/obj2/worker/parallel/WorkerRunner.d.ts
  64. 19 4
      examples/jsm/loaders/obj2/worker/parallel/WorkerRunner.js
  65. 2 2
      examples/jsm/misc/Volume.d.ts
  66. 1 1
      examples/jsm/misc/VolumeSlice.d.ts
  67. 2 0
      examples/jsm/nodes/accessors/CameraNode.js
  68. 2 0
      examples/jsm/nodes/accessors/ColorsNode.js
  69. 2 0
      examples/jsm/nodes/accessors/LightNode.js
  70. 2 0
      examples/jsm/nodes/accessors/NormalNode.js
  71. 2 0
      examples/jsm/nodes/accessors/PositionNode.js
  72. 2 0
      examples/jsm/nodes/accessors/ResolutionNode.js
  73. 2 0
      examples/jsm/nodes/accessors/ScreenUVNode.js
  74. 2 0
      examples/jsm/nodes/accessors/UVNode.js
  75. 2 0
      examples/jsm/nodes/bsdfs/BlinnExponentToRoughnessNode.js
  76. 2 0
      examples/jsm/nodes/bsdfs/RoughnessToBlinnExponentNode.js
  77. 2 0
      examples/jsm/nodes/core/AttributeNode.js
  78. 2 0
      examples/jsm/nodes/core/ConstNode.js
  79. 2 0
      examples/jsm/nodes/core/FunctionCallNode.js
  80. 2 0
      examples/jsm/nodes/core/FunctionNode.js
  81. 2 0
      examples/jsm/nodes/core/InputNode.js
  82. 2 0
      examples/jsm/nodes/core/Node.js
  83. 2 0
      examples/jsm/nodes/core/VarNode.js
  84. 2 0
      examples/jsm/nodes/effects/BlurNode.js
  85. 2 0
      examples/jsm/nodes/effects/ColorAdjustmentNode.js
  86. 2 0
      examples/jsm/nodes/effects/LuminanceNode.js
  87. 2 0
      examples/jsm/nodes/inputs/BoolNode.js
  88. 2 0
      examples/jsm/nodes/inputs/ColorNode.js
  89. 2 0
      examples/jsm/nodes/inputs/CubeTextureNode.js
  90. 2 0
      examples/jsm/nodes/inputs/FloatNode.js
  91. 2 0
      examples/jsm/nodes/inputs/IntNode.js
  92. 2 0
      examples/jsm/nodes/inputs/Matrix3Node.js
  93. 2 0
      examples/jsm/nodes/inputs/Matrix4Node.js
  94. 2 0
      examples/jsm/nodes/inputs/RTTNode.js
  95. 2 0
      examples/jsm/nodes/inputs/ReflectorNode.js
  96. 2 0
      examples/jsm/nodes/inputs/TextureNode.js
  97. 2 0
      examples/jsm/nodes/inputs/Vector2Node.js
  98. 2 0
      examples/jsm/nodes/inputs/Vector3Node.js
  99. 2 0
      examples/jsm/nodes/inputs/Vector4Node.js
  100. 2 0
      examples/jsm/nodes/materials/NodeMaterial.js

+ 46 - 18
build/three.js

@@ -185,7 +185,7 @@
 
 	} );
 
-	var REVISION = '106';
+	var REVISION = '107dev';
 	var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 	var CullFaceNone = 0;
 	var CullFaceBack = 1;
@@ -256,10 +256,14 @@
 	var ClampToEdgeWrapping = 1001;
 	var MirroredRepeatWrapping = 1002;
 	var NearestFilter = 1003;
+	var NearestMipmapNearestFilter = 1004;
 	var NearestMipMapNearestFilter = 1004;
+	var NearestMipmapLinearFilter = 1005;
 	var NearestMipMapLinearFilter = 1005;
 	var LinearFilter = 1006;
+	var LinearMipmapNearestFilter = 1007;
 	var LinearMipMapNearestFilter = 1007;
+	var LinearMipmapLinearFilter = 1008;
 	var LinearMipMapLinearFilter = 1008;
 	var UnsignedByteType = 1009;
 	var ByteType = 1010;
@@ -19552,7 +19556,7 @@
 
 			var currentRenderTarget = _renderer.getRenderTarget();
 			var activeCubeFace = _renderer.getActiveCubeFace();
-			var activeMipMapLevel = _renderer.getActiveMipMapLevel();
+			var activeMipmapLevel = _renderer.getActiveMipmapLevel();
 
 			var _state = _renderer.state;
 
@@ -19710,7 +19714,7 @@
 
 			scope.needsUpdate = false;
 
-			_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipMapLevel );
+			_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );
 
 		};
 
@@ -25385,7 +25389,7 @@
 
 		};
 
-		this.getActiveMipMapLevel = function () {
+		this.getActiveMipmapLevel = function () {
 
 			return _currentActiveMipmapLevel;
 
@@ -25397,11 +25401,11 @@
 
 		};
 
-		this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipMapLevel ) {
+		this.setRenderTarget = function ( renderTarget, activeCubeFace, activeMipmapLevel ) {
 
 			_currentRenderTarget = renderTarget;
 			_currentActiveCubeFace = activeCubeFace;
-			_currentActiveMipmapLevel = activeMipMapLevel;
+			_currentActiveMipmapLevel = activeMipmapLevel;
 
 			if ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) {
 
@@ -25457,7 +25461,7 @@
 			if ( isCube ) {
 
 				var textureProperties = properties.get( renderTarget.texture );
-				_gl.framebufferTexture2D( 36160, 36064, 34069 + ( activeCubeFace || 0 ), textureProperties.__webglTexture, activeMipMapLevel || 0 );
+				_gl.framebufferTexture2D( 36160, 36064, 34069 + ( activeCubeFace || 0 ), textureProperties.__webglTexture, activeMipmapLevel || 0 );
 
 			}
 
@@ -27211,29 +27215,43 @@
 			var geometry = this.geometry;
 			var m, ml, name;
 
-			var morphAttributes = geometry.morphAttributes;
-			var keys = Object.keys( morphAttributes );
+			if ( geometry.isBufferGeometry ) {
+
+				var morphAttributes = geometry.morphAttributes;
+				var keys = Object.keys( morphAttributes );
+
+				if ( keys.length > 0 ) {
 
-			if ( keys.length > 0 ) {
+					var morphAttribute = morphAttributes[ keys[ 0 ] ];
 
-				var morphAttribute = morphAttributes[ keys[ 0 ] ];
+					if ( morphAttribute !== undefined ) {
 
-				if ( morphAttribute !== undefined ) {
+						this.morphTargetInfluences = [];
+						this.morphTargetDictionary = {};
 
-					this.morphTargetInfluences = [];
-					this.morphTargetDictionary = {};
+						for ( m = 0, ml = morphAttribute.length; m < ml; m ++ ) {
 
-					for ( m = 0, ml = morphAttribute.length; m < ml; m ++ ) {
+							name = morphAttribute[ m ].name || String( m );
 
-						name = morphAttribute[ m ].name || String( m );
+							this.morphTargetInfluences.push( 0 );
+							this.morphTargetDictionary[ name ] = m;
 
-						this.morphTargetInfluences.push( 0 );
-						this.morphTargetDictionary[ name ] = m;
+						}
 
 					}
 
 				}
 
+			} else {
+
+				var morphTargets = geometry.morphTargets;
+
+				if ( morphTargets !== undefined && morphTargets.length > 0 ) {
+
+					console.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );
+
+				}
+
 			}
 
 		},
@@ -48415,6 +48433,12 @@
 
 			console.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' );
 
+		},
+		getActiveMipMapLevel: function () {
+
+			console.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' );
+			return this.getActiveMipmapLevel();
+
 		}
 
 	} );
@@ -49037,6 +49061,8 @@
 	exports.LinearInterpolant = LinearInterpolant;
 	exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;
 	exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;
+	exports.LinearMipmapLinearFilter = LinearMipmapLinearFilter;
+	exports.LinearMipmapNearestFilter = LinearMipmapNearestFilter;
 	exports.LinearToneMapping = LinearToneMapping;
 	exports.Loader = Loader;
 	exports.LoaderUtils = LoaderUtils;
@@ -49075,6 +49101,8 @@
 	exports.NearestFilter = NearestFilter;
 	exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;
 	exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;
+	exports.NearestMipmapLinearFilter = NearestMipmapLinearFilter;
+	exports.NearestMipmapNearestFilter = NearestMipmapNearestFilter;
 	exports.NeverDepth = NeverDepth;
 	exports.NoBlending = NoBlending;
 	exports.NoColors = NoColors;

+ 115 - 115
build/three.min.js

@@ -100,7 +100,7 @@ this.type="MeshDepthMaterial";this.depthPacking=3200;this.morphTargets=this.skin
 b),b=b.isSkinnedMesh&&c.skinning,h=0,m&&(h|=1),b&&(h|=2),k=k[h]);a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(h=k.uuid,m=c.uuid,b=l[h],void 0===b&&(b={},l[h]=b),h=b[m],void 0===h&&(h=k.clone(),b[m]=h),k=h);k.visible=c.visible;k.wireframe=c.wireframe;k.side=null!=c.shadowSide?c.shadowSide:q[c.side];k.clipShadows=c.clipShadows;k.clippingPlanes=c.clippingPlanes;k.clipIntersection=c.clipIntersection;k.wireframeLinewidth=c.wireframeLinewidth;k.linewidth=c.linewidth;d&&k.isMeshDistanceMaterial&&
 (k.referencePosition.copy(e),k.nearDistance=f,k.farDistance=g);return k}function e(c,g,h,k){if(!1!==c.visible){if(c.layers.test(g.layers)&&(c.isMesh||c.isLine||c.isPoints)&&c.castShadow&&(!c.frustumCulled||f.intersectsObject(c))){c.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,c.matrixWorld);var m=b.update(c),p=c.material;if(Array.isArray(p))for(var u=m.groups,l=0,q=u.length;l<q;l++){var t=u[l],v=p[t.materialIndex];v&&v.visible&&(v=d(c,v,k,r,h.near,h.far),a.renderBufferDirect(h,null,m,v,c,
 t))}else p.visible&&(v=d(c,p,k,r,h.near,h.far),a.renderBufferDirect(h,null,m,v,c,null))}c=c.children;m=0;for(p=c.length;m<p;m++)e(c[m],g,h,k)}}var f=new Cd,g=new O,h=new C,k=new C(c,c),m=new n,r=new n,p=Array(4),u=Array(4),l={},q={0:1,1:0,2:2},v=[new n(1,0,0),new n(-1,0,0),new n(0,0,1),new n(0,0,-1),new n(0,1,0),new n(0,-1,0)],y=[new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,1,0),new n(0,0,1),new n(0,0,-1)],z=[new ba,new ba,new ba,new ba,new ba,new ba];for(c=0;4!==c;++c){var w=0!==(c&1),x=0!==(c&
-2),A=new mb({depthPacking:3201,morphTargets:w,skinning:x});p[c]=A;w=new nb({morphTargets:w,skinning:x});u[c]=w}var H=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(b,c,d){if(!1!==H.enabled&&(!1!==H.autoUpdate||!1!==H.needsUpdate)&&0!==b.length){var p=a.getRenderTarget(),u=a.getActiveCubeFace(),l=a.getActiveMipMapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);for(var t,n=0,Da=b.length;n<
+2),A=new mb({depthPacking:3201,morphTargets:w,skinning:x});p[c]=A;w=new nb({morphTargets:w,skinning:x});u[c]=w}var H=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.render=function(b,c,d){if(!1!==H.enabled&&(!1!==H.autoUpdate||!1!==H.needsUpdate)&&0!==b.length){var p=a.getRenderTarget(),u=a.getActiveCubeFace(),l=a.getActiveMipmapLevel(),q=a.state;q.setBlending(0);q.buffers.color.setClear(1,1,1,1);q.buffers.depth.setTest(!0);q.setScissorTest(!1);for(var t,n=0,Da=b.length;n<
 Da;n++){var S=b[n];t=S.shadow;var x=S&&S.isPointLight;if(void 0===t)console.warn("THREE.WebGLShadowMap:",S,"has no shadow.");else{var w=t.camera;h.copy(t.mapSize);h.min(k);if(x){var A=h.x,F=h.y;z[0].set(2*A,F,A,F);z[1].set(0,F,A,F);z[2].set(3*A,F,A,F);z[3].set(A,F,A,F);z[4].set(3*A,0,A,F);z[5].set(A,0,A,F);h.x*=4;h.y*=2}null===t.map&&(t.map=new Ta(h.x,h.y,{minFilter:1003,magFilter:1003,format:1023}),t.map.texture.name=S.name+".shadowMap",w.updateProjectionMatrix());t.isSpotLightShadow&&t.update(S);
 A=t.map;F=t.matrix;r.setFromMatrixPosition(S.matrixWorld);w.position.copy(r);x?(t=6,F.makeTranslation(-r.x,-r.y,-r.z)):(t=1,m.setFromMatrixPosition(S.target.matrixWorld),w.lookAt(m),w.updateMatrixWorld(),F.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),F.multiply(w.projectionMatrix),F.multiply(w.matrixWorldInverse));a.setRenderTarget(A);a.clear();for(S=0;S<t;S++)x&&(m.copy(w.position),m.add(v[S]),w.up.copy(y[S]),w.lookAt(m),w.updateMatrixWorld(),q.viewport(z[S])),g.multiplyMatrices(w.projectionMatrix,
 w.matrixWorldInverse),f.setFromMatrix(g),e(c,d,w,x)}}H.needsUpdate=!1;a.setRenderTarget(p,u,l)}}}function nh(a,b,c,d){function e(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,10241,9728);a.texParameteri(b,10240,9728);for(b=0;b<d;b++)a.texImage2D(c+b,0,6408,1,1,0,6408,5121,e);return f}function f(c,e){z[c]=1;0===w[c]&&(a.enableVertexAttribArray(c),w[c]=1);x[c]!==e&&((d.isWebGL2?a:b.get("ANGLE_instanced_arrays"))[d.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](c,
@@ -183,8 +183,8 @@ c.uniformsNeedUpdate=!1);c.isSpriteMaterial&&m.setValue(M,"center",d.center);m.s
 b.envMap&&(a.envMap.value=b.envMap,a.flipEnvMap.value=b.envMap.isCubeTexture?-1:1,a.reflectivity.value=b.reflectivity,a.refractionRatio.value=b.refractionRatio,a.maxMipLevel.value=T.get(b.envMap).__maxMipLevel);b.lightMap&&(a.lightMap.value=b.lightMap,a.lightMapIntensity.value=b.lightMapIntensity);b.aoMap&&(a.aoMap.value=b.aoMap,a.aoMapIntensity.value=b.aoMapIntensity);if(b.map)var c=b.map;else b.specularMap?c=b.specularMap:b.displacementMap?c=b.displacementMap:b.normalMap?c=b.normalMap:b.bumpMap?
 c=b.bumpMap:b.roughnessMap?c=b.roughnessMap:b.metalnessMap?c=b.metalnessMap:b.alphaMap?c=b.alphaMap:b.emissiveMap&&(c=b.emissiveMap);void 0!==c&&(c.isWebGLRenderTarget&&(c=c.texture),!0===c.matrixAutoUpdate&&c.updateMatrix(),a.uvTransform.value.copy(c.matrix))}function q(a,b){a.specular.value.copy(b.specular);a.shininess.value=Math.max(b.shininess,1E-4);b.emissiveMap&&(a.emissiveMap.value=b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=
 -1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias)}function v(a,b){a.roughness.value=b.roughness;a.metalness.value=b.metalness;b.roughnessMap&&(a.roughnessMap.value=b.roughnessMap);b.metalnessMap&&(a.metalnessMap.value=b.metalnessMap);b.emissiveMap&&(a.emissiveMap.value=
-b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log("THREE.WebGLRenderer","106");a=a||{};
-var y=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,x=void 0!==a.depth?a.depth:!0,A=void 0!==a.stencil?a.stencil:!0,H=void 0!==a.antialias?a.antialias:!1,la=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,D=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,F=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:
+b.emissiveMap);b.bumpMap&&(a.bumpMap.value=b.bumpMap,a.bumpScale.value=b.bumpScale,1===b.side&&(a.bumpScale.value*=-1));b.normalMap&&(a.normalMap.value=b.normalMap,a.normalScale.value.copy(b.normalScale),1===b.side&&a.normalScale.value.negate());b.displacementMap&&(a.displacementMap.value=b.displacementMap,a.displacementScale.value=b.displacementScale,a.displacementBias.value=b.displacementBias);b.envMap&&(a.envMapIntensity.value=b.envMapIntensity)}console.log("THREE.WebGLRenderer","107dev");a=a||
+{};var y=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),z=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,x=void 0!==a.depth?a.depth:!0,A=void 0!==a.stencil?a.stencil:!0,H=void 0!==a.antialias?a.antialias:!1,la=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,D=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,F=void 0!==a.powerPreference?a.powerPreference:"default",G=void 0!==a.failIfMajorPerformanceCaveat?a.failIfMajorPerformanceCaveat:
 !1,E=null,B=null;this.domElement=y;this.context=null;this.debug={checkShaderErrors:!0};this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var Y=this,N=!1,Q=null,Da=0,S=0,L=null,yb=null,bb=-1;var I=b=null;
 var U=!1;var V=null,X=null,R=new ba,Z=new ba,ja=null,K=y.width,W=y.height,ca=1,ea=new ba(0,0,K,W),ia=new ba(0,0,K,W),ra=!1,fa=new Cd,Ia=new kg,Ed=!1,ta=!1,Nc=new O,ob=new n;try{w={alpha:w,depth:x,stencil:A,antialias:H,premultipliedAlpha:la,preserveDrawingBuffer:D,powerPreference:F,failIfMajorPerformanceCaveat:G,xrCompatible:!0};y.addEventListener("webglcontextlost",d,!1);y.addEventListener("webglcontextrestored",e,!1);var M=z||y.getContext("webgl",w)||y.getContext("experimental-webgl",w);if(null===
 M){if(null!==y.getContext("webgl"))throw Error("Error creating WebGL context with your selected attributes.");throw Error("Error creating WebGL context.");}void 0===M.getShaderPrecisionFormat&&(M.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Cf){throw console.error("THREE.WebGLRenderer: "+Cf.message),Cf;}var ma,Fa,da,ha,T,aa,sa,wa,qa,na,va,ua,oa,za,Aa,Ca,ka;c();var pa="undefined"!==typeof navigator&&"xr"in navigator&&"supportsSession"in navigator.xr?new Bf(Y):
@@ -203,7 +203,7 @@ h&&M.bindBuffer(34963,p.buffer)}p=Infinity;null!==h?p=h.count:void 0!==r&&(p=r.c
 b);else p(b.material,a.fog,b)})};var Ba=null,ya=new ne;ya.setAnimationLoop(function(a){pa.isPresenting()||Ba&&Ba(a)});"undefined"!==typeof window&&ya.setContext(window);this.setAnimationLoop=function(a){Ba=a;pa.setAnimationLoop(a);ya.start()};this.render=function(a,c,d,e){if(void 0!==d){console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.");var f=d}if(void 0!==e){console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.");
 var g=e}c&&c.isCamera?N||(I=b=null,U=!1,bb=-1,V=null,!0===a.autoUpdate&&a.updateMatrixWorld(),null===c.parent&&c.updateMatrixWorld(),pa.enabled&&(c=pa.getCamera(c)),B=ua.get(a,c),B.init(),a.onBeforeRender(Y,a,c,f||L),Nc.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse),fa.setFromMatrix(Nc),ta=this.localClippingEnabled,Ed=Ia.init(this.clippingPlanes,ta,c),E=va.get(a,c),E.init(),k(a,c,0,Y.sortObjects),!0===Y.sortObjects&&E.sort(),Ed&&Ia.beginShadows(),Ea.render(B.state.shadowsArray,a,c),B.setupLights(c),
 Ed&&Ia.endShadows(),this.info.autoReset&&this.info.reset(),void 0!==f&&this.setRenderTarget(f),oa.render(E,a,c,g),d=E.opaque,e=E.transparent,a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,c,f),e.length&&m(e,a,c,f)):(d.length&&m(d,a,c),e.length&&m(e,a,c)),a.onAfterRender(Y,a,c),null!==L&&(aa.updateRenderTargetMipmap(L),aa.updateMultisampleRenderTarget(L)),da.buffers.depth.setTest(!0),da.buffers.depth.setMask(!0),da.buffers.color.setMask(!0),da.setPolygonOffset(!1),pa.enabled&&pa.submitFrame(),
-B=E=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){Q!==a&&M.bindFramebuffer(36160,a);Q=a};this.getActiveCubeFace=function(){return Da};this.getActiveMipMapLevel=function(){return S};this.getRenderTarget=function(){return L};this.setRenderTarget=function(a,b,c){L=a;Da=b;S=c;a&&void 0===T.get(a).__webglFramebuffer&&aa.setupRenderTarget(a);var d=Q,e=!1;a?(d=T.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],
+B=E=null):console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")};this.setFramebuffer=function(a){Q!==a&&M.bindFramebuffer(36160,a);Q=a};this.getActiveCubeFace=function(){return Da};this.getActiveMipmapLevel=function(){return S};this.getRenderTarget=function(){return L};this.setRenderTarget=function(a,b,c){L=a;Da=b;S=c;a&&void 0===T.get(a).__webglFramebuffer&&aa.setupRenderTarget(a);var d=Q,e=!1;a?(d=T.get(a).__webglFramebuffer,a.isWebGLRenderTargetCube?(d=d[b||0],
 e=!0):d=a.isWebGLMultisampleRenderTarget?T.get(a).__webglMultisampledFramebuffer:d,R.copy(a.viewport),Z.copy(a.scissor),ja=a.scissorTest):(R.copy(ea).multiplyScalar(ca).floor(),Z.copy(ia).multiplyScalar(ca).floor(),ja=ra);yb!==d&&(M.bindFramebuffer(36160,d),yb=d);da.viewport(R);da.scissor(Z);da.setScissorTest(ja);e&&(a=T.get(a.texture),M.framebufferTexture2D(36160,36064,34069+(b||0),a.__webglTexture,c||0))};this.readRenderTargetPixels=function(a,b,c,d,e,f,g){if(a&&a.isWebGLRenderTarget){var h=T.get(a).__webglFramebuffer;
 a.isWebGLRenderTargetCube&&void 0!==g&&(h=h[g]);if(h){g=!1;h!==yb&&(M.bindFramebuffer(36160,h),g=!0);try{var k=a.texture,m=k.format,r=k.type;1023!==m&&ka.convert(m)!==M.getParameter(35739)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===r||ka.convert(r)===M.getParameter(35738)||1015===r&&(Fa.isWebGL2||ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===r&&(Fa.isWebGL2?ma.get("EXT_color_buffer_float"):
 ma.get("EXT_color_buffer_half_float"))?36053===M.checkFramebufferStatus(36160)?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&M.readPixels(b,c,d,e,ka.convert(m),ka.convert(r),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{g&&M.bindFramebuffer(36160,yb)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")};
@@ -235,9 +235,9 @@ g(x,e,f,a,q);g(x+.01,e,f,a,v);z.subVectors(v,q);w.addVectors(v,q);y.crossVectors
 this.addAttribute("position",new D(k,3));this.addAttribute("normal",new D(m,3));this.addAttribute("uv",new D(r,2))}function cd(a,b,c,d,e){Q.call(this);this.type="TorusGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};this.fromBufferGeometry(new ic(a,b,c,d,e));this.mergeVertices()}function ic(a,b,c,d,e){E.call(this);this.type="TorusBufferGeometry";this.parameters={radius:a,tube:b,radialSegments:c,tubularSegments:d,arc:e};a=a||1;b=b||.4;c=Math.floor(c)||8;d=Math.floor(d)||
 6;e=e||2*Math.PI;var f=[],g=[],h=[],k=[],m=new n,r=new n,p=new n,l,t;for(l=0;l<=c;l++)for(t=0;t<=d;t++){var q=t/d*e,v=l/c*Math.PI*2;r.x=(a+b*Math.cos(v))*Math.cos(q);r.y=(a+b*Math.cos(v))*Math.sin(q);r.z=b*Math.sin(v);g.push(r.x,r.y,r.z);m.x=a*Math.cos(q);m.y=a*Math.sin(q);p.subVectors(r,m).normalize();h.push(p.x,p.y,p.z);k.push(t/d);k.push(l/c)}for(l=1;l<=c;l++)for(t=1;t<=d;t++)a=(d+1)*(l-1)+t-1,b=(d+1)*(l-1)+t,e=(d+1)*l+t,f.push((d+1)*l+t-1,a,e),f.push(a,b,e);this.setIndex(f);this.addAttribute("position",
 new D(g,3));this.addAttribute("normal",new D(h,3));this.addAttribute("uv",new D(k,2))}function Df(a,b,c,d,e){for(var f,g=0,h=b,k=c-d;h<c;h+=d)g+=(a[k]-a[h])*(a[h+1]+a[k+1]),k=h;if(e===0<g)for(e=b;e<c;e+=d)f=Ef(e,a[e],a[e+1],f);else for(e=c-d;e>=b;e-=d)f=Ef(e,a[e],a[e+1],f);f&&Fb(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||!Fb(a,a.next)&&0!==aa(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=ue(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;m<t&&(p++,n=n.nextZ,n);m++);for(l=t;0<p||0<l&&n;)0!==p&&(0===l||!n||k.z<=n.z)?(m=k,k=k.nextZ,p--):(m=n,n=n.nextZ,l--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;k=n}q.nextZ=null;t*=2}while(1<r)}for(h=a;a.prev!==a.next;){k=a.prev;n=a.next;if(f)q=ph(a,d,e,f);else a:if(q=
-a,r=q.prev,p=q,t=q.next,0<=aa(r,p,t))q=!1;else{for(m=q.next.next;m!==q.prev;){if(jc(r.x,r.y,p.x,p.y,t.x,t.y,m.x,m.y)&&0<=aa(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),dd(a),h=a=n.next;else if(a=n,a===h){if(!g)fd(ed(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do n=k.prev,q=k.next.next,!Fb(n,q)&&Ff(n,k,k.next,q)&&gd(n,q)&&gd(q,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(q.i/h),dd(k),dd(k.next),k=a=q),k=k.next;while(k!==a);a=k;fd(a,b,c,d,e,f,2)}else if(2===
-g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(q=k.next.i!==n.i&&k.prev.i!==n.i){b:{q=k;do{if(q.i!==k.i&&q.next.i!==k.i&&q.i!==n.i&&q.next.i!==n.i&&Ff(q,q.next,k,n)){q=!0;break b}q=q.next}while(q!==k);q=!1}q=!q}if(q=q&&gd(k,n)&&gd(n,k)){q=k;r=!1;p=(k.x+n.x)/2;n=(k.y+n.y)/2;do q.y>n!==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=Gf(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=
+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=ue(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,l,u,t=1;do{k=h;var q=h=null;for(r=0;k;){r++;var n=k;for(m=l=0;m<t&&(l++,n=n.nextZ,n);m++);for(u=t;0<l||0<u&&n;)0!==l&&(0===u||!n||k.z<=n.z)?(m=k,k=k.nextZ,l--):(m=n,n=n.nextZ,u--),q?q.nextZ=m:h=m,m.prevZ=q,q=m;k=n}q.nextZ=null;t*=2}while(1<r)}for(h=a;a.prev!==a.next;){k=a.prev;n=a.next;if(f)q=ph(a,d,e,f);else a:if(q=
+a,r=q.prev,l=q,t=q.next,0<=aa(r,l,t))q=!1;else{for(m=q.next.next;m!==q.prev;){if(jc(r.x,r.y,l.x,l.y,t.x,t.y,m.x,m.y)&&0<=aa(m.prev,m,m.next)){q=!1;break a}m=m.next}q=!0}if(q)b.push(k.i/c),b.push(a.i/c),b.push(n.i/c),dd(a),h=a=n.next;else if(a=n,a===h){if(!g)fd(ed(a),b,c,d,e,f,1);else if(1===g){g=b;h=c;k=a;do n=k.prev,q=k.next.next,!Fb(n,q)&&Ff(n,k,k.next,q)&&gd(n,q)&&gd(q,n)&&(g.push(n.i/h),g.push(k.i/h),g.push(q.i/h),dd(k),dd(k.next),k=a=q),k=k.next;while(k!==a);a=k;fd(a,b,c,d,e,f,2)}else if(2===
+g)a:{g=a;do{for(h=g.next.next;h!==g.prev;){if(k=g.i!==h.i){k=g;n=h;if(q=k.next.i!==n.i&&k.prev.i!==n.i){b:{q=k;do{if(q.i!==k.i&&q.next.i!==k.i&&q.i!==n.i&&q.next.i!==n.i&&Ff(q,q.next,k,n)){q=!0;break b}q=q.next}while(q!==k);q=!1}q=!q}if(q=q&&gd(k,n)&&gd(n,k)){q=k;r=!1;l=(k.x+n.x)/2;n=(k.y+n.y)/2;do q.y>n!==q.next.y>n&&q.next.y!==q.y&&l<(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=Gf(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 ph(a,b,c,d){var e=a.prev,f=a.next;if(0<=aa(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=ue(e.x<a.x?e.x<f.x?e.x:f.x:a.x<f.x?a.x:f.x,e.y<a.y?e.y<f.y?e.y:f.y:a.y<f.y?a.y:f.y,b,c,d);b=ue(g,h,b,c,d);c=a.prevZ;for(d=a.nextZ;c&&c.z>=k&&d&&d.z<=b;){if(c!==a.prev&&c!==a.next&&jc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=aa(c.prev,c,c.next))return!1;c=c.prevZ;if(d!==a.prev&&d!==a.next&&jc(e.x,e.y,a.x,a.y,
 f.x,f.y,d.x,d.y)&&0<=aa(d.prev,d,d.next))return!1;d=d.nextZ}for(;c&&c.z>=k;){if(c!==a.prev&&c!==a.next&&jc(e.x,e.y,a.x,a.y,f.x,f.y,c.x,c.y)&&0<=aa(c.prev,c,c.next))return!1;c=c.prevZ}for(;d&&d.z<=b;){if(d!==a.prev&&d!==a.next&&jc(e.x,e.y,a.x,a.y,f.x,f.y,d.x,d.y)&&0<=aa(d.prev,d,d.next))return!1;d=d.nextZ}return!0}function qh(a,b){return a.x-b.x}function rh(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.next.x?c:c.next}}c=c.next}while(c!==b);if(!h)return null;if(d===f)return h.prev;b=h;g=h.x;var k=h.y,m=Infinity;for(c=h.next;c!==b;){if(d>=c.x&&c.x>=g&&d!==c.x&&jc(e<k?d:f,e,g,k,e<k?f:d,e,c.x,c.y)){var r=Math.abs(e-c.y)/(d-c.x);(r<m||r===m&&c.x>h.x)&&gd(c,a)&&(h=c,m=r)}c=c.next}return h}function ue(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|
@@ -264,12 +264,12 @@ 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 Hb(a,b){Q.c
 !0===db.isClockWise(l)&&(r[a]=l.reverse())}var n=db.triangulateShape(m,r);a=0;for(c=r.length;a<c;a++)l=r[a],m=m.concat(l);a=0;for(c=m.length;a<c;a++)l=m[a],e.push(l.x,l.y,0),f.push(0,0,1),g.push(l.x,l.y);a=0;for(c=n.length;a<c;a++)m=n[a],d.push(m[0]+h,m[1]+h,m[2]+h),k+=3}E.call(this);this.type="ShapeBufferGeometry";this.parameters={shapes:a,curveSegments:b};b=b||12;var d=[],e=[],f=[],g=[],h=0,k=0;if(!1===Array.isArray(a))c(a);else for(var m=0;m<a.length;m++)c(a[m]),this.addGroup(h,k,m),h+=k,k=0;this.setIndex(d);
 this.addAttribute("position",new D(e,3));this.addAttribute("normal",new D(f,3));this.addAttribute("uv",new D(g,2))}function Kf(a,b){b.shapes=[];if(Array.isArray(a))for(var c=0,d=a.length;c<d;c++)b.shapes.push(a[c].uuid);else b.shapes.push(a.uuid);return b}function nc(a,b){E.call(this);this.type="EdgesGeometry";this.parameters={thresholdAngle:b};var c=[];b=Math.cos(P.DEG2RAD*(void 0!==b?b:1));var d=[0,0],e={},f=["a","b","c"];if(a.isBufferGeometry){var g=new Q;g.fromBufferGeometry(a)}else g=a.clone();
 g.mergeVertices();g.computeFaceNormals();a=g.vertices;g=g.faces;for(var h=0,k=g.length;h<k;h++)for(var m=g[h],r=0;3>r;r++){var l=m[f[r]];var n=m[f[(r+1)%3]];d[0]=Math.min(l,n);d[1]=Math.max(l,n);l=d[0]+","+d[1];void 0===e[l]?e[l]={index1:d[0],index2:d[1],face1:h,face2:void 0}:e[l].face2=h}for(l in e)if(d=e[l],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 D(c,3))}function Jb(a,b,c,d,
-e,f,g,h){Q.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 eb(a,b,c,d,e,f,g,h));this.mergeVertices()}function eb(a,b,c,d,e,f,g,h){function k(c){var e,f=new C,k=new n,p=0,v=!0===c?a:b,w=!0===c?1:-1;var D=q;for(e=1;e<=d;e++)l.push(0,y*w,0),u.push(0,w,0),t.push(.5,.5),q++;var B=q;for(e=0;e<=d;e++){var E=e/d*h+g,G=Math.cos(E);E=Math.sin(E);k.x=v*E;k.y=y*w;
-k.z=v*G;l.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*G+.5;f.y=.5*E*w+.5;t.push(f.x,f.y);q++}for(e=0;e<d;e++)f=D+e,k=B+e,!0===c?r.push(k,k+1,f):r.push(k+1,k,f),p+=3;m.addGroup(z,p,!0===c?1:2);z+=p}E.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==
-h?h:2*Math.PI;var r=[],l=[],u=[],t=[],q=0,v=[],y=c/2,z=0;(function(){var f,k,p=new n,H=new n,C=0,D=(b-a)/c;for(k=0;k<=e;k++){var F=[],B=k/e,E=B*(b-a)+a;for(f=0;f<=d;f++){var G=f/d,I=G*h+g,J=Math.sin(I);I=Math.cos(I);H.x=E*J;H.y=-B*c+y;H.z=E*I;l.push(H.x,H.y,H.z);p.set(J,D,I).normalize();u.push(p.x,p.y,p.z);t.push(G,1-B);F.push(q++)}v.push(F)}for(f=0;f<d;f++)for(k=0;k<e;k++)p=v[k+1][f],H=v[k+1][f+1],D=v[k][f+1],r.push(v[k][f],p,D),r.push(p,H,D),C+=6;m.addGroup(z,C,0);z+=C})();!1===f&&(0<a&&k(!0),0<
-b&&k(!1));this.setIndex(r);this.addAttribute("position",new D(l,3));this.addAttribute("normal",new D(u,3));this.addAttribute("uv",new D(t,2))}function ld(a,b,c,d,e,f,g){Jb.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function md(a,b,c,d,e,f,g){eb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,
-thetaStart:f,thetaLength:g}}function nd(a,b,c,d){Q.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new oc(a,b,c,d));this.mergeVertices()}function oc(a,b,c,d){E.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],k,m=new n,r=new C;f.push(0,0,0);g.push(0,0,1);h.push(.5,
-.5);var l=0;for(k=3;l<=b;l++,k+=3){var u=c+l/b*d;m.x=a*Math.cos(u);m.y=a*Math.sin(u);f.push(m.x,m.y,m.z);g.push(0,0,1);r.x=(f[k]/a+1)/2;r.y=(f[k+1]/a+1)/2;h.push(r.x,r.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.addAttribute("position",new D(f,3));this.addAttribute("normal",new D(g,3));this.addAttribute("uv",new D(h,2))}function Kb(a){L.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function pc(a){va.call(this,a);this.type="RawShaderMaterial"}
+e,f,g,h){Q.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 eb(a,b,c,d,e,f,g,h));this.mergeVertices()}function eb(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 D=q;for(e=1;e<=d;e++)p.push(0,y*w,0),u.push(0,w,0),t.push(.5,.5),q++;var B=q;for(e=0;e<=d;e++){var E=e/d*h+g,G=Math.cos(E);E=Math.sin(E);k.x=v*E;k.y=y*w;
+k.z=v*G;p.push(k.x,k.y,k.z);u.push(0,w,0);f.x=.5*G+.5;f.y=.5*E*w+.5;t.push(f.x,f.y);q++}for(e=0;e<d;e++)f=D+e,k=B+e,!0===c?l.push(k,k+1,f):l.push(k+1,k,f),r+=3;m.addGroup(z,r,!0===c?1:2);z+=r}E.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var m=this;a=void 0!==a?a:1;b=void 0!==b?b:1;c=c||1;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==
+h?h:2*Math.PI;var l=[],p=[],u=[],t=[],q=0,v=[],y=c/2,z=0;(function(){var f,k,r=new n,H=new n,C=0,D=(b-a)/c;for(k=0;k<=e;k++){var F=[],B=k/e,E=B*(b-a)+a;for(f=0;f<=d;f++){var G=f/d,I=G*h+g,J=Math.sin(I);I=Math.cos(I);H.x=E*J;H.y=-B*c+y;H.z=E*I;p.push(H.x,H.y,H.z);r.set(J,D,I).normalize();u.push(r.x,r.y,r.z);t.push(G,1-B);F.push(q++)}v.push(F)}for(f=0;f<d;f++)for(k=0;k<e;k++)r=v[k+1][f],H=v[k+1][f+1],D=v[k][f+1],l.push(v[k][f],r,D),l.push(r,H,D),C+=6;m.addGroup(z,C,0);z+=C})();!1===f&&(0<a&&k(!0),0<
+b&&k(!1));this.setIndex(l);this.addAttribute("position",new D(p,3));this.addAttribute("normal",new D(u,3));this.addAttribute("uv",new D(t,2))}function ld(a,b,c,d,e,f,g){Jb.call(this,0,a,b,c,d,e,f,g);this.type="ConeGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,thetaStart:f,thetaLength:g}}function md(a,b,c,d,e,f,g){eb.call(this,0,a,b,c,d,e,f,g);this.type="ConeBufferGeometry";this.parameters={radius:a,height:b,radialSegments:c,heightSegments:d,openEnded:e,
+thetaStart:f,thetaLength:g}}function nd(a,b,c,d){Q.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};this.fromBufferGeometry(new oc(a,b,c,d));this.mergeVertices()}function oc(a,b,c,d){E.call(this);this.type="CircleBufferGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||1;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e=[],f=[],g=[],h=[],k,m=new n,l=new C;f.push(0,0,0);g.push(0,0,1);h.push(.5,
+.5);var p=0;for(k=3;p<=b;p++,k+=3){var u=c+p/b*d;m.x=a*Math.cos(u);m.y=a*Math.sin(u);f.push(m.x,m.y,m.z);g.push(0,0,1);l.x=(f[k]/a+1)/2;l.y=(f[k+1]/a+1)/2;h.push(l.x,l.y)}for(k=1;k<=b;k++)e.push(k,k+1,0);this.setIndex(e);this.addAttribute("position",new D(f,3));this.addAttribute("normal",new D(g,3));this.addAttribute("uv",new D(h,2))}function Kb(a){L.call(this);this.type="ShadowMaterial";this.color=new B(0);this.transparent=!0;this.setValues(a)}function pc(a){va.call(this,a);this.type="RawShaderMaterial"}
 function Za(a){L.call(this);this.defines={STANDARD:""};this.type="MeshStandardMaterial";this.color=new B(16777215);this.metalness=this.roughness=.5;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new C(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=
 this.metalnessMap=this.roughnessMap=null;this.envMapIntensity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.morphNormals=this.morphTargets=this.skinning=!1;this.setValues(a)}function Lb(a){Za.call(this);this.defines={PHYSICAL:""};this.type="MeshPhysicalMaterial";this.reflectivity=.5;this.clearCoatRoughness=this.clearCoat=0;this.setValues(a)}function Ka(a){L.call(this);this.type="MeshPhongMaterial";this.color=new B(16777215);
 this.specular=new B(1118481);this.shininess=30;this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.emissive=new B(0);this.emissiveIntensity=1;this.bumpMap=this.emissiveMap=null;this.bumpScale=1;this.normalMap=null;this.normalMapType=0;this.normalScale=new C(1,1);this.displacementMap=null;this.displacementScale=1;this.displacementBias=0;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=
@@ -518,10 +518,10 @@ a);this.drawMode=a.drawMode;void 0!==a.morphTargetInfluences&&(this.morphTargetI
 String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")},raycast:function(){function a(a,b,c,d,e,f,g,h){if(null===(1===b.side?d.intersectTriangle(g,f,e,!0,h):d.intersectTriangle(e,f,g,2!==b.side,h)))return null;w.copy(h);w.applyMatrix4(a.matrixWorld);b=c.ray.origin.distanceTo(w);return b<c.near||b>c.far?null:{distance:b,
 point:w.clone(),object:a}}function b(b,c,d,e,r,n,w,D,B,E){f.fromBufferAttribute(r,D);g.fromBufferAttribute(r,B);h.fromBufferAttribute(r,E);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 H=0,x=n.length;H<x;H++){var A=r[H],F=n[H];0!==A&&(k.fromBufferAttribute(F,D),m.fromBufferAttribute(F,B),l.fromBufferAttribute(F,E),p.addScaledVector(k.sub(f),A),u.addScaledVector(m.sub(g),A),t.addScaledVector(l.sub(h),A))}f.add(p);g.add(u);h.add(t)}if(b=a(b,c,d,e,
 f,g,h,z))w&&(q.fromBufferAttribute(w,D),v.fromBufferAttribute(w,B),y.fromBufferAttribute(w,E),b.uv=ha.getUV(z,f,g,h,q,v,y,new C)),w=new Tb(D,B,E),ha.getNormal(f,g,h,w.normal),b.face=w;return b}var c=new O,d=new ub,e=new Ua,f=new n,g=new n,h=new n,k=new n,m=new n,l=new n,p=new n,u=new n,t=new n,q=new C,v=new C,y=new C,z=new n,w=new n;return function(f,g){var h=this.geometry,k=this.material,m=this.matrixWorld;if(void 0!==k&&(null===h.boundingSphere&&h.computeBoundingSphere(),e.copy(h.boundingSphere),
-e.applyMatrix4(m),!1!==f.ray.intersectsSphere(e)&&(c.getInverse(m),d.copy(f.ray).applyMatrix4(c),null===h.boundingBox||!1!==d.intersectsBox(h.boundingBox))))if(h.isBufferGeometry){var l=h.index;m=h.attributes.position;var r=h.morphAttributes.position,p=h.attributes.uv,n=h.groups,t=h.drawRange,u,w;if(null!==l)if(Array.isArray(k)){var x=0;for(u=n.length;x<u;x++){var A=n[x];var D=k[A.materialIndex];var B=Math.max(A.start,t.start);for(w=h=Math.min(A.start+A.count,t.start+t.count);B<w;B+=3){h=l.getX(B);
-var E=l.getX(B+1);var G=l.getX(B+2);if(h=b(this,D,f,d,m,r,p,h,E,G))h.faceIndex=Math.floor(B/3),h.face.materialIndex=A.materialIndex,g.push(h)}}}else for(B=Math.max(0,t.start),h=Math.min(l.count,t.start+t.count),x=B,u=h;x<u;x+=3){if(h=l.getX(x),E=l.getX(x+1),G=l.getX(x+2),h=b(this,k,f,d,m,r,p,h,E,G))h.faceIndex=Math.floor(x/3),g.push(h)}else if(void 0!==m)if(Array.isArray(k))for(x=0,u=n.length;x<u;x++)for(A=n[x],D=k[A.materialIndex],B=Math.max(A.start,t.start),w=h=Math.min(A.start+A.count,t.start+
-t.count);B<w;B+=3){if(h=B,E=B+1,G=B+2,h=b(this,D,f,d,m,r,p,h,E,G))h.faceIndex=Math.floor(B/3),h.face.materialIndex=A.materialIndex,g.push(h)}else for(B=Math.max(0,t.start),h=Math.min(m.count,t.start+t.count),x=B,u=h;x<u;x+=3)if(h=x,E=x+1,G=x+2,h=b(this,k,f,d,m,r,p,h,E,G))h.faceIndex=Math.floor(x/3),g.push(h)}else if(h.isGeometry)for(m=Array.isArray(k),r=h.vertices,p=h.faces,h=h.faceVertexUvs[0],0<h.length&&(l=h),u=0,A=p.length;u<A;u++)if(D=p[u],h=m?k[D.materialIndex]:k,void 0!==h&&(n=r[D.a],t=r[D.b],
-x=r[D.c],h=a(this,h,f,d,n,t,x,z)))l&&l[u]&&(B=l[u],q.copy(B[0]),v.copy(B[1]),y.copy(B[2]),h.uv=ha.getUV(z,n,t,x,q,v,y,new C)),h.face=D,h.faceIndex=u,g.push(h)}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var fg=0;Q.prototype=Object.assign(Object.create(na.prototype),{constructor:Q,isGeometry:!0,applyMatrix:function(a){for(var b=(new ia).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<
+e.applyMatrix4(m),!1!==f.ray.intersectsSphere(e)&&(c.getInverse(m),d.copy(f.ray).applyMatrix4(c),null===h.boundingBox||!1!==d.intersectsBox(h.boundingBox))))if(h.isBufferGeometry){var l=h.index;m=h.attributes.position;var r=h.morphAttributes.position,n=h.attributes.uv,p=h.groups,t=h.drawRange,u,w;if(null!==l)if(Array.isArray(k)){var x=0;for(u=p.length;x<u;x++){var A=p[x];var D=k[A.materialIndex];var B=Math.max(A.start,t.start);for(w=h=Math.min(A.start+A.count,t.start+t.count);B<w;B+=3){h=l.getX(B);
+var E=l.getX(B+1);var G=l.getX(B+2);if(h=b(this,D,f,d,m,r,n,h,E,G))h.faceIndex=Math.floor(B/3),h.face.materialIndex=A.materialIndex,g.push(h)}}}else for(B=Math.max(0,t.start),h=Math.min(l.count,t.start+t.count),x=B,u=h;x<u;x+=3){if(h=l.getX(x),E=l.getX(x+1),G=l.getX(x+2),h=b(this,k,f,d,m,r,n,h,E,G))h.faceIndex=Math.floor(x/3),g.push(h)}else if(void 0!==m)if(Array.isArray(k))for(x=0,u=p.length;x<u;x++)for(A=p[x],D=k[A.materialIndex],B=Math.max(A.start,t.start),w=h=Math.min(A.start+A.count,t.start+
+t.count);B<w;B+=3){if(h=B,E=B+1,G=B+2,h=b(this,D,f,d,m,r,n,h,E,G))h.faceIndex=Math.floor(B/3),h.face.materialIndex=A.materialIndex,g.push(h)}else for(B=Math.max(0,t.start),h=Math.min(m.count,t.start+t.count),x=B,u=h;x<u;x+=3)if(h=x,E=x+1,G=x+2,h=b(this,k,f,d,m,r,n,h,E,G))h.faceIndex=Math.floor(x/3),g.push(h)}else if(h.isGeometry)for(m=Array.isArray(k),r=h.vertices,n=h.faces,h=h.faceVertexUvs[0],0<h.length&&(l=h),u=0,A=n.length;u<A;u++)if(D=n[u],h=m?k[D.materialIndex]:k,void 0!==h&&(p=r[D.a],t=r[D.b],
+x=r[D.c],h=a(this,h,f,d,p,t,x,z)))l&&l[u]&&(B=l[u],q.copy(B[0]),v.copy(B[1]),y.copy(B[2]),h.uv=ha.getUV(z,p,t,x,q,v,y,new C)),h.face=D,h.faceIndex=u,g.push(h)}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});var fg=0;Q.prototype=Object.assign(Object.create(na.prototype),{constructor:Q,isGeometry:!0,applyMatrix:function(a){for(var b=(new ia).getNormalMatrix(a),c=0,d=this.vertices.length;c<d;c++)this.vertices[c].applyMatrix4(a);c=0;for(d=this.faces.length;c<
 d;c++){a=this.faces[c];a.normal.applyMatrix3(b).normalize();for(var e=0,f=a.vertexNormals.length;e<f;e++)a.vertexNormals[e].applyMatrix3(b).normalize()}null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere();this.normalsNeedUpdate=this.verticesNeedUpdate=!0;return this},rotateX:function(){var a=new O;return function(b){a.makeRotationX(b);this.applyMatrix(a);return this}}(),rotateY:function(){var a=new O;return function(b){a.makeRotationY(b);this.applyMatrix(a);
 return this}}(),rotateZ:function(){var a=new O;return function(b){a.makeRotationZ(b);this.applyMatrix(a);return this}}(),translate:function(){var a=new O;return function(b,c,d){a.makeTranslation(b,c,d);this.applyMatrix(a);return this}}(),scale:function(){var a=new O;return function(b,c,d){a.makeScale(b,c,d);this.applyMatrix(a);return this}}(),lookAt:function(){var a=new G;return function(b){a.lookAt(b);a.updateMatrix();this.applyMatrix(a.matrix)}}(),fromBufferGeometry:function(a){function b(a,b,d,
 e){var f=void 0===h?[]:[c.colors[a].clone(),c.colors[b].clone(),c.colors[d].clone()],l=void 0===g?[]:[(new n).fromArray(g,3*a),(new n).fromArray(g,3*b),(new n).fromArray(g,3*d)];e=new Tb(a,b,d,l,f,e);c.faces.push(e);void 0!==k&&c.faceVertexUvs[0].push([(new C).fromArray(k,2*a),(new C).fromArray(k,2*b),(new C).fromArray(k,2*d)]);void 0!==m&&c.faceVertexUvs[1].push([(new C).fromArray(m,2*a),(new C).fromArray(m,2*b),(new C).fromArray(m,2*d)])}var c=this,d=null!==a.index?a.index.array:void 0,e=a.attributes,
@@ -533,14 +533,14 @@ this.faces[a],g=b.vertexNormals,3===g.length?(g[0].copy(c[b.a]),g[1].copy(c[b.b]
 this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var a,b;var c=0;for(b=this.faces.length;c<b;c++){var d=this.faces[c];d.__originalFaceNormal?d.__originalFaceNormal.copy(d.normal):d.__originalFaceNormal=d.normal.clone();d.__originalVertexNormals||(d.__originalVertexNormals=[]);var e=0;for(a=d.vertexNormals.length;e<a;e++)d.__originalVertexNormals[e]?d.__originalVertexNormals[e].copy(d.vertexNormals[e]):d.__originalVertexNormals[e]=d.vertexNormals[e].clone()}var f=new Q;
 f.faces=this.faces;e=0;for(a=this.morphTargets.length;e<a;e++){if(!this.morphNormals[e]){this.morphNormals[e]={};this.morphNormals[e].faceNormals=[];this.morphNormals[e].vertexNormals=[];d=this.morphNormals[e].faceNormals;var g=this.morphNormals[e].vertexNormals;c=0;for(b=this.faces.length;c<b;c++){var h=new n;var k={a:new n,b:new n,c:new n};d.push(h);g.push(k)}}g=this.morphNormals[e];f.vertices=this.morphTargets[e].vertices;f.computeFaceNormals();f.computeVertexNormals();c=0;for(b=this.faces.length;c<
 b;c++)d=this.faces[c],h=g.faceNormals[c],k=g.vertexNormals[c],h.copy(d.normal),k.a.copy(d.vertexNormals[0]),k.b.copy(d.vertexNormals[1]),k.c.copy(d.vertexNormals[2])}c=0;for(b=this.faces.length;c<b;c++)d=this.faces[c],d.normal=d.__originalFaceNormal,d.vertexNormals=d.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new Ha);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=
-new Ua);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,m=this.faceVertexUvs[0],l=a.faceVertexUvs[0],p=this.colors,n=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new ia).getNormalMatrix(b));a=0;for(var t=g.length;a<t;a++){var q=g[a].clone();void 0!==b&&q.applyMatrix4(b);f.push(q)}a=0;for(t=n.length;a<t;a++)p.push(n[a].clone());a=0;for(t=k.length;a<t;a++){g=k[a];var v=g.vertexNormals;
-n=g.vertexColors;p=new Tb(g.a+e,g.b+e,g.c+e);p.normal.copy(g.normal);void 0!==d&&p.normal.applyMatrix3(d).normalize();b=0;for(f=v.length;b<f;b++)q=v[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),p.vertexNormals.push(q);p.color.copy(g.color);b=0;for(f=n.length;b<f;b++)q=n[b],p.vertexColors.push(q.clone());p.materialIndex=g.materialIndex+c;h.push(p)}a=0;for(t=l.length;a<t;a++)if(c=l[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());m.push(d)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",
+new Ua);this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(a&&a.isGeometry){var d,e=this.vertices.length,f=this.vertices,g=a.vertices,h=this.faces,k=a.faces,m=this.faceVertexUvs[0],l=a.faceVertexUvs[0],n=this.colors,u=a.colors;void 0===c&&(c=0);void 0!==b&&(d=(new ia).getNormalMatrix(b));a=0;for(var t=g.length;a<t;a++){var q=g[a].clone();void 0!==b&&q.applyMatrix4(b);f.push(q)}a=0;for(t=u.length;a<t;a++)n.push(u[a].clone());a=0;for(t=k.length;a<t;a++){g=k[a];var v=g.vertexNormals;
+u=g.vertexColors;n=new Tb(g.a+e,g.b+e,g.c+e);n.normal.copy(g.normal);void 0!==d&&n.normal.applyMatrix3(d).normalize();b=0;for(f=v.length;b<f;b++)q=v[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),n.vertexNormals.push(q);n.color.copy(g.color);b=0;for(f=u.length;b<f;b++)q=u[b],n.vertexColors.push(q.clone());n.materialIndex=g.materialIndex+c;h.push(n)}a=0;for(t=l.length;a<t;a++)if(c=l[a],d=[],void 0!==c){b=0;for(f=c.length;b<f;b++)d.push(c[b].clone());m.push(d)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",
 a)},mergeMesh:function(a){a&&a.isMesh?(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a)},mergeVertices:function(){var a={},b=[],c=[],d=Math.pow(10,4),e;var f=0;for(e=this.vertices.length;f<e;f++){var g=this.vertices[f];g=Math.round(g.x*d)+"_"+Math.round(g.y*d)+"_"+Math.round(g.z*d);void 0===a[g]?(a[g]=f,b.push(this.vertices[f]),c[f]=b.length-1):c[f]=c[a[g]]}a=[];f=0;for(e=this.faces.length;f<e;f++)for(d=
 this.faces[f],d.a=c[d.a],d.b=c[d.b],d.c=c[d.c],d=[d.a,d.b,d.c],g=0;3>g;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<e;c++)this.faceVertexUvs[c].splice(d,1);f=this.vertices.length-b.length;this.vertices=b;return f},setFromPoints:function(a){this.vertices=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];this.vertices.push(new n(d.x,d.y,d.z||0))}return this},sortFacesByMaterialIndex:function(){for(var a=this.faces,
 b=a.length,c=0;c<b;c++)a[c]._id=c;a.sort(function(a,b){return a.materialIndex-b.materialIndex});var d=this.faceVertexUvs[0],e=this.faceVertexUvs[1],f,g;d&&d.length===b&&(f=[]);e&&e.length===b&&(g=[]);for(c=0;c<b;c++){var h=a[c]._id;f&&f.push(d[h]);g&&g.push(e[h])}f&&(this.faceVertexUvs[0]=f);g&&(this.faceVertexUvs[1]=g)},toJSON:function(){function a(a,b,c){return c?a|1<<b:a&~(1<<b)}function b(a){var b=a.x.toString()+a.y.toString()+a.z.toString();if(void 0!==m[b])return m[b];m[b]=k.length/3;k.push(a.x,
-a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==p[b])return p[b];p[b]=l.length;l.push(a.getHex());return p[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=n.length/2;n.push(a.x,a.y);return t[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&
-(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var k=[],m={},l=[],p={},n=[],t={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],v=void 0!==this.faceVertexUvs[0][g],y=0<q.normal.length(),z=0<q.vertexNormals.length,w=1!==q.color.r||1!==q.color.g||1!==q.color.b,x=0<q.vertexColors.length,A=0;A=a(A,0,0);A=a(A,1,!0);A=a(A,2,!1);A=a(A,3,v);A=a(A,4,y);A=a(A,5,z);A=a(A,6,w);A=a(A,7,x);h.push(A);h.push(q.a,q.b,q.c);h.push(q.materialIndex);
-v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));y&&h.push(b(q.normal));z&&(y=q.vertexNormals,h.push(b(y[0]),b(y[1]),b(y[2])));w&&h.push(c(q.color));x&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<l.length&&(e.data.colors=l);0<n.length&&(e.data.uvs=[n]);e.data.faces=h;return e},clone:function(){return(new Q).copy(this)},copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=
+a.y,a.z);return m[b]}function c(a){var b=a.r.toString()+a.g.toString()+a.b.toString();if(void 0!==n[b])return n[b];n[b]=l.length;l.push(a.getHex());return n[b]}function d(a){var b=a.x.toString()+a.y.toString();if(void 0!==t[b])return t[b];t[b]=u.length/2;u.push(a.x,a.y);return t[b]}var e={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};e.uuid=this.uuid;e.type=this.type;""!==this.name&&(e.name=this.name);if(void 0!==this.parameters){var f=this.parameters,g;for(g in f)void 0!==f[g]&&
+(e[g]=f[g]);return e}f=[];for(g=0;g<this.vertices.length;g++){var h=this.vertices[g];f.push(h.x,h.y,h.z)}h=[];var k=[],m={},l=[],n={},u=[],t={};for(g=0;g<this.faces.length;g++){var q=this.faces[g],v=void 0!==this.faceVertexUvs[0][g],y=0<q.normal.length(),z=0<q.vertexNormals.length,w=1!==q.color.r||1!==q.color.g||1!==q.color.b,x=0<q.vertexColors.length,A=0;A=a(A,0,0);A=a(A,1,!0);A=a(A,2,!1);A=a(A,3,v);A=a(A,4,y);A=a(A,5,z);A=a(A,6,w);A=a(A,7,x);h.push(A);h.push(q.a,q.b,q.c);h.push(q.materialIndex);
+v&&(v=this.faceVertexUvs[0][g],h.push(d(v[0]),d(v[1]),d(v[2])));y&&h.push(b(q.normal));z&&(y=q.vertexNormals,h.push(b(y[0]),b(y[1]),b(y[2])));w&&h.push(c(q.color));x&&(q=q.vertexColors,h.push(c(q[0]),c(q[1]),c(q[2])))}e.data={};e.data.vertices=f;e.data.normals=k;0<l.length&&(e.data.colors=l);0<u.length&&(e.data.uvs=[u]);e.data.faces=h;return e},clone:function(){return(new Q).copy(this)},copy:function(a){var b,c,d;this.vertices=[];this.colors=[];this.faces=[];this.faceVertexUvs=[[]];this.morphTargets=
 [];this.morphNormals=[];this.skinWeights=[];this.skinIndices=[];this.lineDistances=[];this.boundingSphere=this.boundingBox=null;this.name=a.name;var e=a.vertices;var f=0;for(b=e.length;f<b;f++)this.vertices.push(e[f].clone());e=a.colors;f=0;for(b=e.length;f<b;f++)this.colors.push(e[f].clone());e=a.faces;f=0;for(b=e.length;f<b;f++)this.faces.push(e[f].clone());f=0;for(b=a.faceVertexUvs.length;f<b;f++){var g=a.faceVertexUvs[f];void 0===this.faceVertexUvs[f]&&(this.faceVertexUvs[f]=[]);e=0;for(c=g.length;e<
 c;e++){var h=g[e],k=[];var m=0;for(d=h.length;m<d;m++)k.push(h[m].clone());this.faceVertexUvs[f].push(k)}}m=a.morphTargets;f=0;for(b=m.length;f<b;f++){d={};d.name=m[f].name;if(void 0!==m[f].vertices)for(d.vertices=[],e=0,c=m[f].vertices.length;e<c;e++)d.vertices.push(m[f].vertices[e].clone());if(void 0!==m[f].normals)for(d.normals=[],e=0,c=m[f].normals.length;e<c;e++)d.normals.push(m[f].normals[e].clone());this.morphTargets.push(d)}m=a.morphNormals;f=0;for(b=m.length;f<b;f++){d={};if(void 0!==m[f].vertexNormals)for(d.vertexNormals=
 [],e=0,c=m[f].vertexNormals.length;e<c;e++)g=m[f].vertexNormals[e],h={},h.a=g.a.clone(),h.b=g.b.clone(),h.c=g.c.clone(),d.vertexNormals.push(h);if(void 0!==m[f].faceNormals)for(d.faceNormals=[],e=0,c=m[f].faceNormals.length;e<c;e++)d.faceNormals.push(m[f].faceNormals[e].clone());this.morphNormals.push(d)}e=a.skinWeights;f=0;for(b=e.length;f<b;f++)this.skinWeights.push(e[f].clone());e=a.skinIndices;f=0;for(b=e.length;f<b;f++)this.skinIndices.push(e[f].clone());e=a.lineDistances;f=0;for(b=e.length;f<
@@ -561,7 +561,7 @@ this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){th
 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||1<e))return c.copy(d).multiplyScalar(e).add(b.start)}}(),intersectsLine:function(a){var b=this.distanceToPoint(a.start);a=this.distanceToPoint(a.end);return 0>b&&0<a||0>a&&0<b},intersectsBox:function(a){return a.intersectsPlane(this)},
 intersectsSphere:function(a){return a.intersectsPlane(this)},coplanarPoint:function(a){void 0===a&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),a=new n);return a.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var a=new n,b=new ia;return function(c,d){d=d||b.getNormalMatrix(c);c=this.coplanarPoint(a).applyMatrix4(c);d=this.normal.applyMatrix3(d).normalize();this.constant=-c.dot(d);return this}}(),translate:function(a){this.constant-=a.dot(this.normal);
 return this},equals:function(a){return a.normal.equals(this.normal)&&a.constant===this.constant}});Object.assign(Cd.prototype,{set:function(a,b,c,d,e,f){var g=this.planes;g[0].copy(a);g[1].copy(b);g[2].copy(c);g[3].copy(d);g[4].copy(e);g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},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],y=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-y).normalize();b[5].setComponents(f+e,m+k,t+n,c+y).normalize();return this},intersectsObject:function(){var a=new Ua;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();
+h=c[5],k=c[6],m=c[7],l=c[8],n=c[9],u=c[10],t=c[11],q=c[12],v=c[13],y=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+n,c+v).normalize();b[3].setComponents(f-d,m-h,t-n,c-v).normalize();b[4].setComponents(f-e,m-k,t-u,c-y).normalize();b[5].setComponents(f+e,m+k,t+u,c+y).normalize();return this},intersectsObject:function(){var a=new Ua;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 Ua;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)<a)return!1;return!0},intersectsBox:function(){var a=new n;return function(b){for(var c=this.planes,d=0;6>d;d++){var e=c[d];
 a.x=0<e.normal.x?b.max.x:b.min.x;a.y=0<e.normal.y?b.max.y:b.min.y;a.z=0<e.normal.z?b.max.z:b.min.z;if(0>e.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",
@@ -669,66 +669,66 @@ index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(k=g.ver
 c.vertices,e=c.lineDistances,f=0,g=d.length;f<g;f+=2)a.copy(d[f]),b.copy(d[f+1]),e[f]=0===f?0:e[f-1],e[f+1]=e[f]+a.distanceTo(b);return this}}()});Id.prototype=Object.assign(Object.create(T.prototype),{constructor:Id,isLineLoop:!0});Ja.prototype=Object.create(L.prototype);Ja.prototype.constructor=Ja;Ja.prototype.isPointsMaterial=!0;Ja.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;this.morphTargets=
 a.morphTargets;return this};ac.prototype=Object.assign(Object.create(G.prototype),{constructor:ac,isPoints:!0,raycast:function(){var a=new O,b=new ub,c=new Ua;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);f<l&&(b.closestPointToPoint(a,p),p.applyMatrix4(k),a=d.ray.origin.distanceTo(p),a<d.near||a>d.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<q;u++){var v=t[u];m.fromArray(h,3*v);f(m,v)}}else for(u=0,t=h.length/3;u<t;u++)m.fromArray(h,3*u),f(m,u)}else for(m=h.vertices,u=0,t=m.length;u<
-t;u++)f(m[u],u)}}}(),updateMorphTargets:function(){var a=this.geometry.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}},clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});te.prototype=Object.assign(Object.create(X.prototype),{constructor:te,isVideoTexture:!0,
-update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});bc.prototype=Object.create(X.prototype);bc.prototype.constructor=bc;bc.prototype.isCompressedTexture=!0;Tc.prototype=Object.create(X.prototype);Tc.prototype.constructor=Tc;Tc.prototype.isCanvasTexture=!0;Uc.prototype=Object.create(X.prototype);Uc.prototype.constructor=Uc;Uc.prototype.isDepthTexture=!0;cc.prototype=Object.create(E.prototype);cc.prototype.constructor=cc;Vc.prototype=Object.create(Q.prototype);
-Vc.prototype.constructor=Vc;dc.prototype=Object.create(E.prototype);dc.prototype.constructor=dc;Wc.prototype=Object.create(Q.prototype);Wc.prototype.constructor=Wc;za.prototype=Object.create(E.prototype);za.prototype.constructor=za;Xc.prototype=Object.create(Q.prototype);Xc.prototype.constructor=Xc;ec.prototype=Object.create(za.prototype);ec.prototype.constructor=ec;Yc.prototype=Object.create(Q.prototype);Yc.prototype.constructor=Yc;Db.prototype=Object.create(za.prototype);Db.prototype.constructor=
-Db;Zc.prototype=Object.create(Q.prototype);Zc.prototype.constructor=Zc;fc.prototype=Object.create(za.prototype);fc.prototype.constructor=fc;$c.prototype=Object.create(Q.prototype);$c.prototype.constructor=$c;gc.prototype=Object.create(za.prototype);gc.prototype.constructor=gc;ad.prototype=Object.create(Q.prototype);ad.prototype.constructor=ad;Eb.prototype=Object.create(E.prototype);Eb.prototype.constructor=Eb;Eb.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();
-return a};bd.prototype=Object.create(Q.prototype);bd.prototype.constructor=bd;hc.prototype=Object.create(E.prototype);hc.prototype.constructor=hc;cd.prototype=Object.create(Q.prototype);cd.prototype.constructor=cd;ic.prototype=Object.create(E.prototype);ic.prototype.constructor=ic;var yh={triangulate:function(a,b,c){c=c||2;var d=b&&b.length,e=d?b[0]*c:a.length,f=Df(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;l<m;l++){var n=b[l]*k;var u=l<
-m-1?b[l+1]*k:a.length;n=Df(a,n,u,k,!1);n===n.next&&(n.steiner=!0);d.push(sh(n))}d.sort(qh);for(l=0;l<d.length;l++){b=d[l];k=f;if(k=rh(b,k))b=Gf(k,b),ed(b,b.next);f=ed(f,f.next)}}if(a.length>80*c){var t=h=a[0];var q=d=a[1];for(k=c;k<e;k+=c)l=a[k],b=a[k+1],l<t&&(t=l),b<q&&(q=b),l>h&&(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}},db={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>db.area(a)},
-triangulateShape:function(a,b){var c=[],d=[],e=[];Hf(a);If(c,a);var f=a.length;b.forEach(Hf);for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,If(c,b[a]);b=yh.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};Gb.prototype=Object.create(Q.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);return Jf(this.parameters.shapes,this.parameters.options,a)};Ya.prototype=Object.create(E.prototype);Ya.prototype.constructor=Ya;Ya.prototype.toJSON=
-function(){var a=E.prototype.toJSON.call(this);return Jf(this.parameters.shapes,this.parameters.options,a)};var th={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new C(b[3*c],b[3*c+1]),new C(a,d),new C(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var m=b[3*e],l=b[3*e+1];e=b[3*e+2];var n=b[3*f],u=b[3*f+1];b=b[3*f+2];return.01>Math.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(Q.prototype);hd.prototype.constructor=hd;kc.prototype=Object.create(Ya.prototype);kc.prototype.constructor=kc;id.prototype=Object.create(Q.prototype);id.prototype.constructor=id;qb.prototype=Object.create(E.prototype);qb.prototype.constructor=qb;jd.prototype=Object.create(Q.prototype);jd.prototype.constructor=jd;lc.prototype=Object.create(E.prototype);lc.prototype.constructor=lc;kd.prototype=Object.create(Q.prototype);
-kd.prototype.constructor=kd;mc.prototype=Object.create(E.prototype);mc.prototype.constructor=mc;Hb.prototype=Object.create(Q.prototype);Hb.prototype.constructor=Hb;Hb.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);return Kf(this.parameters.shapes,a)};Ib.prototype=Object.create(E.prototype);Ib.prototype.constructor=Ib;Ib.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);return Kf(this.parameters.shapes,a)};nc.prototype=Object.create(E.prototype);nc.prototype.constructor=
-nc;Jb.prototype=Object.create(Q.prototype);Jb.prototype.constructor=Jb;eb.prototype=Object.create(E.prototype);eb.prototype.constructor=eb;ld.prototype=Object.create(Jb.prototype);ld.prototype.constructor=ld;md.prototype=Object.create(eb.prototype);md.prototype.constructor=md;nd.prototype=Object.create(Q.prototype);nd.prototype.constructor=nd;oc.prototype=Object.create(E.prototype);oc.prototype.constructor=oc;var ua=Object.freeze({WireframeGeometry:cc,ParametricGeometry:Vc,ParametricBufferGeometry:dc,
-TetrahedronGeometry:Xc,TetrahedronBufferGeometry:ec,OctahedronGeometry:Yc,OctahedronBufferGeometry:Db,IcosahedronGeometry:Zc,IcosahedronBufferGeometry:fc,DodecahedronGeometry:$c,DodecahedronBufferGeometry:gc,PolyhedronGeometry:Wc,PolyhedronBufferGeometry:za,TubeGeometry:ad,TubeBufferGeometry:Eb,TorusKnotGeometry:bd,TorusKnotBufferGeometry:hc,TorusGeometry:cd,TorusBufferGeometry:ic,TextGeometry:hd,TextBufferGeometry:kc,SphereGeometry:id,SphereBufferGeometry:qb,RingGeometry:jd,RingBufferGeometry:lc,
-PlaneGeometry:Lc,PlaneBufferGeometry:Bb,LatheGeometry:kd,LatheBufferGeometry:mc,ShapeGeometry:Hb,ShapeBufferGeometry:Ib,ExtrudeGeometry:Gb,ExtrudeBufferGeometry:Ya,EdgesGeometry:nc,ConeGeometry:ld,ConeBufferGeometry:md,CylinderGeometry:Jb,CylinderBufferGeometry:eb,CircleGeometry:nd,CircleBufferGeometry:oc,BoxGeometry:Ub,BoxBufferGeometry:ib});Kb.prototype=Object.create(L.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isShadowMaterial=!0;Kb.prototype.copy=function(a){L.prototype.copy.call(this,
-a);this.color.copy(a.color);return this};pc.prototype=Object.create(va.prototype);pc.prototype.constructor=pc;pc.prototype.isRawShaderMaterial=!0;Za.prototype=Object.create(L.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshStandardMaterial=!0;Za.prototype.copy=function(a){L.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};Lb.prototype=Object.create(Za.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isMeshPhysicalMaterial=!0;Lb.prototype.copy=function(a){Za.prototype.copy.call(this,
-a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ka.prototype=Object.create(L.prototype);Ka.prototype.constructor=Ka;Ka.prototype.isMeshPhongMaterial=!0;Ka.prototype.copy=function(a){L.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};Mb.prototype=Object.create(Ka.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isMeshToonMaterial=!0;Mb.prototype.copy=function(a){Ka.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;
-return this};Nb.prototype=Object.create(L.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshNormalMaterial=!0;Nb.prototype.copy=function(a){L.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};Ob.prototype=Object.create(L.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshLambertMaterial=!0;Ob.prototype.copy=function(a){L.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};Pb.prototype=
-Object.create(L.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isMeshMatcapMaterial=!0;Pb.prototype.copy=function(a){L.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};Qb.prototype=Object.create(V.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isLineDashedMaterial=!0;Qb.prototype.copy=function(a){V.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var zh=Object.freeze({ShadowMaterial:Kb,SpriteMaterial:pb,RawShaderMaterial:pc,ShaderMaterial:va,PointsMaterial:Ja,MeshPhysicalMaterial:Lb,
-MeshStandardMaterial:Za,MeshPhongMaterial:Ka,MeshToonMaterial:Mb,MeshNormalMaterial:Nb,MeshLambertMaterial:Ob,MeshDepthMaterial:mb,MeshDistanceMaterial:nb,MeshBasicMaterial:ka,MeshMatcapMaterial:Pb,LineDashedMaterial:Qb,LineBasicMaterial:V,Material:L}),ta={arraySlice:function(a,b,c){return ta.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=this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-
-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,
-e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=c[a+e];return b},interpolate_:function(){throw Error("call to abstract method");},intervalChanged_:function(){}});Object.assign(Ea.prototype,{beforeStart_:Ea.prototype.copySampleValue_,afterEnd_:Ea.prototype.copySampleValue_});Jd.prototype=Object.assign(Object.create(Ea.prototype),
-{constructor:Jd,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=a;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case 2401:f=a;h=2*c-b;break;case 2402:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=
-a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g,k=this._offsetPrev,m=this._offsetNext,l=this._weightPrev,n=this._weightNext,u=(c-b)/(d-b);c=u*u;d=c*u;b=-l*d+2*l*c-l*u;l=(1+l)*d+(-1.5-2*l)*c+(-.5+l)*u+1;u=(-1-n)*d+(1.5+n)*c+.5*u;n=n*d-n*c;for(c=0;c!==g;++c)e[c]=b*f[k+c]+l*f[h+c]+u*f[a+c]+n*f[m+c];return e}});od.prototype=Object.assign(Object.create(Ea.prototype),{constructor:od,interpolate_:function(a,
-b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*b;return e}});Kd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Kd,interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(sa,{toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ta.convertArray(a.times,Array),values:ta.convertArray(a.values,Array)};var c=a.getInterpolation();
-c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(sa.prototype,{constructor:sa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Kd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new od(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Jd(this.times,this.values,this.getValueSize(),
-a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(b);console.warn("THREE.KeyframeTrack:",b);return this}this.createInterpolant=
-b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,
-b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ta.arraySlice(c,e,f),this.values=ta.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&&ta.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;g<f;++g){var h=!1,k=a[g];if(k!==a[g+1]&&(1!==g||k!==k[0]))if(d)h=!0;else{var m=g*c,l=m-c,n=m+c;for(k=0;k!==c;++k){var u=b[m+k];if(u!==b[l+k]||u!==b[n+k]){h=!0;break}}}if(h){if(g!==e)for(a[e]=a[g],h=g*c,m=e*c,k=0;k!==c;++k)b[m+k]=b[h+k];++e}}if(0<f){a[e]=a[f];h=f*c;m=e*c;for(k=0;k!==c;++k)b[m+k]=b[h+k];++e}e!==a.length&&(this.times=ta.arraySlice(a,0,e),this.values=ta.arraySlice(b,0,e*c));return this},clone:function(){var a=
-ta.arraySlice(this.times,0),b=ta.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;return a}});Ld.prototype=Object.assign(Object.create(sa.prototype),{constructor:Ld,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});Md.prototype=Object.assign(Object.create(sa.prototype),{constructor:Md,ValueTypeName:"color"});qc.prototype=Object.assign(Object.create(sa.prototype),
-{constructor:qc,ValueTypeName:"number"});Nd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Nd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)ea.slerpFlat(e,0,f,a-g,f,a,b);return e}});pd.prototype=Object.assign(Object.create(sa.prototype),{constructor:pd,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(a){return new Nd(this.times,this.values,this.getValueSize(),
-a)},InterpolantFactoryMethodSmooth:void 0});Od.prototype=Object.assign(Object.create(sa.prototype),{constructor:Od,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});rc.prototype=Object.assign(Object.create(sa.prototype),{constructor:rc,ValueTypeName:"vector"});Object.assign(Ga,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(vh(c[e]).scale(d));return new Ga(a.name,
-a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(sa.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],k=[];h.push((g+e-1)%e,g,(g+1)%e);k.push(0,1,0);var m=ta.getKeyframeOrder(h);h=ta.sortedArray(h,1,m);k=ta.sortedArray(k,1,m);d||0!==h[0]||(h.push(e),k.push(k[0]));f.push((new qc(".morphTargetInfluences["+b[g].name+"]",h,k)).scale(1/
-c))}return new Ga(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var m=k[1];(k=d[m])||(d[m]=k=[]);k.push(h)}}a=[];for(m in d)a.push(Ga.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,
-b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ta.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!==k.length)if(k[0].morphTargets){f={};for(var m=0;m<k.length;m++)if(k[m].morphTargets)for(var l=0;l<k[m].morphTargets.length;l++)f[k[m].morphTargets[l]]=-1;for(var n in f){var u=
-[],t=[];for(l=0;l!==k[m].morphTargets.length;++l){var q=k[m];u.push(q.time);t.push(q.morphTarget===n?1:0)}d.push(new qc(".morphTargetInfluence["+n+"]",u,t))}f=f.length*(g||1)}else m=".bones["+b[h].name+"]",c(rc,m+".position",k,"pos",d),c(pd,m+".quaternion",k,"rot",d),c(rc,m+".scale",k,"scl",d)}return 0===d.length?null:new Ga(e,f,d)}});Object.assign(Ga.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=
-a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this},clone:function(){for(var a=[],b=0;b<this.tracks.length;b++)a.push(this.tracks[b].clone());return new Ga(this.name,this.duration,a)}});var Sb={enabled:!1,files:{},add:function(a,b){!1!==
-this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},Aa=new we,Sa={};Object.assign(La.prototype,{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Sb.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;if(void 0!==Sa[a])Sa[a].push({onLoad:b,onProgress:c,onError:d});
-else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=decodeURIComponent(g);h&&(g=atob(g));try{var k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(h=0;h<g.length;h++)m[h]=g.charCodeAt(h);var l="blob"===k?new Blob([m.buffer],{type:c}):m.buffer;break;case "document":l=(new DOMParser).parseFromString(g,c);break;case "json":l=JSON.parse(g);break;default:l=g}setTimeout(function(){b&&b(l);e.manager.itemEnd(a)},
-0)}catch(u){setTimeout(function(){d&&d(u);e.manager.itemError(a);e.manager.itemEnd(a)},0)}}else{Sa[a]=[];Sa[a].push({onLoad:b,onProgress:c,onError:d});var n=new XMLHttpRequest;n.open("GET",a,!0);n.addEventListener("load",function(b){var c=this.response;Sb.add(a,c);var d=Sa[a];delete Sa[a];if(200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var f=0,g=d.length;f<g;f++){var h=d[f];if(h.onLoad)h.onLoad(c)}}else{f=0;for(g=d.length;f<g;f++)if(h=
-d[f],h.onError)h.onError(b);e.manager.itemError(a)}e.manager.itemEnd(a)},!1);n.addEventListener("progress",function(b){for(var c=Sa[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f.onProgress)f.onProgress(b)}},!1);n.addEventListener("error",function(b){var c=Sa[a];delete Sa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);n.addEventListener("abort",function(b){var c=Sa[a];delete Sa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);
-e.manager.itemEnd(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(h in this.requestHeader)n.setRequestHeader(h,this.requestHeader[h]);n.send(null)}e.manager.itemStart(a);return n}},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=
-a;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(Lf.prototype,{load:function(a,b,c,d){var e=this,f=new La(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){for(var b=[],c=0;c<a.length;c++){var d=Ga.parse(a[c]);b.push(d)}return b},setPath:function(a){this.path=a;return this}});Object.assign(Mf.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],
-function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new bc;h.image=g;var k=new La(this.manager);k.setPath(this.path);k.setResponseType("arraybuffer");if(Array.isArray(a))for(var m=0,l=0,n=a.length;l<n;++l)e(l);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};
-for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=a;return this}});Object.assign(xe.prototype,{load:function(a,b,c,d){var e=this,f=new Ab,g=new La(this.manager);g.setResponseType("arraybuffer");g.setPath(this.path);
-g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===
-a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f},setPath:function(a){this.path=a;return this}});Object.assign(qd.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(){k.removeEventListener("load",e,!1);k.removeEventListener("error",f,!1);Sb.add(a,this);b&&b(this);g.manager.itemEnd(a)}function f(b){k.removeEventListener("load",e,!1);k.removeEventListener("error",f,!1);d&&d(b);g.manager.itemError(a);g.manager.itemEnd(a)}void 0===a&&(a="");void 0!==this.path&&
-(a=this.path+a);a=this.manager.resolveURL(a);var g=this,h=Sb.get(a);if(void 0!==h)return g.manager.itemStart(a),setTimeout(function(){b&&b(h);g.manager.itemEnd(a)},0),h;var k=document.createElementNS("http://www.w3.org/1999/xhtml","img");k.addEventListener("load",e,!1);k.addEventListener("error",f,!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(k.crossOrigin=this.crossOrigin);g.manager.itemStart(a);k.src=a;return k},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
-a;return this}});Object.assign(ye.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new cb,g=new qd(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Pd.prototype,{crossOrigin:"anonymous",load:function(a,
-b,c,d){var e=new X,f=new qd(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(c){e.image=c;c=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);e.format=c?1022:1023;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(N.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");return null},getPointAt:function(a,
-b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;
+t;u++)f(m[u],u)}}}(),updateMorphTargets:function(){var a=this.geometry;if(a.isBufferGeometry){a=a.morphAttributes;var b=Object.keys(a);if(0<b.length){var c=a[b[0]];if(void 0!==c)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},a=0,b=c.length;a<b;a++){var d=c[a].name||String(a);this.morphTargetInfluences.push(0);this.morphTargetDictionary[d]=a}}}else a=a.morphTargets,void 0!==a&&0<a.length&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")},
+clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});te.prototype=Object.assign(Object.create(X.prototype),{constructor:te,isVideoTexture:!0,update:function(){var a=this.image;a.readyState>=a.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}});bc.prototype=Object.create(X.prototype);bc.prototype.constructor=bc;bc.prototype.isCompressedTexture=!0;Tc.prototype=Object.create(X.prototype);Tc.prototype.constructor=Tc;Tc.prototype.isCanvasTexture=!0;Uc.prototype=Object.create(X.prototype);
+Uc.prototype.constructor=Uc;Uc.prototype.isDepthTexture=!0;cc.prototype=Object.create(E.prototype);cc.prototype.constructor=cc;Vc.prototype=Object.create(Q.prototype);Vc.prototype.constructor=Vc;dc.prototype=Object.create(E.prototype);dc.prototype.constructor=dc;Wc.prototype=Object.create(Q.prototype);Wc.prototype.constructor=Wc;za.prototype=Object.create(E.prototype);za.prototype.constructor=za;Xc.prototype=Object.create(Q.prototype);Xc.prototype.constructor=Xc;ec.prototype=Object.create(za.prototype);
+ec.prototype.constructor=ec;Yc.prototype=Object.create(Q.prototype);Yc.prototype.constructor=Yc;Db.prototype=Object.create(za.prototype);Db.prototype.constructor=Db;Zc.prototype=Object.create(Q.prototype);Zc.prototype.constructor=Zc;fc.prototype=Object.create(za.prototype);fc.prototype.constructor=fc;$c.prototype=Object.create(Q.prototype);$c.prototype.constructor=$c;gc.prototype=Object.create(za.prototype);gc.prototype.constructor=gc;ad.prototype=Object.create(Q.prototype);ad.prototype.constructor=
+ad;Eb.prototype=Object.create(E.prototype);Eb.prototype.constructor=Eb;Eb.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);a.path=this.parameters.path.toJSON();return a};bd.prototype=Object.create(Q.prototype);bd.prototype.constructor=bd;hc.prototype=Object.create(E.prototype);hc.prototype.constructor=hc;cd.prototype=Object.create(Q.prototype);cd.prototype.constructor=cd;ic.prototype=Object.create(E.prototype);ic.prototype.constructor=ic;var yh={triangulate:function(a,b,c){c=c||2;var d=
+b&&b.length,e=d?b[0]*c:a.length,f=Df(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;l<m;l++){var n=b[l]*k;var u=l<m-1?b[l+1]*k:a.length;n=Df(a,n,u,k,!1);n===n.next&&(n.steiner=!0);d.push(sh(n))}d.sort(qh);for(l=0;l<d.length;l++){b=d[l];k=f;if(k=rh(b,k))b=Gf(k,b),ed(b,b.next);f=ed(f,f.next)}}if(a.length>80*c){var t=h=a[0];var q=d=a[1];for(k=c;k<e;k+=c)l=a[k],b=a[k+1],l<t&&(t=l),b<q&&(q=b),l>h&&(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}},db={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},isClockWise:function(a){return 0>db.area(a)},triangulateShape:function(a,b){var c=[],d=[],e=[];Hf(a);If(c,a);var f=a.length;b.forEach(Hf);for(a=0;a<b.length;a++)d.push(f),f+=b[a].length,If(c,b[a]);b=yh.triangulate(c,d);for(a=0;a<b.length;a+=3)e.push(b.slice(a,a+3));return e}};Gb.prototype=Object.create(Q.prototype);Gb.prototype.constructor=Gb;Gb.prototype.toJSON=
+function(){var a=Q.prototype.toJSON.call(this);return Jf(this.parameters.shapes,this.parameters.options,a)};Ya.prototype=Object.create(E.prototype);Ya.prototype.constructor=Ya;Ya.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);return Jf(this.parameters.shapes,this.parameters.options,a)};var th={generateTopUV:function(a,b,c,d,e){a=b[3*d];d=b[3*d+1];var f=b[3*e];e=b[3*e+1];return[new C(b[3*c],b[3*c+1]),new C(a,d),new C(f,e)]},generateSideWallUV:function(a,b,c,d,e,f){a=b[3*c];var g=b[3*
+c+1];c=b[3*c+2];var h=b[3*d],k=b[3*d+1];d=b[3*d+2];var m=b[3*e],l=b[3*e+1];e=b[3*e+2];var n=b[3*f],u=b[3*f+1];b=b[3*f+2];return.01>Math.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(Q.prototype);hd.prototype.constructor=hd;kc.prototype=Object.create(Ya.prototype);kc.prototype.constructor=kc;id.prototype=Object.create(Q.prototype);id.prototype.constructor=id;qb.prototype=Object.create(E.prototype);qb.prototype.constructor=
+qb;jd.prototype=Object.create(Q.prototype);jd.prototype.constructor=jd;lc.prototype=Object.create(E.prototype);lc.prototype.constructor=lc;kd.prototype=Object.create(Q.prototype);kd.prototype.constructor=kd;mc.prototype=Object.create(E.prototype);mc.prototype.constructor=mc;Hb.prototype=Object.create(Q.prototype);Hb.prototype.constructor=Hb;Hb.prototype.toJSON=function(){var a=Q.prototype.toJSON.call(this);return Kf(this.parameters.shapes,a)};Ib.prototype=Object.create(E.prototype);Ib.prototype.constructor=
+Ib;Ib.prototype.toJSON=function(){var a=E.prototype.toJSON.call(this);return Kf(this.parameters.shapes,a)};nc.prototype=Object.create(E.prototype);nc.prototype.constructor=nc;Jb.prototype=Object.create(Q.prototype);Jb.prototype.constructor=Jb;eb.prototype=Object.create(E.prototype);eb.prototype.constructor=eb;ld.prototype=Object.create(Jb.prototype);ld.prototype.constructor=ld;md.prototype=Object.create(eb.prototype);md.prototype.constructor=md;nd.prototype=Object.create(Q.prototype);nd.prototype.constructor=
+nd;oc.prototype=Object.create(E.prototype);oc.prototype.constructor=oc;var ua=Object.freeze({WireframeGeometry:cc,ParametricGeometry:Vc,ParametricBufferGeometry:dc,TetrahedronGeometry:Xc,TetrahedronBufferGeometry:ec,OctahedronGeometry:Yc,OctahedronBufferGeometry:Db,IcosahedronGeometry:Zc,IcosahedronBufferGeometry:fc,DodecahedronGeometry:$c,DodecahedronBufferGeometry:gc,PolyhedronGeometry:Wc,PolyhedronBufferGeometry:za,TubeGeometry:ad,TubeBufferGeometry:Eb,TorusKnotGeometry:bd,TorusKnotBufferGeometry:hc,
+TorusGeometry:cd,TorusBufferGeometry:ic,TextGeometry:hd,TextBufferGeometry:kc,SphereGeometry:id,SphereBufferGeometry:qb,RingGeometry:jd,RingBufferGeometry:lc,PlaneGeometry:Lc,PlaneBufferGeometry:Bb,LatheGeometry:kd,LatheBufferGeometry:mc,ShapeGeometry:Hb,ShapeBufferGeometry:Ib,ExtrudeGeometry:Gb,ExtrudeBufferGeometry:Ya,EdgesGeometry:nc,ConeGeometry:ld,ConeBufferGeometry:md,CylinderGeometry:Jb,CylinderBufferGeometry:eb,CircleGeometry:nd,CircleBufferGeometry:oc,BoxGeometry:Ub,BoxBufferGeometry:ib});
+Kb.prototype=Object.create(L.prototype);Kb.prototype.constructor=Kb;Kb.prototype.isShadowMaterial=!0;Kb.prototype.copy=function(a){L.prototype.copy.call(this,a);this.color.copy(a.color);return this};pc.prototype=Object.create(va.prototype);pc.prototype.constructor=pc;pc.prototype.isRawShaderMaterial=!0;Za.prototype=Object.create(L.prototype);Za.prototype.constructor=Za;Za.prototype.isMeshStandardMaterial=!0;Za.prototype.copy=function(a){L.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};
+Lb.prototype=Object.create(Za.prototype);Lb.prototype.constructor=Lb;Lb.prototype.isMeshPhysicalMaterial=!0;Lb.prototype.copy=function(a){Za.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};Ka.prototype=Object.create(L.prototype);Ka.prototype.constructor=Ka;Ka.prototype.isMeshPhongMaterial=!0;Ka.prototype.copy=function(a){L.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};Mb.prototype=
+Object.create(Ka.prototype);Mb.prototype.constructor=Mb;Mb.prototype.isMeshToonMaterial=!0;Mb.prototype.copy=function(a){Ka.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};Nb.prototype=Object.create(L.prototype);Nb.prototype.constructor=Nb;Nb.prototype.isMeshNormalMaterial=!0;Nb.prototype.copy=function(a){L.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};Ob.prototype=Object.create(L.prototype);Ob.prototype.constructor=Ob;Ob.prototype.isMeshLambertMaterial=!0;Ob.prototype.copy=function(a){L.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};Pb.prototype=Object.create(L.prototype);Pb.prototype.constructor=Pb;Pb.prototype.isMeshMatcapMaterial=!0;Pb.prototype.copy=function(a){L.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};Qb.prototype=Object.create(V.prototype);Qb.prototype.constructor=Qb;Qb.prototype.isLineDashedMaterial=!0;Qb.prototype.copy=function(a){V.prototype.copy.call(this,a);this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=
+a.gapSize;return this};var zh=Object.freeze({ShadowMaterial:Kb,SpriteMaterial:pb,RawShaderMaterial:pc,ShaderMaterial:va,PointsMaterial:Ja,MeshPhysicalMaterial:Lb,MeshStandardMaterial:Za,MeshPhongMaterial:Ka,MeshToonMaterial:Mb,MeshNormalMaterial:Nb,MeshLambertMaterial:Ob,MeshDepthMaterial:mb,MeshDistanceMaterial:nb,MeshBasicMaterial:ka,MeshMatcapMaterial:Pb,LineDashedMaterial:Qb,LineBasicMaterial:V,Material:L}),ta={arraySlice:function(a,b,c){return ta.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=
+this.parameterPositions,c=this._cachedIndex,d=b[c],e=b[c-1];a:{b:{c:{d:if(!(a<d)){for(var f=c+2;;){if(void 0===d){if(a<e)break d;this._cachedIndex=c=b.length;return this.afterEnd_(c-1,a,e)}if(c===f)break;e=d;d=b[++c];if(a<d)break b}d=b.length;break c}if(a>=e)break a;else{f=b[1];a<f&&(c=2,e=f);for(f=c-2;;){if(void 0===e)return this._cachedIndex=0,this.beforeStart_(0,a,d);if(c===f)break;d=e;e=b[--c-1];if(a>=e)break b}d=c;c=0}}for(;c<d;)e=c+d>>>1,a<b[e]?d=e:c=e+1;d=b[c];e=b[c-1];if(void 0===e)return this._cachedIndex=
+0,this.beforeStart_(0,a,d);if(void 0===d)return this._cachedIndex=c=b.length,this.afterEnd_(c-1,e,a)}this._cachedIndex=c;this.intervalChanged_(c,e,d)}return this.interpolate_(c,e,a,d)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(a){var b=this.resultBuffer,c=this.sampleValues,d=this.valueSize;a*=d;for(var e=0;e!==d;++e)b[e]=c[a+e];return b},interpolate_:function(){throw Error("call to abstract method");},intervalChanged_:function(){}});
+Object.assign(Ea.prototype,{beforeStart_:Ea.prototype.copySampleValue_,afterEnd_:Ea.prototype.copySampleValue_});Jd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Jd,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(a,b,c){var d=this.parameterPositions,e=a-2,f=a+1,g=d[e],h=d[f];if(void 0===g)switch(this.getSettings_().endingStart){case 2401:e=a;g=2*b-c;break;case 2402:e=d.length-2;g=b+d[e]-d[e+1];break;default:e=a,g=c}if(void 0===h)switch(this.getSettings_().endingEnd){case 2401:f=
+a;h=2*c-b;break;case 2402:f=1;h=c+d[1]-d[0];break;default:f=a-1,h=b}a=.5*(c-b);d=this.valueSize;this._weightPrev=a/(b-g);this._weightNext=a/(h-c);this._offsetPrev=e*d;this._offsetNext=f*d},interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g,k=this._offsetPrev,m=this._offsetNext,l=this._weightPrev,n=this._weightNext,u=(c-b)/(d-b);c=u*u;d=c*u;b=-l*d+2*l*c-l*u;l=(1+l)*d+(-1.5-2*l)*c+(-.5+l)*u+1;u=(-1-n)*d+(1.5+n)*c+.5*u;n=n*d-n*c;for(c=0;c!==g;++c)e[c]=
+b*f[k+c]+l*f[h+c]+u*f[a+c]+n*f[m+c];return e}});od.prototype=Object.assign(Object.create(Ea.prototype),{constructor:od,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;var h=a-g;b=(c-b)/(d-b);c=1-b;for(d=0;d!==g;++d)e[d]=f[h+d]*c+f[a+d]*b;return e}});Kd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Kd,interpolate_:function(a){return this.copySampleValue_(a-1)}});Object.assign(sa,{toJSON:function(a){var b=a.constructor;if(void 0!==
+b.toJSON)b=b.toJSON(a);else{b={name:a.name,times:ta.convertArray(a.times,Array),values:ta.convertArray(a.values,Array)};var c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b}});Object.assign(sa.prototype,{constructor:sa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(a){return new Kd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodLinear:function(a){return new od(this.times,
+this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:function(a){return new Jd(this.times,this.values,this.getValueSize(),a)},setInterpolation:function(a){switch(a){case 2300:var b=this.InterpolantFactoryMethodDiscrete;break;case 2301:b=this.InterpolantFactoryMethodLinear;break;case 2302:b=this.InterpolantFactoryMethodSmooth}if(void 0===b){b="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(a!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);
+else throw Error(b);console.warn("THREE.KeyframeTrack:",b);return this}this.createInterpolant=b;return this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(a){if(0!==a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]+=a;return this},scale:function(a){if(1!==
+a)for(var b=this.times,c=0,d=b.length;c!==d;++c)b[c]*=a;return this},trim:function(a,b){for(var c=this.times,d=c.length,e=0,f=d-1;e!==d&&c[e]<a;)++e;for(;-1!==f&&c[f]>b;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),a=this.getValueSize(),this.times=ta.arraySlice(c,e,f),this.values=ta.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&&ta.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;g<f;++g){var h=!1,k=a[g];if(k!==a[g+1]&&(1!==g||k!==k[0]))if(d)h=!0;else{var m=g*c,l=m-c,n=m+c;for(k=0;k!==c;++k){var u=b[m+k];if(u!==b[l+k]||u!==b[n+k]){h=!0;break}}}if(h){if(g!==e)for(a[e]=a[g],h=g*c,m=e*c,k=0;k!==c;++k)b[m+k]=b[h+k];++e}}if(0<f){a[e]=a[f];h=f*c;m=e*c;for(k=0;k!==c;++k)b[m+k]=b[h+k];++e}e!==a.length&&(this.times=ta.arraySlice(a,
+0,e),this.values=ta.arraySlice(b,0,e*c));return this},clone:function(){var a=ta.arraySlice(this.times,0),b=ta.arraySlice(this.values,0);a=new this.constructor(this.name,a,b);a.createInterpolant=this.createInterpolant;return a}});Ld.prototype=Object.assign(Object.create(sa.prototype),{constructor:Ld,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});Md.prototype=Object.assign(Object.create(sa.prototype),
+{constructor:Md,ValueTypeName:"color"});qc.prototype=Object.assign(Object.create(sa.prototype),{constructor:qc,ValueTypeName:"number"});Nd.prototype=Object.assign(Object.create(Ea.prototype),{constructor:Nd,interpolate_:function(a,b,c,d){var e=this.resultBuffer,f=this.sampleValues,g=this.valueSize;a*=g;b=(c-b)/(d-b);for(c=a+g;a!==c;a+=4)ea.slerpFlat(e,0,f,a-g,f,a,b);return e}});pd.prototype=Object.assign(Object.create(sa.prototype),{constructor:pd,ValueTypeName:"quaternion",DefaultInterpolation:2301,
+InterpolantFactoryMethodLinear:function(a){return new Nd(this.times,this.values,this.getValueSize(),a)},InterpolantFactoryMethodSmooth:void 0});Od.prototype=Object.assign(Object.create(sa.prototype),{constructor:Od,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0});rc.prototype=Object.assign(Object.create(sa.prototype),{constructor:rc,ValueTypeName:"vector"});Object.assign(Ga,{parse:function(a){for(var b=
+[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(vh(c[e]).scale(d));return new Ga(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b,uuid:a.uuid};for(var d=0,e=c.length;d!==e;++d)b.push(sa.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],k=[];h.push((g+e-1)%e,g,(g+1)%e);k.push(0,1,0);var m=ta.getKeyframeOrder(h);h=ta.sortedArray(h,1,m);k=ta.sortedArray(k,1,m);d||0!==
+h[0]||(h.push(e),k.push(k[0]));f.push((new qc(".morphTargetInfluences["+b[g].name+"]",h,k)).scale(1/c))}return new Ga(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(a=0;a<c.length;a++)if(c[a].name===b)return c[a];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var m=k[1];(k=d[m])||(d[m]=k=[]);k.push(h)}}a=[];
+for(m in d)a.push(Ga.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ta.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!==k.length)if(k[0].morphTargets){f={};for(var m=0;m<k.length;m++)if(k[m].morphTargets)for(var l=
+0;l<k[m].morphTargets.length;l++)f[k[m].morphTargets[l]]=-1;for(var n in f){var u=[],t=[];for(l=0;l!==k[m].morphTargets.length;++l){var q=k[m];u.push(q.time);t.push(q.morphTarget===n?1:0)}d.push(new qc(".morphTargetInfluence["+n+"]",u,t))}f=f.length*(g||1)}else m=".bones["+b[h].name+"]",c(rc,m+".position",k,"pos",d),c(pd,m+".quaternion",k,"rot",d),c(rc,m+".scale",k,"scl",d)}return 0===d.length?null:new Ga(e,f,d)}});Object.assign(Ga.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==
+c;++b){var d=this.tracks[b];a=Math.max(a,d.times[d.times.length-1])}this.duration=a;return this},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},validate:function(){for(var a=!0,b=0;b<this.tracks.length;b++)a=a&&this.tracks[b].validate();return a},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this},clone:function(){for(var a=[],b=0;b<this.tracks.length;b++)a.push(this.tracks[b].clone());return new Ga(this.name,
+this.duration,a)}});var Sb={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},Aa=new we,Sa={};Object.assign(La.prototype,{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var e=this,f=Sb.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},
+0),f;if(void 0!==Sa[a])Sa[a].push({onLoad:b,onProgress:c,onError:d});else{var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){c=g[1];var h=!!g[2];g=g[3];g=decodeURIComponent(g);h&&(g=atob(g));try{var k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":var m=new Uint8Array(g.length);for(h=0;h<g.length;h++)m[h]=g.charCodeAt(h);var l="blob"===k?new Blob([m.buffer],{type:c}):m.buffer;break;case "document":l=(new DOMParser).parseFromString(g,c);break;case "json":l=JSON.parse(g);
+break;default:l=g}setTimeout(function(){b&&b(l);e.manager.itemEnd(a)},0)}catch(u){setTimeout(function(){d&&d(u);e.manager.itemError(a);e.manager.itemEnd(a)},0)}}else{Sa[a]=[];Sa[a].push({onLoad:b,onProgress:c,onError:d});var n=new XMLHttpRequest;n.open("GET",a,!0);n.addEventListener("load",function(b){var c=this.response;Sb.add(a,c);var d=Sa[a];delete Sa[a];if(200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var f=0,g=d.length;f<g;f++){var h=
+d[f];if(h.onLoad)h.onLoad(c)}}else{f=0;for(g=d.length;f<g;f++)if(h=d[f],h.onError)h.onError(b);e.manager.itemError(a)}e.manager.itemEnd(a)},!1);n.addEventListener("progress",function(b){for(var c=Sa[a],d=0,e=c.length;d<e;d++){var f=c[d];if(f.onProgress)f.onProgress(b)}},!1);n.addEventListener("error",function(b){var c=Sa[a];delete Sa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);n.addEventListener("abort",function(b){var c=
+Sa[a];delete Sa[a];for(var d=0,f=c.length;d<f;d++){var g=c[d];if(g.onError)g.onError(b)}e.manager.itemError(a);e.manager.itemEnd(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(h in this.requestHeader)n.setRequestHeader(h,this.requestHeader[h]);n.send(null)}e.manager.itemStart(a);return n}},setPath:function(a){this.path=
+a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(Lf.prototype,{load:function(a,b,c,d){var e=this,f=new La(e.manager);f.setPath(e.path);f.load(a,function(a){b(e.parse(JSON.parse(a)))},c,d)},parse:function(a){for(var b=[],c=0;c<a.length;c++){var d=Ga.parse(a[c]);b.push(d)}return b},
+setPath:function(a){this.path=a;return this}});Object.assign(Mf.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new bc;h.image=g;var k=new La(this.manager);k.setPath(this.path);k.setResponseType("arraybuffer");if(Array.isArray(a))for(var m=0,l=0,n=a.length;l<n;++l)e(l);
+else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=a;return this}});Object.assign(xe.prototype,
+{load:function(a,b,c,d){var e=this,f=new Ab,g=new La(this.manager);g.setResponseType("arraybuffer");g.setPath(this.path);g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:
+1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f},setPath:function(a){this.path=a;return this}});Object.assign(qd.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(){k.removeEventListener("load",e,!1);k.removeEventListener("error",f,!1);Sb.add(a,this);b&&b(this);g.manager.itemEnd(a)}function f(b){k.removeEventListener("load",e,!1);k.removeEventListener("error",
+f,!1);d&&d(b);g.manager.itemError(a);g.manager.itemEnd(a)}void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);a=this.manager.resolveURL(a);var g=this,h=Sb.get(a);if(void 0!==h)return g.manager.itemStart(a),setTimeout(function(){b&&b(h);g.manager.itemEnd(a)},0),h;var k=document.createElementNS("http://www.w3.org/1999/xhtml","img");k.addEventListener("load",e,!1);k.addEventListener("error",f,!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(k.crossOrigin=this.crossOrigin);g.manager.itemStart(a);
+k.src=a;return k},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(ye.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new cb,g=new qd(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
+a;return this}});Object.assign(Pd.prototype,{crossOrigin:"anonymous",load:function(a,b,c,d){var e=new X,f=new qd(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(c){e.image=c;c=0<a.search(/\.jpe?g($|\?)/i)||0===a.search(/^data:image\/jpeg/);e.format=c?1022:1023;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(N.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");
+return null},getPointAt:function(a,b){a=this.getUtoTmapping(a);return this.getPoint(a,b)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;
 this.needsUpdate=!1;var b=[],c=this.getPoint(0),d,e=0;b.push(0);for(d=1;d<=a;d++){var f=this.getPoint(d/a);e+=f.distanceTo(c);b.push(e);c=f}return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,b){var c=this.getLengths(),d=c.length;b=b?b:a*c[d-1];for(var e=0,f=d-1,g;e<=f;)if(a=Math.floor(e+(f-e)/2),g=c[a]-b,0>g)e=a+1;else if(0<g)f=a-1;else{f=a;break}a=f;if(c[a]===b)return a/(d-1);e=c[a];return(a+(b-e)/(c[a+1]-e))/(d-1)},getTangent:function(a){var b=
 a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new n,d=[],e=[],f=[],g=new n,h=new O,k;for(k=0;k<=a;k++){var m=k/a;d[k]=this.getTangentAt(m);d[k].normalize()}e[0]=new n;f[0]=new n;k=Number.MAX_VALUE;m=Math.abs(d[0].x);var l=Math.abs(d[0].y),p=Math.abs(d[0].z);m<=k&&(k=m,c.set(1,0,0));l<=k&&(k=l,c.set(0,1,0));p<=k&&c.set(0,
 0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(k=1;k<=a;k++)e[k]=e[k-1].clone(),f[k]=f[k-1].clone(),g.crossVectors(d[k-1],d[k]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(P.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(P.clamp(e[0].dot(e[a]),-1,1)),c/=a,0<d[0].dot(g.crossVectors(e[0],e[a]))&&(c=-c),k=1;k<=a;k++)e[k].applyMatrix4(h.makeRotationAxis(d[k],
@@ -790,9 +790,9 @@ g.phiStart,g.phiLength,g.thetaStart,g.thetaLength);break;case "DodecahedronGeome
 new ua[g.type](g.radius,g.tube,g.radialSegments,g.tubularSegments,g.arc);break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":h=new ua[g.type](g.radius,g.tube,g.tubularSegments,g.radialSegments,g.p,g.q);break;case "TubeGeometry":case "TubeBufferGeometry":h=new ua[g.type]((new Ye[g.path.type]).fromJSON(g.path),g.tubularSegments,g.radius,g.radialSegments,g.closed);break;case "LatheGeometry":case "LatheBufferGeometry":h=new ua[g.type](g.points,g.segments,g.phiStart,g.phiLength);break;case "PolyhedronGeometry":case "PolyhedronBufferGeometry":h=
 new ua[g.type](g.vertices,g.indices,g.radius,g.details);break;case "ShapeGeometry":case "ShapeBufferGeometry":h=[];for(var k=0,m=g.shapes.length;k<m;k++){var l=b[g.shapes[k]];h.push(l)}h=new ua[g.type](h,g.curveSegments);break;case "ExtrudeGeometry":case "ExtrudeBufferGeometry":h=[];k=0;for(m=g.shapes.length;k<m;k++)l=b[g.shapes[k]],h.push(l);k=g.options.extrudePath;void 0!==k&&(g.options.extrudePath=(new Ye[k.type]).fromJSON(k));h=new ua[g.type](h,g.options);break;case "BufferGeometry":case "InstancedBufferGeometry":h=
 d.parse(g);break;case "Geometry":"THREE"in window&&"LegacyJSONLoader"in THREE?h=(new THREE.LegacyJSONLoader).parse(g,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+g.type+'"');continue}h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);!0===h.isBufferGeometry&&void 0!==g.userData&&(h.userData=g.userData);c[g.uuid]=h}return c},
-parseMaterials:function(a,b){var c={},d={};if(void 0!==a){var e=new Yd;e.setTextures(b);b=0;for(var f=a.length;b<f;b++){var g=a[b];if("MultiMaterial"===g.type){for(var h=[],k=0;k<g.materials.length;k++){var m=g.materials[k];void 0===c[m.uuid]&&(c[m.uuid]=e.parse(m));h.push(c[m.uuid])}d[g.uuid]=h}else void 0===c[g.uuid]&&(c[g.uuid]=e.parse(g)),d[g.uuid]=c[g.uuid]}}return d},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=Ga.parse(d);void 0!==d.uuid&&(e.uuid=d.uuid);b.push(e)}return b},
-parseImages:function(a,b){function c(a){d.manager.itemStart(a);return f.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemError(a);d.manager.itemEnd(a)})}var d=this,e={};if(void 0!==a&&0<a.length){b=new we(b);var f=new qd(b);f.setCrossOrigin(this.crossOrigin);b=0;for(var g=a.length;b<g;b++){var h=a[b],k=h.url;if(Array.isArray(k)){e[h.uuid]=[];for(var m=0,l=k.length;m<l;m++){var n=k[m];n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:d.resourcePath+n;e[h.uuid].push(c(n))}}else n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?
-h.url:d.resourcePath+h.url,e[h.uuid]=c(n)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=Array.isArray(b[g.image])?new cb(b[g.image]):
+parseMaterials:function(a,b){var c={},d={};if(void 0!==a){var e=new Yd;e.setTextures(b);b=0;for(var f=a.length;b<f;b++){var g=a[b];if("MultiMaterial"===g.type){for(var h=[],k=0;k<g.materials.length;k++){var l=g.materials[k];void 0===c[l.uuid]&&(c[l.uuid]=e.parse(l));h.push(c[l.uuid])}d[g.uuid]=h}else void 0===c[g.uuid]&&(c[g.uuid]=e.parse(g)),d[g.uuid]=c[g.uuid]}}return d},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=Ga.parse(d);void 0!==d.uuid&&(e.uuid=d.uuid);b.push(e)}return b},
+parseImages:function(a,b){function c(a){d.manager.itemStart(a);return f.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemError(a);d.manager.itemEnd(a)})}var d=this,e={};if(void 0!==a&&0<a.length){b=new we(b);var f=new qd(b);f.setCrossOrigin(this.crossOrigin);b=0;for(var g=a.length;b<g;b++){var h=a[b],k=h.url;if(Array.isArray(k)){e[h.uuid]=[];for(var l=0,n=k.length;l<n;l++){var p=k[l];p=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p)?p:d.resourcePath+p;e[h.uuid].push(c(p))}}else p=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h.url)?
+h.url:d.resourcePath+h.url,e[h.uuid]=c(p)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=Array.isArray(b[g.image])?new cb(b[g.image]):
 new X(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,Ah));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);void 0!==g.center&&h.center.fromArray(g.center);void 0!==g.rotation&&(h.rotation=g.rotation);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],$f),h.wrapT=c(g.wrap[1],$f));void 0!==g.format&&(h.format=g.format);void 0!==g.type&&(h.type=g.type);void 0!==g.encoding&&(h.encoding=g.encoding);
 void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,ag));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter,ag));void 0!==g.anisotropy&&(h.anisotropy=g.anisotropy);void 0!==g.flipY&&(h.flipY=g.flipY);void 0!==g.premultiplyAlpha&&(h.premultiplyAlpha=g.premultiplyAlpha);void 0!==g.unpackAlignment&&(h.unpackAlignment=g.unpackAlignment);d[g.uuid]=h}return d},parseObject:function(a,b,c){function d(a){void 0===b[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return b[a]}function e(a){if(void 0!==
 a){if(Array.isArray(a)){for(var b=[],d=0,e=a.length;d<e;d++){var f=a[d];void 0===c[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(c[f])}return b}void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return c[a]}}switch(a.type){case "Scene":var f=new Dc;void 0!==a.background&&Number.isInteger(a.background)&&(f.background=new B(a.background));void 0!==a.fog&&("Fog"===a.fog.type?f.fog=new Gd(a.fog.color,a.fog.near,a.fog.far):"FogExp2"===a.fog.type&&(f.fog=new Fd(a.fog.color,
@@ -951,20 +951,20 @@ supportsHalfFloatTextures:function(){console.warn("THREE.WebGLRenderer: .support
 return this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.");
 return this.capabilities.vertexTextures},supportsInstancedArrays:function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(a){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().");this.setScissorTest(a)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},
 addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTexture2D:function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},
-setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")}});Object.defineProperties(re.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");this.shadowMap.type=a}},
-shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(vf.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},
-renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});
-Object.defineProperties(kb.prototype,{activeCubeFace:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeCubeFace has been removed. It is now the second parameter of WebGLRenderer.setRenderTarget().")}},activeMipMapLevel:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeMipMapLevel has been removed. It is now the third parameter of WebGLRenderer.setRenderTarget().")}}});Object.defineProperties(Ta.prototype,{wrapS:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");
-return this.texture.wrapS},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");this.texture.wrapS=a}},wrapT:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");this.texture.wrapT=a}},magFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");return this.texture.magFilter},
-set:function(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=a}},minFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");this.texture.minFilter=a}},anisotropy:{get:function(){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");return this.texture.anisotropy},
-set:function(a){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");this.texture.anisotropy=a}},offset:{get:function(){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");return this.texture.offset},set:function(a){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");this.texture.offset=a}},repeat:{get:function(){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");return this.texture.repeat},set:function(a){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");
-this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");return this.texture.format},set:function(a){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");return this.texture.type},set:function(a){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");this.texture.type=a}},generateMipmaps:{get:function(){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");
-return this.texture.generateMipmaps},set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});Object.defineProperties(qe.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}});tc.prototype.load=function(a){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");
-var b=this;(new Fe).load(a,function(a){b.setBuffer(a)});return this};Me.prototype.getData=function(){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()};Vb.prototype.updateCubeMap=function(a,b){console.warn("THREE.CubeCamera: .updateCubeMap() is now .update().");return this.update(a,b)};sb.crossOrigin=void 0;sb.loadTexture=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=
-new Pd;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};sb.loadTextureCube=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new ye;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};sb.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};sb.loadCompressedTextureCube=
-function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};l.ACESFilmicToneMapping=5;l.AddEquation=100;l.AddOperation=2;l.AdditiveBlending=2;l.AlphaFormat=1021;l.AlwaysDepth=1;l.AmbientLight=Wd;l.AmbientLightProbe=He;l.AnimationClip=Ga;l.AnimationLoader=Lf;l.AnimationMixer=Oe;l.AnimationObjectGroup=Rf;l.AnimationUtils=ta;l.ArcCurve=sc;l.ArrayCamera=Oc;l.ArrowHelper=hb;l.Audio=tc;l.AudioAnalyser=Me;l.AudioContext=Ke;l.AudioListener=Je;l.AudioLoader=
-Fe;l.AxesHelper=Bd;l.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");return new Bd(a)};l.BackSide=1;l.BasicDepthPacking=3200;l.BasicShadowMap=0;l.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new xe(a)};l.Bone=se;l.BooleanKeyframeTrack=Ld;l.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");return new gb(a,
-b)};l.Box2=Re;l.Box3=Ha;l.Box3Helper=zd;l.BoxBufferGeometry=ib;l.BoxGeometry=Ub;l.BoxHelper=gb;l.BufferAttribute=I;l.BufferGeometry=E;l.BufferGeometryLoader=Ae;l.ByteType=1010;l.Cache=Sb;l.Camera=Va;l.CameraHelper=yd;l.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};l.CanvasTexture=Tc;l.CatmullRomCurve3=wa;l.CineonToneMapping=4;l.CircleBufferGeometry=oc;l.CircleGeometry=nd;l.ClampToEdgeWrapping=1001;l.Clock=Ie;l.ClosedSplineCurve3=Yf;l.Color=B;l.ColorKeyframeTrack=
+setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().");return this.getActiveMipmapLevel()}});Object.defineProperties(re.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");this.shadowMap.enabled=a}},shadowMapType:{get:function(){return this.shadowMap.type},
+set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(vf.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},
+set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},
+set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});Object.defineProperties(kb.prototype,{activeCubeFace:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeCubeFace has been removed. It is now the second parameter of WebGLRenderer.setRenderTarget().")}},activeMipMapLevel:{set:function(){console.warn("THREE.WebGLRenderTargetCube: .activeMipMapLevel has been removed. It is now the third parameter of WebGLRenderer.setRenderTarget().")}}});
+Object.defineProperties(Ta.prototype,{wrapS:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");return this.texture.wrapS},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");this.texture.wrapS=a}},wrapT:{get:function(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set:function(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");this.texture.wrapT=a}},magFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");
+return this.texture.magFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=a}},minFilter:{get:function(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set:function(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");this.texture.minFilter=a}},anisotropy:{get:function(){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");
+return this.texture.anisotropy},set:function(a){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");this.texture.anisotropy=a}},offset:{get:function(){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");return this.texture.offset},set:function(a){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset.");this.texture.offset=a}},repeat:{get:function(){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");return this.texture.repeat},
+set:function(a){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat.");this.texture.repeat=a}},format:{get:function(){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");return this.texture.format},set:function(a){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format.");this.texture.format=a}},type:{get:function(){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");return this.texture.type},set:function(a){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type.");
+this.texture.type=a}},generateMipmaps:{get:function(){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");return this.texture.generateMipmaps},set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.");this.texture.generateMipmaps=a}}});Object.defineProperties(qe.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}});
+tc.prototype.load=function(a){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var b=this;(new Fe).load(a,function(a){b.setBuffer(a)});return this};Me.prototype.getData=function(){console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData().");return this.getFrequencyData()};Vb.prototype.updateCubeMap=function(a,b){console.warn("THREE.CubeCamera: .updateCubeMap() is now .update().");return this.update(a,b)};sb.crossOrigin=void 0;sb.loadTexture=function(a,
+b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=new Pd;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};sb.loadTextureCube=function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new ye;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a};sb.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};
+sb.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};l.ACESFilmicToneMapping=5;l.AddEquation=100;l.AddOperation=2;l.AdditiveBlending=2;l.AlphaFormat=1021;l.AlwaysDepth=1;l.AmbientLight=Wd;l.AmbientLightProbe=He;l.AnimationClip=Ga;l.AnimationLoader=Lf;l.AnimationMixer=Oe;l.AnimationObjectGroup=Rf;l.AnimationUtils=ta;l.ArcCurve=sc;l.ArrayCamera=Oc;l.ArrowHelper=hb;l.Audio=tc;l.AudioAnalyser=Me;l.AudioContext=
+Ke;l.AudioListener=Je;l.AudioLoader=Fe;l.AxesHelper=Bd;l.AxisHelper=function(a){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper.");return new Bd(a)};l.BackSide=1;l.BasicDepthPacking=3200;l.BasicShadowMap=0;l.BinaryTextureLoader=function(a){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.");return new xe(a)};l.Bone=se;l.BooleanKeyframeTrack=Ld;l.BoundingBoxHelper=function(a,b){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.");
+return new gb(a,b)};l.Box2=Re;l.Box3=Ha;l.Box3Helper=zd;l.BoxBufferGeometry=ib;l.BoxGeometry=Ub;l.BoxHelper=gb;l.BufferAttribute=I;l.BufferGeometry=E;l.BufferGeometryLoader=Ae;l.ByteType=1010;l.Cache=Sb;l.Camera=Va;l.CameraHelper=yd;l.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")};l.CanvasTexture=Tc;l.CatmullRomCurve3=wa;l.CineonToneMapping=4;l.CircleBufferGeometry=oc;l.CircleGeometry=nd;l.ClampToEdgeWrapping=1001;l.Clock=Ie;l.ClosedSplineCurve3=Yf;l.Color=B;l.ColorKeyframeTrack=
 Md;l.CompressedTexture=bc;l.CompressedTextureLoader=Mf;l.ConeBufferGeometry=md;l.ConeGeometry=ld;l.CubeCamera=Vb;l.CubeGeometry=Ub;l.CubeReflectionMapping=301;l.CubeRefractionMapping=302;l.CubeTexture=cb;l.CubeTextureLoader=ye;l.CubeUVReflectionMapping=306;l.CubeUVRefractionMapping=307;l.CubicBezierCurve=Ma;l.CubicBezierCurve3=$a;l.CubicInterpolant=Jd;l.CullFaceBack=1;l.CullFaceFront=2;l.CullFaceFrontBack=3;l.CullFaceNone=0;l.Curve=N;l.CurvePath=fb;l.CustomBlending=5;l.CylinderBufferGeometry=eb;l.CylinderGeometry=
 Jb;l.Cylindrical=Wf;l.DataTexture=Ab;l.DataTexture2DArray=Wb;l.DataTexture3D=Xb;l.DataTextureLoader=xe;l.DefaultLoadingManager=Aa;l.DepthFormat=1026;l.DepthStencilFormat=1027;l.DepthTexture=Uc;l.DirectionalLight=Vd;l.DirectionalLightHelper=Bc;l.DirectionalLightShadow=Ud;l.DiscreteInterpolant=Kd;l.DodecahedronBufferGeometry=gc;l.DodecahedronGeometry=$c;l.DoubleSide=2;l.DstAlphaFactor=206;l.DstColorFactor=208;l.DynamicBufferAttribute=function(a,b){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead.");
 return(new I(a,b)).setDynamic(!0)};l.EdgesGeometry=nc;l.EdgesHelper=function(a,b){console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.");return new R(new nc(a.geometry),new V({color:void 0!==b?b:16777215}))};l.EllipseCurve=Ba;l.EqualDepth=4;l.EquirectangularReflectionMapping=303;l.EquirectangularRefractionMapping=304;l.Euler=tb;l.EventDispatcher=na;l.ExtrudeBufferGeometry=Ya;l.ExtrudeGeometry=Gb;l.Face3=Tb;l.Face4=function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");
@@ -973,18 +973,18 @@ Fd;l.Font=Ee;l.FontLoader=Of;l.FrontFaceDirectionCCW=1;l.FrontFaceDirectionCW=0;
 return a.center()}};l.GreaterDepth=6;l.GreaterEqualDepth=5;l.GridHelper=ce;l.Group=Zb;l.HalfFloatType=1016;l.HemisphereLight=Qd;l.HemisphereLightHelper=yc;l.HemisphereLightProbe=Ge;l.IcosahedronBufferGeometry=fc;l.IcosahedronGeometry=Zc;l.ImageBitmapLoader=Ce;l.ImageLoader=qd;l.ImageUtils=sb;l.ImmediateRenderObject=vd;l.InstancedBufferAttribute=$d;l.InstancedBufferGeometry=Zd;l.InstancedInterleavedBuffer=Pe;l.Int16Attribute=function(a,b){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.");
 return new Hc(a,b)};l.Int16BufferAttribute=Hc;l.Int32Attribute=function(a,b){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.");return new Ic(a,b)};l.Int32BufferAttribute=Ic;l.Int8Attribute=function(a,b){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.");return new Ec(a,b)};l.Int8BufferAttribute=Ec;l.IntType=1013;l.InterleavedBuffer=Cb;l.InterleavedBufferAttribute=Pc;l.Interpolant=Ea;l.InterpolateDiscrete=
 2300;l.InterpolateLinear=2301;l.InterpolateSmooth=2302;l.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")};l.KeyframeTrack=sa;l.LOD=Rc;l.LatheBufferGeometry=mc;l.LatheGeometry=kd;l.Layers=ie;l.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")};l.LessDepth=2;l.LessEqualDepth=3;l.Light=Z;l.LightProbe=Ra;l.LightProbeHelper=zc;l.LightShadow=Rb;l.Line=T;l.Line3=Se;l.LineBasicMaterial=V;l.LineCurve=Ca;l.LineCurve3=Na;l.LineDashedMaterial=
-Qb;l.LineLoop=Id;l.LinePieces=1;l.LineSegments=R;l.LineStrip=0;l.LinearEncoding=3E3;l.LinearFilter=1006;l.LinearInterpolant=od;l.LinearMipMapLinearFilter=1008;l.LinearMipMapNearestFilter=1007;l.LinearToneMapping=1;l.Loader=ud;l.LoaderUtils=Ze;l.LoadingManager=we;l.LogLuvEncoding=3003;l.LoopOnce=2200;l.LoopPingPong=2202;l.LoopRepeat=2201;l.LuminanceAlphaFormat=1025;l.LuminanceFormat=1024;l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.Material=L;l.MaterialLoader=Yd;l.Math=P;l.Matrix3=ia;l.Matrix4=O;l.MaxEquation=
-104;l.Mesh=ra;l.MeshBasicMaterial=ka;l.MeshDepthMaterial=mb;l.MeshDistanceMaterial=nb;l.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};l.MeshLambertMaterial=Ob;l.MeshMatcapMaterial=Pb;l.MeshNormalMaterial=Nb;l.MeshPhongMaterial=Ka;l.MeshPhysicalMaterial=Lb;l.MeshStandardMaterial=Za;l.MeshToonMaterial=Mb;l.MinEquation=103;l.MirroredRepeatWrapping=1002;l.MixOperation=1;l.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");
-a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.MultiplyBlending=4;l.MultiplyOperation=0;l.NearestFilter=1003;l.NearestMipMapLinearFilter=1005;l.NearestMipMapNearestFilter=1004;l.NeverDepth=0;l.NoBlending=0;l.NoColors=0;l.NoToneMapping=0;l.NormalBlending=1;l.NotEqualDepth=7;l.NumberKeyframeTrack=qc;l.Object3D=G;l.ObjectLoader=Be;l.ObjectSpaceNormalMap=1;l.OctahedronBufferGeometry=Db;l.OctahedronGeometry=Yc;l.OneFactor=201;l.OneMinusDstAlphaFactor=207;l.OneMinusDstColorFactor=
-209;l.OneMinusSrcAlphaFactor=205;l.OneMinusSrcColorFactor=203;l.OrthographicCamera=td;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.ParametricBufferGeometry=dc;l.ParametricGeometry=Vc;l.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Qc(a)};l.ParticleBasicMaterial=function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};l.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");
-return new ac(a,b)};l.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};l.Path=Qa;l.PerspectiveCamera=ja;l.Plane=Wa;l.PlaneBufferGeometry=Bb;l.PlaneGeometry=Lc;l.PlaneHelper=Ad;l.PointCloud=function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new ac(a,b)};l.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};
-l.PointLight=Td;l.PointLightHelper=wc;l.Points=ac;l.PointsMaterial=Ja;l.PolarGridHelper=de;l.PolyhedronBufferGeometry=za;l.PolyhedronGeometry=Wc;l.PositionalAudio=Le;l.PositionalAudioHelper=Ac;l.PropertyBinding=qa;l.PropertyMixer=Ne;l.QuadraticBezierCurve=Oa;l.QuadraticBezierCurve3=ab;l.Quaternion=ea;l.QuaternionKeyframeTrack=pd;l.QuaternionLinearInterpolant=Nd;l.REVISION="106";l.RGBADepthPacking=3201;l.RGBAFormat=1023;l.RGBA_ASTC_10x10_Format=37819;l.RGBA_ASTC_10x5_Format=37816;l.RGBA_ASTC_10x6_Format=
-37817;l.RGBA_ASTC_10x8_Format=37818;l.RGBA_ASTC_12x10_Format=37820;l.RGBA_ASTC_12x12_Format=37821;l.RGBA_ASTC_4x4_Format=37808;l.RGBA_ASTC_5x4_Format=37809;l.RGBA_ASTC_5x5_Format=37810;l.RGBA_ASTC_6x5_Format=37811;l.RGBA_ASTC_6x6_Format=37812;l.RGBA_ASTC_8x5_Format=37813;l.RGBA_ASTC_8x6_Format=37814;l.RGBA_ASTC_8x8_Format=37815;l.RGBA_PVRTC_2BPPV1_Format=35843;l.RGBA_PVRTC_4BPPV1_Format=35842;l.RGBA_S3TC_DXT1_Format=33777;l.RGBA_S3TC_DXT3_Format=33778;l.RGBA_S3TC_DXT5_Format=33779;l.RGBDEncoding=
-3006;l.RGBEEncoding=3002;l.RGBEFormat=1023;l.RGBFormat=1022;l.RGBM16Encoding=3005;l.RGBM7Encoding=3004;l.RGB_ETC1_Format=36196;l.RGB_PVRTC_2BPPV1_Format=35841;l.RGB_PVRTC_4BPPV1_Format=35840;l.RGB_S3TC_DXT1_Format=33776;l.RawShaderMaterial=pc;l.Ray=ub;l.Raycaster=Tf;l.RectAreaLight=Xd;l.RectAreaLightHelper=xc;l.RedFormat=1028;l.ReinhardToneMapping=2;l.RepeatWrapping=1E3;l.ReverseSubtractEquation=102;l.RingBufferGeometry=lc;l.RingGeometry=jd;l.Scene=Dc;l.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},
-detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};l.ShaderChunk=U;l.ShaderLib=Xa;l.ShaderMaterial=va;l.ShadowMaterial=Kb;l.Shape=rb;l.ShapeBufferGeometry=Ib;l.ShapeGeometry=Hb;l.ShapePath=De;l.ShapeUtils=db;l.ShortType=1011;l.Skeleton=Hd;l.SkeletonHelper=vc;l.SkinnedMesh=Sc;l.SmoothShading=2;l.Sphere=Ua;l.SphereBufferGeometry=qb;l.SphereGeometry=
-id;l.Spherical=Vf;l.SphericalHarmonics3=ae;l.SphericalReflectionMapping=305;l.Spline=Ue;l.SplineCurve=Pa;l.SplineCurve3=Zf;l.SpotLight=Sd;l.SpotLightHelper=uc;l.SpotLightShadow=Rd;l.Sprite=Qc;l.SpriteMaterial=pb;l.SrcAlphaFactor=204;l.SrcAlphaSaturateFactor=210;l.SrcColorFactor=202;l.StereoCamera=Pf;l.StringKeyframeTrack=Od;l.SubtractEquation=101;l.SubtractiveBlending=3;l.TangentSpaceNormalMap=0;l.TetrahedronBufferGeometry=ec;l.TetrahedronGeometry=Xc;l.TextBufferGeometry=kc;l.TextGeometry=hd;l.Texture=
-X;l.TextureLoader=Pd;l.TorusBufferGeometry=ic;l.TorusGeometry=cd;l.TorusKnotBufferGeometry=hc;l.TorusKnotGeometry=bd;l.Triangle=ha;l.TriangleFanDrawMode=2;l.TriangleStripDrawMode=1;l.TrianglesDrawMode=0;l.TubeBufferGeometry=Eb;l.TubeGeometry=ad;l.UVMapping=300;l.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new vb(a,b)};l.Uint16BufferAttribute=vb;l.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");
-return new wb(a,b)};l.Uint32BufferAttribute=wb;l.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");return new Fc(a,b)};l.Uint8BufferAttribute=Fc;l.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Gc(a,b)};l.Uint8ClampedBufferAttribute=Gc;l.Uncharted2ToneMapping=3;l.Uniform=be;l.UniformsLib=J;l.UniformsUtils=
-xh;l.UnsignedByteType=1009;l.UnsignedInt248Type=1020;l.UnsignedIntType=1014;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedShortType=1012;l.Vector2=C;l.Vector3=n;l.Vector4=ba;l.VectorKeyframeTrack=rc;l.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};l.VertexColors=2;l.VertexNormalsHelper=wd;l.VideoTexture=te;l.WebGLMultisampleRenderTarget=he;l.WebGLRenderTarget=Ta;l.WebGLRenderTargetCube=
-kb;l.WebGLRenderer=re;l.WebGLUtils=xf;l.WireframeGeometry=cc;l.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");return new R(new cc(a.geometry),new V({color:void 0!==b?b:16777215}))};l.WrapAroundEnding=2402;l.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new La(a)};l.ZeroCurvatureEnding=2400;l.ZeroFactor=200;l.ZeroSlopeEnding=2401;l.sRGBEncoding=3001;Object.defineProperty(l,
-"__esModule",{value:!0})});
+Qb;l.LineLoop=Id;l.LinePieces=1;l.LineSegments=R;l.LineStrip=0;l.LinearEncoding=3E3;l.LinearFilter=1006;l.LinearInterpolant=od;l.LinearMipMapLinearFilter=1008;l.LinearMipMapNearestFilter=1007;l.LinearMipmapLinearFilter=1008;l.LinearMipmapNearestFilter=1007;l.LinearToneMapping=1;l.Loader=ud;l.LoaderUtils=Ze;l.LoadingManager=we;l.LogLuvEncoding=3003;l.LoopOnce=2200;l.LoopPingPong=2202;l.LoopRepeat=2201;l.LuminanceAlphaFormat=1025;l.LuminanceFormat=1024;l.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};l.Material=L;
+l.MaterialLoader=Yd;l.Math=P;l.Matrix3=ia;l.Matrix4=O;l.MaxEquation=104;l.Mesh=ra;l.MeshBasicMaterial=ka;l.MeshDepthMaterial=mb;l.MeshDistanceMaterial=nb;l.MeshFaceMaterial=function(a){console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead.");return a};l.MeshLambertMaterial=Ob;l.MeshMatcapMaterial=Pb;l.MeshNormalMaterial=Nb;l.MeshPhongMaterial=Ka;l.MeshPhysicalMaterial=Lb;l.MeshStandardMaterial=Za;l.MeshToonMaterial=Mb;l.MinEquation=103;l.MirroredRepeatWrapping=1002;l.MixOperation=
+1;l.MultiMaterial=function(a){void 0===a&&(a=[]);console.warn("THREE.MultiMaterial has been removed. Use an Array instead.");a.isMultiMaterial=!0;a.materials=a;a.clone=function(){return a.slice()};return a};l.MultiplyBlending=4;l.MultiplyOperation=0;l.NearestFilter=1003;l.NearestMipMapLinearFilter=1005;l.NearestMipMapNearestFilter=1004;l.NearestMipmapLinearFilter=1005;l.NearestMipmapNearestFilter=1004;l.NeverDepth=0;l.NoBlending=0;l.NoColors=0;l.NoToneMapping=0;l.NormalBlending=1;l.NotEqualDepth=
+7;l.NumberKeyframeTrack=qc;l.Object3D=G;l.ObjectLoader=Be;l.ObjectSpaceNormalMap=1;l.OctahedronBufferGeometry=Db;l.OctahedronGeometry=Yc;l.OneFactor=201;l.OneMinusDstAlphaFactor=207;l.OneMinusDstColorFactor=209;l.OneMinusSrcAlphaFactor=205;l.OneMinusSrcColorFactor=203;l.OrthographicCamera=td;l.PCFShadowMap=1;l.PCFSoftShadowMap=2;l.ParametricBufferGeometry=dc;l.ParametricGeometry=Vc;l.Particle=function(a){console.warn("THREE.Particle has been renamed to THREE.Sprite.");return new Qc(a)};l.ParticleBasicMaterial=
+function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};l.ParticleSystem=function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new ac(a,b)};l.ParticleSystemMaterial=function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};l.Path=Qa;l.PerspectiveCamera=ja;l.Plane=Wa;l.PlaneBufferGeometry=Bb;l.PlaneGeometry=Lc;l.PlaneHelper=Ad;l.PointCloud=function(a,
+b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new ac(a,b)};l.PointCloudMaterial=function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new Ja(a)};l.PointLight=Td;l.PointLightHelper=wc;l.Points=ac;l.PointsMaterial=Ja;l.PolarGridHelper=de;l.PolyhedronBufferGeometry=za;l.PolyhedronGeometry=Wc;l.PositionalAudio=Le;l.PositionalAudioHelper=Ac;l.PropertyBinding=qa;l.PropertyMixer=Ne;l.QuadraticBezierCurve=Oa;l.QuadraticBezierCurve3=
+ab;l.Quaternion=ea;l.QuaternionKeyframeTrack=pd;l.QuaternionLinearInterpolant=Nd;l.REVISION="107dev";l.RGBADepthPacking=3201;l.RGBAFormat=1023;l.RGBA_ASTC_10x10_Format=37819;l.RGBA_ASTC_10x5_Format=37816;l.RGBA_ASTC_10x6_Format=37817;l.RGBA_ASTC_10x8_Format=37818;l.RGBA_ASTC_12x10_Format=37820;l.RGBA_ASTC_12x12_Format=37821;l.RGBA_ASTC_4x4_Format=37808;l.RGBA_ASTC_5x4_Format=37809;l.RGBA_ASTC_5x5_Format=37810;l.RGBA_ASTC_6x5_Format=37811;l.RGBA_ASTC_6x6_Format=37812;l.RGBA_ASTC_8x5_Format=37813;l.RGBA_ASTC_8x6_Format=
+37814;l.RGBA_ASTC_8x8_Format=37815;l.RGBA_PVRTC_2BPPV1_Format=35843;l.RGBA_PVRTC_4BPPV1_Format=35842;l.RGBA_S3TC_DXT1_Format=33777;l.RGBA_S3TC_DXT3_Format=33778;l.RGBA_S3TC_DXT5_Format=33779;l.RGBDEncoding=3006;l.RGBEEncoding=3002;l.RGBEFormat=1023;l.RGBFormat=1022;l.RGBM16Encoding=3005;l.RGBM7Encoding=3004;l.RGB_ETC1_Format=36196;l.RGB_PVRTC_2BPPV1_Format=35841;l.RGB_PVRTC_4BPPV1_Format=35840;l.RGB_S3TC_DXT1_Format=33776;l.RawShaderMaterial=pc;l.Ray=ub;l.Raycaster=Tf;l.RectAreaLight=Xd;l.RectAreaLightHelper=
+xc;l.RedFormat=1028;l.ReinhardToneMapping=2;l.RepeatWrapping=1E3;l.ReverseSubtractEquation=102;l.RingBufferGeometry=lc;l.RingGeometry=jd;l.Scene=Dc;l.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}};l.ShaderChunk=
+U;l.ShaderLib=Xa;l.ShaderMaterial=va;l.ShadowMaterial=Kb;l.Shape=rb;l.ShapeBufferGeometry=Ib;l.ShapeGeometry=Hb;l.ShapePath=De;l.ShapeUtils=db;l.ShortType=1011;l.Skeleton=Hd;l.SkeletonHelper=vc;l.SkinnedMesh=Sc;l.SmoothShading=2;l.Sphere=Ua;l.SphereBufferGeometry=qb;l.SphereGeometry=id;l.Spherical=Vf;l.SphericalHarmonics3=ae;l.SphericalReflectionMapping=305;l.Spline=Ue;l.SplineCurve=Pa;l.SplineCurve3=Zf;l.SpotLight=Sd;l.SpotLightHelper=uc;l.SpotLightShadow=Rd;l.Sprite=Qc;l.SpriteMaterial=pb;l.SrcAlphaFactor=
+204;l.SrcAlphaSaturateFactor=210;l.SrcColorFactor=202;l.StereoCamera=Pf;l.StringKeyframeTrack=Od;l.SubtractEquation=101;l.SubtractiveBlending=3;l.TangentSpaceNormalMap=0;l.TetrahedronBufferGeometry=ec;l.TetrahedronGeometry=Xc;l.TextBufferGeometry=kc;l.TextGeometry=hd;l.Texture=X;l.TextureLoader=Pd;l.TorusBufferGeometry=ic;l.TorusGeometry=cd;l.TorusKnotBufferGeometry=hc;l.TorusKnotGeometry=bd;l.Triangle=ha;l.TriangleFanDrawMode=2;l.TriangleStripDrawMode=1;l.TrianglesDrawMode=0;l.TubeBufferGeometry=
+Eb;l.TubeGeometry=ad;l.UVMapping=300;l.Uint16Attribute=function(a,b){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.");return new vb(a,b)};l.Uint16BufferAttribute=vb;l.Uint32Attribute=function(a,b){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.");return new wb(a,b)};l.Uint32BufferAttribute=wb;l.Uint8Attribute=function(a,b){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.");
+return new Fc(a,b)};l.Uint8BufferAttribute=Fc;l.Uint8ClampedAttribute=function(a,b){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.");return new Gc(a,b)};l.Uint8ClampedBufferAttribute=Gc;l.Uncharted2ToneMapping=3;l.Uniform=be;l.UniformsLib=J;l.UniformsUtils=xh;l.UnsignedByteType=1009;l.UnsignedInt248Type=1020;l.UnsignedIntType=1014;l.UnsignedShort4444Type=1017;l.UnsignedShort5551Type=1018;l.UnsignedShort565Type=1019;l.UnsignedShortType=
+1012;l.Vector2=C;l.Vector3=n;l.Vector4=ba;l.VectorKeyframeTrack=rc;l.Vertex=function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");return new n(a,b,c)};l.VertexColors=2;l.VertexNormalsHelper=wd;l.VideoTexture=te;l.WebGLMultisampleRenderTarget=he;l.WebGLRenderTarget=Ta;l.WebGLRenderTargetCube=kb;l.WebGLRenderer=re;l.WebGLUtils=xf;l.WireframeGeometry=cc;l.WireframeHelper=function(a,b){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.");
+return new R(new cc(a.geometry),new V({color:void 0!==b?b:16777215}))};l.WrapAroundEnding=2402;l.XHRLoader=function(a){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader.");return new La(a)};l.ZeroCurvatureEnding=2400;l.ZeroFactor=200;l.ZeroSlopeEnding=2401;l.sRGBEncoding=3001;Object.defineProperty(l,"__esModule",{value:!0})});

文件差異過大導致無法顯示
+ 42 - 18
build/three.module.js


+ 17 - 0
docs/api/en/objects/Points.html

@@ -54,6 +54,17 @@
 			Default is a [page:PointsMaterial] with a random color.
 		</p>
 
+		<h3>[property:Array morphTargetInfluences]</h3>
+		<p>
+		An array of weights typically from 0-1 that specify how much of the morph is applied.
+		Undefined by default, but reset to a blank array by [page:Points.updateMorphTargets updateMorphTargets].
+		</p>
+
+		<h3>[property:Object morphTargetDictionary]</h3>
+		<p>
+		A dictionary of morphTargets based on the morphTarget.name property.
+		Undefined by default, but rebuilt [page:Points.updateMorphTargets updateMorphTargets].
+		</p>
 
 		<h2>Methods</h2>
 		<p>See the base [page:Object3D] class for common methods.</p>
@@ -69,6 +80,12 @@
 		Returns a clone of this Points object and its descendants.
 		</p>
 
+		<h3>[method:null updateMorphTargets]()</h3>
+		<p>
+		Updates the morphTargets to have no influence on the object. Resets the
+		[page:Points.morphTargetInfluences morphTargetInfluences] and
+		[page:Points.morphTargetDictionary morphTargetDictionary] properties.
+		</p>
 
 		<h2>Source</h2>
 

+ 3 - 3
docs/api/en/renderers/WebGLRenderer.html

@@ -354,7 +354,7 @@
 		<h3>[method:Integer getActiveCubeFace]()</h3>
 		<p>Returns the current active cube face.</p>
 
-		<h3>[method:Integer getActiveMipMapLevel]()</h3>
+		<h3>[method:Integer getActiveMipmapLevel]()</h3>
 		<p>Returns the current active mipmap level.</p>
 
 		<h3>[method:RenderTarget getRenderTarget]()</h3>
@@ -446,11 +446,11 @@
 		<h3>[method:null setPixelRatio]( [param:number value] )</h3>
 		<p>Sets device pixel ratio. This is usually used for HiDPI device to prevent bluring output canvas.</p>
 
-		<h3>[method:null setRenderTarget]( [param:WebGLRenderTarget renderTarget], [param:Integer activeCubeFace], [param:Integer activeMipMapLevel] )</h3>
+		<h3>[method:null setRenderTarget]( [param:WebGLRenderTarget renderTarget], [param:Integer activeCubeFace], [param:Integer activeMipmapLevel] )</h3>
 		<p>
 		renderTarget -- The [page:WebGLRenderTarget renderTarget] that needs to be activated. When *null* is given, the canvas is set as the active render target instead.<br />
 		activeCubeFace -- Specifies the active cube side (PX 0, NX 1, PY 2, NY 3, PZ 4, NZ 5) of [page:WebGLRenderTargetCube] (optional).<br />
-		activeMipMapLevel -- Specifies the active mipmap level (optional).<br /><br />
+		activeMipmapLevel -- Specifies the active mipmap level (optional).<br /><br />
 		This method sets the active rendertarget.
 		</p>
 

+ 16 - 0
docs/api/zh/objects/Points.html

@@ -50,6 +50,17 @@
 		[page:Material]的实例。定义了物体的外观。默认值是一个具有随机颜色的[page:PointsMaterial]。
 	</p>
 
+	<h3>[property:Array morphTargetInfluences]</h3>
+	<p>
+		一个包含有权重(值一般在0-1范围内)的数组,指定应用了多少变形。
+		默认情况下是未定义的,但是会被[page:Points.updateMorphTargets updateMorphTargets]重置为一个空数组。
+	</p>
+
+	<h3>[property:Object morphTargetDictionary]</h3>
+	<p>
+		基于morphTarget.name属性的morphTargets字典。
+		默认情况下是未定义的,但是会被[page:Points.updateMorphTargets updateMorphTargets]重建。
+	</p>
 
 	<h2>方法</h2>
 	<p>请参阅其基类[page:Object3D]来查看共有方法。</p>
@@ -65,6 +76,11 @@
 		返回这个点及其子集的一个克隆对象。
 	</p>
 
+	<h3>[method:null updateMorphTargets]()</h3>
+	<p>
+		更新morphTargets,使其不对对象产生影响,重置[page:Points.morphTargetInfluences morphTargetInfluences] and
+		[page:Points.morphTargetDictionary morphTargetDictionary]属性。
+	</p>
 
 	<h2>源代码</h2>
 

+ 2 - 2
docs/manual/en/introduction/How-to-use-WebGL2.html

@@ -22,11 +22,11 @@
 
 	<p>
 		Since WebGL 2 is not supported by all devices that support WebGL 1, it's important to check the respective availability.
-		To do so, please include [link:https://github.com/mrdoob/three.js/blob/master/examples/js/WebGL.js WebGL.js] into your project.
+		To do so, please include [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js WebGL.js] into your project.
 	</p>
 
 	<code>
-&lt;script src="/path/to/WebGL.js"&gt;&lt;/script&gt;
+import { WEBGL } from 'three/examples/jsm/WebGL.js';
 	</code>
 
 	<p>

+ 1 - 1
docs/manual/en/introduction/WebGL-compatibility-check.html

@@ -15,7 +15,7 @@
 		</p>
 
 		<p>
-			Add	[link:https://github.com/mrdoob/three.js/blob/master/examples/js/WebGL.js]
+			Add	[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js]
 			to your javascript and run the following before attempting to render anything.
 		</p>
 

+ 2 - 2
docs/manual/zh/introduction/How-to-use-WebGL2.html

@@ -21,11 +21,11 @@
 
 	<p>
 		由于WebGL 2并不被所有支持WebGL 1的设备所支持,因此检查各种设备上WebGL 2的可用性是非常重要的。
-		要对其可用性进行检查,请将[link:https://github.com/mrdoob/three.js/blob/master/examples/js/WebGL.js WebGL.js]包含到你的项目中。
+		要对其可用性进行检查,请将[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js WebGL.js]包含到你的项目中。
 	</p>
 
 	<code>
-&lt;script src="/path/to/WebGL.js"&gt;&lt;/script&gt;
+import { WEBGL } from 'three/examples/jsm/WebGL.js';
 	</code>
 
 	<p>

+ 1 - 1
docs/manual/zh/introduction/WebGL-compatibility-check.html

@@ -14,7 +14,7 @@
 		</p>
 
 		<p>
-			请将[link:https://github.com/mrdoob/three.js/blob/master/examples/js/WebGL.js]引入到你的文件,并在尝试开始渲染之前先运行该文件。
+			请将[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/WebGL.js]引入到你的文件,并在尝试开始渲染之前先运行该文件。
         	</p>
 
 <code>

+ 1 - 1
examples/js/WebGL.js

@@ -3,7 +3,7 @@
  * @author mr.doob / http://mrdoob.com/
  */
 
-var WEBGL = {
+THREE.WEBGL = {
 
 	isWebGLAvailable: function () {
 

+ 19 - 1
examples/js/controls/OrthographicTrackballControls.js

@@ -485,7 +485,25 @@ THREE.OrthographicTrackballControls = function ( object, domElement ) {
 		event.preventDefault();
 		event.stopPropagation();
 
-		_zoomStart.y += event.deltaY * 0.01;
+		switch ( event.deltaMode ) {
+
+			case 2:
+				// Zoom in pages
+				_zoomStart.y -= event.deltaY * 0.025;
+				break;
+
+			case 1:
+				// Zoom in lines
+				_zoomStart.y -= event.deltaY * 0.01;
+				break;
+
+			default:
+				// undefined, 0, assume pixels
+				_zoomStart.y -= event.deltaY * 0.00025;
+				break;
+
+		}
+
 		_this.dispatchEvent( startEvent );
 		_this.dispatchEvent( endEvent );
 

+ 38 - 17
examples/js/controls/TrackballControls.js

@@ -35,6 +35,8 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 	this.keys = [ 65 /*A*/, 83 /*S*/, 68 /*D*/ ];
 
+	this.mouseButtons = { ROTATE: THREE.MOUSE.LEFT, ZOOM: THREE.MOUSE.MIDDLE, PAN: THREE.MOUSE.RIGHT };
+
 	// internals
 
 	this.target = new THREE.Vector3();
@@ -44,7 +46,7 @@ THREE.TrackballControls = function ( object, domElement ) {
 	var lastPosition = new THREE.Vector3();
 
 	var _state = STATE.NONE,
-		_prevState = STATE.NONE,
+		_keyState = STATE.NONE,
 
 		_eye = new THREE.Vector3(),
 
@@ -324,7 +326,7 @@ THREE.TrackballControls = function ( object, domElement ) {
 	this.reset = function () {
 
 		_state = STATE.NONE;
-		_prevState = STATE.NONE;
+		_keyState = STATE.NONE;
 
 		_this.target.copy( _this.target0 );
 		_this.object.position.copy( _this.position0 );
@@ -348,33 +350,31 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 		window.removeEventListener( 'keydown', keydown );
 
-		_prevState = _state;
-
-		if ( _state !== STATE.NONE ) {
+		if ( _keyState !== STATE.NONE ) {
 
 			return;
 
 		} else if ( event.keyCode === _this.keys[ STATE.ROTATE ] && ! _this.noRotate ) {
 
-			_state = STATE.ROTATE;
+			_keyState = STATE.ROTATE;
 
 		} else if ( event.keyCode === _this.keys[ STATE.ZOOM ] && ! _this.noZoom ) {
 
-			_state = STATE.ZOOM;
+			_keyState = STATE.ZOOM;
 
 		} else if ( event.keyCode === _this.keys[ STATE.PAN ] && ! _this.noPan ) {
 
-			_state = STATE.PAN;
+			_keyState = STATE.PAN;
 
 		}
 
 	}
 
-	function keyup( event ) {
+	function keyup() {
 
 		if ( _this.enabled === false ) return;
 
-		_state = _prevState;
+		_keyState = STATE.NONE;
 
 		window.addEventListener( 'keydown', keydown, false );
 
@@ -389,21 +389,40 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 		if ( _state === STATE.NONE ) {
 
-			_state = event.button;
+			switch ( event.button ) {
+
+				case _this.mouseButtons.ROTATE:
+					_state = STATE.ROTATE;
+					break;
+
+				case _this.mouseButtons.ZOOM:
+					_state = STATE.ZOOM;
+					break;
+
+				case _this.mouseButtons.PAN:
+					_state = STATE.PAN;
+					break;
+
+				default:
+					_state = STATE.NONE;
+
+			}
 
 		}
 
-		if ( _state === STATE.ROTATE && ! _this.noRotate ) {
+		var state = ( _keyState !== STATE.NONE ) ? _keyState : _state;
+
+		if ( state === STATE.ROTATE && ! _this.noRotate ) {
 
 			_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );
 			_movePrev.copy( _moveCurr );
 
-		} else if ( _state === STATE.ZOOM && ! _this.noZoom ) {
+		} else if ( state === STATE.ZOOM && ! _this.noZoom ) {
 
 			_zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 			_zoomEnd.copy( _zoomStart );
 
-		} else if ( _state === STATE.PAN && ! _this.noPan ) {
+		} else if ( state === STATE.PAN && ! _this.noPan ) {
 
 			_panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 			_panEnd.copy( _panStart );
@@ -424,16 +443,18 @@ THREE.TrackballControls = function ( object, domElement ) {
 		event.preventDefault();
 		event.stopPropagation();
 
-		if ( _state === STATE.ROTATE && ! _this.noRotate ) {
+		var state = ( _keyState !== STATE.NONE ) ? _keyState : _state;
+
+		if ( state === STATE.ROTATE && ! _this.noRotate ) {
 
 			_movePrev.copy( _moveCurr );
 			_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );
 
-		} else if ( _state === STATE.ZOOM && ! _this.noZoom ) {
+		} else if ( state === STATE.ZOOM && ! _this.noZoom ) {
 
 			_zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 
-		} else if ( _state === STATE.PAN && ! _this.noPan ) {
+		} else if ( state === STATE.PAN && ! _this.noPan ) {
 
 			_panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 

+ 2 - 2
examples/js/controls/TransformControls.js

@@ -598,7 +598,7 @@ THREE.TransformControls = function ( camera, domElement ) {
 
 	}
 
-	// TODO: depricate
+	// TODO: deprecate
 
 	this.getMode = function () {
 
@@ -638,7 +638,7 @@ THREE.TransformControls = function ( camera, domElement ) {
 
 	this.update = function () {
 
-		console.warn( 'THREE.TransformControls: update function has been depricated.' );
+		console.warn( 'THREE.TransformControls: update function has no more functionality and therefore has been deprecated.' );
 
 	};
 

+ 0 - 2
examples/js/exporters/GLTFExporter.js

@@ -2224,8 +2224,6 @@ THREE.GLTFExporter.Utils = {
 
 			}
 
-			var mergedKeyframeIndex = 0;
-			var sourceKeyframeIndex = 0;
 			var sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );
 
 			mergedTrack = mergedTracks[ sourceTrackNode.uuid ];

+ 3 - 3
examples/js/geometries/LightningStrike.js

@@ -532,7 +532,7 @@ THREE.LightningStrike.prototype.fillMesh = function ( time ) {
 
 };
 
-THREE.LightningStrike.prototype.addNewSubray = function ( rayParameters ) {
+THREE.LightningStrike.prototype.addNewSubray = function ( /*rayParameters*/ ) {
 
 	return this.subrays[ this.numSubrays ++ ];
 
@@ -784,7 +784,7 @@ THREE.LightningStrike.prototype.createTriangleVerticesWithUVs = function ( pos,
 
 };
 
-THREE.LightningStrike.prototype.createPrismFaces = function ( vertex, index ) {
+THREE.LightningStrike.prototype.createPrismFaces = function ( vertex/*, index*/ ) {
 
 	var indices = this.indices;
 	var vertex = this.currentVertex - 6;
@@ -831,7 +831,7 @@ THREE.LightningStrike.prototype.createDefaultSubrayCreationCallbacks = function
 		var childSubraySeed = random1() * ( currentCycle + 1 );
 
 		var isActive = phase % period <= dutyCycle * period;
-		
+
 		var probability = 0;
 
 		if ( isActive ) {

+ 22 - 9
examples/js/interactive/SelectionBox.js

@@ -8,6 +8,18 @@ THREE.SelectionBox = ( function () {
 	var frustum = new THREE.Frustum();
 	var center = new THREE.Vector3();
 
+	var tmpPoint = new THREE.Vector3();
+
+	var vecNear = new THREE.Vector3();
+	var vecTopLeft = new THREE.Vector3();
+	var vecTopRight = new THREE.Vector3();
+	var vecDownRight = new THREE.Vector3();
+	var vecDownLeft = new THREE.Vector3();
+
+	var vectemp1 = new THREE.Vector3();
+	var vectemp2 = new THREE.Vector3();
+	var vectemp3 = new THREE.Vector3();
+
 	function SelectionBox( camera, scene, deep ) {
 
 		this.camera = camera;
@@ -40,25 +52,26 @@ THREE.SelectionBox = ( function () {
 		this.camera.updateProjectionMatrix();
 		this.camera.updateMatrixWorld();
 
-		var tmpPoint = startPoint.clone();
+		tmpPoint.copy( startPoint );
 		tmpPoint.x = Math.min( startPoint.x, endPoint.x );
 		tmpPoint.y = Math.max( startPoint.y, endPoint.y );
 		endPoint.x = Math.max( startPoint.x, endPoint.x );
 		endPoint.y = Math.min( startPoint.y, endPoint.y );
 
-		var vecNear = this.camera.position.clone();
-		var vecTopLeft = tmpPoint.clone();
-		var vecTopRight = new THREE.Vector3( endPoint.x, tmpPoint.y, 0 );
-		var vecDownRight = endPoint.clone();
-		var vecDownLeft = new THREE.Vector3( tmpPoint.x, endPoint.y, 0 );
+		vecNear.copy( this.camera.position );
+		vecTopLeft.copy( tmpPoint );
+		vecTopRight.set( endPoint.x, tmpPoint.y, 0 );
+		vecDownRight.copy( endPoint );
+		vecDownLeft.set( tmpPoint.x, endPoint.y, 0 );
+
 		vecTopLeft.unproject( this.camera );
 		vecTopRight.unproject( this.camera );
 		vecDownRight.unproject( this.camera );
 		vecDownLeft.unproject( this.camera );
 
-		var vectemp1 = vecTopLeft.clone().sub( vecNear );
-		var vectemp2 = vecTopRight.clone().sub( vecNear );
-		var vectemp3 = vecDownRight.clone().sub( vecNear );
+		vectemp1.copy( vecTopLeft ).sub( vecNear );
+		vectemp2.copy( vecTopRight ).sub( vecNear );
+		vectemp3.copy( vecDownRight ).sub( vecNear );
 		vectemp1.normalize();
 		vectemp2.normalize();
 		vectemp3.normalize();

文件差異過大導致無法顯示
+ 12 - 0
examples/js/libs/dat.gui.min.js


+ 5 - 0
examples/js/libs/stats.min.js

@@ -0,0 +1,5 @@
+// stats.js - http://github.com/mrdoob/stats.js
+var Stats=function(){function h(a){c.appendChild(a.dom);return a}function k(a){for(var d=0;d<c.children.length;d++)c.children[d].style.display=d===a?"block":"none";l=a}var l=0,c=document.createElement("div");c.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000";c.addEventListener("click",function(a){a.preventDefault();k(++l%c.children.length)},!1);var g=(performance||Date).now(),e=g,a=0,r=h(new Stats.Panel("FPS","#0ff","#002")),f=h(new Stats.Panel("MS","#0f0","#020"));
+if(self.performance&&self.performance.memory)var t=h(new Stats.Panel("MB","#f08","#201"));k(0);return{REVISION:16,dom:c,addPanel:h,showPanel:k,begin:function(){g=(performance||Date).now()},end:function(){a++;var c=(performance||Date).now();f.update(c-g,200);if(c>e+1E3&&(r.update(1E3*a/(c-e),100),e=c,a=0,t)){var d=performance.memory;t.update(d.usedJSHeapSize/1048576,d.jsHeapSizeLimit/1048576)}return c},update:function(){g=this.end()},domElement:c,setMode:k}};
+Stats.Panel=function(h,k,l){var c=Infinity,g=0,e=Math.round,a=e(window.devicePixelRatio||1),r=80*a,f=48*a,t=3*a,u=2*a,d=3*a,m=15*a,n=74*a,p=30*a,q=document.createElement("canvas");q.width=r;q.height=f;q.style.cssText="width:80px;height:48px";var b=q.getContext("2d");b.font="bold "+9*a+"px Helvetica,Arial,sans-serif";b.textBaseline="top";b.fillStyle=l;b.fillRect(0,0,r,f);b.fillStyle=k;b.fillText(h,t,u);b.fillRect(d,m,n,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d,m,n,p);return{dom:q,update:function(f,
+v){c=Math.min(c,f);g=Math.max(g,f);b.fillStyle=l;b.globalAlpha=1;b.fillRect(0,0,r,m);b.fillStyle=k;b.fillText(e(f)+" "+h+" ("+e(c)+"-"+e(g)+")",t,u);b.drawImage(q,d+a,m,n-a,p,d,m,n-a,p);b.fillRect(d+n-a,m,a,p);b.fillStyle=l;b.globalAlpha=.9;b.fillRect(d+n-a,m,a,e((1-f/v)*p))}}};"object"===typeof module&&(module.exports=Stats);

+ 9 - 1
examples/js/loaders/EXRLoader.js

@@ -82,13 +82,21 @@ THREE.EXRLoader = function ( manager ) {
 
 THREE.EXRLoader.prototype = Object.create( THREE.DataTextureLoader.prototype );
 
-THREE.EXRLoader.prototype.setType = function ( value ) {
+THREE.EXRLoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
 	return this;
 
 };
 
+THREE.EXRLoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.EXRLoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};
+
 THREE.EXRLoader.prototype._parser = function ( buffer ) {
 
 	const USHORT_RANGE = ( 1 << 16 );

+ 12 - 4
examples/js/loaders/HDRCubeTextureLoader.js

@@ -15,9 +15,9 @@ THREE.HDRCubeTextureLoader.prototype.load = function ( urls, onLoad, onProgress,
 
 	if ( ! Array.isArray( urls ) ) {
 
-		console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setType() instead.' );
+		console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setDataType() instead.' );
 
-		this.setType( urls );
+		this.setDataType( urls );
 
 		urls = onLoad;
 		onLoad = onProgress;
@@ -121,10 +121,18 @@ THREE.HDRCubeTextureLoader.prototype.setPath = function ( value ) {
 
 };
 
-THREE.HDRCubeTextureLoader.prototype.setType = function ( value ) {
+THREE.HDRCubeTextureLoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
-	this.hdrLoader.setType( value );
+	this.hdrLoader.setDataType( value );
 	return this;
 
 };
+
+THREE.HDRCubeTextureLoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.HDRCubeTextureLoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};

+ 0 - 2
examples/js/loaders/LDrawLoader.js

@@ -1045,8 +1045,6 @@ THREE.LDrawLoader = ( function () {
 			// Retrieve data from the parent parse scope
 			var parentParseScope = this.getParentParseScope();
 
-			var isRoot = ! parentParseScope.isFromParse;
-
 			// Main colour codes passed to this subobject (or default codes 16 and 24 if it is the root object)
 			var mainColourCode = parentParseScope.mainColourCode;
 			var mainEdgeColourCode = parentParseScope.mainEdgeColourCode;

+ 9 - 1
examples/js/loaders/RGBELoader.js

@@ -470,13 +470,21 @@ THREE.RGBELoader.prototype._parser = function ( buffer ) {
 
 };
 
-THREE.RGBELoader.prototype.setType = function ( value ) {
+THREE.RGBELoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
 	return this;
 
 };
 
+THREE.RGBELoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.RGBELoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};
+
 THREE.RGBELoader.prototype.load = function ( url, onLoad, onProgress, onError ) {
 
 	function onLoadCallback( texture, texData ) {

+ 6 - 12
examples/js/loaders/SVGLoader.js

@@ -881,19 +881,15 @@ THREE.SVGLoader.prototype = {
 
 			var transform = parseNodeTransform( node );
 
-			if ( transform ) {
-
-				if ( transformStack.length > 0 ) {
+			if ( transformStack.length > 0 ) {
 
-					transform.premultiply( transformStack[ transformStack.length - 1 ] );
-
-				}
-
-				currentTransform.copy( transform );
-				transformStack.push( transform );
+				transform.premultiply( transformStack[ transformStack.length - 1 ] );
 
 			}
 
+			currentTransform.copy( transform );
+			transformStack.push( transform );
+
 			return transform;
 
 		}
@@ -1178,11 +1174,10 @@ THREE.SVGLoader.prototype = {
 
 };
 
-THREE.SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap, miterLimit ) {
+THREE.SVGLoader.getStrokeStyle = function ( width, color, lineJoin, lineCap, miterLimit ) {
 
 	// Param width: Stroke width
 	// Param color: As returned by THREE.Color.getStyle()
-	// Param opacity: 0 (transparent) to 1 (opaque)
 	// Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
 	// Param lineCap: One of "round", "square" or "butt"
 	// Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
@@ -1190,7 +1185,6 @@ THREE.SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lin
 
 	width = width !== undefined ? width : 1;
 	color = color !== undefined ? color : '#000';
-	opacity = opacity !== undefined ? opacity : 1;
 	lineJoin = lineJoin !== undefined ? lineJoin : 'miter';
 	lineCap = lineCap !== undefined ? lineCap : 'butt';
 	miterLimit = miterLimit !== undefined ? miterLimit : 4;

+ 0 - 2
examples/js/utils/SkeletonUtils.js

@@ -2,8 +2,6 @@
  * @author sunag / http://www.sunag.com.br
  */
 
-'use strict';
-
 THREE.SkeletonUtils = {
 
 	retarget: function () {

+ 0 - 21
examples/js/vr/WebVR.js

@@ -218,27 +218,6 @@ var WEBVR = {
 
 		}
 
-	},
-
-	// DEPRECATED
-
-	checkAvailability: function () {
-		console.warn( 'WEBVR.checkAvailability has been deprecated.' );
-		return new Promise( function () {} );
-	},
-
-	getMessageContainer: function () {
-		console.warn( 'WEBVR.getMessageContainer has been deprecated.' );
-		return document.createElement( 'div' );
-	},
-
-	getButton: function () {
-		console.warn( 'WEBVR.getButton has been deprecated.' );
-		return document.createElement( 'div' );
-	},
-
-	getVRDisplay: function () {
-		console.warn( 'WEBVR.getVRDisplay has been deprecated.' );
 	}
 
 };

+ 9 - 0
examples/jsm/WebGL.d.ts

@@ -0,0 +1,9 @@
+export namespace WEBGL {
+
+  export function isWebGLAvailable(): boolean;
+  export function isWebGL2Available(): boolean;
+  export function getWebGLErrorMessage(): HTMLElement;
+  export function getWebGL2ErrorMessage(): HTMLElement;
+  export function getErrorMessage(version: number): HTMLElement;
+
+}

+ 98 - 0
examples/jsm/WebGL.js

@@ -0,0 +1,98 @@
+/**
+ * @author alteredq / http://alteredqualia.com/
+ * @author mr.doob / http://mrdoob.com/
+ */
+
+
+
+var WEBGL = {
+
+	isWebGLAvailable: function () {
+
+		try {
+
+			var canvas = document.createElement( 'canvas' );
+			return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) );
+
+		} catch ( e ) {
+
+			return false;
+
+		}
+
+	},
+
+	isWebGL2Available: function () {
+
+		try {
+
+			var canvas = document.createElement( 'canvas' );
+			return !! ( window.WebGL2RenderingContext && canvas.getContext( 'webgl2' ) );
+
+		} catch ( e ) {
+
+			return false;
+
+		}
+
+	},
+
+	getWebGLErrorMessage: function () {
+
+		return this.getErrorMessage( 1 );
+
+	},
+
+	getWebGL2ErrorMessage: function () {
+
+		return this.getErrorMessage( 2 );
+
+	},
+
+	getErrorMessage: function ( version ) {
+
+		var names = {
+			1: 'WebGL',
+			2: 'WebGL 2'
+		};
+
+		var contexts = {
+			1: window.WebGLRenderingContext,
+			2: window.WebGL2RenderingContext
+		};
+
+		var message = 'Your $0 does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">$1</a>';
+
+		var element = document.createElement( 'div' );
+		element.id = 'webglmessage';
+		element.style.fontFamily = 'monospace';
+		element.style.fontSize = '13px';
+		element.style.fontWeight = 'normal';
+		element.style.textAlign = 'center';
+		element.style.background = '#fff';
+		element.style.color = '#000';
+		element.style.padding = '1.5em';
+		element.style.width = '400px';
+		element.style.margin = '5em auto 0';
+
+		if ( contexts[ version ] ) {
+
+			message = message.replace( '$0', 'graphics card' );
+
+		} else {
+
+			message = message.replace( '$0', 'browser' );
+
+		}
+
+		message = message.replace( '$1', names[ version ] );
+
+		element.innerHTML = message;
+
+		return element;
+
+	}
+
+};
+
+export { WEBGL };

+ 19 - 1
examples/jsm/controls/OrthographicTrackballControls.js

@@ -492,7 +492,25 @@ var OrthographicTrackballControls = function ( object, domElement ) {
 		event.preventDefault();
 		event.stopPropagation();
 
-		_zoomStart.y += event.deltaY * 0.01;
+		switch ( event.deltaMode ) {
+
+			case 2:
+				// Zoom in pages
+				_zoomStart.y -= event.deltaY * 0.025;
+				break;
+
+			case 1:
+				// Zoom in lines
+				_zoomStart.y -= event.deltaY * 0.01;
+				break;
+
+			default:
+				// undefined, 0, assume pixels
+				_zoomStart.y -= event.deltaY * 0.00025;
+				break;
+
+		}
+
 		_this.dispatchEvent( startEvent );
 		_this.dispatchEvent( endEvent );
 

+ 39 - 17
examples/jsm/controls/TrackballControls.js

@@ -7,6 +7,7 @@
 
 import {
 	EventDispatcher,
+	MOUSE,
 	Quaternion,
 	Vector2,
 	Vector3
@@ -42,6 +43,8 @@ var TrackballControls = function ( object, domElement ) {
 
 	this.keys = [ 65 /*A*/, 83 /*S*/, 68 /*D*/ ];
 
+	this.mouseButtons = { ROTATE: MOUSE.LEFT, ZOOM: MOUSE.MIDDLE, PAN: MOUSE.RIGHT };
+
 	// internals
 
 	this.target = new Vector3();
@@ -51,7 +54,7 @@ var TrackballControls = function ( object, domElement ) {
 	var lastPosition = new Vector3();
 
 	var _state = STATE.NONE,
-		_prevState = STATE.NONE,
+		_keyState = STATE.NONE,
 
 		_eye = new Vector3(),
 
@@ -331,7 +334,7 @@ var TrackballControls = function ( object, domElement ) {
 	this.reset = function () {
 
 		_state = STATE.NONE;
-		_prevState = STATE.NONE;
+		_keyState = STATE.NONE;
 
 		_this.target.copy( _this.target0 );
 		_this.object.position.copy( _this.position0 );
@@ -355,33 +358,31 @@ var TrackballControls = function ( object, domElement ) {
 
 		window.removeEventListener( 'keydown', keydown );
 
-		_prevState = _state;
-
-		if ( _state !== STATE.NONE ) {
+		if ( _keyState !== STATE.NONE ) {
 
 			return;
 
 		} else if ( event.keyCode === _this.keys[ STATE.ROTATE ] && ! _this.noRotate ) {
 
-			_state = STATE.ROTATE;
+			_keyState = STATE.ROTATE;
 
 		} else if ( event.keyCode === _this.keys[ STATE.ZOOM ] && ! _this.noZoom ) {
 
-			_state = STATE.ZOOM;
+			_keyState = STATE.ZOOM;
 
 		} else if ( event.keyCode === _this.keys[ STATE.PAN ] && ! _this.noPan ) {
 
-			_state = STATE.PAN;
+			_keyState = STATE.PAN;
 
 		}
 
 	}
 
-	function keyup( event ) {
+	function keyup() {
 
 		if ( _this.enabled === false ) return;
 
-		_state = _prevState;
+		_keyState = STATE.NONE;
 
 		window.addEventListener( 'keydown', keydown, false );
 
@@ -396,21 +397,40 @@ var TrackballControls = function ( object, domElement ) {
 
 		if ( _state === STATE.NONE ) {
 
-			_state = event.button;
+			switch ( event.button ) {
+
+				case _this.mouseButtons.ROTATE:
+					_state = STATE.ROTATE;
+					break;
+
+				case _this.mouseButtons.ZOOM:
+					_state = STATE.ZOOM;
+					break;
+
+				case _this.mouseButtons.PAN:
+					_state = STATE.PAN;
+					break;
+
+				default:
+					_state = STATE.NONE;
+
+			}
 
 		}
 
-		if ( _state === STATE.ROTATE && ! _this.noRotate ) {
+		var state = ( _keyState !== STATE.NONE ) ? _keyState : _state;
+
+		if ( state === STATE.ROTATE && ! _this.noRotate ) {
 
 			_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );
 			_movePrev.copy( _moveCurr );
 
-		} else if ( _state === STATE.ZOOM && ! _this.noZoom ) {
+		} else if ( state === STATE.ZOOM && ! _this.noZoom ) {
 
 			_zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 			_zoomEnd.copy( _zoomStart );
 
-		} else if ( _state === STATE.PAN && ! _this.noPan ) {
+		} else if ( state === STATE.PAN && ! _this.noPan ) {
 
 			_panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 			_panEnd.copy( _panStart );
@@ -431,16 +451,18 @@ var TrackballControls = function ( object, domElement ) {
 		event.preventDefault();
 		event.stopPropagation();
 
-		if ( _state === STATE.ROTATE && ! _this.noRotate ) {
+		var state = ( _keyState !== STATE.NONE ) ? _keyState : _state;
+
+		if ( state === STATE.ROTATE && ! _this.noRotate ) {
 
 			_movePrev.copy( _moveCurr );
 			_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );
 
-		} else if ( _state === STATE.ZOOM && ! _this.noZoom ) {
+		} else if ( state === STATE.ZOOM && ! _this.noZoom ) {
 
 			_zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 
-		} else if ( _state === STATE.PAN && ! _this.noPan ) {
+		} else if ( state === STATE.PAN && ! _this.noPan ) {
 
 			_panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );
 

+ 2 - 2
examples/jsm/controls/TransformControls.js

@@ -623,7 +623,7 @@ var TransformControls = function ( camera, domElement ) {
 
 	}
 
-	// TODO: depricate
+	// TODO: deprecate
 
 	this.getMode = function () {
 
@@ -663,7 +663,7 @@ var TransformControls = function ( camera, domElement ) {
 
 	this.update = function () {
 
-		console.warn( 'THREE.TransformControls: update function has been depricated.' );
+		console.warn( 'THREE.TransformControls: update function has no more functionality and therefore has been deprecated.' );
 
 	};
 

+ 0 - 2
examples/jsm/exporters/GLTFExporter.js

@@ -2248,8 +2248,6 @@ GLTFExporter.Utils = {
 
 			}
 
-			var mergedKeyframeIndex = 0;
-			var sourceKeyframeIndex = 0;
 			var sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) );
 
 			mergedTrack = mergedTracks[ sourceTrackNode.uuid ];

+ 4 - 5
examples/jsm/geometries/LightningStrike.js

@@ -7,7 +7,7 @@
  * Usage
  *
  * var myRay = new LightningStrike( paramsObject );
- * var myRayMesh = new Mesh( myRay, myMaterial );
+ * var myRayMesh = new THREE.Mesh( myRay, myMaterial );
  * scene.add( myRayMesh );
  * ...
  * myRay.update( currentTime );
@@ -105,7 +105,6 @@ import {
 	BufferGeometry,
 	Float32BufferAttribute,
 	Math as _Math,
-	Mesh,
 	Uint32BufferAttribute,
 	Vector3
 } from "../../../build/three.module.js";
@@ -542,7 +541,7 @@ LightningStrike.prototype.fillMesh = function ( time ) {
 
 };
 
-LightningStrike.prototype.addNewSubray = function ( rayParameters ) {
+LightningStrike.prototype.addNewSubray = function ( /*rayParameters*/ ) {
 
 	return this.subrays[ this.numSubrays ++ ];
 
@@ -794,7 +793,7 @@ LightningStrike.prototype.createTriangleVerticesWithUVs = function ( pos, up, fo
 
 };
 
-LightningStrike.prototype.createPrismFaces = function ( vertex, index ) {
+LightningStrike.prototype.createPrismFaces = function ( vertex/*, index*/ ) {
 
 	var indices = this.indices;
 	var vertex = this.currentVertex - 6;
@@ -841,7 +840,7 @@ LightningStrike.prototype.createDefaultSubrayCreationCallbacks = function () {
 		var childSubraySeed = random1() * ( currentCycle + 1 );
 
 		var isActive = phase % period <= dutyCycle * period;
-		
+
 		var probability = 0;
 
 		if ( isActive ) {

+ 22 - 9
examples/jsm/interactive/SelectionBox.js

@@ -13,6 +13,18 @@ var SelectionBox = ( function () {
 	var frustum = new Frustum();
 	var center = new Vector3();
 
+	var tmpPoint = new Vector3();
+
+	var vecNear = new Vector3();
+	var vecTopLeft = new Vector3();
+	var vecTopRight = new Vector3();
+	var vecDownRight = new Vector3();
+	var vecDownLeft = new Vector3();
+
+	var vectemp1 = new Vector3();
+	var vectemp2 = new Vector3();
+	var vectemp3 = new Vector3();
+
 	function SelectionBox( camera, scene, deep ) {
 
 		this.camera = camera;
@@ -45,25 +57,26 @@ var SelectionBox = ( function () {
 		this.camera.updateProjectionMatrix();
 		this.camera.updateMatrixWorld();
 
-		var tmpPoint = startPoint.clone();
+		tmpPoint.copy( startPoint );
 		tmpPoint.x = Math.min( startPoint.x, endPoint.x );
 		tmpPoint.y = Math.max( startPoint.y, endPoint.y );
 		endPoint.x = Math.max( startPoint.x, endPoint.x );
 		endPoint.y = Math.min( startPoint.y, endPoint.y );
 
-		var vecNear = this.camera.position.clone();
-		var vecTopLeft = tmpPoint.clone();
-		var vecTopRight = new Vector3( endPoint.x, tmpPoint.y, 0 );
-		var vecDownRight = endPoint.clone();
-		var vecDownLeft = new Vector3( tmpPoint.x, endPoint.y, 0 );
+		vecNear.copy( this.camera.position );
+		vecTopLeft.copy( tmpPoint );
+		vecTopRight.set( endPoint.x, tmpPoint.y, 0 );
+		vecDownRight.copy( endPoint );
+		vecDownLeft.set( tmpPoint.x, endPoint.y, 0 );
+
 		vecTopLeft.unproject( this.camera );
 		vecTopRight.unproject( this.camera );
 		vecDownRight.unproject( this.camera );
 		vecDownLeft.unproject( this.camera );
 
-		var vectemp1 = vecTopLeft.clone().sub( vecNear );
-		var vectemp2 = vecTopRight.clone().sub( vecNear );
-		var vectemp3 = vecDownRight.clone().sub( vecNear );
+		vectemp1.copy( vecTopLeft ).sub( vecNear );
+		vectemp2.copy( vecTopRight ).sub( vecNear );
+		vectemp3.copy( vecDownRight ).sub( vecNear );
 		vectemp1.normalize();
 		vectemp2.normalize();
 		vectemp3.normalize();

+ 1 - 1
examples/jsm/loaders/EXRLoader.d.ts

@@ -19,5 +19,5 @@ export class EXRLoader extends DataTextureLoader {
   type: TextureDataType;
 
   _parser(buffer: ArrayBuffer) : EXR;
-  setType(type: TextureDataType): this;
+  setDataType(type: TextureDataType): this;
 }

+ 9 - 1
examples/jsm/loaders/EXRLoader.js

@@ -91,13 +91,21 @@ var EXRLoader = function ( manager ) {
 
 EXRLoader.prototype = Object.create( DataTextureLoader.prototype );
 
-EXRLoader.prototype.setType = function ( value ) {
+EXRLoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
 	return this;
 
 };
 
+EXRLoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.EXRLoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};
+
 EXRLoader.prototype._parser = function ( buffer ) {
 
 	const USHORT_RANGE = ( 1 << 16 );

+ 1 - 1
examples/jsm/loaders/HDRCubeTextureLoader.d.ts

@@ -15,5 +15,5 @@ export class HDRCubeTextureLoader {
 
   load(url: string, onLoad: (texture: CubeTexture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
   setPath(value: string): this;
-  setType(type: TextureDataType): this;
+  setDataType(type: TextureDataType): this;
 }

+ 12 - 4
examples/jsm/loaders/HDRCubeTextureLoader.js

@@ -32,9 +32,9 @@ HDRCubeTextureLoader.prototype.load = function ( urls, onLoad, onProgress, onErr
 
 	if ( ! Array.isArray( urls ) ) {
 
-		console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setType() instead.' );
+		console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setDataType() instead.' );
 
-		this.setType( urls );
+		this.setDataType( urls );
 
 		urls = onLoad;
 		onLoad = onProgress;
@@ -138,12 +138,20 @@ HDRCubeTextureLoader.prototype.setPath = function ( value ) {
 
 };
 
-HDRCubeTextureLoader.prototype.setType = function ( value ) {
+HDRCubeTextureLoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
-	this.hdrLoader.setType( value );
+	this.hdrLoader.setDataType( value );
 	return this;
 
 };
 
+HDRCubeTextureLoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.HDRCubeTextureLoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};
+
 export { HDRCubeTextureLoader };

+ 0 - 2
examples/jsm/loaders/LDrawLoader.js

@@ -1063,8 +1063,6 @@ var LDrawLoader = ( function () {
 			// Retrieve data from the parent parse scope
 			var parentParseScope = this.getParentParseScope();
 
-			var isRoot = ! parentParseScope.isFromParse;
-
 			// Main colour codes passed to this subobject (or default codes 16 and 24 if it is the root object)
 			var mainColourCode = parentParseScope.mainColourCode;
 			var mainEdgeColourCode = parentParseScope.mainEdgeColourCode;

+ 1 - 1
examples/jsm/loaders/MMDLoader.d.ts

@@ -28,7 +28,7 @@ export class MMDLoader {
   loadPMX(url: string, onLoad: (object: object) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
   loadVMD(url: string, onLoad: (object: object) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
   loadVPD(url: string, onLoad: (object: object) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
-  loadWithAnimation(url: string, onLoad: (object: MMDLoaderAnimationObject) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
+  loadWithAnimation(url: string, vmdUrl: string | string[], onLoad: (object: MMDLoaderAnimationObject) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
   setAnimationPath(animationPath: string): this;
   setCrossOrigin(crossOrigin: string): this;
   setPath(path: string): this;

+ 45 - 0
examples/jsm/loaders/OBJLoader2.d.ts

@@ -0,0 +1,45 @@
+import {
+  LoadingManager,
+  Group
+} from '../../../src/Three';
+
+import { MaterialHandler } from './obj2/shared/MaterialHandler';
+import { MeshReceiver} from './obj2/shared/MeshReceiver';
+
+export class OBJLoader2 {
+  constructor(manager?: LoadingManager);
+  manager: LoadingManager;
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+  modelName: string;
+  instanceNo: number;
+  path: string;
+  resourcePath: string;
+  useIndices: boolean;
+  disregardNormals: boolean;
+  materialPerSmoothingGroup: boolean;
+  useOAsMesh: boolean;
+  baseObject3d: Group;
+  callbacks: {
+    onParseProgress: Function;
+    genericErrorHandler: Function;
+  };
+  materialHandler: MaterialHandler;
+  meshReceiver: MeshReceiver;
+
+  addMaterials(materials: object): void;
+  load(url: string, onLoad: (group: Group) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void, onMeshAlter?: (meshData: object) => void): void;
+  parse(content: ArrayBuffer | string): void;
+  setLogging(enabled: boolean, debug: boolean): this;
+  setModelName(modelName: string): this;
+  setPath(path: string): this;
+  setResourcePath(path: string): this;
+  setBaseObject3d(baseObject3d: Object3D): this;
+  setUseIndices(useIndices: boolean): this;
+  setDisregardNormals(disregardNormals: boolean): this;
+  setMaterialPerSmoothingGroup(materialPerSmoothingGroup: boolean): this;
+  setUseOAsMesh(useOAsMesh: boolean): this;
+  setGenericErrorHandler(genericErrorHandler: Function): void;
+}

+ 48 - 2
examples/jsm/loaders/OBJLoader2.js

@@ -20,6 +20,7 @@ import { MaterialHandler } from "./obj2/shared/MaterialHandler.js";
  * @param {DefaultLoadingManager} [manager] The loadingManager for the loader to use. Default is {@link DefaultLoadingManager}
  */
 const OBJLoader2 = function ( manager ) {
+
 	this.manager = ( manager !== undefined && manager !== null ) ? manager : DefaultLoadingManager;
 	this.logging = {
 		enabled: true,
@@ -43,6 +44,7 @@ const OBJLoader2 = function ( manager ) {
 
 	this.materialHandler = new MaterialHandler();
 	this.meshReceiver = new MeshReceiver( this.materialHandler );
+
 };
 OBJLoader2.OBJLOADER2_VERSION = '3.0.0-beta2';
 console.info( 'Using OBJLoader2 version: ' + OBJLoader2.OBJLOADER2_VERSION );
@@ -58,9 +60,11 @@ OBJLoader2.prototype = {
 	 * @param {boolean} debug True or false.
 	 */
 	setLogging: function ( enabled, debug ) {
+
 		this.logging.enabled = enabled === true;
 		this.logging.debug = debug === true;
 		return this;
+
 	},
 
 	/**
@@ -69,8 +73,10 @@ OBJLoader2.prototype = {
 	 * @param {string} modelName
 	 */
 	setModelName: function ( modelName ) {
+
 		this.modelName = modelName ? modelName : this.modelName;
 		return this;
+
 	},
 
 	/**
@@ -79,8 +85,10 @@ OBJLoader2.prototype = {
 	 * @param {string} path URL
 	 */
 	setPath: function ( path ) {
+
 		this.path = path ? path : this.path;
 		return this;
+
 	},
 
 
@@ -89,7 +97,9 @@ OBJLoader2.prototype = {
 	 * @param {string} resourcePath
 	 */
 	setResourcePath: function ( resourcePath ) {
+
 		this.resourcePath = resourcePath ? resourcePath : this.resourcePath;
+
 	},
 
 	/**
@@ -98,8 +108,10 @@ OBJLoader2.prototype = {
 	 * @param {Object3D} baseObject3d Object already attached to scenegraph where new meshes will be attached to
 	 */
 	setBaseObject3d: function ( baseObject3d ) {
+
 		this.baseObject3d = ( baseObject3d === undefined || baseObject3d === null ) ? this.baseObject3d : baseObject3d;
 		return this;
+
 	},
 
 	/**
@@ -108,7 +120,9 @@ OBJLoader2.prototype = {
 	 * @param materials Object with named {@link Material}
 	 */
 	addMaterials: function ( materials ) {
+
 		this.materialHandler.addMaterials( materials );
+
 	},
 
 	/**
@@ -117,8 +131,10 @@ OBJLoader2.prototype = {
 	 * @param {boolean} useIndices=false
 	 */
 	setUseIndices: function ( useIndices ) {
+
 		this.useIndices = useIndices === true;
 		return this;
+
 	},
 
 	/**
@@ -127,8 +143,10 @@ OBJLoader2.prototype = {
 	 * @param {boolean} disregardNormals=false
 	 */
 	setDisregardNormals: function ( disregardNormals ) {
+
 		this.disregardNormals = disregardNormals === true;
 		return this;
+
 	},
 
 	/**
@@ -137,8 +155,10 @@ OBJLoader2.prototype = {
 	 * @param {boolean} materialPerSmoothingGroup=false
 	 */
 	setMaterialPerSmoothingGroup: function ( materialPerSmoothingGroup ) {
+
 		this.materialPerSmoothingGroup = materialPerSmoothingGroup === true;
 		return this;
+
 	},
 
 	/**
@@ -147,8 +167,10 @@ OBJLoader2.prototype = {
 	 * @param {boolean} useOAsMesh=false
 	 */
 	setUseOAsMesh: function ( useOAsMesh ) {
+
 		this.useOAsMesh = useOAsMesh === true;
 		return this;
+
 	},
 
 	/**
@@ -156,11 +178,13 @@ OBJLoader2.prototype = {
 	 * @param {Function} genericErrorHandler
 	 */
 	setGenericErrorHandler: function ( genericErrorHandler ) {
+
 		if ( genericErrorHandler !== undefined && genericErrorHandler !== null ) {
 
 			this.callbacks.genericErrorHandler = genericErrorHandler;
 
 		}
+
 	},
 
 	/**
@@ -173,6 +197,7 @@ OBJLoader2.prototype = {
 	 * @private
 	 */
 	_setCallbacks: function ( onParseProgress, onMeshAlter, onLoadMaterials ) {
+
 		if ( onParseProgress !== undefined && onParseProgress !== null ) {
 
 			this.callbacks.onParseProgress = onParseProgress;
@@ -180,6 +205,7 @@ OBJLoader2.prototype = {
 		}
 		this.meshReceiver._setCallbacks( onParseProgress, onMeshAlter );
 		this.materialHandler._setCallbacks( onLoadMaterials );
+
 	},
 
 	/**
@@ -191,6 +217,7 @@ OBJLoader2.prototype = {
 	 * @param {number} numericalValue Numerical value describing the progress
 	 */
 	_onProgress: function ( type, text, numericalValue ) {
+
 		let message = text ? text : '';
 		let event = {
 			detail: {
@@ -211,6 +238,7 @@ OBJLoader2.prototype = {
 			console.log( message );
 
 		}
+
 	},
 
 	/**
@@ -220,6 +248,7 @@ OBJLoader2.prototype = {
 	 * @param {String} errorMessage The event containing the error
 	 */
 	_onError: function ( errorMessage ) {
+
 		if ( this.callbacks.genericErrorHandler ) {
 
 			this.callbacks.genericErrorHandler( errorMessage );
@@ -243,6 +272,7 @@ OBJLoader2.prototype = {
 	 * @param {function} [onMeshAlter] Called after worker successfully delivered a single mesh
 	 */
 	load: function ( url, onLoad, onFileLoadProgress, onError, onMeshAlter ) {
+
 		let scope = this;
 		if ( onError === null || onError === undefined ) {
 
@@ -279,27 +309,32 @@ OBJLoader2.prototype = {
 			let numericalValueRef = 0;
 			let numericalValue = 0;
 			onFileLoadProgress = function ( event ) {
+
 				if ( ! event.lengthComputable ) return;
 
 				numericalValue = event.loaded / event.total;
 				if ( numericalValue > numericalValueRef ) {
 
 					numericalValueRef = numericalValue;
-					let output = 'Download of "' + url + '": ' + (numericalValue * 100).toFixed( 2 ) + '%';
+					let output = 'Download of "' + url + '": ' + ( numericalValue * 100 ).toFixed( 2 ) + '%';
 					scope._onProgress( 'progressLoad', output, numericalValue );
 
 				}
+
 			};
 
 		}
 		this._setCallbacks( null, onMeshAlter, null );
 		let fileLoaderOnLoad = function ( content ) {
+
 			onLoad( scope.parse( content ) );
+
 		};
 		let fileLoader = new FileLoader( this.manager );
 		fileLoader.setPath( this.path || this.resourcePath );
 		fileLoader.setResponseType( 'arraybuffer' );
 		fileLoader.load( filename, fileLoaderOnLoad, onFileLoadProgress, onError );
+
 	},
 
 	/**
@@ -308,6 +343,7 @@ OBJLoader2.prototype = {
 	 * @param {arraybuffer|string} content OBJ data as Uint8Array or String
 	 */
 	parse: function ( content ) {
+
 		// fast-fail in case of illegal data
 		if ( content === null || content === undefined ) {
 
@@ -330,13 +366,19 @@ OBJLoader2.prototype = {
 
 		let scope = this;
 		let scopedOnAssetAvailable = function ( payload ) {
+
 			scope._onAssetAvailable( payload );
+
 		};
 		let onProgressScoped = function ( text, numericalValue ) {
+
 			scope._onProgress( 'progressParse', text, numericalValue );
+
 		};
 		let onErrorScoped = function ( message ) {
+
 			scope._onError( message );
+
 		};
 		parser.setCallbackOnAssetAvailable( scopedOnAssetAvailable );
 		parser.setCallbackOnProgress( onProgressScoped );
@@ -346,7 +388,7 @@ OBJLoader2.prototype = {
 			if ( this.logging.enabled ) console.info( 'Parsing arrayBuffer...' );
 			parser.parse( content );
 
-		} else if ( typeof( content ) === 'string' || content instanceof String ) {
+		} else if ( typeof ( content ) === 'string' || content instanceof String ) {
 
 			if ( this.logging.enabled ) console.info( 'Parsing text...' );
 			parser.parseText( content );
@@ -362,6 +404,7 @@ OBJLoader2.prototype = {
 
 		}
 		return this.baseObject3d;
+
 	},
 
 	_onAssetAvailable: function ( payload ) {
@@ -372,7 +415,9 @@ OBJLoader2.prototype = {
 
 			let meshes = this.meshReceiver.buildMeshes( payload );
 			for ( let mesh of meshes ) {
+
 				this.baseObject3d.add( mesh );
+
 			}
 
 		} else if ( payload.type === 'material' ) {
@@ -380,6 +425,7 @@ OBJLoader2.prototype = {
 			this.materialHandler.addPayloadMaterials( payload );
 
 		}
+
 	}
 };
 

+ 19 - 0
examples/jsm/loaders/OBJLoader2Parallel.d.ts

@@ -0,0 +1,19 @@
+import {
+  LoadingManager
+} from '../../../src/Three';
+import { OBJLoader2 } from './OBJLoader2.js';
+
+import { WorkerExecutionSupport} from './obj2/worker/main/WorkerExecutionSupport';
+
+export class OBJLoader2Parallel extends OBJLoader2 {
+  constructor(manager?: LoadingManager);
+  preferJsmWorker: boolean;
+	executeParallel: boolean;
+	workerExecutionSupport: WorkerExecutionSupport;
+
+  setPreferJsmWorker(preferJsmWorker: boolean): this;
+  setCallbackOnParseComplete(onParseComplete: Function): this;
+  setExecuteParallel(executeParallel: boolean): this;
+  getWorkerExecutionSupport(): object;
+  buildWorkerCode(): object;
+}

+ 28 - 4
examples/jsm/loaders/OBJLoader2Parallel.js

@@ -27,12 +27,14 @@ import {
  * @constructor
  */
 const OBJLoader2Parallel = function ( manager ) {
+
 	OBJLoader2.call( this, manager );
 	this.preferJsmWorker = false;
 
 	this.callbacks.onParseComplete = null;
 	this.executeParallel = true;
 	this.workerExecutionSupport = new WorkerExecutionSupport();
+
 };
 OBJLoader2Parallel.prototype = Object.create( OBJLoader2.prototype );
 OBJLoader2Parallel.prototype.constructor = OBJLoader2Parallel;
@@ -42,8 +44,10 @@ console.info( 'Using OBJLoader2Parallel version: ' + OBJLoader2.OBJLOADER2_PARAL
 
 
 OBJLoader2Parallel.prototype.setPreferJsmWorker = function ( preferJsmWorker ) {
+
 	this.preferJsmWorker = preferJsmWorker === true;
 	return this;
+
 };
 
 /**
@@ -53,10 +57,14 @@ OBJLoader2Parallel.prototype.setPreferJsmWorker = function ( preferJsmWorker ) {
  * @return {OBJLoader2Parallel}
  */
 OBJLoader2Parallel.prototype.setCallbackOnParseComplete = function ( onParseComplete ) {
+
 	if ( onParseComplete !== undefined && onParseComplete !== null ) {
+
 		this.callbacks.onParseComplete = onParseComplete;
+
 	}
 	return this;
+
 };
 
 /**
@@ -66,8 +74,10 @@ OBJLoader2Parallel.prototype.setCallbackOnParseComplete = function ( onParseComp
  * @return {OBJLoader2Parallel}
  */
 OBJLoader2Parallel.prototype.setExecuteParallel = function ( executeParallel ) {
+
 	this.executeParallel = executeParallel === true;
 	return this;
+
 };
 
 /**
@@ -76,7 +86,9 @@ OBJLoader2Parallel.prototype.setExecuteParallel = function ( executeParallel ) {
  * @return {WorkerExecutionSupport|WorkerExecutionSupport}
  */
 OBJLoader2Parallel.prototype.getWorkerExecutionSupport = function () {
+
 	return this.workerExecutionSupport;
+
 };
 
 /**
@@ -85,6 +97,7 @@ OBJLoader2Parallel.prototype.getWorkerExecutionSupport = function () {
  * @return {CodeBuilderInstructions}
  */
 OBJLoader2Parallel.prototype.buildWorkerCode = function () {
+
 	let codeBuilderInstructions = new CodeBuilderInstructions( true, true, this.preferJsmWorker );
 	if ( codeBuilderInstructions.isSupportsJsmWorker() ) {
 
@@ -104,19 +117,23 @@ OBJLoader2Parallel.prototype.buildWorkerCode = function () {
 		codeBuilderInstructions.addCodeFragment( codeWorkerRunner );
 
 		// allows to include full libraries as importScripts
-//		codeBuilderInstructions.addLibraryImport( '../../node_modules/three/build/three.js' );
+		//		codeBuilderInstructions.addLibraryImport( '../../node_modules/three/build/three.js' );
 		codeBuilderInstructions.addStartCode( 'new WorkerRunner( new DefaultWorkerPayloadHandler( new OBJLoader2Parser() ) );' );
 
 	}
 	return codeBuilderInstructions;
+
 };
 
 /**
  * @private
  */
 OBJLoader2Parallel.prototype._configure = function () {
+
 	if ( this.callbacks.onParseComplete === null ) {
+
 		throw "No callbackOnLoad was provided! Aborting!";
+
 	}
 	// check if worker is already available and if so, then fast-fail
 	if ( this.workerExecutionSupport.isWorkerLoaded( this.preferJsmWorker ) ) return;
@@ -125,10 +142,13 @@ OBJLoader2Parallel.prototype._configure = function () {
 
 	let scope = this;
 	let scopedOnAssetAvailable = function ( payload ) {
+
 		scope._onAssetAvailable( payload );
+
 	};
 
 	this.workerExecutionSupport.updateCallbacks( scopedOnAssetAvailable, this.callbacks.onParseComplete );
+
 };
 
 /**
@@ -141,10 +161,12 @@ OBJLoader2Parallel.prototype._configure = function () {
  * @param {function} [onError] A function to be called if an error occurs during loading. The function receives the error as an argument.
  * @param {function} [onMeshAlter] Called after worker successfully delivered a single mesh
  */
-OBJLoader2Parallel.prototype.load = function( content, onLoad, onFileLoadProgress, onError, onMeshAlter ) {
+OBJLoader2Parallel.prototype.load = function ( content, onLoad, onFileLoadProgress, onError, onMeshAlter ) {
+
 	this.setCallbackOnParseComplete( onLoad );
 
 	OBJLoader2.prototype.load.call( this, content, function () {}, onFileLoadProgress, onError, onMeshAlter );
+
 };
 
 /**
@@ -152,7 +174,8 @@ OBJLoader2Parallel.prototype.load = function( content, onLoad, onFileLoadProgres
  *
  * @param {arraybuffer} content OBJ data as Uint8Array or String
  */
-OBJLoader2Parallel.prototype.parse = function( content ) {
+OBJLoader2Parallel.prototype.parse = function ( content ) {
+
 	if ( this.executeParallel ) {
 
 		this._configure();
@@ -183,6 +206,7 @@ OBJLoader2Parallel.prototype.parse = function( content ) {
 		this.callbacks.onParseComplete( OBJLoader2.prototype.parse.call( this, content ) );
 
 	}
+
 };
 
-export { OBJLoader2Parallel }
+export { OBJLoader2Parallel };

+ 1 - 1
examples/jsm/loaders/RGBELoader.d.ts

@@ -21,5 +21,5 @@ export class RGBELoader extends DataTextureLoader {
   type: TextureDataType;
 
   _parser(buffer: ArrayBuffer): RGBE;
-  setType(type: TextureDataType): this;
+  setDataType(type: TextureDataType): this;
 }

+ 9 - 1
examples/jsm/loaders/RGBELoader.js

@@ -484,13 +484,21 @@ RGBELoader.prototype._parser = function ( buffer ) {
 
 };
 
-RGBELoader.prototype.setType = function ( value ) {
+RGBELoader.prototype.setDataType = function ( value ) {
 
 	this.type = value;
 	return this;
 
 };
 
+RGBELoader.prototype.setType = function ( value ) {
+
+	console.warn( 'THREE.RGBELoader: .setType() has been renamed to .setDataType().' );
+
+	return this.setDataType( value );
+
+};
+
 RGBELoader.prototype.load = function ( url, onLoad, onProgress, onError ) {
 
 	function onLoadCallback( texture, texData ) {

+ 1 - 1
examples/jsm/loaders/SVGLoader.d.ts

@@ -28,7 +28,7 @@ export class SVGLoader {
 
   parse(text: string) : SVGResult;
 
-  static getStrokeStyle(width: number, color: string, opacity: number, lineJoin: string, lineCap: string, miterLimit: number): StrokeStyle;
+  static getStrokeStyle(width: number, color: string, lineJoin: string, lineCap: string, miterLimit: number): StrokeStyle;
   static pointsToStroke(points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number ): BufferGeometry;
   static pointsToStrokeWithBuffers(points: Vector3[], style: StrokeStyle, arcDivisions: number, minDistance: number, vertices: number[], normals: number[], uvs: number[], vertexOffset: number): number;
 }

+ 6 - 12
examples/jsm/loaders/SVGLoader.js

@@ -894,19 +894,15 @@ SVGLoader.prototype = {
 
 			var transform = parseNodeTransform( node );
 
-			if ( transform ) {
-
-				if ( transformStack.length > 0 ) {
+			if ( transformStack.length > 0 ) {
 
-					transform.premultiply( transformStack[ transformStack.length - 1 ] );
-
-				}
-
-				currentTransform.copy( transform );
-				transformStack.push( transform );
+				transform.premultiply( transformStack[ transformStack.length - 1 ] );
 
 			}
 
+			currentTransform.copy( transform );
+			transformStack.push( transform );
+
 			return transform;
 
 		}
@@ -1191,11 +1187,10 @@ SVGLoader.prototype = {
 
 };
 
-SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap, miterLimit ) {
+SVGLoader.getStrokeStyle = function ( width, color, lineJoin, lineCap, miterLimit ) {
 
 	// Param width: Stroke width
 	// Param color: As returned by Color.getStyle()
-	// Param opacity: 0 (transparent) to 1 (opaque)
 	// Param lineJoin: One of "round", "bevel", "miter" or "miter-limit"
 	// Param lineCap: One of "round", "square" or "butt"
 	// Param miterLimit: Maximum join length, in multiples of the "width" parameter (join is truncated if it exceeds that distance)
@@ -1203,7 +1198,6 @@ SVGLoader.getStrokeStyle = function ( width, color, opacity, lineJoin, lineCap,
 
 	width = width !== undefined ? width : 1;
 	color = color !== undefined ? color : '#000';
-	opacity = opacity !== undefined ? opacity : 1;
 	lineJoin = lineJoin !== undefined ? lineJoin : 'miter';
 	lineCap = lineCap !== undefined ? lineCap : 'butt';
 	miterLimit = miterLimit !== undefined ? miterLimit : 4;

+ 4 - 0
examples/jsm/loaders/obj2/bridge/MtlObjBridge.d.ts

@@ -0,0 +1,4 @@
+export namespace MtlObjBridge {
+  export function link(processResult: object, assetLoader: object): void;
+  export function addMaterialsFromMtlLoader(materialCreator: object): void;
+}

+ 6 - 2
examples/jsm/loaders/obj2/bridge/MtlObjBridge.js

@@ -13,12 +13,14 @@ const MtlObjBridge = {
 	 * @param processResult
 	 * @param assetLoader
 	 */
-	link: function( processResult, assetLoader ) {
+	link: function ( processResult, assetLoader ) {
+
 		if ( typeof assetLoader.addMaterials === 'function' ) {
 
 			assetLoader.addMaterials( this.addMaterialsFromMtlLoader( processResult ) );
 
 		}
+
 	},
 
 	/**
@@ -27,6 +29,7 @@ const MtlObjBridge = {
 	 * @param Instance of {@link MTLLoader.MaterialCreator}
 	 */
 	addMaterialsFromMtlLoader: function ( materialCreator ) {
+
 		let newMaterials = {};
 		if ( materialCreator instanceof MTLLoader.MaterialCreator ) {
 
@@ -35,7 +38,8 @@ const MtlObjBridge = {
 
 		}
 		return newMaterials;
+
 	}
 };
 
-export { MtlObjBridge }
+export { MtlObjBridge };

+ 22 - 0
examples/jsm/loaders/obj2/shared/MaterialHandler.d.ts

@@ -0,0 +1,22 @@
+import {
+  Material
+} from '../../../../../src/Three';
+
+export class MaterialHandler {
+  constructor();
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+  callbacks: {
+    onLoadMaterials: Function;
+  };
+  materials: object;
+
+  addMaterials(materials: object, newMaterials: object): object;
+  addPayloadMaterials(materialPayload: object): object;
+  setLogging(enabled: boolean, debug: boolean): void;
+  getMaterials(): object;
+  getMaterial(materialName: string): Material;
+  getMaterialsJSON(): object;
+}

+ 23 - 2
examples/jsm/loaders/obj2/shared/MaterialHandler.js

@@ -13,6 +13,7 @@ import {
 
 
 const MaterialHandler = function () {
+
 	this.logging = {
 		enabled: true,
 		debug: false
@@ -23,6 +24,7 @@ const MaterialHandler = function () {
 	};
 	this.materials = {};
 	this._createDefaultMaterials();
+
 };
 
 MaterialHandler.prototype = {
@@ -36,19 +38,24 @@ MaterialHandler.prototype = {
 	 * @param {boolean} debug True or false.
 	 */
 	setLogging:	function ( enabled, debug ) {
+
 		this.logging.enabled = enabled === true;
 		this.logging.debug = debug === true;
+
 	},
 
 	_setCallbacks: function ( onLoadMaterials ) {
+
 		if ( onLoadMaterials !== undefined && onLoadMaterials !== null ) {
 
 			this.callbacks.onLoadMaterials = onLoadMaterials;
 
 		}
+
 	},
 
 	_createDefaultMaterials: function () {
+
 		let defaultMaterial = new MeshStandardMaterial( { color: 0xDCF1FF } );
 		defaultMaterial.name = 'defaultMaterial';
 
@@ -69,6 +76,7 @@ MaterialHandler.prototype = {
 		runtimeMaterials[ defaultPointMaterial.name ] = defaultPointMaterial;
 
 		this.addMaterials( runtimeMaterials );
+
 	},
 
 	/**
@@ -78,6 +86,7 @@ MaterialHandler.prototype = {
 	 * @returns {Object} Map of {@link Material}
 	 */
 	addPayloadMaterials: function ( materialPayload ) {
+
 		let material, materialName;
 		let materialCloneInstructions = materialPayload.materials.materialCloneInstructions;
 		let newMaterials = {};
@@ -85,9 +94,10 @@ MaterialHandler.prototype = {
 		if ( materialCloneInstructions !== undefined && materialCloneInstructions !== null ) {
 
 			let materialNameOrg = materialCloneInstructions.materialNameOrg;
-			materialNameOrg = (materialNameOrg !== undefined && materialNameOrg !== null) ? materialNameOrg : "";
+			materialNameOrg = ( materialNameOrg !== undefined && materialNameOrg !== null ) ? materialNameOrg : "";
 			let materialOrg = this.materials[ materialNameOrg ];
 			if ( materialOrg ) {
+
 				material = materialOrg.clone();
 
 				materialName = materialCloneInstructions.materialName;
@@ -111,6 +121,7 @@ MaterialHandler.prototype = {
 				console.info( 'Requested material "' + materialNameOrg + '" is not available!' );
 
 			}
+
 		}
 
 		let materials = materialPayload.materials.serializedMaterials;
@@ -137,6 +148,7 @@ MaterialHandler.prototype = {
 		newMaterials = this.addMaterials( materials, newMaterials );
 
 		return newMaterials;
+
 	},
 
 	/**
@@ -146,6 +158,7 @@ MaterialHandler.prototype = {
 	 * @param newMaterials [Object] with named {@link Material}
 	 */
 	addMaterials: function ( materials, newMaterials ) {
+
 		if ( newMaterials === undefined || newMaterials === null ) {
 
 			newMaterials = {};
@@ -165,6 +178,7 @@ MaterialHandler.prototype = {
 
 		}
 		return newMaterials;
+
 	},
 
 	/**
@@ -173,7 +187,9 @@ MaterialHandler.prototype = {
 	 * @returns {Object} Map of {@link Material}
 	 */
 	getMaterials: function () {
+
 		return this.materials;
+
 	},
 
 	/**
@@ -182,7 +198,9 @@ MaterialHandler.prototype = {
 	 * @returns {Material}
 	 */
 	getMaterial: function ( materialName ) {
+
 		return this.materials[ materialName ];
+
 	},
 
 	/**
@@ -191,17 +209,20 @@ MaterialHandler.prototype = {
 	 * @returns {Object} Map of Materials in JSON representation
 	 */
 	getMaterialsJSON: function () {
+
 		let materialsJSON = {};
 		let material;
 		for ( let materialName in this.materials ) {
 
 			material = this.materials[ materialName ];
 			materialsJSON[ materialName ] = material.toJSON();
+
 		}
 
 		return materialsJSON;
+
 	}
 
 };
 
-export { MaterialHandler }
+export { MaterialHandler };

+ 22 - 0
examples/jsm/loaders/obj2/shared/MeshReceiver.d.ts

@@ -0,0 +1,22 @@
+import {
+  Mesh
+} from '../../../../../src/Three';
+
+import { MaterialHandler } from './MaterialHandler'
+
+export class MeshReceiver {
+  constructor(materialHandler: MaterialHandler);
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+  callbacks: {
+    onParseProgress: Function;
+    onMeshAlter: Function;
+  };
+  materialHandler: MaterialHandler;
+
+  buildMeshes(meshPayload: object): Mesh[];
+  setLogging(enabled: boolean, debug: boolean): void;
+
+}

+ 23 - 6
examples/jsm/loaders/obj2/shared/MeshReceiver.js

@@ -17,7 +17,8 @@ import {
  * @param {MaterialHandler} materialHandler
  * @constructor
  */
-const MeshReceiver = function( materialHandler ) {
+const MeshReceiver = function ( materialHandler ) {
+
 	this.logging = {
 		enabled: true,
 		debug: false
@@ -28,6 +29,7 @@ const MeshReceiver = function( materialHandler ) {
 		onMeshAlter: null
 	};
 	this.materialHandler = materialHandler;
+
 };
 
 MeshReceiver.prototype = {
@@ -41,8 +43,10 @@ MeshReceiver.prototype = {
 	 * @param {boolean} debug True or false.
 	 */
 	setLogging:	function ( enabled, debug ) {
+
 		this.logging.enabled = enabled === true;
 		this.logging.debug = debug === true;
+
 	},
 
 	/**
@@ -52,6 +56,7 @@ MeshReceiver.prototype = {
 	 * @private
 	 */
 	_setCallbacks: function ( onParseProgress, onMeshAlter ) {
+
 		if ( onParseProgress !== undefined && onParseProgress !== null ) {
 
 			this.callbacks.onParseProgress = onParseProgress;
@@ -62,6 +67,7 @@ MeshReceiver.prototype = {
 			this.callbacks.onMeshAlter = onMeshAlter;
 
 		}
+
 	},
 
 	/**
@@ -71,6 +77,7 @@ MeshReceiver.prototype = {
 	 * @returns {Mesh[]} mesh Array of {@link Mesh}
 	 */
 	buildMeshes: function ( meshPayload ) {
+
 		let meshName = meshPayload.params.meshName;
 
 		let bufferGeometry = new BufferGeometry();
@@ -80,7 +87,7 @@ MeshReceiver.prototype = {
 			bufferGeometry.setIndex( new BufferAttribute( new Uint32Array( meshPayload.buffers.indices ), 1 ) );
 
 		}
-		let haveVertexColors = meshPayload.buffers.colors  !== null;
+		let haveVertexColors = meshPayload.buffers.colors !== null;
 		if ( haveVertexColors ) {
 
 			bufferGeometry.addAttribute( 'color', new BufferAttribute( new Float32Array( meshPayload.buffers.colors ), 3 ) );
@@ -95,7 +102,7 @@ MeshReceiver.prototype = {
 			bufferGeometry.computeVertexNormals();
 
 		}
-		if ( meshPayload.buffers.uvs  !== null ) {
+		if ( meshPayload.buffers.uvs !== null ) {
 
 			bufferGeometry.addAttribute( 'uv', new BufferAttribute( new Float32Array( meshPayload.buffers.uvs ), 2 ) );
 
@@ -155,6 +162,7 @@ MeshReceiver.prototype = {
 					}
 				}
 			);
+
 		}
 
 		// here LoadedMeshUserOverride is required to be provided by the callback used to alter the results
@@ -208,12 +216,12 @@ MeshReceiver.prototype = {
 
 			}
 			progressMessage += ': Adding mesh(es) (' + meshNames.length + ': ' + meshNames + ') from input mesh: ' + meshName;
-			progressMessage += ' (' + ( meshPayload.progress.numericalValue * 100).toFixed( 2 ) + '%)';
+			progressMessage += ' (' + ( meshPayload.progress.numericalValue * 100 ).toFixed( 2 ) + '%)';
 
 		} else {
 
 			progressMessage += ': Not adding mesh: ' + meshName;
-			progressMessage += ' (' + ( meshPayload.progress.numericalValue * 100).toFixed( 2 ) + '%)';
+			progressMessage += ' (' + ( meshPayload.progress.numericalValue * 100 ).toFixed( 2 ) + '%)';
 
 		}
 		let callbackOnParseProgress = this.callbacks.onParseProgress;
@@ -224,6 +232,7 @@ MeshReceiver.prototype = {
 		}
 
 		return meshes;
+
 	}
 
 };
@@ -235,10 +244,12 @@ MeshReceiver.prototype = {
  * @param {boolean} disregardMesh=false Tell implementation to completely disregard this mesh
  * @param {boolean} disregardMesh=false Tell implementation that mesh(es) have been altered or added
  */
-const LoadedMeshUserOverride = function( disregardMesh, alteredMesh ) {
+const LoadedMeshUserOverride = function ( disregardMesh, alteredMesh ) {
+
 	this.disregardMesh = disregardMesh === true;
 	this.alteredMesh = alteredMesh === true;
 	this.meshes = [];
+
 };
 
 
@@ -252,8 +263,10 @@ LoadedMeshUserOverride.prototype = {
 	 * @param {Mesh} mesh
 	 */
 	addMesh: function ( mesh ) {
+
 		this.meshes.push( mesh );
 		this.alteredMesh = true;
+
 	},
 
 	/**
@@ -262,7 +275,9 @@ LoadedMeshUserOverride.prototype = {
 	 * @returns {boolean}
 	 */
 	isDisregardMesh: function () {
+
 		return this.disregardMesh;
+
 	},
 
 	/**
@@ -271,7 +286,9 @@ LoadedMeshUserOverride.prototype = {
 	 * @returns {boolean}
 	 */
 	providesAlteredMeshes: function () {
+
 		return this.alteredMesh;
+
 	}
 };
 

+ 4 - 0
examples/jsm/loaders/obj2/utils/CodeSerializer.d.ts

@@ -0,0 +1,4 @@
+export namespace CodeSerializer {
+  export function serializeObject(fullName: string, object: object): string;
+  export function serializeClass(fullName: string, object: object, constructorName?: string, basePrototypeName?: string, ignoreFunctions?: string[], includeFunctions?: string[], overrideFunctions?: string[]): string;
+}

+ 8 - 3
examples/jsm/loaders/obj2/utils/CodeSerializer.js

@@ -12,12 +12,13 @@ const CodeSerializer = {
 	 * @returns {string}
 	 */
 	serializeObject: function ( fullName, object ) {
+
 		let objectString = fullName + ' = {\n\n';
 		let part;
 		for ( let name in object ) {
 
 			part = object[ name ];
-			if ( typeof( part ) === 'string' || part instanceof String ) {
+			if ( typeof ( part ) === 'string' || part instanceof String ) {
 
 				part = part.replace( '\n', '\\n' );
 				part = part.replace( '\r', '\\r' );
@@ -42,6 +43,7 @@ const CodeSerializer = {
 		objectString += '}\n\n';
 
 		return objectString;
+
 	},
 
 	/**
@@ -53,6 +55,7 @@ const CodeSerializer = {
 	 * @returns {string}
 	 */
 	serializeClass: function ( fullName, object, constructorName, basePrototypeName, ignoreFunctions, includeFunctions, overrideFunctions ) {
+
 		let valueString, objectPart, constructorString, i, funcOverride;
 		let prototypeFunctions = [];
 		let objectProperties = [];
@@ -90,6 +93,7 @@ const CodeSerializer = {
 						prototypeFunctions.push( '\t' + name + ': ' + valueString + ',\n\n' );
 
 					}
+
 				}
 
 			}
@@ -119,7 +123,7 @@ const CodeSerializer = {
 
 			} else {
 
-				if ( typeof( objectPart ) === 'string' || objectPart instanceof String) {
+				if ( typeof ( objectPart ) === 'string' || objectPart instanceof String ) {
 
 					valueString = '\"' + objectPart.toString() + '\"';
 
@@ -172,7 +176,8 @@ const CodeSerializer = {
 		objectString += '\n\n';
 
 		return objectString;
+
 	},
 };
 
-export { CodeSerializer }
+export { CodeSerializer };

+ 3 - 0
examples/jsm/loaders/obj2/utils/ObjectManipulator.d.ts

@@ -0,0 +1,3 @@
+export namespace ObjectManipulator {
+  export function applyProperties(objToAlter: object, params: object, forceCreation: boolean): void;
+}

+ 5 - 1
examples/jsm/loaders/obj2/utils/ObjectManipulator.js

@@ -12,11 +12,13 @@ const ObjectManipulator = {
 	 * @param {Object} params The parameter object
 	 */
 	applyProperties: function ( objToAlter, params, forceCreation ) {
+
 		// fast-fail
 		if ( objToAlter === undefined || objToAlter === null || params === undefined || params === null ) return;
 
 		var property, funcName, values;
 		for ( property in params ) {
+
 			funcName = 'set' + property.substring( 0, 1 ).toLocaleUpperCase() + property.substring( 1 );
 			values = params[ property ];
 
@@ -29,8 +31,10 @@ const ObjectManipulator = {
 				objToAlter[ property ] = values;
 
 			}
+
 		}
+
 	}
 };
 
-export { ObjectManipulator }
+export { ObjectManipulator };

+ 59 - 0
examples/jsm/loaders/obj2/worker/main/WorkerExecutionSupport.d.ts

@@ -0,0 +1,59 @@
+export class CodeBuilderInstructions {
+  constructor(supportsStandardWorker: boolean, supportsJsmWorker: boolean, preferJsmWorker: boolean);
+  supportsStandardWorker: boolean;
+  supportsJsmWorker: boolean;
+  preferJsmWorker: boolean;
+  startCode: string;
+  codeFragments: string[];
+  importStatements: string[];
+  jsmWorkerFile: string;
+  defaultGeometryType: number;
+
+  isSupportsStandardWorker(): boolean;
+  isSupportsJsmWorker(): boolean;
+  isPreferJsmWorker(): boolean;
+  setJsmWorkerFile(jsmWorkerFile: string): void;
+  addStartCode(startCode: string): void;
+  addCodeFragment(code: string): void;
+  addLibraryImport(libraryPath: string): void;
+  getImportStatements(): string[];
+  getCodeFragments(): string[];
+  getStartCode(): string;
+}
+
+export class WorkerExecutionSupport {
+  constructor();
+
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+
+  worker: {
+    native: null;
+    jsmWorker: boolean;
+    logging: boolean;
+    workerRunner: {
+      name: string;
+      usesMeshDisassembler: boolean;
+      defaultGeometryType: number;
+    };
+    terminateWorkerOnLoad: boolean;
+    forceWorkerDataCopy: boolean;
+    started: boolean;
+    queuedMessage: null;
+    callbacks: {
+      onAssetAvailable: Function;
+      onLoad: Function;
+      terminate: Function;
+    };
+  }
+
+  setLogging(enabled: boolean, debug: boolean): this;
+  setForceWorkerDataCopy(forceWorkerDataCopy: boolean): this;
+  setTerminateWorkerOnLoad(terminateWorkerOnLoad: boolean): this;
+  updateCallbacks(onAssetAvailable: Function, onLoad: Function): void;
+  buildWorker(codeBuilderInstructions: CodeBuilderInstructions): void;
+  isWorkerLoaded(requireJsmWorker: boolean): boolean;
+  executeParallel(payload:object, transferables?: object[]);
+}

+ 78 - 5
examples/jsm/loaders/obj2/worker/main/WorkerExecutionSupport.js

@@ -11,6 +11,7 @@
  * @constructor
  */
 const CodeBuilderInstructions = function ( supportsStandardWorker, supportsJsmWorker, preferJsmWorker ) {
+
 	this.supportsStandardWorker = supportsStandardWorker;
 	this.supportsJsmWorker = supportsJsmWorker;
 	this.preferJsmWorker = preferJsmWorker;
@@ -20,6 +21,7 @@ const CodeBuilderInstructions = function ( supportsStandardWorker, supportsJsmWo
 
 	this.jsmWorkerFile = null;
 	this.defaultGeometryType = 0;
+
 };
 
 CodeBuilderInstructions.prototype = {
@@ -27,15 +29,21 @@ CodeBuilderInstructions.prototype = {
 	constructor: CodeBuilderInstructions,
 
 	isSupportsStandardWorker: function () {
+
 		return this.supportsStandardWorker;
+
 	},
 
 	isSupportsJsmWorker: function () {
+
 		return this.supportsJsmWorker;
+
 	},
 
 	isPreferJsmWorker: function () {
+
 		return this.preferJsmWorker;
+
 	},
 
 	/**
@@ -44,9 +52,13 @@ CodeBuilderInstructions.prototype = {
 	 * @param {String} jsmWorkerFile
 	 */
 	setJsmWorkerFile: function ( jsmWorkerFile ) {
+
 		if ( jsmWorkerFile !== undefined && jsmWorkerFile !== null ) {
+
 			this.jsmWorkerFile = jsmWorkerFile;
+
 		}
+
 	},
 
 	/**
@@ -54,7 +66,9 @@ CodeBuilderInstructions.prototype = {
 	 * @param {String} startCode
 	 */
 	addStartCode: function ( startCode ) {
+
 		this.startCode = startCode;
+
 	},
 
 	/**
@@ -62,7 +76,9 @@ CodeBuilderInstructions.prototype = {
 	 * @param {String} code
 	 */
 	addCodeFragment: function ( code ) {
+
 		this.codeFragments.push( code );
+
 	},
 
 	/**
@@ -70,21 +86,29 @@ CodeBuilderInstructions.prototype = {
 	 * @param {String} libraryPath
 	 */
 	addLibraryImport: function ( libraryPath ) {
+
 		let libraryUrl = new URL( libraryPath, window.location.href ).href;
 		let code = 'importScripts( "' + libraryUrl + '" );';
 		this.importStatements.push(	code );
+
 	},
 
 	getImportStatements: function () {
+
 		return this.importStatements;
+
 	},
 
 	getCodeFragments: function () {
+
 		return this.codeFragments;
+
 	},
 
 	getStartCode: function () {
+
 		return this.startCode;
+
 	}
 
 };
@@ -94,12 +118,14 @@ CodeBuilderInstructions.prototype = {
  * @class
  */
 const WorkerExecutionSupport = function () {
+
 	// check worker support first
 	if ( window.Worker === undefined ) throw "This browser does not support web workers!";
 	if ( window.Blob === undefined ) throw "This browser does not support Blob!";
 	if ( typeof window.URL.createObjectURL !== 'function' ) throw "This browser does not support Object creation from URL!";
 
 	this._reset();
+
 };
 WorkerExecutionSupport.WORKER_SUPPORT_VERSION = '3.0.0-beta2';
 console.info( 'Using WorkerSupport version: ' + WorkerExecutionSupport.WORKER_SUPPORT_VERSION );
@@ -110,14 +136,17 @@ WorkerExecutionSupport.prototype = {
 	constructor: WorkerExecutionSupport,
 
 	_reset: function () {
+
 		this.logging = {
 			enabled: true,
 			debug: false
 		};
 
 		let scope = this;
-		let scopeTerminate = function (  ) {
+		let scopeTerminate = function ( ) {
+
 			scope._terminate();
+
 		};
 		this.worker = {
 			native: null,
@@ -138,6 +167,7 @@ WorkerExecutionSupport.prototype = {
 				terminate: scopeTerminate
 			}
 		};
+
 	},
 
 	/**
@@ -147,10 +177,12 @@ WorkerExecutionSupport.prototype = {
 	 * @param {boolean} debug True or false.
 	 */
 	setLogging: function ( enabled, debug ) {
+
 		this.logging.enabled = enabled === true;
 		this.logging.debug = debug === true;
 		this.worker.logging = enabled === true;
 		return this;
+
 	},
 
 	/**
@@ -159,8 +191,10 @@ WorkerExecutionSupport.prototype = {
 	 * @param {boolean} forceWorkerDataCopy True or false.
 	 */
 	setForceWorkerDataCopy: function ( forceWorkerDataCopy ) {
+
 		this.worker.forceWorkerDataCopy = forceWorkerDataCopy === true;
 		return this;
+
 	},
 
 	/**
@@ -169,6 +203,7 @@ WorkerExecutionSupport.prototype = {
 	 * @param {boolean} terminateWorkerOnLoad True or false.
 	 */
 	setTerminateWorkerOnLoad: function ( terminateWorkerOnLoad ) {
+
 		this.worker.terminateWorkerOnLoad = terminateWorkerOnLoad === true;
 		if ( this.worker.terminateWorkerOnLoad && this.isWorkerLoaded( this.worker.jsmWorker ) &&
 				this.worker.queuedMessage === null && this.worker.started ) {
@@ -182,6 +217,7 @@ WorkerExecutionSupport.prototype = {
 
 		}
 		return this;
+
 	},
 
 	/**
@@ -191,6 +227,7 @@ WorkerExecutionSupport.prototype = {
 	 * @param {Function} [onLoad] The function that is called when parsing is complete.
 	 */
 	updateCallbacks: function ( onAssetAvailable, onLoad ) {
+
 		if ( onAssetAvailable !== undefined && onAssetAvailable !== null ) {
 
 			this.worker.callbacks.onAssetAvailable = onAssetAvailable;
@@ -202,14 +239,17 @@ WorkerExecutionSupport.prototype = {
 
 		}
 		this._verifyCallbacks();
+
 	},
 
 	_verifyCallbacks: function () {
+
 		if ( this.worker.callbacks.onAssetAvailable === undefined || this.worker.callbacks.onAssetAvailable === null ) {
 
 			throw 'Unable to run as no "onAssetAvailable" callback is set.';
 
 		}
+
 	},
 
 	/**
@@ -219,10 +259,13 @@ WorkerExecutionSupport.prototype = {
  	 * @param {CodeBuilderInstructions} codeBuilderInstructions
 	 */
 	buildWorker: function ( codeBuilderInstructions ) {
+
 		let jsmSuccess = false;
 
 		if ( codeBuilderInstructions.isSupportsJsmWorker() && codeBuilderInstructions.isPreferJsmWorker() ) {
+
 			jsmSuccess = this._buildWorkerJsm( codeBuilderInstructions );
+
 		}
 
 		if ( ! jsmSuccess && codeBuilderInstructions.isSupportsStandardWorker() ) {
@@ -230,6 +273,7 @@ WorkerExecutionSupport.prototype = {
 			this._buildWorkerStandard( codeBuilderInstructions );
 
 		}
+
 	},
 
 	/**
@@ -239,6 +283,7 @@ WorkerExecutionSupport.prototype = {
 	 * @private
 	 */
 	_buildWorkerJsm: function ( codeBuilderInstructions ) {
+
 		let jsmSuccess = true;
 		let timeLabel = 'buildWorkerJsm';
 		let workerAvailable = this._buildWorkerCheckPreconditions( true, timeLabel );
@@ -250,8 +295,7 @@ WorkerExecutionSupport.prototype = {
 				let worker = new Worker( workerFileUrl, { type: "module" } );
 				this._configureWorkerCommunication( worker, true, codeBuilderInstructions.defaultGeometryType, timeLabel );
 
-			}
-			catch ( e ) {
+			} catch ( e ) {
 
 				jsmSuccess = false;
 				// Chrome throws this exception, but Firefox currently does not complain, but can't execute the worker afterwards
@@ -260,11 +304,13 @@ WorkerExecutionSupport.prototype = {
 					console.error( "Modules are not supported in workers." );
 
 				}
+
 			}
 
 		}
 
 		return jsmSuccess;
+
 	},
 
 	/**
@@ -279,17 +325,22 @@ WorkerExecutionSupport.prototype = {
 	 * @private
 	 */
 	_buildWorkerStandard: function ( codeBuilderInstructions ) {
+
 		let timeLabel = 'buildWorkerStandard';
 		let workerAvailable = this._buildWorkerCheckPreconditions( false, timeLabel );
 		if ( ! workerAvailable ) {
 
 			let concatenateCode = '';
 			codeBuilderInstructions.getImportStatements().forEach( function ( element ) {
+
 				concatenateCode += element + '\n';
+
 			} );
 			concatenateCode += '\n';
 			codeBuilderInstructions.getCodeFragments().forEach( function ( element ) {
+
 				concatenateCode += element + '\n';
+
 			} );
 			concatenateCode += '\n';
 			concatenateCode += codeBuilderInstructions.getStartCode();
@@ -300,15 +351,18 @@ WorkerExecutionSupport.prototype = {
 			this._configureWorkerCommunication( worker, false, codeBuilderInstructions.defaultGeometryType, timeLabel );
 
 		}
+
 	},
 
 	_buildWorkerCheckPreconditions: function ( requireJsmWorker, timeLabel ) {
+
 		let workerAvailable = false;
 		if ( this.isWorkerLoaded( requireJsmWorker ) ) {
 
 			workerAvailable = true;
 
 		} else {
+
 			if ( this.logging.enabled ) {
 
 				console.info( 'WorkerExecutionSupport: Building ' + ( requireJsmWorker ? 'jsm' : 'standard' ) + ' worker code...' );
@@ -318,20 +372,25 @@ WorkerExecutionSupport.prototype = {
 
 		}
 		return workerAvailable;
+
 	},
 
 	_configureWorkerCommunication: function ( worker, haveJsmWorker, defaultGeometryType, timeLabel ) {
+
 		this.worker.native = worker;
 		this.worker.jsmWorker = haveJsmWorker;
 
 		let scope = this;
 		let scopedReceiveWorkerMessage = function ( event ) {
+
 			scope._receiveWorkerMessage( event );
+
 		};
 		this.worker.native.onmessage = scopedReceiveWorkerMessage;
 		if ( defaultGeometryType !== undefined && defaultGeometryType !== null ) {
 
 			this.worker.workerRunner.defaultGeometryType = defaultGeometryType;
+
 		}
 
 		if ( this.logging.enabled ) {
@@ -339,6 +398,7 @@ WorkerExecutionSupport.prototype = {
 			console.timeEnd( timeLabel );
 
 		}
+
 	},
 
 	/**
@@ -347,18 +407,22 @@ WorkerExecutionSupport.prototype = {
 	 * @return {boolean|*}
 	 */
 	isWorkerLoaded: function ( requireJsmWorker ) {
+
 		return this.worker.native !== null &&
 			( ( requireJsmWorker && this.worker.jsmWorker ) || ( ! requireJsmWorker && ! this.worker.jsmWorker ) );
+
 	},
 
 	/**
 	 * Executed in worker scope
 	 */
 	_receiveWorkerMessage: function ( event ) {
+
 		let payload = event.data;
 		let workerRunnerName = this.worker.workerRunner.name;
 
 		switch ( payload.cmd ) {
+
 			case 'assetAvailable':
 				this.worker.callbacks.onAssetAvailable( payload );
 				break;
@@ -401,6 +465,7 @@ WorkerExecutionSupport.prototype = {
 				break;
 
 		}
+
 	},
 
 	/**
@@ -408,16 +473,19 @@ WorkerExecutionSupport.prototype = {
 	 *
 	 * @param {Object} payload Raw mesh description (buffers, params, materials) used to build one to many meshes.
 	 */
-	executeParallel: function( payload, transferables ) {
+	executeParallel: function ( payload, transferables ) {
+
 		payload.cmd = 'parse';
 		payload.usesMeshDisassembler = this.worker.workerRunner.usesMeshDisassembler;
 		payload.defaultGeometryType = this.worker.workerRunner.defaultGeometryType;
 		if ( ! this._verifyWorkerIsAvailable( payload, transferables ) ) return;
 
 		this._postMessage();
+
 	},
 
 	_verifyWorkerIsAvailable: function ( payload, transferables ) {
+
 		this._verifyCallbacks();
 		let ready = true;
 		if ( this.worker.queuedMessage !== null ) {
@@ -435,9 +503,11 @@ WorkerExecutionSupport.prototype = {
 
 		}
 		return ready;
+
 	},
 
 	_postMessage: function () {
+
 		if ( this.worker.queuedMessage !== null ) {
 
 			if ( this.worker.queuedMessage.payload.data.input instanceof ArrayBuffer ) {
@@ -466,15 +536,18 @@ WorkerExecutionSupport.prototype = {
 			}
 
 		}
+
 	},
 
 	_terminate: function () {
+
 		this.worker.native.terminate();
 		this._reset();
+
 	}
 };
 
 export {
 	CodeBuilderInstructions,
 	WorkerExecutionSupport
-}
+};

+ 81 - 0
examples/jsm/loaders/obj2/worker/parallel/OBJLoader2Parser.d.ts

@@ -0,0 +1,81 @@
+export class OBJLoader2Parser {
+  constructor();
+  callbacks: {
+    onProgress: Function;
+    onAssetAvailable: Function;
+    onError: Function;
+  };
+  contentRef: Uint8Array;
+  legacyMode: boolean;
+  materials: object;
+  materialPerSmoothingGroup: boolean;
+  useOAsMesh: boolean;
+  useIndices: boolean;
+  disregardNormals: boolean;
+
+  vertices: number[];
+  colors: number[];
+  normals: number[];
+  uvs: number[];
+
+  rawMesh: {
+    objectName: string;
+    groupName: string;
+    activeMtlName: string;
+    mtllibName: string;
+    faceType: number;
+    subGroups: object[];
+    subGroupInUse: object;
+    smoothingGroup: {
+      splitMaterials: boolean;
+      normalized: boolean;
+      real: boolean;
+    };
+    counts: {
+      doubleIndicesCount: number;
+      faceCount: number;
+      mtlCount: number;
+      smoothingGroupCount: number;
+    }
+  };
+
+  inputObjectCount: number;
+  outputObjectCount: number;
+  globalCounts: {
+    vertices: number;
+    faces: number;
+    doubleIndicesCount: number;
+    lineByte: number;
+    currentByte: number;
+    totalBytes: number;
+  };
+
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+
+  resetRawMesh(): void;
+  setMaterialPerSmoothingGroup(materialPerSmoothingGroup: boolean): void;
+  setUseOAsMesh(useOAsMesh: boolean): void;
+  setUseIndices(useIndices: boolean): void;
+  setDisregardNormals(disregardNormals: boolean): void;
+  setMaterials(materials: object): void;
+  setCallbackOnAssetAvailable(onAssetAvailable: Function): void;
+  setCallbackOnProgress(onProgress: Function): void;
+  setCallbackOnError(onError: Function): void;
+  setLogging(enabled: boolean, debug: boolean): void;
+  configure(): void;
+  parse(arrayBuffer: Uint8Array): void;
+  parseText(text: string): void;
+  processLine(buffer: string[], bufferPointer: number, slashesCount: number): void;
+  pushSmoothingGroup(smoothingGroup: object): void;
+  checkFaceType(faceType: number): void;
+  checkSubGroup(): void;
+  buildFace(faceIndexV: string, faceIndexU: string, faceIndexN: string): void;
+  createRawMeshReport(inputObjectCount: number): void;
+  finalizeRawMesh(): object;
+  processCompletedMesh(): boolean;
+  buildMesh(result: object): void;
+  finalizeParsing(): void;
+}

+ 94 - 20
examples/jsm/loaders/obj2/worker/parallel/OBJLoader2Parser.js

@@ -6,7 +6,8 @@
  * Parse OBJ data either from ArrayBuffer or string
  * @class
  */
-const OBJLoader2Parser = function() {
+const OBJLoader2Parser = function () {
+
 	this.callbacks = {
 		onProgress: null,
 		onAssetAvailable: null,
@@ -64,6 +65,7 @@ const OBJLoader2Parser = function() {
 		enabled: true,
 		debug: false
 	};
+
 };
 
 OBJLoader2Parser.prototype = {
@@ -71,6 +73,7 @@ OBJLoader2Parser.prototype = {
 	constructor: OBJLoader2Parser,
 
 	resetRawMesh: function () {
+
 		// faces are stored according combined index of group, material and smoothingGroup (0 or not)
 		this.rawMesh.subGroups = [];
 		this.rawMesh.subGroupInUse = null;
@@ -84,66 +87,88 @@ OBJLoader2Parser.prototype = {
 		this.rawMesh.counts.faceCount = 0;
 		this.rawMesh.counts.mtlCount = 0;
 		this.rawMesh.counts.smoothingGroupCount = 0;
+
 	},
 
 	setMaterialPerSmoothingGroup: function ( materialPerSmoothingGroup ) {
+
 		this.materialPerSmoothingGroup = materialPerSmoothingGroup;
+
 	},
 
 	setUseOAsMesh: function ( useOAsMesh ) {
+
 		this.useOAsMesh = useOAsMesh;
+
 	},
 
 	setUseIndices: function ( useIndices ) {
+
 		this.useIndices = useIndices;
+
 	},
 
 	setDisregardNormals: function ( disregardNormals ) {
+
 		this.disregardNormals = disregardNormals;
+
 	},
 
 	setMaterials: function ( materials ) {
+
 		if ( materials === undefined || materials === null ) return;
 
 		for ( let materialName in materials ) {
+
 			if ( materials.hasOwnProperty( materialName ) ) {
 
 				this.materials[ materialName ] = materials[ materialName ];
 
 			}
+
 		}
+
 	},
 
 	setCallbackOnAssetAvailable: function ( onAssetAvailable ) {
+
 		if ( onAssetAvailable !== null && onAssetAvailable !== undefined ) {
 
 			this.callbacks.onAssetAvailable = onAssetAvailable;
 
 		}
+
 	},
 
 	setCallbackOnProgress: function ( onProgress ) {
+
 		if ( onProgress !== null && onProgress !== undefined ) {
 
 			this.callbacks.onProgress = onProgress;
 
 		}
+
 	},
 
 	setCallbackOnError: function ( onError ) {
+
 		if ( onError !== null && onError !== undefined ) {
 
 			this.callbacks.onError = onError;
 
 		}
+
 	},
 
 	setLogging: function ( enabled, debug ) {
+
 		this.logging.enabled = enabled === true;
 		this.logging.debug = debug === true;
+
 	},
 
 	configure: function () {
+
 		if ( this.callbacks.onAssetAvailable === null ) {
 
 			let errorMessage = 'Unable to run as no callback for building meshes is set.';
@@ -154,6 +179,7 @@ OBJLoader2Parser.prototype = {
 			} else {
 
 				throw errorMessage;
+
 			}
 
 		}
@@ -161,7 +187,7 @@ OBJLoader2Parser.prototype = {
 		if ( this.logging.enabled ) {
 
 			let matKeys = Object.keys( this.materials );
-			let matNames = (matKeys.length > 0) ? '\n\tmaterialNames:\n\t\t- ' + matKeys.join( '\n\t\t- ' ) : '\n\tmaterialNames: None';
+			let matNames = ( matKeys.length > 0 ) ? '\n\tmaterialNames:\n\t\t- ' + matKeys.join( '\n\t\t- ' ) : '\n\tmaterialNames: None';
 			let printedConfig = 'OBJLoader.Parser configuration:'
 				+ matNames
 				+ '\n\tmaterialPerSmoothingGroup: ' + this.materialPerSmoothingGroup
@@ -169,17 +195,24 @@ OBJLoader2Parser.prototype = {
 				+ '\n\tuseIndices: ' + this.useIndices
 				+ '\n\tdisregardNormals: ' + this.disregardNormals;
 			if ( this.callbacks.onProgress !== null ) {
+
 				printedConfig += '\n\tcallbacks.onProgress: ' + this.callbacks.onProgress.name;
+
 			}
 			if ( this.callbacks.onAssetAvailable !== null ) {
+
 				printedConfig += '\n\tcallbacks.onAssetAvailable: ' + this.callbacks.onAssetAvailable.name;
+
 			}
 			if ( this.callbacks.onError !== null ) {
+
 				printedConfig += '\n\tcallbacks.onError: ' + this.callbacks.onError.name;
+
 			}
 			console.info( printedConfig );
 
 		}
+
 	},
 
 	/**
@@ -188,6 +221,7 @@ OBJLoader2Parser.prototype = {
 	 * @param {Uint8Array} arrayBuffer OBJ data as Uint8Array
 	 */
 	parse: function ( arrayBuffer ) {
+
 		if ( this.logging.enabled ) console.time( 'OBJLoader.Parser.parse' );
 		this.configure();
 
@@ -201,6 +235,7 @@ OBJLoader2Parser.prototype = {
 
 			code = arrayBufferView[ i ];
 			switch ( code ) {
+
 				// space
 				case 32:
 					if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
@@ -231,10 +266,13 @@ OBJLoader2Parser.prototype = {
 				default:
 					word += String.fromCharCode( code );
 					break;
+
 			}
+
 		}
 		this.finalizeParsing();
 		if ( this.logging.enabled ) console.timeEnd( 'OBJLoader.Parser.parse' );
+
 	},
 
 	/**
@@ -243,6 +281,7 @@ OBJLoader2Parser.prototype = {
 	 * @param {string} text OBJ data as string
 	 */
 	parseText: function ( text ) {
+
 		if ( this.logging.enabled ) console.time( 'OBJLoader.Parser.parseText' );
 		this.configure();
 		this.legacyMode = true;
@@ -255,6 +294,7 @@ OBJLoader2Parser.prototype = {
 
 			char = text[ i ];
 			switch ( char ) {
+
 				case ' ':
 					if ( word.length > 0 ) buffer[ bufferPointer ++ ] = word;
 					word = '';
@@ -281,16 +321,21 @@ OBJLoader2Parser.prototype = {
 
 				default:
 					word += char;
+
 			}
+
 		}
 		this.finalizeParsing();
 		if ( this.logging.enabled ) console.timeEnd( 'OBJLoader.Parser.parseText' );
+
 	},
 
 	processLine: function ( buffer, bufferPointer, slashesCount ) {
+
 		if ( bufferPointer < 1 ) return;
 
 		let reconstructString = function ( content, legacyMode, start, stop ) {
+
 			let line = '';
 			if ( stop > start ) {
 
@@ -309,11 +354,13 @@ OBJLoader2Parser.prototype = {
 
 			}
 			return line;
+
 		};
 
 		let bufferLength, length, i, lineDesignation;
-		lineDesignation = buffer [ 0 ];
+		lineDesignation = buffer[ 0 ];
 		switch ( lineDesignation ) {
+
 			case 'v':
 				this.vertices.push( parseFloat( buffer[ 1 ] ) );
 				this.vertices.push( parseFloat( buffer[ 2 ] ) );
@@ -354,6 +401,7 @@ OBJLoader2Parser.prototype = {
 					}
 
 					// "f vertex/uv ..."
+
 				} else if ( bufferLength === slashesCount * 2 ) {
 
 					this.checkFaceType( 1 );
@@ -366,6 +414,7 @@ OBJLoader2Parser.prototype = {
 					}
 
 					// "f vertex/uv/normal ..."
+
 				} else if ( bufferLength * 2 === slashesCount * 3 ) {
 
 					this.checkFaceType( 2 );
@@ -378,6 +427,7 @@ OBJLoader2Parser.prototype = {
 					}
 
 					// "f vertex//normal ..."
+
 				} else {
 
 					this.checkFaceType( 3 );
@@ -402,7 +452,7 @@ OBJLoader2Parser.prototype = {
 
 				} else {
 
-					this.checkFaceType( (lineDesignation === 'l') ? 5 : 6 );
+					this.checkFaceType( ( lineDesignation === 'l' ) ? 5 : 6 );
 					for ( i = 1, length = bufferLength + 1; i < length; i ++ ) this.buildFace( buffer[ i ] );
 
 				}
@@ -441,17 +491,22 @@ OBJLoader2Parser.prototype = {
 
 			default:
 				break;
+
 		}
+
 	},
 
 	pushSmoothingGroup: function ( smoothingGroup ) {
+
 		let smoothingGroupInt = parseInt( smoothingGroup );
 		if ( isNaN( smoothingGroupInt ) ) {
+
 			smoothingGroupInt = smoothingGroup === "off" ? 0 : 1;
+
 		}
 
 		let smoothCheck = this.rawMesh.smoothingGroup.normalized;
-		this.rawMesh.smoothingGroup.normalized = this.rawMesh.smoothingGroup.splitMaterials ? smoothingGroupInt : (smoothingGroupInt === 0) ? 0 : 1;
+		this.rawMesh.smoothingGroup.normalized = this.rawMesh.smoothingGroup.splitMaterials ? smoothingGroupInt : ( smoothingGroupInt === 0 ) ? 0 : 1;
 		this.rawMesh.smoothingGroup.real = smoothingGroupInt;
 
 		if ( smoothCheck !== smoothingGroupInt ) {
@@ -460,6 +515,7 @@ OBJLoader2Parser.prototype = {
 			this.checkSubGroup();
 
 		}
+
 	},
 
 	/**
@@ -473,6 +529,7 @@ OBJLoader2Parser.prototype = {
 	 * faceType = 6: "p vertex ..."
 	 */
 	checkFaceType: function ( faceType ) {
+
 		if ( this.rawMesh.faceType !== faceType ) {
 
 			this.processCompletedMesh();
@@ -480,9 +537,11 @@ OBJLoader2Parser.prototype = {
 			this.checkSubGroup();
 
 		}
+
 	},
 
 	checkSubGroup: function () {
+
 		let index = this.rawMesh.activeMtlName + '|' + this.rawMesh.smoothingGroup.normalized;
 		this.rawMesh.subGroupInUse = this.rawMesh.subGroups[ index ];
 
@@ -505,15 +564,17 @@ OBJLoader2Parser.prototype = {
 			this.rawMesh.subGroups[ index ] = this.rawMesh.subGroupInUse;
 
 		}
+
 	},
 
 	buildFace: function ( faceIndexV, faceIndexU, faceIndexN ) {
+
 		let subGroupInUse = this.rawMesh.subGroupInUse;
 		let scope = this;
 		let updateSubGroupInUse = function () {
 
 			let faceIndexVi = parseInt( faceIndexV );
-			let indexPointerV = 3 * (faceIndexVi > 0 ? faceIndexVi - 1 : faceIndexVi + scope.vertices.length / 3);
+			let indexPointerV = 3 * ( faceIndexVi > 0 ? faceIndexVi - 1 : faceIndexVi + scope.vertices.length / 3 );
 			let indexPointerC = scope.colors.length > 0 ? indexPointerV : null;
 
 			let vertices = subGroupInUse.vertices;
@@ -532,7 +593,7 @@ OBJLoader2Parser.prototype = {
 			if ( faceIndexU ) {
 
 				let faceIndexUi = parseInt( faceIndexU );
-				let indexPointerU = 2 * (faceIndexUi > 0 ? faceIndexUi - 1 : faceIndexUi + scope.uvs.length / 2);
+				let indexPointerU = 2 * ( faceIndexUi > 0 ? faceIndexUi - 1 : faceIndexUi + scope.uvs.length / 2 );
 				let uvs = subGroupInUse.uvs;
 				uvs.push( scope.uvs[ indexPointerU ++ ] );
 				uvs.push( scope.uvs[ indexPointerU ] );
@@ -541,13 +602,14 @@ OBJLoader2Parser.prototype = {
 			if ( faceIndexN && ! scope.disregardNormals ) {
 
 				let faceIndexNi = parseInt( faceIndexN );
-				let indexPointerN = 3 * (faceIndexNi > 0 ? faceIndexNi - 1 : faceIndexNi + scope.normals.length / 3);
+				let indexPointerN = 3 * ( faceIndexNi > 0 ? faceIndexNi - 1 : faceIndexNi + scope.normals.length / 3 );
 				let normals = subGroupInUse.normals;
 				normals.push( scope.normals[ indexPointerN ++ ] );
 				normals.push( scope.normals[ indexPointerN ++ ] );
 				normals.push( scope.normals[ indexPointerN ] );
 
 			}
+
 		};
 
 		if ( this.useIndices ) {
@@ -560,11 +622,11 @@ OBJLoader2Parser.prototype = {
 				indicesPointer = this.rawMesh.subGroupInUse.vertices.length / 3;
 				updateSubGroupInUse();
 				subGroupInUse.indexMappings[ mappingName ] = indicesPointer;
-				subGroupInUse.indexMappingsCount++;
+				subGroupInUse.indexMappingsCount ++;
 
 			} else {
 
-				this.rawMesh.counts.doubleIndicesCount++;
+				this.rawMesh.counts.doubleIndicesCount ++;
 
 			}
 			subGroupInUse.indices.push( indicesPointer );
@@ -575,9 +637,11 @@ OBJLoader2Parser.prototype = {
 
 		}
 		this.rawMesh.counts.faceCount ++;
+
 	},
 
 	createRawMeshReport: function ( inputObjectCount ) {
+
 		return 'Input Object number: ' + inputObjectCount +
 			'\n\tObject name: ' + this.rawMesh.objectName +
 			'\n\tGroup name: ' + this.rawMesh.groupName +
@@ -588,12 +652,14 @@ OBJLoader2Parser.prototype = {
 			'\n\tSmoothingGroup count: ' + this.rawMesh.counts.smoothingGroupCount +
 			'\n\tMaterial count: ' + this.rawMesh.counts.mtlCount +
 			'\n\tReal MeshOutputGroup count: ' + this.rawMesh.subGroups.length;
+
 	},
 
 	/**
 	 * Clear any empty subGroup and calculate absolute vertex, normal and uv counts
 	 */
 	finalizeRawMesh: function () {
+
 		let meshOutputGroupTemp = [];
 		let meshOutputGroup;
 		let absoluteVertexCount = 0;
@@ -611,7 +677,7 @@ OBJLoader2Parser.prototype = {
 				indices = meshOutputGroup.indices;
 				if ( indices.length > 0 && absoluteIndexMappingsCount > 0 ) {
 
-					for ( let i = 0; i < indices.length; i++ ) {
+					for ( let i = 0; i < indices.length; i ++ ) {
 
 						indices[ i ] = indices[ i ] + absoluteIndexMappingsCount;
 
@@ -627,6 +693,7 @@ OBJLoader2Parser.prototype = {
 				absoluteNormalCount += meshOutputGroup.normals.length;
 
 			}
+
 		}
 
 		// do not continue if no result
@@ -647,9 +714,11 @@ OBJLoader2Parser.prototype = {
 
 		}
 		return result;
+
 	},
 
 	processCompletedMesh: function () {
+
 		let result = this.finalizeRawMesh();
 		let haveMesh = result !== null;
 		if ( haveMesh ) {
@@ -671,13 +740,14 @@ OBJLoader2Parser.prototype = {
 			if ( this.callbacks.onProgress !== null ) {
 
 				this.callbacks.onProgress( 'Completed [o: ' + this.rawMesh.objectName + ' g:' + this.rawMesh.groupName + '' +
-					'] Total progress: ' + (progressBytesPercent * 100).toFixed( 2 ) + '%', progressBytesPercent );
+					'] Total progress: ' + ( progressBytesPercent * 100 ).toFixed( 2 ) + '%', progressBytesPercent );
 
 			}
 			this.resetRawMesh();
 
 		}
 		return haveMesh;
+
 	},
 
 	/**
@@ -687,22 +757,23 @@ OBJLoader2Parser.prototype = {
 	 * @param result
 	 */
 	buildMesh: function ( result ) {
+
 		let meshOutputGroups = result.subGroups;
 
 		let vertexFA = new Float32Array( result.absoluteVertexCount );
 		this.globalCounts.vertices += result.absoluteVertexCount / 3;
 		this.globalCounts.faces += result.faceCount;
 		this.globalCounts.doubleIndicesCount += result.doubleIndicesCount;
-		let indexUA = (result.absoluteIndexCount > 0) ? new Uint32Array( result.absoluteIndexCount ) : null;
-		let colorFA = (result.absoluteColorCount > 0) ? new Float32Array( result.absoluteColorCount ) : null;
-		let normalFA = (result.absoluteNormalCount > 0) ? new Float32Array( result.absoluteNormalCount ) : null;
-		let uvFA = (result.absoluteUvCount > 0) ? new Float32Array( result.absoluteUvCount ) : null;
+		let indexUA = ( result.absoluteIndexCount > 0 ) ? new Uint32Array( result.absoluteIndexCount ) : null;
+		let colorFA = ( result.absoluteColorCount > 0 ) ? new Float32Array( result.absoluteColorCount ) : null;
+		let normalFA = ( result.absoluteNormalCount > 0 ) ? new Float32Array( result.absoluteNormalCount ) : null;
+		let uvFA = ( result.absoluteUvCount > 0 ) ? new Float32Array( result.absoluteUvCount ) : null;
 		let haveVertexColors = colorFA !== null;
 
 		let meshOutputGroup;
 		let materialNames = [];
 
-		let createMultiMaterial = (meshOutputGroups.length > 1);
+		let createMultiMaterial = ( meshOutputGroups.length > 1 );
 		let materialIndex = 0;
 		let materialIndexMapping = [];
 		let selectedMaterialIndex;
@@ -727,7 +798,7 @@ OBJLoader2Parser.prototype = {
 			materialNameOrg = meshOutputGroup.materialName;
 			if ( this.rawMesh.faceType < 4 ) {
 
-				materialName = materialNameOrg + (haveVertexColors ? '_vertexColor' : '') + (meshOutputGroup.smoothingGroup === 0 ? '_flat' : '');
+				materialName = materialNameOrg + ( haveVertexColors ? '_vertexColor' : '' ) + ( meshOutputGroup.smoothingGroup === 0 ? '_flat' : '' );
 
 
 			} else {
@@ -883,17 +954,19 @@ OBJLoader2Parser.prototype = {
 					uvs: uvFA
 				},
 				// 0: mesh, 1: line, 2: point
-				geometryType: this.rawMesh.faceType < 4 ? 0 : (this.rawMesh.faceType === 6) ? 2 : 1
+				geometryType: this.rawMesh.faceType < 4 ? 0 : ( this.rawMesh.faceType === 6 ) ? 2 : 1
 			},
 			[ vertexFA.buffer ],
-			indexUA !== null ?  [ indexUA.buffer ] : null,
+			indexUA !== null ? [ indexUA.buffer ] : null,
 			colorFA !== null ? [ colorFA.buffer ] : null,
 			normalFA !== null ? [ normalFA.buffer ] : null,
 			uvFA !== null ? [ uvFA.buffer ] : null
 		);
+
 	},
 
 	finalizeParsing: function () {
+
 		if ( this.logging.enabled ) console.info( 'Global output object count: ' + this.outputObjectCount );
 		if ( this.processCompletedMesh() && this.logging.enabled ) {
 
@@ -904,6 +977,7 @@ OBJLoader2Parser.prototype = {
 			console.info( parserFinalReport );
 
 		}
+
 	}
 };
 

+ 24 - 0
examples/jsm/loaders/obj2/worker/parallel/WorkerRunner.d.ts

@@ -0,0 +1,24 @@
+import { OBJLoader2Parser } from './OBJLoader2Parser';
+
+export class DefaultWorkerPayloadHandler {
+  constructor(parser: OBJLoader2Parser);
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+  parser: OBJLoader2Parser;
+
+  handlePayload(payload: object): void;
+}
+
+export class WorkerRunner {
+  constructor(payloadHandler: object);
+  logging: {
+    enabled: boolean;
+    debug: boolean;
+  };
+  resourceDescriptors: OBJLoader2Parser;
+  payloadHandler: object;
+
+  processMessage(payload: object): void;
+}

+ 19 - 4
examples/jsm/loaders/obj2/worker/parallel/WorkerRunner.js

@@ -5,11 +5,13 @@
 import { ObjectManipulator } from "../../utils/ObjectManipulator.js";
 
 const DefaultWorkerPayloadHandler = function ( parser ) {
+
 	this.parser = parser;
 	this.logging = {
 		enabled: false,
 		debug: false
 	};
+
 };
 
 DefaultWorkerPayloadHandler.prototype = {
@@ -17,19 +19,26 @@ DefaultWorkerPayloadHandler.prototype = {
 	constructor: DefaultWorkerPayloadHandler,
 
 	handlePayload: function ( payload ) {
+
 		if ( payload.logging ) {
+
 			this.logging.enabled = payload.logging.enabled === true;
 			this.logging.debug = payload.logging.debug === true;
+
 		}
 		if ( payload.cmd === 'parse' ) {
 
 			let scope = this;
 			let callbacks = {
 				callbackOnAssetAvailable: function ( payload ) {
+
 					self.postMessage( payload );
+
 				},
 				callbackOnProgress: function ( text ) {
+
 					if ( scope.logging.enabled && scope.logging.debug ) console.debug( 'WorkerRunner: progress: ' + text );
+
 				}
 			};
 
@@ -44,7 +53,7 @@ DefaultWorkerPayloadHandler.prototype = {
 			ObjectManipulator.applyProperties( parser, callbacks );
 
 			let arraybuffer;
-			if ( payload.params && payload.params.index !== undefined && payload.params.index !== null) {
+			if ( payload.params && payload.params.index !== undefined && payload.params.index !== null ) {
 
 				arraybuffer = this.resourceDescriptors[ payload.params.index ].content;
 
@@ -62,7 +71,7 @@ DefaultWorkerPayloadHandler.prototype = {
 
 			} else {
 
-				parser[ parseFunctionName ] ( arraybuffer, payload.data.options );
+				parser[ parseFunctionName ]( arraybuffer, payload.data.options );
 
 			}
 			if ( this.logging.enabled ) console.log( 'WorkerRunner: Run complete!' );
@@ -87,14 +96,18 @@ DefaultWorkerPayloadHandler.prototype = {
  * @constructor
  */
 const WorkerRunner = function ( payloadHandler ) {
+
 	this.resourceDescriptors = [];
 	this.payloadHandler = payloadHandler;
 
 	let scope = this;
-	let scopedRunner = function( event ) {
+	let scopedRunner = function ( event ) {
+
 		scope.processMessage( event.data );
+
 	};
 	self.addEventListener( 'message', scopedRunner, false );
+
 };
 
 WorkerRunner.prototype = {
@@ -107,6 +120,7 @@ WorkerRunner.prototype = {
 	 * @param {Object} payload Raw mesh description (buffers, params, materials) used to build one to many meshes.
 	 */
 	processMessage: function ( payload ) {
+
 		if ( payload.data.resourceDescriptors && this.resourceDescriptors.length === 0 ) {
 
 			for ( let name in payload.data.resourceDescriptors ) {
@@ -118,6 +132,7 @@ WorkerRunner.prototype = {
 		}
 
 		this.payloadHandler.handlePayload( payload );
+
 	}
 
 };
@@ -125,4 +140,4 @@ WorkerRunner.prototype = {
 export {
 	WorkerRunner,
 	DefaultWorkerPayloadHandler
-}
+};

+ 2 - 2
examples/jsm/misc/Volume.d.ts

@@ -5,7 +5,7 @@ import {
 import { VolumeSlice } from "./VolumeSlice.js";
 
 export class Volume {
-  constructor( xLength?: number, yLength?: number, zLength?: number, type?:string, arrayBuffer: ArrayLike<number> );
+  constructor( xLength?: number, yLength?: number, zLength?: number, type?:string, arrayBuffer?: ArrayLike<number> );
 
   xLength: number;
   yLength: number;
@@ -27,7 +27,7 @@ export class Volume {
   access( i: number, j: number, k: number ): number;
   reverseAccess( index: number ): number[];
 
-  map( functionToMap: function, context: this ): this;
+  map( functionToMap: Function, context: this ): this;
 
   extractPerpendicularPlane ( axis: string, RASIndex: number ): object;
   extractSlice( axis: string, index: number ): VolumeSlice;

+ 1 - 1
examples/jsm/misc/VolumeSlice.d.ts

@@ -3,7 +3,7 @@ import {
   Mesh,
 } from '../../../src/Three';
 
-import { volume } from './Volume';
+import { Volume } from './Volume';
 
 export class VolumeSlice {
   constructor( volume: Volume, index?: number, axis?: string );

+ 2 - 0
examples/jsm/nodes/accessors/CameraNode.js

@@ -202,6 +202,8 @@ CameraNode.prototype.copy = function ( source ) {
 
 	}
 
+	return this;
+
 };
 
 CameraNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/ColorsNode.js

@@ -34,6 +34,8 @@ ColorsNode.prototype.copy = function ( source ) {
 
 	this.index = source.index;
 
+	return this;
+
 };
 
 ColorsNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/LightNode.js

@@ -40,6 +40,8 @@ LightNode.prototype.copy = function ( source ) {
 
 	this.scope = source.scope;
 
+	return this;
+
 };
 
 LightNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/NormalNode.js

@@ -84,6 +84,8 @@ NormalNode.prototype.copy = function ( source ) {
 
 	this.scope = source.scope;
 
+	return this;
+
 };
 
 NormalNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/PositionNode.js

@@ -114,6 +114,8 @@ PositionNode.prototype.copy = function ( source ) {
 
 	this.scope = source.scope;
 
+	return this;
+
 };
 
 PositionNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/ResolutionNode.js

@@ -43,6 +43,8 @@ ResolutionNode.prototype.copy = function ( source ) {
 
 	this.renderer = source.renderer;
 
+	return this;
+
 };
 
 ResolutionNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/ScreenUVNode.js

@@ -43,6 +43,8 @@ ScreenUVNode.prototype.copy = function ( source ) {
 
 	this.resolution = source.resolution;
 
+	return this;
+
 };
 
 ScreenUVNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/accessors/UVNode.js

@@ -36,6 +36,8 @@ UVNode.prototype.copy = function ( source ) {
 
 	this.index = source.index;
 
+	return this;
+
 };
 
 UVNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/bsdfs/BlinnExponentToRoughnessNode.js

@@ -29,6 +29,8 @@ BlinnExponentToRoughnessNode.prototype.copy = function ( source ) {
 
 	this.blinnExponent = source.blinnExponent;
 
+	return this;
+
 };
 
 BlinnExponentToRoughnessNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/bsdfs/RoughnessToBlinnExponentNode.js

@@ -71,6 +71,8 @@ RoughnessToBlinnExponentNode.prototype.copy = function ( source ) {
 
 	this.texture = source.texture;
 
+	return this;
+
 };
 
 RoughnessToBlinnExponentNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/AttributeNode.js

@@ -47,6 +47,8 @@ AttributeNode.prototype.copy = function ( source ) {
 
 	this.type = source.type;
 
+	return this;
+
 };
 
 AttributeNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/ConstNode.js

@@ -102,6 +102,8 @@ ConstNode.prototype.copy = function ( source ) {
 
 	this.parse( source.src, source.useDefine );
 
+	return this;
+
 };
 
 ConstNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/FunctionCallNode.js

@@ -70,6 +70,8 @@ FunctionCallNode.prototype.copy = function ( source ) {
 
 	this.value = source.value;
 
+	return this;
+
 };
 
 FunctionCallNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/FunctionNode.js

@@ -226,6 +226,8 @@ FunctionNode.prototype.copy = function ( source ) {
 
 	if ( source.type !== undefined ) this.type = source.type;
 
+	return this;
+
 };
 
 FunctionNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/InputNode.js

@@ -38,6 +38,8 @@ InputNode.prototype.copy = function ( source ) {
 
 	if ( source.readonly !== undefined ) this.readonly = source.readonly;
 
+	return this;
+
 };
 
 InputNode.prototype.createJSONNode = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/Node.js

@@ -147,6 +147,8 @@ Node.prototype = {
 
 		if ( source.userData !== undefined ) this.userData = JSON.parse( JSON.stringify( source.userData ) );
 
+		return this;
+
 	},
 
 	createJSONNode: function ( meta ) {

+ 2 - 0
examples/jsm/nodes/core/VarNode.js

@@ -43,6 +43,8 @@ VarNode.prototype.copy = function ( source ) {
 	this.type = source.type;
 	this.value = source.value;
 
+	return this;
+
 };
 
 VarNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/effects/BlurNode.js

@@ -142,6 +142,8 @@ BlurNode.prototype.copy = function ( source ) {
 	this.blurX = source.blurX;
 	this.blurY = source.blurY;
 
+	return this;
+
 };
 
 BlurNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/effects/ColorAdjustmentNode.js

@@ -113,6 +113,8 @@ ColorAdjustmentNode.prototype.copy = function ( source ) {
 	this.adjustment = source.adjustment;
 	this.method = source.method;
 
+	return this;
+
 };
 
 ColorAdjustmentNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/effects/LuminanceNode.js

@@ -52,6 +52,8 @@ LuminanceNode.prototype.copy = function ( source ) {
 
 	this.rgb = source.rgb;
 
+	return this;
+
 };
 
 LuminanceNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/BoolNode.js

@@ -28,6 +28,8 @@ BoolNode.prototype.copy = function ( source ) {
 
 	this.value = source.value;
 
+	return this;
+
 };
 
 BoolNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/ColorNode.js

@@ -33,6 +33,8 @@ ColorNode.prototype.copy = function ( source ) {
 
 	this.value.copy( source );
 
+	return this;
+
 };
 
 ColorNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/CubeTextureNode.js

@@ -84,6 +84,8 @@ CubeTextureNode.prototype.copy = function ( source ) {
 
 	if ( source.bias ) this.bias = source.bias;
 
+	return this;
+
 };
 
 CubeTextureNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/FloatNode.js

@@ -28,6 +28,8 @@ FloatNode.prototype.copy = function ( source ) {
 
 	this.value = source.value;
 
+	return this;
+
 };
 
 FloatNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/IntNode.js

@@ -28,6 +28,8 @@ IntNode.prototype.copy = function ( source ) {
 
 	this.value = source.value;
 
+	return this;
+
 };
 
 IntNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/Matrix3Node.js

@@ -51,6 +51,8 @@ Matrix3Node.prototype.copy = function ( source ) {
 
 	this.value.fromArray( source.elements );
 
+	return this;
+
 };
 
 Matrix3Node.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/Matrix4Node.js

@@ -50,6 +50,8 @@ Matrix4Node.prototype.copy = function ( source ) {
 
 	this.scope.value.fromArray( source.elements );
 
+	return this;
+
 };
 
 Matrix4Node.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/RTTNode.js

@@ -135,6 +135,8 @@ RTTNode.prototype.copy = function ( source ) {
 
 	this.saveTo = source.saveTo;
 
+	return this;
+
 };
 
 RTTNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/ReflectorNode.js

@@ -67,6 +67,8 @@ ReflectorNode.prototype.copy = function ( source ) {
 
 	this.scope.mirror = source.mirror;
 
+	return this;
+
 };
 
 ReflectorNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/TextureNode.js

@@ -89,6 +89,8 @@ TextureNode.prototype.copy = function ( source ) {
 	if ( source.bias ) this.bias = source.bias;
 	if ( source.project !== undefined ) this.project = source.project;
 
+	return this;
+
 };
 
 TextureNode.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/Vector2Node.js

@@ -33,6 +33,8 @@ Vector2Node.prototype.copy = function ( source ) {
 
 	this.value.copy( source );
 
+	return this;
+
 };
 
 Vector2Node.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/Vector3Node.js

@@ -33,6 +33,8 @@ Vector3Node.prototype.copy = function ( source ) {
 
 	this.value.copy( source );
 
+	return this;
+
 };
 
 Vector3Node.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/inputs/Vector4Node.js

@@ -33,6 +33,8 @@ Vector4Node.prototype.copy = function ( source ) {
 
 	this.value.copy( source );
 
+	return this;
+
 };
 
 Vector4Node.prototype.toJSON = function ( meta ) {

+ 2 - 0
examples/jsm/nodes/materials/NodeMaterial.js

@@ -144,6 +144,8 @@ NodeMaterial.prototype.copy = function ( source ) {
 
 	}
 
+	return this;
+
 };
 
 NodeMaterial.prototype.toJSON = function ( meta ) {

部分文件因文件數量過多而無法顯示