minerender 1.4.11 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.esdoc.json +0 -0
- package/.github/FUNDING.yml +0 -0
- package/.github/stale.yml +0 -0
- package/.github/workflows/nodejs.yml +0 -0
- package/.travis.yml +0 -0
- package/CNAME +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/build.mjs +20 -0
- package/demo/model/index.html +0 -0
- package/demo/skin/index.html +0 -0
- package/dist/bundle.js +106338 -0
- package/dist/cjs/AnimatorFunction.d.ts +3 -0
- package/dist/cjs/AnimatorFunction.js +3 -0
- package/dist/cjs/AnimatorFunction.js.map +1 -0
- package/dist/cjs/Axis.d.ts +8 -0
- package/dist/cjs/Axis.js +23 -0
- package/dist/cjs/Axis.js.map +1 -0
- package/dist/cjs/CubeFace.d.ts +17 -0
- package/dist/cjs/CubeFace.js +23 -0
- package/dist/cjs/CubeFace.js.map +1 -0
- package/dist/cjs/Disposable.d.ts +4 -0
- package/dist/cjs/Disposable.js +8 -0
- package/dist/cjs/Disposable.js.map +1 -0
- package/dist/cjs/Env.d.ts +2 -0
- package/dist/cjs/Env.js +7 -0
- package/dist/cjs/Env.js.map +1 -0
- package/dist/cjs/ExtractableImageData.d.ts +5 -0
- package/dist/cjs/ExtractableImageData.js +3 -0
- package/dist/cjs/ExtractableImageData.js.map +1 -0
- package/dist/cjs/Geometries.d.ts +6 -0
- package/dist/cjs/Geometries.js +92 -0
- package/dist/cjs/Geometries.js.map +1 -0
- package/dist/cjs/ListAsset.d.ts +5 -0
- package/dist/cjs/ListAsset.js +3 -0
- package/dist/cjs/ListAsset.js.map +1 -0
- package/dist/cjs/Materials.d.ts +9 -0
- package/dist/cjs/Materials.js +151 -0
- package/dist/cjs/Materials.js.map +1 -0
- package/dist/cjs/Meshes.d.ts +6 -0
- package/dist/cjs/Meshes.js +21 -0
- package/dist/cjs/Meshes.js.map +1 -0
- package/dist/cjs/MinecraftAsset.d.ts +7 -0
- package/dist/cjs/MinecraftAsset.js +3 -0
- package/dist/cjs/MinecraftAsset.js.map +1 -0
- package/dist/cjs/MinecraftCubeTexture.d.ts +26 -0
- package/dist/cjs/MinecraftCubeTexture.js +104 -0
- package/dist/cjs/MinecraftCubeTexture.js.map +1 -0
- package/dist/cjs/MinecraftTextureMeta.d.ts +15 -0
- package/dist/cjs/MinecraftTextureMeta.js +3 -0
- package/dist/cjs/MinecraftTextureMeta.js.map +1 -0
- package/dist/cjs/SceneStats.d.ts +5 -0
- package/dist/cjs/SceneStats.js +12 -0
- package/dist/cjs/SceneStats.js.map +1 -0
- package/dist/cjs/Serializable.d.ts +3 -0
- package/dist/cjs/Serializable.js +3 -0
- package/dist/cjs/Serializable.js.map +1 -0
- package/dist/cjs/Ticker.d.ts +20 -0
- package/dist/cjs/Ticker.js +55 -0
- package/dist/cjs/Ticker.js.map +1 -0
- package/dist/cjs/TintColors.d.ts +1 -0
- package/dist/cjs/TintColors.js +5 -0
- package/dist/cjs/TintColors.js.map +1 -0
- package/dist/cjs/Transformable.d.ts +11 -0
- package/dist/cjs/Transformable.js +8 -0
- package/dist/cjs/Transformable.js.map +1 -0
- package/dist/cjs/UVMapper.d.ts +40 -0
- package/dist/cjs/UVMapper.js +434 -0
- package/dist/cjs/UVMapper.js.map +1 -0
- package/dist/cjs/WrappedImage.d.ts +17 -0
- package/dist/cjs/WrappedImage.js +50 -0
- package/dist/cjs/WrappedImage.js.map +1 -0
- package/dist/cjs/_model/Cube.d.ts +10 -0
- package/dist/cjs/_model/Cube.js +3 -0
- package/dist/cjs/_model/Cube.js.map +1 -0
- package/dist/cjs/_model/Element.d.ts +9 -0
- package/dist/cjs/_model/Element.js +3 -0
- package/dist/cjs/_model/Element.js.map +1 -0
- package/dist/cjs/_model/Face.d.ts +6 -0
- package/dist/cjs/_model/Face.js +3 -0
- package/dist/cjs/_model/Face.js.map +1 -0
- package/dist/cjs/_model/Model.d.ts +4 -0
- package/dist/cjs/_model/Model.js +3 -0
- package/dist/cjs/_model/Model.js.map +1 -0
- package/dist/cjs/assets/AssetKey.d.ts +26 -0
- package/dist/cjs/assets/AssetKey.js +83 -0
- package/dist/cjs/assets/AssetKey.js.map +1 -0
- package/dist/cjs/assets/AssetLoader.d.ts +26 -0
- package/dist/cjs/assets/AssetLoader.js +153 -0
- package/dist/cjs/assets/AssetLoader.js.map +1 -0
- package/dist/cjs/assets/Assets.d.ts +14 -0
- package/dist/cjs/assets/Assets.js +37 -0
- package/dist/cjs/assets/Assets.js.map +1 -0
- package/dist/cjs/assets/BlockStates.d.ts +11 -0
- package/dist/cjs/assets/BlockStates.js +75 -0
- package/dist/cjs/assets/BlockStates.js.map +1 -0
- package/dist/cjs/assets/Entities.d.ts +8 -0
- package/dist/cjs/assets/Entities.js +57 -0
- package/dist/cjs/assets/Entities.js.map +1 -0
- package/dist/cjs/assets/ModelTextures.d.ts +12 -0
- package/dist/cjs/assets/ModelTextures.js +66 -0
- package/dist/cjs/assets/ModelTextures.js.map +1 -0
- package/dist/cjs/assets/Models.d.ts +12 -0
- package/dist/cjs/assets/Models.js +95 -0
- package/dist/cjs/assets/Models.js.map +1 -0
- package/dist/cjs/bedrock/BedrockEntityDescription.d.ts +19 -0
- package/dist/cjs/bedrock/BedrockEntityDescription.js +3 -0
- package/dist/cjs/bedrock/BedrockEntityDescription.js.map +1 -0
- package/dist/cjs/bedrock/BedrockEntityFile.d.ts +7 -0
- package/dist/cjs/bedrock/BedrockEntityFile.js +3 -0
- package/dist/cjs/bedrock/BedrockEntityFile.js.map +1 -0
- package/dist/cjs/bedrock/BedrockGeometry.d.ts +27 -0
- package/dist/cjs/bedrock/BedrockGeometry.js +3 -0
- package/dist/cjs/bedrock/BedrockGeometry.js.map +1 -0
- package/dist/cjs/bedrock/BedrockGeometryFile.d.ts +5 -0
- package/dist/cjs/bedrock/BedrockGeometryFile.js +3 -0
- package/dist/cjs/bedrock/BedrockGeometryFile.js.map +1 -0
- package/dist/cjs/cache/CacheKey.d.ts +28 -0
- package/dist/cjs/cache/CacheKey.js +27 -0
- package/dist/cjs/cache/CacheKey.js.map +1 -0
- package/dist/cjs/cache/Caching.d.ts +29 -0
- package/dist/cjs/cache/Caching.js +93 -0
- package/dist/cjs/cache/Caching.js.map +1 -0
- package/dist/cjs/cache/PersistentCache.d.ts +15 -0
- package/dist/cjs/cache/PersistentCache.js +112 -0
- package/dist/cjs/cache/PersistentCache.js.map +1 -0
- package/dist/cjs/canvas/CanvasCompat.d.ts +5 -0
- package/dist/cjs/canvas/CanvasCompat.js +53 -0
- package/dist/cjs/canvas/CanvasCompat.js.map +1 -0
- package/dist/cjs/canvas/CanvasImage.d.ts +18 -0
- package/dist/cjs/canvas/CanvasImage.js +45 -0
- package/dist/cjs/canvas/CanvasImage.js.map +1 -0
- package/dist/cjs/entity/EntityModel.d.ts +7 -0
- package/dist/cjs/entity/EntityModel.js +3 -0
- package/dist/cjs/entity/EntityModel.js.map +1 -0
- package/dist/cjs/entity/blockEntityModels.json +1401 -0
- package/dist/cjs/entity/entityModels.json +20623 -0
- package/dist/cjs/entity/scene/EntityObject.d.ts +20 -0
- package/dist/cjs/entity/scene/EntityObject.js +131 -0
- package/dist/cjs/entity/scene/EntityObject.js.map +1 -0
- package/dist/cjs/error/MineRenderError.d.ts +4 -0
- package/dist/cjs/error/MineRenderError.js +15 -0
- package/dist/cjs/error/MineRenderError.js.map +1 -0
- package/dist/cjs/gui/scene/GuiObject.d.ts +6 -0
- package/dist/cjs/gui/scene/GuiObject.js +8 -0
- package/dist/cjs/gui/scene/GuiObject.js.map +1 -0
- package/dist/cjs/image/ImageLoader.d.ts +28 -0
- package/dist/cjs/image/ImageLoader.js +166 -0
- package/dist/cjs/image/ImageLoader.js.map +1 -0
- package/dist/cjs/index.d.ts +28 -0
- package/dist/cjs/index.js +43 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/inspector/SceneInspector.d.ts +27 -0
- package/dist/cjs/inspector/SceneInspector.js +366 -0
- package/dist/cjs/inspector/SceneInspector.js.map +1 -0
- package/dist/cjs/inspector/SceneStats.d.ts +22 -0
- package/dist/cjs/inspector/SceneStats.js +53 -0
- package/dist/cjs/inspector/SceneStats.js.map +1 -0
- package/dist/cjs/instance/InstanceManager.d.ts +14 -0
- package/dist/cjs/instance/InstanceManager.js +58 -0
- package/dist/cjs/instance/InstanceManager.js.map +1 -0
- package/dist/cjs/instance/InstanceReference.d.ts +21 -0
- package/dist/cjs/instance/InstanceReference.js +49 -0
- package/dist/cjs/instance/InstanceReference.js.map +1 -0
- package/dist/cjs/instance/Instanceable.d.ts +16 -0
- package/dist/cjs/instance/Instanceable.js +8 -0
- package/dist/cjs/instance/Instanceable.js.map +1 -0
- package/dist/cjs/lib/OrbitControls.d.ts +64 -0
- package/dist/cjs/lib/OrbitControls.js +658 -0
- package/dist/cjs/lib/OrbitControls.js.map +1 -0
- package/dist/cjs/model/DisplayPosition.d.ts +11 -0
- package/dist/cjs/model/DisplayPosition.js +16 -0
- package/dist/cjs/model/DisplayPosition.js.map +1 -0
- package/dist/cjs/model/ElementFace.d.ts +9 -0
- package/dist/cjs/model/ElementFace.js +3 -0
- package/dist/cjs/model/ElementFace.js.map +1 -0
- package/dist/cjs/model/GuiLight.d.ts +4 -0
- package/dist/cjs/model/GuiLight.js +9 -0
- package/dist/cjs/model/GuiLight.js.map +1 -0
- package/dist/cjs/model/Model.d.ts +46 -0
- package/dist/cjs/model/Model.js +20 -0
- package/dist/cjs/model/Model.js.map +1 -0
- package/dist/cjs/model/ModelElement.d.ts +21 -0
- package/dist/cjs/model/ModelElement.js +3 -0
- package/dist/cjs/model/ModelElement.js.map +1 -0
- package/dist/cjs/model/ModelGenerator.d.ts +6 -0
- package/dist/cjs/model/ModelGenerator.js +27 -0
- package/dist/cjs/model/ModelGenerator.js.map +1 -0
- package/dist/cjs/model/ModelMerger.d.ts +5 -0
- package/dist/cjs/model/ModelMerger.js +51 -0
- package/dist/cjs/model/ModelMerger.js.map +1 -0
- package/dist/cjs/model/ModelPart.d.ts +23 -0
- package/dist/cjs/model/ModelPart.js +3 -0
- package/dist/cjs/model/ModelPart.js.map +1 -0
- package/dist/cjs/model/block/Block.d.ts +6 -0
- package/dist/cjs/model/block/Block.js +3 -0
- package/dist/cjs/model/block/Block.js.map +1 -0
- package/dist/cjs/model/block/BlockState.d.ts +23 -0
- package/dist/cjs/model/block/BlockState.js +3 -0
- package/dist/cjs/model/block/BlockState.js.map +1 -0
- package/dist/cjs/model/block/BlockStateProperties.d.ts +13 -0
- package/dist/cjs/model/block/BlockStateProperties.js +3 -0
- package/dist/cjs/model/block/BlockStateProperties.js.map +1 -0
- package/dist/cjs/model/block/scene/BlockObject.d.ts +46 -0
- package/dist/cjs/model/block/scene/BlockObject.js +468 -0
- package/dist/cjs/model/block/scene/BlockObject.js.map +1 -0
- package/dist/cjs/model/defaultBlockStates.json +12337 -0
- package/dist/cjs/model/multiblock/MultiBlockStructure.d.ts +9 -0
- package/dist/cjs/model/multiblock/MultiBlockStructure.js +3 -0
- package/dist/cjs/model/multiblock/MultiBlockStructure.js.map +1 -0
- package/dist/cjs/model/multiblock/SchematicParser.d.ts +4 -0
- package/dist/cjs/model/multiblock/SchematicParser.js +23 -0
- package/dist/cjs/model/multiblock/SchematicParser.js.map +1 -0
- package/dist/cjs/model/multiblock/StructureParser.d.ts +70 -0
- package/dist/cjs/model/multiblock/StructureParser.js +52 -0
- package/dist/cjs/model/multiblock/StructureParser.js.map +1 -0
- package/dist/cjs/model/scene/ModelObject.d.ts +25 -0
- package/dist/cjs/model/scene/ModelObject.js +163 -0
- package/dist/cjs/model/scene/ModelObject.js.map +1 -0
- package/dist/cjs/nbt/NBTHelper.d.ts +8 -0
- package/dist/cjs/nbt/NBTHelper.js +42 -0
- package/dist/cjs/nbt/NBTHelper.js.map +1 -0
- package/dist/cjs/renderer/MineRenderScene.d.ts +35 -0
- package/dist/cjs/renderer/MineRenderScene.js +132 -0
- package/dist/cjs/renderer/MineRenderScene.js.map +1 -0
- package/dist/cjs/renderer/Renderer.d.ts +83 -0
- package/dist/cjs/renderer/Renderer.js +267 -0
- package/dist/cjs/renderer/Renderer.js.map +1 -0
- package/dist/cjs/renderer/SceneObject.d.ts +81 -0
- package/dist/cjs/renderer/SceneObject.js +400 -0
- package/dist/cjs/renderer/SceneObject.js.map +1 -0
- package/dist/cjs/renderer/SceneObjectOptions.d.ts +6 -0
- package/dist/cjs/renderer/SceneObjectOptions.js +3 -0
- package/dist/cjs/renderer/SceneObjectOptions.js.map +1 -0
- package/dist/cjs/request/Requests.d.ts +12 -0
- package/dist/cjs/request/Requests.js +39 -0
- package/dist/cjs/request/Requests.js.map +1 -0
- package/dist/cjs/skin/SkinGeometries.d.ts +5 -0
- package/dist/cjs/skin/SkinGeometries.js +39 -0
- package/dist/cjs/skin/SkinGeometries.js.map +1 -0
- package/dist/cjs/skin/SkinPart.d.ts +16 -0
- package/dist/cjs/skin/SkinPart.js +21 -0
- package/dist/cjs/skin/SkinPart.js.map +1 -0
- package/dist/cjs/skin/SkinTextureCoordinates.d.ts +5 -0
- package/dist/cjs/skin/SkinTextureCoordinates.js +751 -0
- package/dist/cjs/skin/SkinTextureCoordinates.js.map +1 -0
- package/dist/cjs/skin/Skins.d.ts +17 -0
- package/dist/cjs/skin/Skins.js +168 -0
- package/dist/cjs/skin/Skins.js.map +1 -0
- package/dist/cjs/skin/scene/SkinObject.d.ts +21 -0
- package/dist/cjs/skin/scene/SkinObject.js +119 -0
- package/dist/cjs/skin/scene/SkinObject.js.map +1 -0
- package/dist/cjs/texture/TextureAtlas.d.ts +29 -0
- package/dist/cjs/texture/TextureAtlas.js +26 -0
- package/dist/cjs/texture/TextureAtlas.js.map +1 -0
- package/dist/cjs/texture/TextureLoader.d.ts +6 -0
- package/dist/cjs/texture/TextureLoader.js +34 -0
- package/dist/cjs/texture/TextureLoader.js.map +1 -0
- package/dist/cjs/texture/Textures.d.ts +10 -0
- package/dist/cjs/texture/Textures.js +52 -0
- package/dist/cjs/texture/Textures.js.map +1 -0
- package/dist/cjs/three/BufferGeometryUtils.d.ts +44 -0
- package/dist/cjs/three/BufferGeometryUtils.js +554 -0
- package/dist/cjs/three/BufferGeometryUtils.js.map +1 -0
- package/dist/cjs/three/OrbitControls.d.ts +59 -0
- package/dist/cjs/three/OrbitControls.js +790 -0
- package/dist/cjs/three/OrbitControls.js.map +1 -0
- package/dist/cjs/util/BatchedExecutor.d.ts +12 -0
- package/dist/cjs/util/BatchedExecutor.js +26 -0
- package/dist/cjs/util/BatchedExecutor.js.map +1 -0
- package/dist/cjs/util/log.d.ts +1 -0
- package/dist/cjs/util/log.js +32 -0
- package/dist/cjs/util/log.js.map +1 -0
- package/dist/cjs/util/model.d.ts +11 -0
- package/dist/cjs/util/model.js +182 -0
- package/dist/cjs/util/model.js.map +1 -0
- package/dist/cjs/util/performance.d.ts +3 -0
- package/dist/cjs/util/performance.js +19 -0
- package/dist/cjs/util/performance.js.map +1 -0
- package/dist/cjs/util/three.d.ts +8 -0
- package/dist/cjs/util/three.js +28 -0
- package/dist/cjs/util/three.js.map +1 -0
- package/dist/cjs/util/util.d.ts +19 -0
- package/dist/cjs/util/util.js +143 -0
- package/dist/cjs/util/util.js.map +1 -0
- package/dist/cjs/world/BlockInfo.d.ts +6 -0
- package/dist/cjs/world/BlockInfo.js +3 -0
- package/dist/cjs/world/BlockInfo.js.map +1 -0
- package/dist/cjs/world/Chunk.d.ts +33 -0
- package/dist/cjs/world/Chunk.js +132 -0
- package/dist/cjs/world/Chunk.js.map +1 -0
- package/dist/cjs/world/MineRenderWorld.d.ts +31 -0
- package/dist/cjs/world/MineRenderWorld.js +133 -0
- package/dist/cjs/world/MineRenderWorld.js.map +1 -0
- package/dist/esm/AnimatorFunction.d.ts +3 -0
- package/dist/esm/AnimatorFunction.js +2 -0
- package/dist/esm/AnimatorFunction.js.map +1 -0
- package/dist/esm/Axis.d.ts +8 -0
- package/dist/esm/Axis.js +19 -0
- package/dist/esm/Axis.js.map +1 -0
- package/dist/esm/CubeFace.d.ts +17 -0
- package/dist/esm/CubeFace.js +20 -0
- package/dist/esm/CubeFace.js.map +1 -0
- package/dist/esm/Disposable.d.ts +4 -0
- package/dist/esm/Disposable.js +4 -0
- package/dist/esm/Disposable.js.map +1 -0
- package/dist/esm/Env.d.ts +2 -0
- package/dist/esm/Env.js +3 -0
- package/dist/esm/Env.js.map +1 -0
- package/dist/esm/ExtractableImageData.d.ts +5 -0
- package/dist/esm/ExtractableImageData.js +2 -0
- package/dist/esm/ExtractableImageData.js.map +1 -0
- package/dist/esm/Geometries.d.ts +6 -0
- package/dist/esm/Geometries.js +88 -0
- package/dist/esm/Geometries.js.map +1 -0
- package/dist/esm/ListAsset.d.ts +5 -0
- package/dist/esm/ListAsset.js +2 -0
- package/dist/esm/ListAsset.js.map +1 -0
- package/dist/esm/Materials.d.ts +9 -0
- package/dist/esm/Materials.js +147 -0
- package/dist/esm/Materials.js.map +1 -0
- package/dist/esm/Meshes.d.ts +6 -0
- package/dist/esm/Meshes.js +17 -0
- package/dist/esm/Meshes.js.map +1 -0
- package/dist/esm/MinecraftAsset.d.ts +7 -0
- package/dist/esm/MinecraftAsset.js +2 -0
- package/dist/esm/MinecraftAsset.js.map +1 -0
- package/dist/esm/MinecraftCubeTexture.d.ts +26 -0
- package/dist/esm/MinecraftCubeTexture.js +100 -0
- package/dist/esm/MinecraftCubeTexture.js.map +1 -0
- package/dist/esm/MinecraftTextureMeta.d.ts +15 -0
- package/dist/esm/MinecraftTextureMeta.js +2 -0
- package/dist/esm/MinecraftTextureMeta.js.map +1 -0
- package/dist/esm/SceneStats.d.ts +5 -0
- package/dist/esm/SceneStats.js +8 -0
- package/dist/esm/SceneStats.js.map +1 -0
- package/dist/esm/Serializable.d.ts +3 -0
- package/dist/esm/Serializable.js +2 -0
- package/dist/esm/Serializable.js.map +1 -0
- package/dist/esm/Ticker.d.ts +20 -0
- package/dist/esm/Ticker.js +51 -0
- package/dist/esm/Ticker.js.map +1 -0
- package/dist/esm/TintColors.d.ts +1 -0
- package/dist/esm/TintColors.js +2 -0
- package/dist/esm/TintColors.js.map +1 -0
- package/dist/esm/Transformable.d.ts +11 -0
- package/dist/esm/Transformable.js +4 -0
- package/dist/esm/Transformable.js.map +1 -0
- package/dist/esm/UVMapper.d.ts +40 -0
- package/dist/esm/UVMapper.js +429 -0
- package/dist/esm/UVMapper.js.map +1 -0
- package/dist/esm/WrappedImage.d.ts +17 -0
- package/dist/esm/WrappedImage.js +46 -0
- package/dist/esm/WrappedImage.js.map +1 -0
- package/dist/esm/_model/Cube.d.ts +10 -0
- package/dist/esm/_model/Cube.js +2 -0
- package/dist/esm/_model/Cube.js.map +1 -0
- package/dist/esm/_model/Element.d.ts +9 -0
- package/dist/esm/_model/Element.js +2 -0
- package/dist/esm/_model/Element.js.map +1 -0
- package/dist/esm/_model/Face.d.ts +6 -0
- package/dist/esm/_model/Face.js +2 -0
- package/dist/esm/_model/Face.js.map +1 -0
- package/dist/esm/_model/Model.d.ts +4 -0
- package/dist/esm/_model/Model.js +2 -0
- package/dist/esm/_model/Model.js.map +1 -0
- package/dist/esm/assets/AssetKey.d.ts +26 -0
- package/dist/esm/assets/AssetKey.js +76 -0
- package/dist/esm/assets/AssetKey.js.map +1 -0
- package/dist/esm/assets/AssetLoader.d.ts +26 -0
- package/dist/esm/assets/AssetLoader.js +149 -0
- package/dist/esm/assets/AssetLoader.js.map +1 -0
- package/dist/esm/assets/Assets.d.ts +14 -0
- package/dist/esm/assets/Assets.js +33 -0
- package/dist/esm/assets/Assets.js.map +1 -0
- package/dist/esm/assets/BlockStates.d.ts +11 -0
- package/dist/esm/assets/BlockStates.js +68 -0
- package/dist/esm/assets/BlockStates.js.map +1 -0
- package/dist/esm/assets/Entities.d.ts +8 -0
- package/dist/esm/assets/Entities.js +50 -0
- package/dist/esm/assets/Entities.js.map +1 -0
- package/dist/esm/assets/ModelTextures.d.ts +12 -0
- package/dist/esm/assets/ModelTextures.js +62 -0
- package/dist/esm/assets/ModelTextures.js.map +1 -0
- package/dist/esm/assets/Models.d.ts +12 -0
- package/dist/esm/assets/Models.js +91 -0
- package/dist/esm/assets/Models.js.map +1 -0
- package/dist/esm/bedrock/BedrockEntityDescription.d.ts +19 -0
- package/dist/esm/bedrock/BedrockEntityDescription.js +2 -0
- package/dist/esm/bedrock/BedrockEntityDescription.js.map +1 -0
- package/dist/esm/bedrock/BedrockEntityFile.d.ts +7 -0
- package/dist/esm/bedrock/BedrockEntityFile.js +2 -0
- package/dist/esm/bedrock/BedrockEntityFile.js.map +1 -0
- package/dist/esm/bedrock/BedrockGeometry.d.ts +27 -0
- package/dist/esm/bedrock/BedrockGeometry.js +2 -0
- package/dist/esm/bedrock/BedrockGeometry.js.map +1 -0
- package/dist/esm/bedrock/BedrockGeometryFile.d.ts +5 -0
- package/dist/esm/bedrock/BedrockGeometryFile.js +2 -0
- package/dist/esm/bedrock/BedrockGeometryFile.js.map +1 -0
- package/dist/esm/cache/CacheKey.d.ts +28 -0
- package/dist/esm/cache/CacheKey.js +19 -0
- package/dist/esm/cache/CacheKey.js.map +1 -0
- package/dist/esm/cache/Caching.d.ts +29 -0
- package/dist/esm/cache/Caching.js +89 -0
- package/dist/esm/cache/Caching.js.map +1 -0
- package/dist/esm/cache/PersistentCache.d.ts +15 -0
- package/dist/esm/cache/PersistentCache.js +105 -0
- package/dist/esm/cache/PersistentCache.js.map +1 -0
- package/dist/esm/canvas/CanvasCompat.d.ts +5 -0
- package/dist/esm/canvas/CanvasCompat.js +29 -0
- package/dist/esm/canvas/CanvasCompat.js.map +1 -0
- package/dist/esm/canvas/CanvasImage.d.ts +18 -0
- package/dist/esm/canvas/CanvasImage.js +41 -0
- package/dist/esm/canvas/CanvasImage.js.map +1 -0
- package/dist/esm/entity/EntityModel.d.ts +7 -0
- package/dist/esm/entity/EntityModel.js +2 -0
- package/dist/esm/entity/EntityModel.js.map +1 -0
- package/dist/esm/entity/blockEntityModels.json +1401 -0
- package/dist/esm/entity/entityModels.json +20623 -0
- package/dist/esm/entity/scene/EntityObject.d.ts +20 -0
- package/dist/esm/entity/scene/EntityObject.js +104 -0
- package/dist/esm/entity/scene/EntityObject.js.map +1 -0
- package/dist/esm/error/MineRenderError.d.ts +4 -0
- package/dist/esm/error/MineRenderError.js +11 -0
- package/dist/esm/error/MineRenderError.js.map +1 -0
- package/dist/esm/gui/scene/GuiObject.d.ts +6 -0
- package/dist/esm/gui/scene/GuiObject.js +4 -0
- package/dist/esm/gui/scene/GuiObject.js.map +1 -0
- package/dist/esm/image/ImageLoader.d.ts +28 -0
- package/dist/esm/image/ImageLoader.js +159 -0
- package/dist/esm/image/ImageLoader.js.map +1 -0
- package/dist/esm/index.d.ts +28 -0
- package/dist/esm/index.js +31 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/inspector/SceneInspector.d.ts +27 -0
- package/dist/esm/inspector/SceneInspector.js +362 -0
- package/dist/esm/inspector/SceneInspector.js.map +1 -0
- package/dist/esm/inspector/SceneStats.d.ts +22 -0
- package/dist/esm/inspector/SceneStats.js +49 -0
- package/dist/esm/inspector/SceneStats.js.map +1 -0
- package/dist/esm/instance/InstanceManager.d.ts +14 -0
- package/dist/esm/instance/InstanceManager.js +53 -0
- package/dist/esm/instance/InstanceManager.js.map +1 -0
- package/dist/esm/instance/InstanceReference.d.ts +21 -0
- package/dist/esm/instance/InstanceReference.js +44 -0
- package/dist/esm/instance/InstanceReference.js.map +1 -0
- package/dist/esm/instance/Instanceable.d.ts +16 -0
- package/dist/esm/instance/Instanceable.js +4 -0
- package/dist/esm/instance/Instanceable.js.map +1 -0
- package/dist/esm/lib/OrbitControls.d.ts +64 -0
- package/dist/esm/lib/OrbitControls.js +636 -0
- package/dist/esm/lib/OrbitControls.js.map +1 -0
- package/dist/esm/model/DisplayPosition.d.ts +11 -0
- package/dist/esm/model/DisplayPosition.js +13 -0
- package/dist/esm/model/DisplayPosition.js.map +1 -0
- package/dist/esm/model/ElementFace.d.ts +9 -0
- package/dist/esm/model/ElementFace.js +2 -0
- package/dist/esm/model/ElementFace.js.map +1 -0
- package/dist/esm/model/GuiLight.d.ts +4 -0
- package/dist/esm/model/GuiLight.js +6 -0
- package/dist/esm/model/GuiLight.js.map +1 -0
- package/dist/esm/model/Model.d.ts +46 -0
- package/dist/esm/model/Model.js +14 -0
- package/dist/esm/model/Model.js.map +1 -0
- package/dist/esm/model/ModelElement.d.ts +21 -0
- package/dist/esm/model/ModelElement.js +2 -0
- package/dist/esm/model/ModelElement.js.map +1 -0
- package/dist/esm/model/ModelGenerator.d.ts +6 -0
- package/dist/esm/model/ModelGenerator.js +23 -0
- package/dist/esm/model/ModelGenerator.js.map +1 -0
- package/dist/esm/model/ModelMerger.d.ts +5 -0
- package/dist/esm/model/ModelMerger.js +44 -0
- package/dist/esm/model/ModelMerger.js.map +1 -0
- package/dist/esm/model/ModelPart.d.ts +23 -0
- package/dist/esm/model/ModelPart.js +2 -0
- package/dist/esm/model/ModelPart.js.map +1 -0
- package/dist/esm/model/block/Block.d.ts +6 -0
- package/dist/esm/model/block/Block.js +2 -0
- package/dist/esm/model/block/Block.js.map +1 -0
- package/dist/esm/model/block/BlockState.d.ts +23 -0
- package/dist/esm/model/block/BlockState.js +2 -0
- package/dist/esm/model/block/BlockState.js.map +1 -0
- package/dist/esm/model/block/BlockStateProperties.d.ts +13 -0
- package/dist/esm/model/block/BlockStateProperties.js +2 -0
- package/dist/esm/model/block/BlockStateProperties.js.map +1 -0
- package/dist/esm/model/block/scene/BlockObject.d.ts +46 -0
- package/dist/esm/model/block/scene/BlockObject.js +460 -0
- package/dist/esm/model/block/scene/BlockObject.js.map +1 -0
- package/dist/esm/model/defaultBlockStates.json +12337 -0
- package/dist/esm/model/multiblock/MultiBlockStructure.d.ts +9 -0
- package/dist/esm/model/multiblock/MultiBlockStructure.js +2 -0
- package/dist/esm/model/multiblock/MultiBlockStructure.js.map +1 -0
- package/dist/esm/model/multiblock/SchematicParser.d.ts +4 -0
- package/dist/esm/model/multiblock/SchematicParser.js +19 -0
- package/dist/esm/model/multiblock/SchematicParser.js.map +1 -0
- package/dist/esm/model/multiblock/StructureParser.d.ts +70 -0
- package/dist/esm/model/multiblock/StructureParser.js +48 -0
- package/dist/esm/model/multiblock/StructureParser.js.map +1 -0
- package/dist/esm/model/scene/ModelObject.d.ts +25 -0
- package/dist/esm/model/scene/ModelObject.js +155 -0
- package/dist/esm/model/scene/ModelObject.js.map +1 -0
- package/dist/esm/nbt/NBTHelper.d.ts +8 -0
- package/dist/esm/nbt/NBTHelper.js +19 -0
- package/dist/esm/nbt/NBTHelper.js.map +1 -0
- package/dist/esm/renderer/MineRenderScene.d.ts +35 -0
- package/dist/esm/renderer/MineRenderScene.js +124 -0
- package/dist/esm/renderer/MineRenderScene.js.map +1 -0
- package/dist/esm/renderer/Renderer.d.ts +83 -0
- package/dist/esm/renderer/Renderer.js +260 -0
- package/dist/esm/renderer/Renderer.js.map +1 -0
- package/dist/esm/renderer/SceneObject.d.ts +81 -0
- package/dist/esm/renderer/SceneObject.js +392 -0
- package/dist/esm/renderer/SceneObject.js.map +1 -0
- package/dist/esm/renderer/SceneObjectOptions.d.ts +6 -0
- package/dist/esm/renderer/SceneObjectOptions.js +2 -0
- package/dist/esm/renderer/SceneObjectOptions.js.map +1 -0
- package/dist/esm/request/Requests.d.ts +12 -0
- package/dist/esm/request/Requests.js +32 -0
- package/dist/esm/request/Requests.js.map +1 -0
- package/dist/esm/skin/SkinGeometries.d.ts +5 -0
- package/dist/esm/skin/SkinGeometries.js +33 -0
- package/dist/esm/skin/SkinGeometries.js.map +1 -0
- package/dist/esm/skin/SkinPart.d.ts +16 -0
- package/dist/esm/skin/SkinPart.js +18 -0
- package/dist/esm/skin/SkinPart.js.map +1 -0
- package/dist/esm/skin/SkinTextureCoordinates.d.ts +5 -0
- package/dist/esm/skin/SkinTextureCoordinates.js +748 -0
- package/dist/esm/skin/SkinTextureCoordinates.js.map +1 -0
- package/dist/esm/skin/Skins.d.ts +17 -0
- package/dist/esm/skin/Skins.js +164 -0
- package/dist/esm/skin/Skins.js.map +1 -0
- package/dist/esm/skin/scene/SkinObject.d.ts +21 -0
- package/dist/esm/skin/scene/SkinObject.js +112 -0
- package/dist/esm/skin/scene/SkinObject.js.map +1 -0
- package/dist/esm/texture/TextureAtlas.d.ts +29 -0
- package/dist/esm/texture/TextureAtlas.js +22 -0
- package/dist/esm/texture/TextureAtlas.js.map +1 -0
- package/dist/esm/texture/TextureLoader.d.ts +6 -0
- package/dist/esm/texture/TextureLoader.js +30 -0
- package/dist/esm/texture/TextureLoader.js.map +1 -0
- package/dist/esm/texture/Textures.d.ts +10 -0
- package/dist/esm/texture/Textures.js +29 -0
- package/dist/esm/texture/Textures.js.map +1 -0
- package/dist/esm/three/BufferGeometryUtils.d.ts +44 -0
- package/dist/esm/three/BufferGeometryUtils.js +544 -0
- package/dist/esm/three/BufferGeometryUtils.js.map +1 -0
- package/dist/esm/three/OrbitControls.d.ts +59 -0
- package/dist/esm/three/OrbitControls.js +786 -0
- package/dist/esm/three/OrbitControls.js.map +1 -0
- package/dist/esm/util/BatchedExecutor.d.ts +12 -0
- package/dist/esm/util/BatchedExecutor.js +22 -0
- package/dist/esm/util/BatchedExecutor.js.map +1 -0
- package/dist/esm/util/log.d.ts +1 -0
- package/dist/esm/util/log.js +28 -0
- package/dist/esm/util/log.js.map +1 -0
- package/dist/esm/util/model.d.ts +11 -0
- package/dist/esm/util/model.js +173 -0
- package/dist/esm/util/model.js.map +1 -0
- package/dist/esm/util/performance.d.ts +3 -0
- package/dist/esm/util/performance.js +13 -0
- package/dist/esm/util/performance.js.map +1 -0
- package/dist/esm/util/three.d.ts +8 -0
- package/dist/esm/util/three.js +19 -0
- package/dist/esm/util/three.js.map +1 -0
- package/dist/esm/util/util.d.ts +19 -0
- package/dist/esm/util/util.js +107 -0
- package/dist/esm/util/util.js.map +1 -0
- package/dist/esm/world/BlockInfo.d.ts +6 -0
- package/dist/esm/world/BlockInfo.js +2 -0
- package/dist/esm/world/BlockInfo.js.map +1 -0
- package/dist/esm/world/Chunk.d.ts +33 -0
- package/dist/esm/world/Chunk.js +128 -0
- package/dist/esm/world/Chunk.js.map +1 -0
- package/dist/esm/world/MineRenderWorld.d.ts +31 -0
- package/dist/esm/world/MineRenderWorld.js +129 -0
- package/dist/esm/world/MineRenderWorld.js.map +1 -0
- package/docs/CNAME +0 -0
- package/docs/ast/source/.external-ecmascript.js.json +0 -0
- package/docs/ast/source/combined/index.js.json +0 -0
- package/docs/ast/source/entity/index.js.json +0 -0
- package/docs/ast/source/functions.js.json +0 -0
- package/docs/ast/source/gui/guiHelper.js.json +0 -0
- package/docs/ast/source/gui/guiPositions.js.json +0 -0
- package/docs/ast/source/gui/index.js.json +0 -0
- package/docs/ast/source/lib/OrbitControls.js.json +0 -0
- package/docs/ast/source/lib/merge.js.json +0 -0
- package/docs/ast/source/model/ModelWorker.js.json +0 -0
- package/docs/ast/source/model/index.js.json +0 -0
- package/docs/ast/source/model/modelConverter.js.json +0 -0
- package/docs/ast/source/model/modelFunctions.js.json +0 -0
- package/docs/ast/source/renderBase.js.json +0 -0
- package/docs/ast/source/skin/index.js.json +0 -0
- package/docs/ast/source/skin/texturePositions.js.json +0 -0
- package/docs/badge.svg +0 -0
- package/docs/class/src/combined/index.js~CombinedRender.html +0 -0
- package/docs/class/src/entity/index.js~EntityRender.html +0 -0
- package/docs/class/src/gui/index.js~GuiRender.html +0 -0
- package/docs/class/src/model/index.js~ModelRender.html +0 -0
- package/docs/class/src/renderBase.js~Render.html +0 -0
- package/docs/class/src/skin/index.js~SkinRender.html +0 -0
- package/docs/coverage.json +0 -0
- package/docs/css/github.css +0 -0
- package/docs/css/identifiers.css +0 -0
- package/docs/css/manual.css +0 -0
- package/docs/css/prettify-tomorrow.css +0 -0
- package/docs/css/search.css +0 -0
- package/docs/css/source.css +0 -0
- package/docs/css/style.css +0 -0
- package/docs/css/test.css +0 -0
- package/docs/file/src/combined/index.js.html +0 -0
- package/docs/file/src/entity/index.js.html +0 -0
- package/docs/file/src/functions.js.html +0 -0
- package/docs/file/src/gui/guiHelper.js.html +0 -0
- package/docs/file/src/gui/guiPositions.js.html +0 -0
- package/docs/file/src/gui/index.js.html +0 -0
- package/docs/file/src/lib/OrbitControls.js.html +0 -0
- package/docs/file/src/lib/merge.js.html +0 -0
- package/docs/file/src/model/ModelWorker.js.html +0 -0
- package/docs/file/src/model/index.js.html +0 -0
- package/docs/file/src/model/modelConverter.js.html +0 -0
- package/docs/file/src/model/modelFunctions.js.html +0 -0
- package/docs/file/src/renderBase.js.html +0 -0
- package/docs/file/src/skin/index.js.html +0 -0
- package/docs/file/src/skin/texturePositions.js.html +0 -0
- package/docs/function/index.html +0 -0
- package/docs/identifiers.html +0 -0
- package/docs/image/badge.svg +0 -0
- package/docs/image/brand_logo.png +0 -0
- package/docs/image/esdoc-logo-mini-black.png +0 -0
- package/docs/image/esdoc-logo-mini.png +0 -0
- package/docs/image/github.png +0 -0
- package/docs/image/manual-badge.svg +0 -0
- package/docs/image/search.png +0 -0
- package/docs/index.html +0 -0
- package/docs/index.json +0 -0
- package/docs/lint.json +0 -0
- package/docs/script/inherited-summary.js +0 -0
- package/docs/script/inner-link.js +0 -0
- package/docs/script/manual.js +0 -0
- package/docs/script/patch-for-local.js +0 -0
- package/docs/script/prettify/Apache-License-2.0.txt +0 -0
- package/docs/script/prettify/prettify.js +0 -0
- package/docs/script/pretty-print.js +0 -0
- package/docs/script/search.js +0 -0
- package/docs/script/search_index.js +0 -0
- package/docs/script/test-summary.js +0 -0
- package/docs/source.html +0 -0
- package/docs/variable/index.html +0 -0
- package/embed/model/index.html +0 -0
- package/embed/skin/index.html +0 -0
- package/favicon.ico +0 -0
- package/gulpfile.js +77 -0
- package/img/minerender-x128.png +0 -0
- package/img/minerender-x256.png +0 -0
- package/img/minerender-x256.webp +0 -0
- package/img/minerender-x512.png +0 -0
- package/img/minerender-x64.png +0 -0
- package/img/minerender.svg +0 -0
- package/img/minerender_block_gray.png +0 -0
- package/img/minerender_steve.png +0 -0
- package/img/minerender_steve_gray.png +0 -0
- package/img/minerender_steve_gray_blur.png +0 -0
- package/img/optifine_cape.png +0 -0
- package/img/optifine_hires_cape.png +0 -0
- package/index.html +0 -0
- package/js/data.js +0 -0
- package/js/data.min.js.map +1 -0
- package/js/main.js +0 -0
- package/js/main.min.js.map +1 -0
- package/keybase.txt +0 -0
- package/manifest.json +0 -0
- package/mccolor.js +1 -0
- package/nameToUuid.php +0 -0
- package/package.json +93 -24
- package/renovate.json +0 -0
- package/res/bedrockSource.txt +2 -0
- package/res/idsToNames.json +0 -0
- package/res/mc/.htaccess +0 -0
- package/res/mc/index.php +0 -0
- package/res/models/entities/agent.json +0 -0
- package/res/models/entities/armor_stand.json +0 -0
- package/res/models/entities/bat.json +0 -0
- package/res/models/entities/bed.json +0 -0
- package/res/models/entities/blaze.json +0 -0
- package/res/models/entities/cape.json +0 -0
- package/res/models/entities/chalkboard_large.json +0 -0
- package/res/models/entities/chalkboard_medium.json +0 -0
- package/res/models/entities/chalkboard_small.json +0 -0
- package/res/models/entities/chicken.json +0 -0
- package/res/models/entities/cod.json +0 -0
- package/res/models/entities/cow.json +0 -0
- package/res/models/entities/creeper.charged.json +0 -0
- package/res/models/entities/creeper.json +0 -0
- package/res/models/entities/dolphin.json +0 -0
- package/res/models/entities/dragon.json +0 -0
- package/res/models/entities/dragon_head.json +0 -0
- package/res/models/entities/enderman.json +0 -0
- package/res/models/entities/evoker.json +0 -0
- package/res/models/entities/ghast.json +0 -0
- package/res/models/entities/guardian.json +0 -0
- package/res/models/entities/horse.json +0 -0
- package/res/models/entities/horse.v2.json +0 -0
- package/res/models/entities/humanoid.armor1.json +0 -0
- package/res/models/entities/humanoid.armor2.json +0 -0
- package/res/models/entities/humanoid.custom.json +0 -0
- package/res/models/entities/humanoid.customSlim.json +0 -0
- package/res/models/entities/humanoid.json +0 -0
- package/res/models/entities/irongolem.json +0 -0
- package/res/models/entities/lavaslime.json +0 -0
- package/res/models/entities/llama.json +0 -0
- package/res/models/entities/llamaspit.json +0 -0
- package/res/models/entities/mob_head.json +0 -0
- package/res/models/entities/mooshroom.json +0 -0
- package/res/models/entities/npc.json +0 -0
- package/res/models/entities/ocelot.json +0 -0
- package/res/models/entities/parrot.json +0 -0
- package/res/models/entities/pig.json +0 -0
- package/res/models/entities/pigzombie.baby.json +0 -0
- package/res/models/entities/pigzombie.json +0 -0
- package/res/models/entities/player_head.json +0 -0
- package/res/models/entities/polarbear.json +0 -0
- package/res/models/entities/pufferfish.large.json +0 -0
- package/res/models/entities/pufferfish.mid.json +0 -0
- package/res/models/entities/pufferfish.small.json +0 -0
- package/res/models/entities/quadruped.json +0 -0
- package/res/models/entities/rabbit.json +0 -0
- package/res/models/entities/salmon.json +0 -0
- package/res/models/entities/sheep.json +0 -0
- package/res/models/entities/sheep.sheared.json +0 -0
- package/res/models/entities/shulker.json +0 -0
- package/res/models/entities/silverfish.json +0 -0
- package/res/models/entities/skeleton.json +0 -0
- package/res/models/entities/skeleton.stray.json +0 -0
- package/res/models/entities/skeleton.wither.json +0 -0
- package/res/models/entities/slime.armor.json +0 -0
- package/res/models/entities/slime.json +0 -0
- package/res/models/entities/snowgolem.json +0 -0
- package/res/models/entities/spider.json +0 -0
- package/res/models/entities/squid.json +0 -0
- package/res/models/entities/stray.armor.json +0 -0
- package/res/models/entities/trident.json +0 -0
- package/res/models/entities/tropicalfish_a.json +0 -0
- package/res/models/entities/tropicalfish_b.json +0 -0
- package/res/models/entities/turtle.json +0 -0
- package/res/models/entities/vex.json +0 -0
- package/res/models/entities/villager.json +0 -0
- package/res/models/entities/villager.witch.json +0 -0
- package/res/models/entities/vindicator.json +0 -0
- package/res/models/entities/witherBoss.armor.json +0 -0
- package/res/models/entities/witherBoss.json +0 -0
- package/res/models/entities/wolf.json +0 -0
- package/res/models/entities/zombie.drowned.json +0 -0
- package/res/models/entities/zombie.husk.json +0 -0
- package/res/models/entities/zombie.json +0 -0
- package/res/models/entities/zombie.villager.json +0 -0
- package/res/tools/bedrock/bedrockEntityConverter.js +0 -0
- package/res/tools/bedrock/convertedMobs/agent.json +0 -0
- package/res/tools/bedrock/convertedMobs/bed.json +0 -0
- package/res/tools/bedrock/convertedMobs/cape.json +0 -0
- package/res/tools/bedrock/convertedMobs/chalkboard_large.json +0 -0
- package/res/tools/bedrock/convertedMobs/chalkboard_medium.json +0 -0
- package/res/tools/bedrock/convertedMobs/chalkboard_small.json +0 -0
- package/res/tools/bedrock/convertedMobs/dragon.json +0 -0
- package/res/tools/bedrock/convertedMobs/dragon_head.json +0 -0
- package/res/tools/bedrock/convertedMobs/elytra.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor.boots.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor.chestplate.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor.helmet.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor.leggings.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor1.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.armor2.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.custom.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.customSlim.json +0 -0
- package/res/tools/bedrock/convertedMobs/humanoid.json +0 -0
- package/res/tools/bedrock/convertedMobs/irongolem.json +0 -0
- package/res/tools/bedrock/convertedMobs/mob_head.json +0 -0
- package/res/tools/bedrock/convertedMobs/player_head.json +0 -0
- package/res/tools/bedrock/convertedMobs/quadruped.json +0 -0
- package/res/tools/bedrock/convertedMobs/rsion.json +0 -0
- package/res/tools/bedrock/convertedMobs/trident.json +0 -0
- package/res/tools/bedrock/mobs.json +0 -0
- package/res/tools/java/javaSourceParser.js +0 -0
- package/res/tools/java/parsedToModel.js +0 -0
- package/server/index.js +0 -0
- package/src/AnimatorFunction.d.ts +3 -0
- package/src/AnimatorFunction.js +3 -0
- package/src/AnimatorFunction.js.map +1 -0
- package/src/AnimatorFunction.ts +3 -0
- package/src/Axis.d.ts +8 -0
- package/src/Axis.js +23 -0
- package/src/Axis.js.map +1 -0
- package/src/Axis.ts +20 -0
- package/src/CubeFace.d.ts +17 -0
- package/src/CubeFace.js +23 -0
- package/src/CubeFace.js.map +1 -0
- package/src/CubeFace.ts +20 -0
- package/src/Disposable.d.ts +4 -0
- package/src/Disposable.js +8 -0
- package/src/Disposable.js.map +1 -0
- package/src/Disposable.ts +7 -0
- package/src/Env.d.ts +2 -0
- package/src/Env.js +7 -0
- package/src/Env.js.map +1 -0
- package/src/Env.ts +2 -0
- package/src/ExtractableImageData.d.ts +5 -0
- package/src/ExtractableImageData.js +3 -0
- package/src/ExtractableImageData.js.map +1 -0
- package/src/ExtractableImageData.ts +5 -0
- package/src/Geometries.d.ts +6 -0
- package/src/Geometries.js +92 -0
- package/src/Geometries.js.map +1 -0
- package/src/Geometries.ts +99 -0
- package/src/ListAsset.d.ts +5 -0
- package/src/ListAsset.js +3 -0
- package/src/ListAsset.js.map +1 -0
- package/src/ListAsset.ts +6 -0
- package/src/Materials.d.ts +8 -0
- package/src/Materials.js +38 -0
- package/src/Materials.js.map +1 -0
- package/src/Materials.ts +160 -0
- package/src/Meshes.d.ts +6 -0
- package/src/Meshes.js +21 -0
- package/src/Meshes.js.map +1 -0
- package/src/Meshes.ts +20 -0
- package/src/MinecraftAsset.d.ts +7 -0
- package/src/MinecraftAsset.js +3 -0
- package/src/MinecraftAsset.js.map +1 -0
- package/src/MinecraftAsset.ts +9 -0
- package/src/MinecraftCubeTexture.d.ts +26 -0
- package/src/MinecraftCubeTexture.js +104 -0
- package/src/MinecraftCubeTexture.js.map +1 -0
- package/src/MinecraftCubeTexture.ts +116 -0
- package/src/MinecraftTextureMeta.d.ts +15 -0
- package/src/MinecraftTextureMeta.js +3 -0
- package/src/MinecraftTextureMeta.js.map +1 -0
- package/src/MinecraftTextureMeta.ts +18 -0
- package/src/SceneStats.d.ts +5 -0
- package/src/SceneStats.js +12 -0
- package/src/SceneStats.js.map +1 -0
- package/src/SceneStats.ts +7 -0
- package/src/Serializable.d.ts +3 -0
- package/src/Serializable.js +3 -0
- package/src/Serializable.js.map +1 -0
- package/src/Serializable.ts +3 -0
- package/src/Ticker.d.ts +20 -0
- package/src/Ticker.js +55 -0
- package/src/Ticker.js.map +1 -0
- package/src/Ticker.ts +65 -0
- package/src/TintColors.ts +3 -0
- package/src/Transformable.d.ts +10 -0
- package/src/Transformable.js +8 -0
- package/src/Transformable.js.map +1 -0
- package/src/Transformable.ts +23 -0
- package/src/UVMapper.d.ts +40 -0
- package/src/UVMapper.js +421 -0
- package/src/UVMapper.js.map +1 -0
- package/src/UVMapper.ts +506 -0
- package/src/WrappedImage.d.ts +17 -0
- package/src/WrappedImage.js +50 -0
- package/src/WrappedImage.js.map +1 -0
- package/src/WrappedImage.ts +61 -0
- package/src/_model/Cube.ts +9 -0
- package/src/_model/Element.ts +10 -0
- package/src/_model/Face.ts +7 -0
- package/src/_model/Model.ts +5 -0
- package/src/assets/AssetKey.d.ts +24 -0
- package/src/assets/AssetKey.js +70 -0
- package/src/assets/AssetKey.js.map +1 -0
- package/src/assets/AssetKey.ts +98 -0
- package/src/assets/AssetLoader.d.ts +25 -0
- package/src/assets/AssetLoader.js +132 -0
- package/src/assets/AssetLoader.js.map +1 -0
- package/src/assets/AssetLoader.ts +152 -0
- package/src/assets/Assets.d.ts +14 -0
- package/src/assets/Assets.js +24 -0
- package/src/assets/Assets.js.map +1 -0
- package/src/assets/Assets.ts +28 -0
- package/src/assets/BlockStates.d.ts +9 -0
- package/src/assets/BlockStates.js +51 -0
- package/src/assets/BlockStates.js.map +1 -0
- package/src/assets/BlockStates.ts +64 -0
- package/src/assets/Entities.d.ts +8 -0
- package/src/assets/Entities.js +40 -0
- package/src/assets/Entities.js.map +1 -0
- package/src/assets/Entities.ts +40 -0
- package/src/assets/ModelTextures.d.ts +11 -0
- package/src/assets/ModelTextures.js +42 -0
- package/src/assets/ModelTextures.js.map +1 -0
- package/src/assets/ModelTextures.ts +58 -0
- package/src/assets/Models.d.ts +11 -0
- package/src/assets/Models.js +70 -0
- package/src/assets/Models.js.map +1 -0
- package/src/assets/Models.ts +81 -0
- package/src/bedrock/BedrockEntityDescription.ts +11 -0
- package/src/bedrock/BedrockEntityFile.ts +8 -0
- package/src/bedrock/BedrockGeometry.ts +28 -0
- package/src/bedrock/BedrockGeometryFile.ts +7 -0
- package/src/cache/CacheKey.d.ts +28 -0
- package/src/cache/CacheKey.js +27 -0
- package/src/cache/CacheKey.js.map +1 -0
- package/src/cache/CacheKey.ts +90 -0
- package/src/cache/Caching.d.ts +29 -0
- package/src/cache/Caching.js +93 -0
- package/src/cache/Caching.js.map +1 -0
- package/src/cache/Caching.ts +116 -0
- package/src/cache/PersistentCache.d.ts +15 -0
- package/src/cache/PersistentCache.js +101 -0
- package/src/cache/PersistentCache.js.map +1 -0
- package/src/cache/PersistentCache.ts +132 -0
- package/src/canvas/CanvasCompat.d.ts +5 -0
- package/src/canvas/CanvasCompat.js +53 -0
- package/src/canvas/CanvasCompat.js.map +1 -0
- package/src/canvas/CanvasCompat.ts +33 -0
- package/src/canvas/CanvasImage.d.ts +18 -0
- package/src/canvas/CanvasImage.js +45 -0
- package/src/canvas/CanvasImage.js.map +1 -0
- package/src/canvas/CanvasImage.ts +58 -0
- package/src/entity/EntityModel.d.ts +7 -0
- package/src/entity/EntityModel.js +3 -0
- package/src/entity/EntityModel.js.map +1 -0
- package/src/entity/EntityModel.ts +6 -0
- package/src/entity/blockEntityModels.json +1401 -0
- package/src/entity/entityModels.json +20623 -0
- package/src/entity/scene/EntityObject.d.ts +20 -0
- package/src/entity/scene/EntityObject.js +116 -0
- package/src/entity/scene/EntityObject.js.map +1 -0
- package/src/entity/scene/EntityObject.ts +138 -0
- package/src/error/MineRenderError.d.ts +4 -0
- package/src/error/MineRenderError.js +15 -0
- package/src/error/MineRenderError.js.map +1 -0
- package/src/error/MineRenderError.ts +11 -0
- package/src/gui/scene/GuiObject.ts +13 -0
- package/src/image/ImageLoader.d.ts +28 -0
- package/src/image/ImageLoader.js +134 -0
- package/src/image/ImageLoader.js.map +1 -0
- package/src/image/ImageLoader.ts +161 -0
- package/src/index.d.ts +22 -0
- package/src/index.js +36 -0
- package/src/index.js.map +1 -0
- package/src/index.ts +39 -0
- package/src/inspector/SceneInspector.d.ts +22 -0
- package/src/inspector/SceneInspector.js +334 -0
- package/src/inspector/SceneInspector.js.map +1 -0
- package/src/inspector/SceneInspector.ts +426 -0
- package/src/inspector/SceneStats.ts +68 -0
- package/src/instance/InstanceManager.ts +53 -0
- package/src/instance/InstanceReference.d.ts +20 -0
- package/src/instance/InstanceReference.js +46 -0
- package/src/instance/InstanceReference.js.map +1 -0
- package/src/instance/InstanceReference.ts +62 -0
- package/src/instance/Instanceable.d.ts +15 -0
- package/src/instance/Instanceable.js +8 -0
- package/src/instance/Instanceable.js.map +1 -0
- package/src/instance/Instanceable.ts +33 -0
- package/src/lib/OrbitControls.js +0 -0
- package/src/model/DisplayPosition.ts +12 -0
- package/src/model/ElementFace.d.ts +9 -0
- package/src/model/ElementFace.js +3 -0
- package/src/model/ElementFace.js.map +1 -0
- package/src/model/ElementFace.ts +10 -0
- package/src/model/GuiLight.ts +4 -0
- package/src/model/Model.d.ts +43 -0
- package/src/model/Model.js +8 -0
- package/src/model/Model.js.map +1 -0
- package/src/model/Model.ts +67 -0
- package/src/model/ModelElement.ts +30 -0
- package/src/model/ModelGenerator.ts +32 -0
- package/src/model/ModelMerger.ts +36 -0
- package/src/model/ModelPart.d.ts +23 -0
- package/src/model/ModelPart.js +3 -0
- package/src/model/ModelPart.js.map +1 -0
- package/src/model/ModelPart.ts +25 -0
- package/src/model/block/Block.ts +10 -0
- package/src/model/block/BlockState.ts +25 -0
- package/src/model/block/BlockStateProperties.ts +12 -0
- package/src/model/block/scene/BlockObject.ts +475 -0
- package/src/model/defaultBlockStates.json +12337 -0
- package/src/model/legacyBlockList.json +47234 -0
- package/src/model/multiblock/MultiBlockStructure.ts +14 -0
- package/src/model/multiblock/SchematicParser.ts +11 -0
- package/src/model/multiblock/StructureParser.ts +109 -0
- package/src/model/scene/ModelObject.ts +185 -0
- package/src/nbt/NBTHelper.d.ts +8 -0
- package/src/nbt/NBTHelper.js +32 -0
- package/src/nbt/NBTHelper.js.map +1 -0
- package/src/nbt/NBTHelper.ts +15 -0
- package/src/renderer/MineRenderScene.ts +132 -0
- package/src/renderer/Renderer.ts +399 -0
- package/src/renderer/SceneObject.ts +446 -0
- package/src/renderer/SceneObjectOptions.ts +6 -0
- package/src/request/Requests.ts +44 -0
- package/src/skin/SkinGeometries.d.ts +5 -0
- package/src/skin/SkinGeometries.js +39 -0
- package/src/skin/SkinGeometries.js.map +1 -0
- package/src/skin/SkinGeometries.ts +50 -0
- package/src/skin/SkinPart.d.ts +16 -0
- package/src/skin/SkinPart.js +21 -0
- package/src/skin/SkinPart.js.map +1 -0
- package/src/skin/SkinPart.ts +19 -0
- package/src/skin/SkinTextureCoordinates.d.ts +5 -0
- package/src/skin/SkinTextureCoordinates.js +753 -0
- package/src/skin/SkinTextureCoordinates.js.map +1 -0
- package/src/skin/SkinTextureCoordinates.ts +759 -0
- package/src/skin/Skins.ts +158 -0
- package/src/skin/playerModels.json +678 -0
- package/src/skin/scene/SkinObject.d.ts +20 -0
- package/src/skin/scene/SkinObject.js +102 -0
- package/src/skin/scene/SkinObject.js.map +1 -0
- package/src/skin/scene/SkinObject.ts +148 -0
- package/src/texture/TextureAtlas.d.ts +29 -0
- package/src/texture/TextureAtlas.js +26 -0
- package/src/texture/TextureAtlas.js.map +1 -0
- package/src/texture/TextureAtlas.ts +32 -0
- package/src/texture/TextureLoader.d.ts +6 -0
- package/src/texture/TextureLoader.js +34 -0
- package/src/texture/TextureLoader.js.map +1 -0
- package/src/texture/TextureLoader.ts +41 -0
- package/src/texture/Textures.d.ts +10 -0
- package/src/texture/Textures.js +52 -0
- package/src/texture/Textures.js.map +1 -0
- package/src/texture/Textures.ts +37 -0
- package/src/three/BufferGeometryUtils.d.ts +17 -0
- package/src/three/BufferGeometryUtils.js +944 -0
- package/src/three/OrbitControls.d.ts +78 -0
- package/src/three/OrbitControls.js +1297 -0
- package/src/util/BatchedExecutor.ts +37 -0
- package/src/util/log.ts +30 -0
- package/src/util/model.d.ts +11 -0
- package/src/util/model.js +182 -0
- package/src/util/model.js.map +1 -0
- package/src/util/model.ts +213 -0
- package/src/util/performance.ts +14 -0
- package/src/util/three.d.ts +6 -0
- package/src/util/three.js +20 -0
- package/src/util/three.js.map +1 -0
- package/src/util/three.ts +26 -0
- package/src/util/util.d.ts +9 -0
- package/src/util/util.js +117 -0
- package/src/util/util.js.map +1 -0
- package/src/util/util.ts +120 -0
- package/src/world/BlockInfo.ts +7 -0
- package/src/world/Chunk.ts +165 -0
- package/src/world/MineRenderWorld.ts +149 -0
- package/test/combined.html +0 -0
- package/test/entity.html +0 -0
- package/test/gui.html +0 -0
- package/test/model.html +0 -0
- package/test/serviceworker.js +50 -0
- package/test/skin.html +0 -0
- package/test/structure.html +0 -0
- package/test/v2.html +528 -0
- package/tsconfig-cjs.json +7 -0
- package/tsconfig.json +37 -0
- package/CORSpipe.php +0 -32
- package/dist/all.js +0 -2294
- package/dist/all.min.js +0 -52
- package/dist/entity.js +0 -2282
- package/dist/entity.min.js +0 -52
- package/dist/gui.js +0 -2270
- package/dist/gui.min.js +0 -52
- package/dist/model.js +0 -2234
- package/dist/model.min.js +0 -52
- package/dist/skin.js +0 -397
- package/dist/skin.min.js +0 -24
- package/src/combined/index.js +0 -83
- package/src/entity/index.js +0 -335
- package/src/functions.js +0 -262
- package/src/gui/guiHelper.js +0 -154
- package/src/gui/guiPositions.js +0 -85
- package/src/gui/index.js +0 -222
- package/src/lib/merge.js +0 -0
- package/src/model/ModelWorker.js +0 -32
- package/src/model/index.js +0 -1128
- package/src/model/modelConverter.js +0 -290
- package/src/model/modelFunctions.js +0 -463
- package/src/renderBase.js +0 -496
- package/src/skin/index.js +0 -696
- package/src/skin/texturePositions.js +0 -1050
- package/stats.json +0 -1
- package/stats.php +0 -41
- package/webpack.config.js +0 -166
package/dist/skin.min.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* MineRender 1.4.11
|
|
3
|
-
* (c) 2018, Haylee Schäfer (inventivetalent) / MIT License
|
|
4
|
-
* https://minerender.org
|
|
5
|
-
* Build #1613813330530 / Sat Feb 20 2021 10:28:50 GMT+0100 (GMT+01:00)
|
|
6
|
-
*/!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=14)}([function(e,t){e.exports=THREE},function(e,t,r){"use strict";t.a={head:[{left:{x:0,y:16,w:8,h:8,flipX:!1},front:{x:8,y:16,w:8,h:8},right:{x:16,y:16,w:8,h:8,flipX:!1},back:{x:24,y:16,w:8,h:8},top:{x:8,y:24,w:8,h:8},bottom:{x:16,y:24,w:8,h:8,flipX:!0,flipY:!0}},{left:{x:0,y:48,w:8,h:8,flipX:!1},front:{x:8,y:48,w:8,h:8},right:{x:16,y:48,w:8,h:8,flipX:!1},back:{x:24,y:48,w:8,h:8},top:{x:8,y:56,w:8,h:8},bottom:{x:16,y:56,w:8,h:8,flipX:!0,flipY:!0}}],body:[{left:{x:16,y:0,w:4,h:12,flipX:!0},front:{x:20,y:0,w:8,h:12},right:{x:28,y:0,w:4,h:12,flipX:!0},back:{x:32,y:0,w:8,h:12},top:{x:20,y:12,w:8,h:4},bottom:{x:28,y:12,w:8,h:4,flipY:!0,flipX:!0}},{left:{x:16,y:32,w:4,h:12,flipX:!1},front:{x:20,y:32,w:8,h:12},right:{x:28,y:32,w:4,h:12,flipX:!1},back:{x:32,y:32,w:8,h:12},top:{x:20,y:44,w:8,h:4},bottom:{x:28,y:44,w:8,h:4,flipY:!0,flipX:!0}}],rightArm:[{left:{x:40,y:0,w:4,h:12,flipX:!1},front:{x:44,y:0,w:4,h:12,flipX:!1},right:{x:48,y:0,w:4,h:12,flipX:!1},back:{x:52,y:0,w:4,h:12,flipX:!1},top:{x:44,y:12,w:4,h:4,flipX:!1},bottom:{x:48,y:12,w:4,h:4,flipX:!0,flipY:!0}},{left:{x:32,y:0,w:4,h:12,flipX:!1},front:{x:36,y:0,w:4,h:12,sw:3,flipX:!1},right:{x:40,y:0,w:4,h:12,sx:39,flipX:!1},back:{x:44,y:0,w:4,h:12,sx:43,sw:3,flipX:!1},top:{x:36,y:12,w:4,h:4,sw:3,flipX:!1},bottom:{x:40,y:12,w:4,h:4,sx:39,sw:3,flipY:!0,flipX:!0}}],leftArm:[{left:{x:40,y:0,w:4,h:12,flipX:!1},front:{x:44,y:0,w:4,h:12,flipX:!1},right:{x:48,y:0,w:4,h:12,flipX:!1},back:{x:52,y:0,w:4,h:12,flipX:!1},top:{x:44,y:12,w:4,h:4,flipX:!1},bottom:{x:48,y:12,w:4,h:4,flipX:!0,flipY:!0}},{left:{x:40,y:32,w:4,h:12,flipX:!1},front:{x:44,y:32,w:4,h:12,sw:3,flipX:!1},right:{x:48,y:32,w:4,h:12,sx:47,flipX:!1},back:{x:52,y:32,w:4,h:12,sx:51,sw:3,flipX:!1},top:{x:44,y:44,w:4,h:4,sw:3,flipX:!1},bottom:{x:48,y:44,w:4,h:4,sx:47,sw:3,flipY:!0,flipX:!0}}],rightLeg:[{left:{x:0,y:0,w:4,h:12,flipX:!1},front:{x:4,y:0,w:4,h:12,flipX:!1},right:{x:8,y:0,w:4,h:12,flipX:!1},back:{x:12,y:0,w:4,h:12},top:{x:4,y:12,w:4,h:4,flipX:!1},bottom:{x:8,y:12,w:4,h:4,flipX:!0,flipY:!0}},{left:{x:16,y:0,w:4,h:12,flipX:!1},front:{x:20,y:0,w:4,h:12,flipX:!1},right:{x:24,y:0,w:4,h:12,flipX:!1},back:{x:28,y:0,w:4,h:12,flipX:!1},top:{x:20,y:12,w:4,h:4,flipX:!1},bottom:{x:24,y:12,w:4,h:4,flipY:!0,flipX:!0}}],leftLeg:[{left:{x:0,y:0,w:4,h:12,flipX:!1},front:{x:4,y:0,w:4,h:12,flipX:!1},right:{x:8,y:0,w:4,h:12,flipX:!1},back:{x:12,y:0,w:4,h:12,flipX:!0},top:{x:4,y:12,w:4,h:4,flipX:!1},bottom:{x:8,y:12,w:4,h:4,flipX:!0,flipY:!0}},{left:{x:0,y:32,w:4,h:12,flipX:!1},front:{x:4,y:32,w:4,h:12,flipX:!1},right:{x:8,y:32,w:4,h:12,flipX:!1},back:{x:12,y:32,w:4,h:12,flipX:!1},top:{x:4,y:44,w:4,h:4,flipX:!1},bottom:{x:8,y:44,w:4,h:4,flipY:!0,flipX:!0}}],hat:[{left:{x:32,y:16,w:8,h:8},front:{x:40,y:16,w:8,h:8},right:{x:48,y:16,w:8,h:8},back:{x:56,y:16,w:8,h:8},top:{x:40,y:24,w:8,h:8,flipX:!1},bottom:{x:48,y:24,w:8,h:8,flipY:!0,flipX:!0}},{left:{x:32,y:48,w:8,h:8},front:{x:40,y:48,w:8,h:8},right:{x:48,y:48,w:8,h:8},back:{x:56,y:48,w:8,h:8},top:{x:40,y:56,w:8,h:8,flipX:!1},bottom:{x:48,y:56,w:8,h:8,flipY:!0,flipX:!0}}],jacket:{left:{x:16,y:16,w:4,h:12},front:{x:20,y:16,w:8,h:12},right:{x:28,y:16,w:4,h:12},back:{x:32,y:16,w:8,h:12},top:{x:20,y:28,w:8,h:4},bottom:{x:28,y:28,w:8,h:4,flipY:!0,flipX:!0}},rightSleeve:{left:{x:48,y:0,w:4,h:12},front:{x:52,y:0,w:4,h:12,sw:3},right:{x:56,y:0,w:4,h:12,sx:55},back:{x:60,y:0,w:4,h:12,sx:59,sw:3},top:{x:52,y:12,w:4,h:4,sw:3},bottom:{x:56,y:12,w:4,h:4,sx:55,sw:3,flipY:!0,flipX:!0}},leftSleeve:{left:{x:40,y:16,w:4,h:12},front:{x:44,y:16,w:4,h:12,sw:3},right:{x:48,y:16,w:4,h:12,sx:47},back:{x:52,y:16,w:4,h:12,sx:51,sw:3},top:{x:44,y:28,w:4,h:4,sw:3},bottom:{x:48,y:28,w:4,h:4,sx:47,sw:3,flipY:!0,flipX:!0}},rightTrousers:{left:{x:0,y:0,w:4,h:12},front:{x:4,y:0,w:4,h:12},right:{x:8,y:0,w:4,h:12},back:{x:12,y:0,w:4,h:12},top:{x:4,y:12,w:4,h:4},bottom:{x:8,y:12,w:4,h:4,flipY:!0,flipX:!0}},leftTrousers:{left:{x:0,y:16,w:4,h:12},front:{x:4,y:16,w:4,h:12},right:{x:8,y:16,w:4,h:12},back:{x:12,y:16,w:4,h:12},top:{x:4,y:28,w:4,h:4},bottom:{x:8,y:28,w:4,h:4,flipY:!0,flipX:!0}},cape:{right:{x:0,y:5,w:1,h:16},front:{x:1,y:5,w:10,h:16},left:{x:11,y:5,w:1,h:16},back:{x:12,y:5,w:10,h:16},top:{x:1,y:21,w:10,h:1},bottom:{x:11,y:21,w:10,h:1}},capeRelative:{right:{x:0,y:15/32,w:1/64,h:.5},front:{x:1/64,y:15/32,w:10/64,h:.5},left:{x:11/64,y:15/32,w:1/64,h:.5},back:{x:.1875,y:15/32,w:10/64,h:.5},top:{x:1/64,y:31/32,w:10/64,h:1/32},bottom:{x:11/64,y:31/32,w:10/64,h:1/32}},capeOptifineRelative:{right:{x:0,y:10/44,w:2/92,h:32/44},front:{x:2/92,y:10/44,w:20/92,h:32/44},left:{x:22/92,y:10/44,w:2/92,h:32/44},back:{x:24/92,y:10/44,w:20/92,h:32/44},top:{x:2/92,y:42/44,w:20/92,h:2/44},bottom:{x:22/92,y:42/44,w:20/92,h:2/44}},capeOptifine:{right:{x:0,y:10,w:2,h:32},front:{x:2,y:10,w:20,h:32},left:{x:22,y:10,w:2,h:32},back:{x:24,y:10,w:20,h:32},top:{x:2,y:42,w:20,h:2},bottom:{x:22,y:42,w:20,h:2}},capeLabymodRelative:{right:{x:0,y:0,w:1/22,h:16/17},front:{x:1/22,y:0,w:10/22,h:16/17},left:{x:.5,y:0,w:1/22,h:16/17},back:{x:12/22,y:0,w:10/22,h:16/17},top:{x:1/22,y:16/17,w:10/22,h:1/17},bottom:{x:.5,y:16/17,w:10/22,h:1/17}}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),n=r(0);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=new n.OrthographicCamera(-1,1,1,-1,0,1),s=new n.PlaneBufferGeometry(2,2),l=function(){function e(t){i(this,e),this._mesh=new n.Mesh(s,t)}return a(e,[{key:"render",value:function(e){e.render(this._mesh,o)}},{key:"material",get:function(){return this._mesh.material},set:function(e){this._mesh.material=e}}]),e}(),u=function(){function e(){i(this,e),this.enabled=!0,this.needsSwap=!1,this.clear=!1,this.renderToScreen=!1}return a(e,[{key:"setSize",value:function(e,t){}},{key:"render",value:function(e,t,r,a,n){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}]),e}();u.FullScreenQuad=l,t.default=u},function(module,exports,__webpack_require__){
|
|
7
|
-
/*!
|
|
8
|
-
* The three.js expansion library v0.92.0
|
|
9
|
-
* Collected by Jusfoun Visualization Department
|
|
10
|
-
* Contact:
|
|
11
|
-
* vis@jusfoun.com
|
|
12
|
-
* http://vis.jusfoun.com
|
|
13
|
-
* http://jusfoun-vis.github.io
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) 2018, Jusfoun Big Data Group Inc.
|
|
16
|
-
* All rights reserved.
|
|
17
|
-
*
|
|
18
|
-
* LICENSE
|
|
19
|
-
* http://www.jusfoun.com/software/LICENSE.txt
|
|
20
|
-
*
|
|
21
|
-
* The three.js LICENSE
|
|
22
|
-
* http://threejs.org/license
|
|
23
|
-
*/
|
|
24
|
-
!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=27)}([function(e,t){e.exports=__webpack_require__(0)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1};Object.assign(a.prototype,{setSize:function(e,t){},render:function(e,t,r,a,n){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}),t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","gl_FragColor = opacity * texel;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(1),o=(a=i)&&a.__esModule?a:{default:a};var s=function(e,t){o.default.call(this),this.textureID=void 0!==t?t:"tDiffuse",e instanceof n.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=n.UniformsUtils.clone(e.uniforms),this.material=new n.ShaderMaterial({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.camera=new n.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new n.Scene,this.quad=new n.Mesh(new n.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(o.default.prototype),{constructor:s,render:function(e,t,r,a,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=r.texture),this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}}),t.default=s},function(e,t,r){!function(e){"use strict";function t(){}function r(e,r){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===r||r,this.encoder=new t}function a(){}function n(){}t.prototype.s2u=function(e){for(var t=this.s2uTable,r="",a=0;a<e.length;){var n=e[a++];if(!(n>=0&&n<=126||n>=161&&n<=223)&&a<e.length&&(n=n<<8|e[a++]),void 0===t[n])throw"unknown char code "+n+".";r+=String.fromCharCode(t[n])}return r},t.prototype.s2uTable={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:92,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:126,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:65340,33120:65374,33121:8741,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:65293,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:65504,33170:65505,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:65506,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34624:9312,34625:9313,34626:9314,34627:9315,34628:9316,34629:9317,34630:9318,34631:9319,34632:9320,34633:9321,34634:9322,34635:9323,34636:9324,34637:9325,34638:9326,34639:9327,34640:9328,34641:9329,34642:9330,34643:9331,34644:8544,34645:8545,34646:8546,34647:8547,34648:8548,34649:8549,34650:8550,34651:8551,34652:8552,34653:8553,34655:13129,34656:13076,34657:13090,34658:13133,34659:13080,34660:13095,34661:13059,34662:13110,34663:13137,34664:13143,34665:13069,34666:13094,34667:13091,34668:13099,34669:13130,34670:13115,34671:13212,34672:13213,34673:13214,34674:13198,34675:13199,34676:13252,34677:13217,34686:13179,34688:12317,34689:12319,34690:8470,34691:13261,34692:8481,34693:12964,34694:12965,34695:12966,34696:12967,34697:12968,34698:12849,34699:12850,34700:12857,34701:13182,34702:13181,34703:13180,34704:8786,34705:8801,34706:8747,34707:8750,34708:8721,34709:8730,34710:8869,34711:8736,34712:8735,34713:8895,34714:8757,34715:8745,34716:8746,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081,60736:32394,60737:35100,60738:37704,60739:37512,60740:34012,60741:20425,60742:28859,60743:26161,60744:26824,60745:37625,60746:26363,60747:24389,60748:20008,60749:20193,60750:20220,60751:20224,60752:20227,60753:20281,60754:20310,60755:20370,60756:20362,60757:20378,60758:20372,60759:20429,60760:20544,60761:20514,60762:20479,60763:20510,60764:20550,60765:20592,60766:20546,60767:20628,60768:20724,60769:20696,60770:20810,60771:20836,60772:20893,60773:20926,60774:20972,60775:21013,60776:21148,60777:21158,60778:21184,60779:21211,60780:21248,60781:21255,60782:21284,60783:21362,60784:21395,60785:21426,60786:21469,60787:64014,60788:21660,60789:21642,60790:21673,60791:21759,60792:21894,60793:22361,60794:22373,60795:22444,60796:22472,60797:22471,60798:64015,60800:64016,60801:22686,60802:22706,60803:22795,60804:22867,60805:22875,60806:22877,60807:22883,60808:22948,60809:22970,60810:23382,60811:23488,60812:29999,60813:23512,60814:23532,60815:23582,60816:23718,60817:23738,60818:23797,60819:23847,60820:23891,60821:64017,60822:23874,60823:23917,60824:23992,60825:23993,60826:24016,60827:24353,60828:24372,60829:24423,60830:24503,60831:24542,60832:24669,60833:24709,60834:24714,60835:24798,60836:24789,60837:24864,60838:24818,60839:24849,60840:24887,60841:24880,60842:24984,60843:25107,60844:25254,60845:25589,60846:25696,60847:25757,60848:25806,60849:25934,60850:26112,60851:26133,60852:26171,60853:26121,60854:26158,60855:26142,60856:26148,60857:26213,60858:26199,60859:26201,60860:64018,60861:26227,60862:26265,60863:26272,60864:26290,60865:26303,60866:26362,60867:26382,60868:63785,60869:26470,60870:26555,60871:26706,60872:26560,60873:26625,60874:26692,60875:26831,60876:64019,60877:26984,60878:64020,60879:27032,60880:27106,60881:27184,60882:27243,60883:27206,60884:27251,60885:27262,60886:27362,60887:27364,60888:27606,60889:27711,60890:27740,60891:27782,60892:27759,60893:27866,60894:27908,60895:28039,60896:28015,60897:28054,60898:28076,60899:28111,60900:28152,60901:28146,60902:28156,60903:28217,60904:28252,60905:28199,60906:28220,60907:28351,60908:28552,60909:28597,60910:28661,60911:28677,60912:28679,60913:28712,60914:28805,60915:28843,60916:28943,60917:28932,60918:29020,60919:28998,60920:28999,60921:64021,60922:29121,60923:29182,60924:29361,60992:29374,60993:29476,60994:64022,60995:29559,60996:29629,60997:29641,60998:29654,60999:29667,61e3:29650,61001:29703,61002:29685,61003:29734,61004:29738,61005:29737,61006:29742,61007:29794,61008:29833,61009:29855,61010:29953,61011:30063,61012:30338,61013:30364,61014:30366,61015:30363,61016:30374,61017:64023,61018:30534,61019:21167,61020:30753,61021:30798,61022:30820,61023:30842,61024:31024,61025:64024,61026:64025,61027:64026,61028:31124,61029:64027,61030:31131,61031:31441,61032:31463,61033:64028,61034:31467,61035:31646,61036:64029,61037:32072,61038:32092,61039:32183,61040:32160,61041:32214,61042:32338,61043:32583,61044:32673,61045:64030,61046:33537,61047:33634,61048:33663,61049:33735,61050:33782,61051:33864,61052:33972,61053:34131,61054:34137,61056:34155,61057:64031,61058:34224,61059:64032,61060:64033,61061:34823,61062:35061,61063:35346,61064:35383,61065:35449,61066:35495,61067:35518,61068:35551,61069:64034,61070:35574,61071:35667,61072:35711,61073:36080,61074:36084,61075:36114,61076:36214,61077:64035,61078:36559,61079:64036,61080:64037,61081:36967,61082:37086,61083:64038,61084:37141,61085:37159,61086:37338,61087:37335,61088:37342,61089:37357,61090:37358,61091:37348,61092:37349,61093:37382,61094:37392,61095:37386,61096:37434,61097:37440,61098:37436,61099:37454,61100:37465,61101:37457,61102:37433,61103:37479,61104:37543,61105:37495,61106:37496,61107:37607,61108:37591,61109:37593,61110:37584,61111:64039,61112:37589,61113:37600,61114:37587,61115:37669,61116:37665,61117:37627,61118:64040,61119:37662,61120:37631,61121:37661,61122:37634,61123:37744,61124:37719,61125:37796,61126:37830,61127:37854,61128:37880,61129:37937,61130:37957,61131:37960,61132:38290,61133:63964,61134:64041,61135:38557,61136:38575,61137:38707,61138:38715,61139:38723,61140:38733,61141:38735,61142:38737,61143:38741,61144:38999,61145:39013,61146:64042,61147:64043,61148:39207,61149:64044,61150:39326,61151:39502,61152:39641,61153:39644,61154:39797,61155:39794,61156:39823,61157:39857,61158:39867,61159:39936,61160:40304,61161:40299,61162:64045,61163:40473,61164:40657,61167:8560,61168:8561,61169:8562,61170:8563,61171:8564,61172:8565,61173:8566,61174:8567,61175:8568,61176:8569,61177:65506,61178:65508,61179:65287,61180:65282,61504:57344,61505:57345,61506:57346,61507:57347,61508:57348,61509:57349,61510:57350,61511:57351,61512:57352,61513:57353,61514:57354,61515:57355,61516:57356,61517:57357,61518:57358,61519:57359,61520:57360,61521:57361,61522:57362,61523:57363,61524:57364,61525:57365,61526:57366,61527:57367,61528:57368,61529:57369,61530:57370,61531:57371,61532:57372,61533:57373,61534:57374,61535:57375,61536:57376,61537:57377,61538:57378,61539:57379,61540:57380,61541:57381,61542:57382,61543:57383,61544:57384,61545:57385,61546:57386,61547:57387,61548:57388,61549:57389,61550:57390,61551:57391,61552:57392,61553:57393,61554:57394,61555:57395,61556:57396,61557:57397,61558:57398,61559:57399,61560:57400,61561:57401,61562:57402,61563:57403,61564:57404,61565:57405,61566:57406,61568:57407,61569:57408,61570:57409,61571:57410,61572:57411,61573:57412,61574:57413,61575:57414,61576:57415,61577:57416,61578:57417,61579:57418,61580:57419,61581:57420,61582:57421,61583:57422,61584:57423,61585:57424,61586:57425,61587:57426,61588:57427,61589:57428,61590:57429,61591:57430,61592:57431,61593:57432,61594:57433,61595:57434,61596:57435,61597:57436,61598:57437,61599:57438,61600:57439,61601:57440,61602:57441,61603:57442,61604:57443,61605:57444,61606:57445,61607:57446,61608:57447,61609:57448,61610:57449,61611:57450,61612:57451,61613:57452,61614:57453,61615:57454,61616:57455,61617:57456,61618:57457,61619:57458,61620:57459,61621:57460,61622:57461,61623:57462,61624:57463,61625:57464,61626:57465,61627:57466,61628:57467,61629:57468,61630:57469,61631:57470,61632:57471,61633:57472,61634:57473,61635:57474,61636:57475,61637:57476,61638:57477,61639:57478,61640:57479,61641:57480,61642:57481,61643:57482,61644:57483,61645:57484,61646:57485,61647:57486,61648:57487,61649:57488,61650:57489,61651:57490,61652:57491,61653:57492,61654:57493,61655:57494,61656:57495,61657:57496,61658:57497,61659:57498,61660:57499,61661:57500,61662:57501,61663:57502,61664:57503,61665:57504,61666:57505,61667:57506,61668:57507,61669:57508,61670:57509,61671:57510,61672:57511,61673:57512,61674:57513,61675:57514,61676:57515,61677:57516,61678:57517,61679:57518,61680:57519,61681:57520,61682:57521,61683:57522,61684:57523,61685:57524,61686:57525,61687:57526,61688:57527,61689:57528,61690:57529,61691:57530,61692:57531,61760:57532,61761:57533,61762:57534,61763:57535,61764:57536,61765:57537,61766:57538,61767:57539,61768:57540,61769:57541,61770:57542,61771:57543,61772:57544,61773:57545,61774:57546,61775:57547,61776:57548,61777:57549,61778:57550,61779:57551,61780:57552,61781:57553,61782:57554,61783:57555,61784:57556,61785:57557,61786:57558,61787:57559,61788:57560,61789:57561,61790:57562,61791:57563,61792:57564,61793:57565,61794:57566,61795:57567,61796:57568,61797:57569,61798:57570,61799:57571,61800:57572,61801:57573,61802:57574,61803:57575,61804:57576,61805:57577,61806:57578,61807:57579,61808:57580,61809:57581,61810:57582,61811:57583,61812:57584,61813:57585,61814:57586,61815:57587,61816:57588,61817:57589,61818:57590,61819:57591,61820:57592,61821:57593,61822:57594,61824:57595,61825:57596,61826:57597,61827:57598,61828:57599,61829:57600,61830:57601,61831:57602,61832:57603,61833:57604,61834:57605,61835:57606,61836:57607,61837:57608,61838:57609,61839:57610,61840:57611,61841:57612,61842:57613,61843:57614,61844:57615,61845:57616,61846:57617,61847:57618,61848:57619,61849:57620,61850:57621,61851:57622,61852:57623,61853:57624,61854:57625,61855:57626,61856:57627,61857:57628,61858:57629,61859:57630,61860:57631,61861:57632,61862:57633,61863:57634,61864:57635,61865:57636,61866:57637,61867:57638,61868:57639,61869:57640,61870:57641,61871:57642,61872:57643,61873:57644,61874:57645,61875:57646,61876:57647,61877:57648,61878:57649,61879:57650,61880:57651,61881:57652,61882:57653,61883:57654,61884:57655,61885:57656,61886:57657,61887:57658,61888:57659,61889:57660,61890:57661,61891:57662,61892:57663,61893:57664,61894:57665,61895:57666,61896:57667,61897:57668,61898:57669,61899:57670,61900:57671,61901:57672,61902:57673,61903:57674,61904:57675,61905:57676,61906:57677,61907:57678,61908:57679,61909:57680,61910:57681,61911:57682,61912:57683,61913:57684,61914:57685,61915:57686,61916:57687,61917:57688,61918:57689,61919:57690,61920:57691,61921:57692,61922:57693,61923:57694,61924:57695,61925:57696,61926:57697,61927:57698,61928:57699,61929:57700,61930:57701,61931:57702,61932:57703,61933:57704,61934:57705,61935:57706,61936:57707,61937:57708,61938:57709,61939:57710,61940:57711,61941:57712,61942:57713,61943:57714,61944:57715,61945:57716,61946:57717,61947:57718,61948:57719,62016:57720,62017:57721,62018:57722,62019:57723,62020:57724,62021:57725,62022:57726,62023:57727,62024:57728,62025:57729,62026:57730,62027:57731,62028:57732,62029:57733,62030:57734,62031:57735,62032:57736,62033:57737,62034:57738,62035:57739,62036:57740,62037:57741,62038:57742,62039:57743,62040:57744,62041:57745,62042:57746,62043:57747,62044:57748,62045:57749,62046:57750,62047:57751,62048:57752,62049:57753,62050:57754,62051:57755,62052:57756,62053:57757,62054:57758,62055:57759,62056:57760,62057:57761,62058:57762,62059:57763,62060:57764,62061:57765,62062:57766,62063:57767,62064:57768,62065:57769,62066:57770,62067:57771,62068:57772,62069:57773,62070:57774,62071:57775,62072:57776,62073:57777,62074:57778,62075:57779,62076:57780,62077:57781,62078:57782,62080:57783,62081:57784,62082:57785,62083:57786,62084:57787,62085:57788,62086:57789,62087:57790,62088:57791,62089:57792,62090:57793,62091:57794,62092:57795,62093:57796,62094:57797,62095:57798,62096:57799,62097:57800,62098:57801,62099:57802,62100:57803,62101:57804,62102:57805,62103:57806,62104:57807,62105:57808,62106:57809,62107:57810,62108:57811,62109:57812,62110:57813,62111:57814,62112:57815,62113:57816,62114:57817,62115:57818,62116:57819,62117:57820,62118:57821,62119:57822,62120:57823,62121:57824,62122:57825,62123:57826,62124:57827,62125:57828,62126:57829,62127:57830,62128:57831,62129:57832,62130:57833,62131:57834,62132:57835,62133:57836,62134:57837,62135:57838,62136:57839,62137:57840,62138:57841,62139:57842,62140:57843,62141:57844,62142:57845,62143:57846,62144:57847,62145:57848,62146:57849,62147:57850,62148:57851,62149:57852,62150:57853,62151:57854,62152:57855,62153:57856,62154:57857,62155:57858,62156:57859,62157:57860,62158:57861,62159:57862,62160:57863,62161:57864,62162:57865,62163:57866,62164:57867,62165:57868,62166:57869,62167:57870,62168:57871,62169:57872,62170:57873,62171:57874,62172:57875,62173:57876,62174:57877,62175:57878,62176:57879,62177:57880,62178:57881,62179:57882,62180:57883,62181:57884,62182:57885,62183:57886,62184:57887,62185:57888,62186:57889,62187:57890,62188:57891,62189:57892,62190:57893,62191:57894,62192:57895,62193:57896,62194:57897,62195:57898,62196:57899,62197:57900,62198:57901,62199:57902,62200:57903,62201:57904,62202:57905,62203:57906,62204:57907,62272:57908,62273:57909,62274:57910,62275:57911,62276:57912,62277:57913,62278:57914,62279:57915,62280:57916,62281:57917,62282:57918,62283:57919,62284:57920,62285:57921,62286:57922,62287:57923,62288:57924,62289:57925,62290:57926,62291:57927,62292:57928,62293:57929,62294:57930,62295:57931,62296:57932,62297:57933,62298:57934,62299:57935,62300:57936,62301:57937,62302:57938,62303:57939,62304:57940,62305:57941,62306:57942,62307:57943,62308:57944,62309:57945,62310:57946,62311:57947,62312:57948,62313:57949,62314:57950,62315:57951,62316:57952,62317:57953,62318:57954,62319:57955,62320:57956,62321:57957,62322:57958,62323:57959,62324:57960,62325:57961,62326:57962,62327:57963,62328:57964,62329:57965,62330:57966,62331:57967,62332:57968,62333:57969,62334:57970,62336:57971,62337:57972,62338:57973,62339:57974,62340:57975,62341:57976,62342:57977,62343:57978,62344:57979,62345:57980,62346:57981,62347:57982,62348:57983,62349:57984,62350:57985,62351:57986,62352:57987,62353:57988,62354:57989,62355:57990,62356:57991,62357:57992,62358:57993,62359:57994,62360:57995,62361:57996,62362:57997,62363:57998,62364:57999,62365:58e3,62366:58001,62367:58002,62368:58003,62369:58004,62370:58005,62371:58006,62372:58007,62373:58008,62374:58009,62375:58010,62376:58011,62377:58012,62378:58013,62379:58014,62380:58015,62381:58016,62382:58017,62383:58018,62384:58019,62385:58020,62386:58021,62387:58022,62388:58023,62389:58024,62390:58025,62391:58026,62392:58027,62393:58028,62394:58029,62395:58030,62396:58031,62397:58032,62398:58033,62399:58034,62400:58035,62401:58036,62402:58037,62403:58038,62404:58039,62405:58040,62406:58041,62407:58042,62408:58043,62409:58044,62410:58045,62411:58046,62412:58047,62413:58048,62414:58049,62415:58050,62416:58051,62417:58052,62418:58053,62419:58054,62420:58055,62421:58056,62422:58057,62423:58058,62424:58059,62425:58060,62426:58061,62427:58062,62428:58063,62429:58064,62430:58065,62431:58066,62432:58067,62433:58068,62434:58069,62435:58070,62436:58071,62437:58072,62438:58073,62439:58074,62440:58075,62441:58076,62442:58077,62443:58078,62444:58079,62445:58080,62446:58081,62447:58082,62448:58083,62449:58084,62450:58085,62451:58086,62452:58087,62453:58088,62454:58089,62455:58090,62456:58091,62457:58092,62458:58093,62459:58094,62460:58095,62528:58096,62529:58097,62530:58098,62531:58099,62532:58100,62533:58101,62534:58102,62535:58103,62536:58104,62537:58105,62538:58106,62539:58107,62540:58108,62541:58109,62542:58110,62543:58111,62544:58112,62545:58113,62546:58114,62547:58115,62548:58116,62549:58117,62550:58118,62551:58119,62552:58120,62553:58121,62554:58122,62555:58123,62556:58124,62557:58125,62558:58126,62559:58127,62560:58128,62561:58129,62562:58130,62563:58131,62564:58132,62565:58133,62566:58134,62567:58135,62568:58136,62569:58137,62570:58138,62571:58139,62572:58140,62573:58141,62574:58142,62575:58143,62576:58144,62577:58145,62578:58146,62579:58147,62580:58148,62581:58149,62582:58150,62583:58151,62584:58152,62585:58153,62586:58154,62587:58155,62588:58156,62589:58157,62590:58158,62592:58159,62593:58160,62594:58161,62595:58162,62596:58163,62597:58164,62598:58165,62599:58166,62600:58167,62601:58168,62602:58169,62603:58170,62604:58171,62605:58172,62606:58173,62607:58174,62608:58175,62609:58176,62610:58177,62611:58178,62612:58179,62613:58180,62614:58181,62615:58182,62616:58183,62617:58184,62618:58185,62619:58186,62620:58187,62621:58188,62622:58189,62623:58190,62624:58191,62625:58192,62626:58193,62627:58194,62628:58195,62629:58196,62630:58197,62631:58198,62632:58199,62633:58200,62634:58201,62635:58202,62636:58203,62637:58204,62638:58205,62639:58206,62640:58207,62641:58208,62642:58209,62643:58210,62644:58211,62645:58212,62646:58213,62647:58214,62648:58215,62649:58216,62650:58217,62651:58218,62652:58219,62653:58220,62654:58221,62655:58222,62656:58223,62657:58224,62658:58225,62659:58226,62660:58227,62661:58228,62662:58229,62663:58230,62664:58231,62665:58232,62666:58233,62667:58234,62668:58235,62669:58236,62670:58237,62671:58238,62672:58239,62673:58240,62674:58241,62675:58242,62676:58243,62677:58244,62678:58245,62679:58246,62680:58247,62681:58248,62682:58249,62683:58250,62684:58251,62685:58252,62686:58253,62687:58254,62688:58255,62689:58256,62690:58257,62691:58258,62692:58259,62693:58260,62694:58261,62695:58262,62696:58263,62697:58264,62698:58265,62699:58266,62700:58267,62701:58268,62702:58269,62703:58270,62704:58271,62705:58272,62706:58273,62707:58274,62708:58275,62709:58276,62710:58277,62711:58278,62712:58279,62713:58280,62714:58281,62715:58282,62716:58283,62784:58284,62785:58285,62786:58286,62787:58287,62788:58288,62789:58289,62790:58290,62791:58291,62792:58292,62793:58293,62794:58294,62795:58295,62796:58296,62797:58297,62798:58298,62799:58299,62800:58300,62801:58301,62802:58302,62803:58303,62804:58304,62805:58305,62806:58306,62807:58307,62808:58308,62809:58309,62810:58310,62811:58311,62812:58312,62813:58313,62814:58314,62815:58315,62816:58316,62817:58317,62818:58318,62819:58319,62820:58320,62821:58321,62822:58322,62823:58323,62824:58324,62825:58325,62826:58326,62827:58327,62828:58328,62829:58329,62830:58330,62831:58331,62832:58332,62833:58333,62834:58334,62835:58335,62836:58336,62837:58337,62838:58338,62839:58339,62840:58340,62841:58341,62842:58342,62843:58343,62844:58344,62845:58345,62846:58346,62848:58347,62849:58348,62850:58349,62851:58350,62852:58351,62853:58352,62854:58353,62855:58354,62856:58355,62857:58356,62858:58357,62859:58358,62860:58359,62861:58360,62862:58361,62863:58362,62864:58363,62865:58364,62866:58365,62867:58366,62868:58367,62869:58368,62870:58369,62871:58370,62872:58371,62873:58372,62874:58373,62875:58374,62876:58375,62877:58376,62878:58377,62879:58378,62880:58379,62881:58380,62882:58381,62883:58382,62884:58383,62885:58384,62886:58385,62887:58386,62888:58387,62889:58388,62890:58389,62891:58390,62892:58391,62893:58392,62894:58393,62895:58394,62896:58395,62897:58396,62898:58397,62899:58398,62900:58399,62901:58400,62902:58401,62903:58402,62904:58403,62905:58404,62906:58405,62907:58406,62908:58407,62909:58408,62910:58409,62911:58410,62912:58411,62913:58412,62914:58413,62915:58414,62916:58415,62917:58416,62918:58417,62919:58418,62920:58419,62921:58420,62922:58421,62923:58422,62924:58423,62925:58424,62926:58425,62927:58426,62928:58427,62929:58428,62930:58429,62931:58430,62932:58431,62933:58432,62934:58433,62935:58434,62936:58435,62937:58436,62938:58437,62939:58438,62940:58439,62941:58440,62942:58441,62943:58442,62944:58443,62945:58444,62946:58445,62947:58446,62948:58447,62949:58448,62950:58449,62951:58450,62952:58451,62953:58452,62954:58453,62955:58454,62956:58455,62957:58456,62958:58457,62959:58458,62960:58459,62961:58460,62962:58461,62963:58462,62964:58463,62965:58464,62966:58465,62967:58466,62968:58467,62969:58468,62970:58469,62971:58470,62972:58471,63040:58472,63041:58473,63042:58474,63043:58475,63044:58476,63045:58477,63046:58478,63047:58479,63048:58480,63049:58481,63050:58482,63051:58483,63052:58484,63053:58485,63054:58486,63055:58487,63056:58488,63057:58489,63058:58490,63059:58491,63060:58492,63061:58493,63062:58494,63063:58495,63064:58496,63065:58497,63066:58498,63067:58499,63068:58500,63069:58501,63070:58502,63071:58503,63072:58504,63073:58505,63074:58506,63075:58507,63076:58508,63077:58509,63078:58510,63079:58511,63080:58512,63081:58513,63082:58514,63083:58515,63084:58516,63085:58517,63086:58518,63087:58519,63088:58520,63089:58521,63090:58522,63091:58523,63092:58524,63093:58525,63094:58526,63095:58527,63096:58528,63097:58529,63098:58530,63099:58531,63100:58532,63101:58533,63102:58534,63104:58535,63105:58536,63106:58537,63107:58538,63108:58539,63109:58540,63110:58541,63111:58542,63112:58543,63113:58544,63114:58545,63115:58546,63116:58547,63117:58548,63118:58549,63119:58550,63120:58551,63121:58552,63122:58553,63123:58554,63124:58555,63125:58556,63126:58557,63127:58558,63128:58559,63129:58560,63130:58561,63131:58562,63132:58563,63133:58564,63134:58565,63135:58566,63136:58567,63137:58568,63138:58569,63139:58570,63140:58571,63141:58572,63142:58573,63143:58574,63144:58575,63145:58576,63146:58577,63147:58578,63148:58579,63149:58580,63150:58581,63151:58582,63152:58583,63153:58584,63154:58585,63155:58586,63156:58587,63157:58588,63158:58589,63159:58590,63160:58591,63161:58592,63162:58593,63163:58594,63164:58595,63165:58596,63166:58597,63167:58598,63168:58599,63169:58600,63170:58601,63171:58602,63172:58603,63173:58604,63174:58605,63175:58606,63176:58607,63177:58608,63178:58609,63179:58610,63180:58611,63181:58612,63182:58613,63183:58614,63184:58615,63185:58616,63186:58617,63187:58618,63188:58619,63189:58620,63190:58621,63191:58622,63192:58623,63193:58624,63194:58625,63195:58626,63196:58627,63197:58628,63198:58629,63199:58630,63200:58631,63201:58632,63202:58633,63203:58634,63204:58635,63205:58636,63206:58637,63207:58638,63208:58639,63209:58640,63210:58641,63211:58642,63212:58643,63213:58644,63214:58645,63215:58646,63216:58647,63217:58648,63218:58649,63219:58650,63220:58651,63221:58652,63222:58653,63223:58654,63224:58655,63225:58656,63226:58657,63227:58658,63228:58659,63296:58660,63297:58661,63298:58662,63299:58663,63300:58664,63301:58665,63302:58666,63303:58667,63304:58668,63305:58669,63306:58670,63307:58671,63308:58672,63309:58673,63310:58674,63311:58675,63312:58676,63313:58677,63314:58678,63315:58679,63316:58680,63317:58681,63318:58682,63319:58683,63320:58684,63321:58685,63322:58686,63323:58687,63324:58688,63325:58689,63326:58690,63327:58691,63328:58692,63329:58693,63330:58694,63331:58695,63332:58696,63333:58697,63334:58698,63335:58699,63336:58700,63337:58701,63338:58702,63339:58703,63340:58704,63341:58705,63342:58706,63343:58707,63344:58708,63345:58709,63346:58710,63347:58711,63348:58712,63349:58713,63350:58714,63351:58715,63352:58716,63353:58717,63354:58718,63355:58719,63356:58720,63357:58721,63358:58722,63360:58723,63361:58724,63362:58725,63363:58726,63364:58727,63365:58728,63366:58729,63367:58730,63368:58731,63369:58732,63370:58733,63371:58734,63372:58735,63373:58736,63374:58737,63375:58738,63376:58739,63377:58740,63378:58741,63379:58742,63380:58743,63381:58744,63382:58745,63383:58746,63384:58747,63385:58748,63386:58749,63387:58750,63388:58751,63389:58752,63390:58753,63391:58754,63392:58755,63393:58756,63394:58757,63395:58758,63396:58759,63397:58760,63398:58761,63399:58762,63400:58763,63401:58764,63402:58765,63403:58766,63404:58767,63405:58768,63406:58769,63407:58770,63408:58771,63409:58772,63410:58773,63411:58774,63412:58775,63413:58776,63414:58777,63415:58778,63416:58779,63417:58780,63418:58781,63419:58782,63420:58783,63421:58784,63422:58785,63423:58786,63424:58787,63425:58788,63426:58789,63427:58790,63428:58791,63429:58792,63430:58793,63431:58794,63432:58795,63433:58796,63434:58797,63435:58798,63436:58799,63437:58800,63438:58801,63439:58802,63440:58803,63441:58804,63442:58805,63443:58806,63444:58807,63445:58808,63446:58809,63447:58810,63448:58811,63449:58812,63450:58813,63451:58814,63452:58815,63453:58816,63454:58817,63455:58818,63456:58819,63457:58820,63458:58821,63459:58822,63460:58823,63461:58824,63462:58825,63463:58826,63464:58827,63465:58828,63466:58829,63467:58830,63468:58831,63469:58832,63470:58833,63471:58834,63472:58835,63473:58836,63474:58837,63475:58838,63476:58839,63477:58840,63478:58841,63479:58842,63480:58843,63481:58844,63482:58845,63483:58846,63484:58847,63552:58848,63553:58849,63554:58850,63555:58851,63556:58852,63557:58853,63558:58854,63559:58855,63560:58856,63561:58857,63562:58858,63563:58859,63564:58860,63565:58861,63566:58862,63567:58863,63568:58864,63569:58865,63570:58866,63571:58867,63572:58868,63573:58869,63574:58870,63575:58871,63576:58872,63577:58873,63578:58874,63579:58875,63580:58876,63581:58877,63582:58878,63583:58879,63584:58880,63585:58881,63586:58882,63587:58883,63588:58884,63589:58885,63590:58886,63591:58887,63592:58888,63593:58889,63594:58890,63595:58891,63596:58892,63597:58893,63598:58894,63599:58895,63600:58896,63601:58897,63602:58898,63603:58899,63604:58900,63605:58901,63606:58902,63607:58903,63608:58904,63609:58905,63610:58906,63611:58907,63612:58908,63613:58909,63614:58910,63616:58911,63617:58912,63618:58913,63619:58914,63620:58915,63621:58916,63622:58917,63623:58918,63624:58919,63625:58920,63626:58921,63627:58922,63628:58923,63629:58924,63630:58925,63631:58926,63632:58927,63633:58928,63634:58929,63635:58930,63636:58931,63637:58932,63638:58933,63639:58934,63640:58935,63641:58936,63642:58937,63643:58938,63644:58939,63645:58940,63646:58941,63647:58942,63648:58943,63649:58944,63650:58945,63651:58946,63652:58947,63653:58948,63654:58949,63655:58950,63656:58951,63657:58952,63658:58953,63659:58954,63660:58955,63661:58956,63662:58957,63663:58958,63664:58959,63665:58960,63666:58961,63667:58962,63668:58963,63669:58964,63670:58965,63671:58966,63672:58967,63673:58968,63674:58969,63675:58970,63676:58971,63677:58972,63678:58973,63679:58974,63680:58975,63681:58976,63682:58977,63683:58978,63684:58979,63685:58980,63686:58981,63687:58982,63688:58983,63689:58984,63690:58985,63691:58986,63692:58987,63693:58988,63694:58989,63695:58990,63696:58991,63697:58992,63698:58993,63699:58994,63700:58995,63701:58996,63702:58997,63703:58998,63704:58999,63705:59e3,63706:59001,63707:59002,63708:59003,63709:59004,63710:59005,63711:59006,63712:59007,63713:59008,63714:59009,63715:59010,63716:59011,63717:59012,63718:59013,63719:59014,63720:59015,63721:59016,63722:59017,63723:59018,63724:59019,63725:59020,63726:59021,63727:59022,63728:59023,63729:59024,63730:59025,63731:59026,63732:59027,63733:59028,63734:59029,63735:59030,63736:59031,63737:59032,63738:59033,63739:59034,63740:59035,64064:8560,64065:8561,64066:8562,64067:8563,64068:8564,64069:8565,64070:8566,64071:8567,64072:8568,64073:8569,64074:8544,64075:8545,64076:8546,64077:8547,64078:8548,64079:8549,64080:8550,64081:8551,64082:8552,64083:8553,64084:65506,64085:65508,64086:65287,64087:65282,64088:12849,64089:8470,64090:8481,64091:8757,64092:32394,64093:35100,64094:37704,64095:37512,64096:34012,64097:20425,64098:28859,64099:26161,64100:26824,64101:37625,64102:26363,64103:24389,64104:20008,64105:20193,64106:20220,64107:20224,64108:20227,64109:20281,64110:20310,64111:20370,64112:20362,64113:20378,64114:20372,64115:20429,64116:20544,64117:20514,64118:20479,64119:20510,64120:20550,64121:20592,64122:20546,64123:20628,64124:20724,64125:20696,64126:20810,64128:20836,64129:20893,64130:20926,64131:20972,64132:21013,64133:21148,64134:21158,64135:21184,64136:21211,64137:21248,64138:21255,64139:21284,64140:21362,64141:21395,64142:21426,64143:21469,64144:64014,64145:21660,64146:21642,64147:21673,64148:21759,64149:21894,64150:22361,64151:22373,64152:22444,64153:22472,64154:22471,64155:64015,64156:64016,64157:22686,64158:22706,64159:22795,64160:22867,64161:22875,64162:22877,64163:22883,64164:22948,64165:22970,64166:23382,64167:23488,64168:29999,64169:23512,64170:23532,64171:23582,64172:23718,64173:23738,64174:23797,64175:23847,64176:23891,64177:64017,64178:23874,64179:23917,64180:23992,64181:23993,64182:24016,64183:24353,64184:24372,64185:24423,64186:24503,64187:24542,64188:24669,64189:24709,64190:24714,64191:24798,64192:24789,64193:24864,64194:24818,64195:24849,64196:24887,64197:24880,64198:24984,64199:25107,64200:25254,64201:25589,64202:25696,64203:25757,64204:25806,64205:25934,64206:26112,64207:26133,64208:26171,64209:26121,64210:26158,64211:26142,64212:26148,64213:26213,64214:26199,64215:26201,64216:64018,64217:26227,64218:26265,64219:26272,64220:26290,64221:26303,64222:26362,64223:26382,64224:63785,64225:26470,64226:26555,64227:26706,64228:26560,64229:26625,64230:26692,64231:26831,64232:64019,64233:26984,64234:64020,64235:27032,64236:27106,64237:27184,64238:27243,64239:27206,64240:27251,64241:27262,64242:27362,64243:27364,64244:27606,64245:27711,64246:27740,64247:27782,64248:27759,64249:27866,64250:27908,64251:28039,64252:28015,64320:28054,64321:28076,64322:28111,64323:28152,64324:28146,64325:28156,64326:28217,64327:28252,64328:28199,64329:28220,64330:28351,64331:28552,64332:28597,64333:28661,64334:28677,64335:28679,64336:28712,64337:28805,64338:28843,64339:28943,64340:28932,64341:29020,64342:28998,64343:28999,64344:64021,64345:29121,64346:29182,64347:29361,64348:29374,64349:29476,64350:64022,64351:29559,64352:29629,64353:29641,64354:29654,64355:29667,64356:29650,64357:29703,64358:29685,64359:29734,64360:29738,64361:29737,64362:29742,64363:29794,64364:29833,64365:29855,64366:29953,64367:30063,64368:30338,64369:30364,64370:30366,64371:30363,64372:30374,64373:64023,64374:30534,64375:21167,64376:30753,64377:30798,64378:30820,64379:30842,64380:31024,64381:64024,64382:64025,64384:64026,64385:31124,64386:64027,64387:31131,64388:31441,64389:31463,64390:64028,64391:31467,64392:31646,64393:64029,64394:32072,64395:32092,64396:32183,64397:32160,64398:32214,64399:32338,64400:32583,64401:32673,64402:64030,64403:33537,64404:33634,64405:33663,64406:33735,64407:33782,64408:33864,64409:33972,64410:34131,64411:34137,64412:34155,64413:64031,64414:34224,64415:64032,64416:64033,64417:34823,64418:35061,64419:35346,64420:35383,64421:35449,64422:35495,64423:35518,64424:35551,64425:64034,64426:35574,64427:35667,64428:35711,64429:36080,64430:36084,64431:36114,64432:36214,64433:64035,64434:36559,64435:64036,64436:64037,64437:36967,64438:37086,64439:64038,64440:37141,64441:37159,64442:37338,64443:37335,64444:37342,64445:37357,64446:37358,64447:37348,64448:37349,64449:37382,64450:37392,64451:37386,64452:37434,64453:37440,64454:37436,64455:37454,64456:37465,64457:37457,64458:37433,64459:37479,64460:37543,64461:37495,64462:37496,64463:37607,64464:37591,64465:37593,64466:37584,64467:64039,64468:37589,64469:37600,64470:37587,64471:37669,64472:37665,64473:37627,64474:64040,64475:37662,64476:37631,64477:37661,64478:37634,64479:37744,64480:37719,64481:37796,64482:37830,64483:37854,64484:37880,64485:37937,64486:37957,64487:37960,64488:38290,64489:63964,64490:64041,64491:38557,64492:38575,64493:38707,64494:38715,64495:38723,64496:38733,64497:38735,64498:38737,64499:38741,64500:38999,64501:39013,64502:64042,64503:64043,64504:39207,64505:64044,64506:39326,64507:39502,64508:39641,64576:39644,64577:39797,64578:39794,64579:39823,64580:39857,64581:39867,64582:39936,64583:40304,64584:40299,64585:64045,64586:40473,64587:40657},r.prototype={constructor:r,getInt8:function(){var e=this.dv.getInt8(this.offset);return this.offset+=1,e},getInt8Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getInt8());return t},getUint8:function(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e},getUint8Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getUint8());return t},getInt16:function(){var e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},getInt16Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getInt16());return t},getUint16:function(){var e=this.dv.getUint16(this.offset,this.littleEndian);return this.offset+=2,e},getUint16Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getUint16());return t},getInt32:function(){var e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},getInt32Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getInt32());return t},getUint32:function(){var e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},getUint32Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getUint32());return t},getFloat32:function(){var e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},getFloat32Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getFloat32());return t},getFloat64:function(){var e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},getFloat64Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getFloat64());return t},getIndex:function(e,t){switch(e){case 1:return!0===t?this.getUint8():this.getInt8();case 2:return!0===t?this.getUint16():this.getInt16();case 4:return this.getInt32();default:throw"unknown number type "+e+" exception."}},getIndexArray:function(e,t,r){for(var a=[],n=0;n<t;n++)a.push(this.getIndex(e,r));return a},getChars:function(e){for(var t="";e>0;){var r=this.getUint8();if(e--,0===r)break;t+=String.fromCharCode(r)}for(;e>0;)this.getUint8(),e--;return t},getSjisStringsAsUnicode:function(e){for(var t=[];e>0;){var r=this.getUint8();if(e--,0===r)break;t.push(r)}for(;e>0;)this.getUint8(),e--;return this.encoder.s2u(new Uint8Array(t))},getUnicodeStrings:function(e){for(var t="";e>0;){var r=this.getUint16();if(e-=2,0===r)break;t+=String.fromCharCode(r)}for(;e>0;)this.getUint8(),e--;return t},getTextBuffer:function(){var e=this.getUint32();return this.getUnicodeStrings(e)}},a.prototype={constructor:a,leftToRightVector3:function(e){e[2]=-e[2]},leftToRightQuaternion:function(e){e[0]=-e[0],e[1]=-e[1]},leftToRightEuler:function(e){e[0]=-e[0],e[1]=-e[1]},leftToRightIndexOrder:function(e){var t=e[2];e[2]=e[0],e[0]=t},leftToRightVector3Range:function(e,t){var r=-t[2];t[2]=-e[2],e[2]=r},leftToRightEulerRange:function(e,t){var r=-t[0],a=-t[1];t[0]=-e[0],t[1]=-e[1],e[0]=r,e[1]=a}},n.prototype.parsePmd=function(e,t){var a,n={},i=new r(e);return n.metadata={},n.metadata.format="pmd",n.metadata.coordinateSystem="left",function(){var e=n.metadata;if(e.magic=i.getChars(3),"Pmd"!==e.magic)throw"PMD file magic is not Pmd, but "+e.magic;e.version=i.getFloat32(),e.modelName=i.getSjisStringsAsUnicode(20),e.comment=i.getSjisStringsAsUnicode(256)}(),function(){var e,t=n.metadata;t.vertexCount=i.getUint32(),n.vertices=[];for(var r=0;r<t.vertexCount;r++)n.vertices.push((e=void 0,(e={}).position=i.getFloat32Array(3),e.normal=i.getFloat32Array(3),e.uv=i.getFloat32Array(2),e.skinIndices=i.getUint16Array(2),e.skinWeights=[i.getUint8()/100],e.skinWeights.push(1-e.skinWeights[0]),e.edgeFlag=i.getUint8(),e))}(),function(){var e,t=n.metadata;t.faceCount=i.getUint32()/3,n.faces=[];for(var r=0;r<t.faceCount;r++)n.faces.push((e=void 0,(e={}).indices=i.getUint16Array(3),e))}(),function(){var e,t=n.metadata;t.materialCount=i.getUint32(),n.materials=[];for(var r=0;r<t.materialCount;r++)n.materials.push((e=void 0,(e={}).diffuse=i.getFloat32Array(4),e.shininess=i.getFloat32(),e.specular=i.getFloat32Array(3),e.ambient=i.getFloat32Array(3),e.toonIndex=i.getInt8(),e.edgeFlag=i.getUint8(),e.faceCount=i.getUint32()/3,e.fileName=i.getSjisStringsAsUnicode(20),e))}(),function(){var e,t=n.metadata;t.boneCount=i.getUint16(),n.bones=[];for(var r=0;r<t.boneCount;r++)n.bones.push((e=void 0,(e={}).name=i.getSjisStringsAsUnicode(20),e.parentIndex=i.getInt16(),e.tailIndex=i.getInt16(),e.type=i.getUint8(),e.ikIndex=i.getInt16(),e.position=i.getFloat32Array(3),e))}(),function(){var e=function(){var e={};e.target=i.getUint16(),e.effector=i.getUint16(),e.linkCount=i.getUint8(),e.iteration=i.getUint16(),e.maxAngle=i.getFloat32(),e.links=[];for(var t=0;t<e.linkCount;t++){var r={};r.index=i.getUint16(),e.links.push(r)}return e},t=n.metadata;t.ikCount=i.getUint16(),n.iks=[];for(var r=0;r<t.ikCount;r++)n.iks.push(e())}(),function(){var e=function(){var e={};e.name=i.getSjisStringsAsUnicode(20),e.elementCount=i.getUint32(),e.type=i.getUint8(),e.elements=[];for(var t=0;t<e.elementCount;t++)e.elements.push({index:i.getUint32(),position:i.getFloat32Array(3)});return e},t=n.metadata;t.morphCount=i.getUint16(),n.morphs=[];for(var r=0;r<t.morphCount;r++)n.morphs.push(e())}(),function(){var e,t=n.metadata;t.morphFrameCount=i.getUint8(),n.morphFrames=[];for(var r=0;r<t.morphFrameCount;r++)n.morphFrames.push((e=void 0,(e={}).index=i.getUint16(),e))}(),function(){var e,t=n.metadata;t.boneFrameNameCount=i.getUint8(),n.boneFrameNames=[];for(var r=0;r<t.boneFrameNameCount;r++)n.boneFrameNames.push((e=void 0,(e={}).name=i.getSjisStringsAsUnicode(50),e))}(),function(){var e,t=n.metadata;t.boneFrameCount=i.getUint32(),n.boneFrames=[];for(var r=0;r<t.boneFrameCount;r++)n.boneFrames.push((e=void 0,(e={}).boneIndex=i.getInt16(),e.frameIndex=i.getUint8(),e))}(),(a=n.metadata).englishCompatibility=i.getUint8(),a.englishCompatibility>0&&(a.englishModelName=i.getSjisStringsAsUnicode(20),a.englishComment=i.getSjisStringsAsUnicode(256)),function(){var e=n.metadata;if(0!==e.englishCompatibility){n.englishBoneNames=[];for(var t=0;t<e.boneCount;t++)n.englishBoneNames.push((r=void 0,(r={}).name=i.getSjisStringsAsUnicode(20),r));var r}}(),function(){var e=n.metadata;if(0!==e.englishCompatibility){n.englishMorphNames=[];for(var t=0;t<e.morphCount-1;t++)n.englishMorphNames.push((r=void 0,(r={}).name=i.getSjisStringsAsUnicode(20),r));var r}}(),function(){var e=n.metadata;if(0!==e.englishCompatibility){n.englishBoneFrameNames=[];for(var t=0;t<e.boneFrameNameCount;t++)n.englishBoneFrameNames.push((r=void 0,(r={}).name=i.getSjisStringsAsUnicode(50),r));var r}}(),function(){var e;n.toonTextures=[];for(var t=0;t<10;t++)n.toonTextures.push((e=void 0,(e={}).fileName=i.getSjisStringsAsUnicode(100),e))}(),function(){var e,t=n.metadata;t.rigidBodyCount=i.getUint32(),n.rigidBodies=[];for(var r=0;r<t.rigidBodyCount;r++)n.rigidBodies.push((e=void 0,(e={}).name=i.getSjisStringsAsUnicode(20),e.boneIndex=i.getInt16(),e.groupIndex=i.getUint8(),e.groupTarget=i.getUint16(),e.shapeType=i.getUint8(),e.width=i.getFloat32(),e.height=i.getFloat32(),e.depth=i.getFloat32(),e.position=i.getFloat32Array(3),e.rotation=i.getFloat32Array(3),e.weight=i.getFloat32(),e.positionDamping=i.getFloat32(),e.rotationDamping=i.getFloat32(),e.restitution=i.getFloat32(),e.friction=i.getFloat32(),e.type=i.getUint8(),e))}(),function(){var e,t=n.metadata;t.constraintCount=i.getUint32(),n.constraints=[];for(var r=0;r<t.constraintCount;r++)n.constraints.push((e=void 0,(e={}).name=i.getSjisStringsAsUnicode(20),e.rigidBodyIndex1=i.getUint32(),e.rigidBodyIndex2=i.getUint32(),e.position=i.getFloat32Array(3),e.rotation=i.getFloat32Array(3),e.translationLimitation1=i.getFloat32Array(3),e.translationLimitation2=i.getFloat32Array(3),e.rotationLimitation1=i.getFloat32Array(3),e.rotationLimitation2=i.getFloat32Array(3),e.springPosition=i.getFloat32Array(3),e.springRotation=i.getFloat32Array(3),e))}(),!0===t&&this.leftToRightModel(n),n},n.prototype.parsePmx=function(e,t){var a={},n=new r(e);return a.metadata={},a.metadata.format="pmx",a.metadata.coordinateSystem="left",function(){var e=a.metadata;if(e.magic=n.getChars(4),"PMX "!==e.magic)throw"PMX file magic is not PMX , but "+e.magic;if(e.version=n.getFloat32(),2!==e.version&&2.1!==e.version)throw"PMX version "+e.version+" is not supported.";e.headerSize=n.getUint8(),e.encoding=n.getUint8(),e.additionalUvNum=n.getUint8(),e.vertexIndexSize=n.getUint8(),e.textureIndexSize=n.getUint8(),e.materialIndexSize=n.getUint8(),e.boneIndexSize=n.getUint8(),e.morphIndexSize=n.getUint8(),e.rigidBodyIndexSize=n.getUint8(),e.modelName=n.getTextBuffer(),e.englishModelName=n.getTextBuffer(),e.comment=n.getTextBuffer(),e.englishComment=n.getTextBuffer()}(),function(){var e=function(){var e={};e.position=n.getFloat32Array(3),e.normal=n.getFloat32Array(3),e.uv=n.getFloat32Array(2),e.auvs=[];for(var r=0;r<a.metadata.additionalUvNum;r++)e.auvs.push(n.getFloat32Array(4));e.type=n.getUint8();var i=t.boneIndexSize;if(0===e.type)e.skinIndices=n.getIndexArray(i,1),e.skinWeights=[1];else if(1===e.type)e.skinIndices=n.getIndexArray(i,2),e.skinWeights=n.getFloat32Array(1),e.skinWeights.push(1-e.skinWeights[0]);else if(2===e.type)e.skinIndices=n.getIndexArray(i,4),e.skinWeights=n.getFloat32Array(4);else{if(3!==e.type)throw"unsupport bone type "+e.type+" exception.";e.skinIndices=n.getIndexArray(i,2),e.skinWeights=n.getFloat32Array(1),e.skinWeights.push(1-e.skinWeights[0]),e.skinC=n.getFloat32Array(3),e.skinR0=n.getFloat32Array(3),e.skinR1=n.getFloat32Array(3),e.type=1}return e.edgeRatio=n.getFloat32(),e},t=a.metadata;t.vertexCount=n.getUint32(),a.vertices=[];for(var r=0;r<t.vertexCount;r++)a.vertices.push(e())}(),function(){var e,t=a.metadata;t.faceCount=n.getUint32()/3,a.faces=[];for(var r=0;r<t.faceCount;r++)a.faces.push((e=void 0,(e={}).indices=n.getIndexArray(t.vertexIndexSize,3,!0),e))}(),function(){var e=a.metadata;e.textureCount=n.getUint32(),a.textures=[];for(var t=0;t<e.textureCount;t++)a.textures.push(n.getTextBuffer())}(),function(){var e=function(){var e={};if(e.name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.diffuse=n.getFloat32Array(4),e.specular=n.getFloat32Array(3),e.shininess=n.getFloat32(),e.ambient=n.getFloat32Array(3),e.flag=n.getUint8(),e.edgeColor=n.getFloat32Array(4),e.edgeSize=n.getFloat32(),e.textureIndex=n.getIndex(a.metadata.textureIndexSize),e.envTextureIndex=n.getIndex(a.metadata.textureIndexSize),e.envFlag=n.getUint8(),e.toonFlag=n.getUint8(),0===e.toonFlag)e.toonIndex=n.getIndex(a.metadata.textureIndexSize);else{if(1!==e.toonFlag)throw"unknown toon flag "+e.toonFlag+" exception.";e.toonIndex=n.getInt8()}return e.comment=n.getTextBuffer(),e.faceCount=n.getUint32()/3,e},t=a.metadata;t.materialCount=n.getUint32(),a.materials=[];for(var r=0;r<t.materialCount;r++)a.materials.push(e())}(),function(){var e=function(){var e={};if(e.name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.position=n.getFloat32Array(3),e.parentIndex=n.getIndex(a.metadata.boneIndexSize),e.transformationClass=n.getUint32(),e.flag=n.getUint16(),1&e.flag?e.connectIndex=n.getIndex(a.metadata.boneIndexSize):e.offsetPosition=n.getFloat32Array(3),256&e.flag||512&e.flag){var t={};t.isLocal=0!=(128&e.flag),t.affectRotation=0!=(256&e.flag),t.affectPosition=0!=(512&e.flag),t.parentIndex=n.getIndex(a.metadata.boneIndexSize),t.ratio=n.getFloat32(),e.grant=t}if(1024&e.flag&&(e.fixAxis=n.getFloat32Array(3)),2048&e.flag&&(e.localXVector=n.getFloat32Array(3),e.localZVector=n.getFloat32Array(3)),8192&e.flag&&(e.key=n.getUint32()),32&e.flag){var r={};r.effector=n.getIndex(a.metadata.boneIndexSize),r.target=null,r.iteration=n.getUint32(),r.maxAngle=n.getFloat32(),r.linkCount=n.getUint32(),r.links=[];for(var i=0;i<r.linkCount;i++){var o={};o.index=n.getIndex(a.metadata.boneIndexSize),o.angleLimitation=n.getUint8(),1===o.angleLimitation&&(o.lowerLimitationAngle=n.getFloat32Array(3),o.upperLimitationAngle=n.getFloat32Array(3)),r.links.push(o)}e.ik=r}return e},t=a.metadata;t.boneCount=n.getUint32(),a.bones=[];for(var r=0;r<t.boneCount;r++)a.bones.push(e())}(),function(){var e=function(){var e={};e.name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.panel=n.getUint8(),e.type=n.getUint8(),e.elementCount=n.getUint32(),e.elements=[];for(var t=0;t<e.elementCount;t++)if(0===e.type)(r={}).index=n.getIndex(a.metadata.morphIndexSize),r.ratio=n.getFloat32(),e.elements.push(r);else if(1===e.type)(r={}).index=n.getIndex(a.metadata.vertexIndexSize,!0),r.position=n.getFloat32Array(3),e.elements.push(r);else if(2===e.type)(r={}).index=n.getIndex(a.metadata.boneIndexSize),r.position=n.getFloat32Array(3),r.rotation=n.getFloat32Array(4),e.elements.push(r);else if(3===e.type)(r={}).index=n.getIndex(a.metadata.vertexIndexSize,!0),r.uv=n.getFloat32Array(4),e.elements.push(r);else if(4===e.type);else if(5===e.type);else if(6===e.type);else if(7===e.type);else if(8===e.type){var r;(r={}).index=n.getIndex(a.metadata.materialIndexSize),r.type=n.getUint8(),r.diffuse=n.getFloat32Array(4),r.specular=n.getFloat32Array(3),r.shininess=n.getFloat32(),r.ambient=n.getFloat32Array(3),r.edgeColor=n.getFloat32Array(4),r.edgeSize=n.getFloat32(),r.textureColor=n.getFloat32Array(4),r.sphereTextureColor=n.getFloat32Array(4),r.toonColor=n.getFloat32Array(4),e.elements.push(r)}return e},t=a.metadata;t.morphCount=n.getUint32(),a.morphs=[];for(var r=0;r<t.morphCount;r++)a.morphs.push(e())}(),function(){var e=function(){var e={};e.name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.type=n.getUint8(),e.elementCount=n.getUint32(),e.elements=[];for(var t=0;t<e.elementCount;t++){var r={};r.target=n.getUint8(),r.index=0===r.target?n.getIndex(a.metadata.boneIndexSize):n.getIndex(a.metadata.morphIndexSize),e.elements.push(r)}return e},t=a.metadata;t.frameCount=n.getUint32(),a.frames=[];for(var r=0;r<t.frameCount;r++)a.frames.push(e())}(),function(){var e,t=a.metadata;t.rigidBodyCount=n.getUint32(),a.rigidBodies=[];for(var r=0;r<t.rigidBodyCount;r++)a.rigidBodies.push((e=void 0,(e={}).name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.boneIndex=n.getIndex(a.metadata.boneIndexSize),e.groupIndex=n.getUint8(),e.groupTarget=n.getUint16(),e.shapeType=n.getUint8(),e.width=n.getFloat32(),e.height=n.getFloat32(),e.depth=n.getFloat32(),e.position=n.getFloat32Array(3),e.rotation=n.getFloat32Array(3),e.weight=n.getFloat32(),e.positionDamping=n.getFloat32(),e.rotationDamping=n.getFloat32(),e.restitution=n.getFloat32(),e.friction=n.getFloat32(),e.type=n.getUint8(),e))}(),function(){var e,t=a.metadata;t.constraintCount=n.getUint32(),a.constraints=[];for(var r=0;r<t.constraintCount;r++)a.constraints.push((e=void 0,(e={}).name=n.getTextBuffer(),e.englishName=n.getTextBuffer(),e.type=n.getUint8(),e.rigidBodyIndex1=n.getIndex(a.metadata.rigidBodyIndexSize),e.rigidBodyIndex2=n.getIndex(a.metadata.rigidBodyIndexSize),e.position=n.getFloat32Array(3),e.rotation=n.getFloat32Array(3),e.translationLimitation1=n.getFloat32Array(3),e.translationLimitation2=n.getFloat32Array(3),e.rotationLimitation1=n.getFloat32Array(3),e.rotationLimitation2=n.getFloat32Array(3),e.springPosition=n.getFloat32Array(3),e.springRotation=n.getFloat32Array(3),e))}(),!0===t&&this.leftToRightModel(a),a},n.prototype.parseVmd=function(e,t){var a={},n=new r(e);return a.metadata={},a.metadata.coordinateSystem="left",function(){var e=a.metadata;if(e.magic=n.getChars(30),"Vocaloid Motion Data 0002"!==e.magic)throw"VMD file magic is not Vocaloid Motion Data 0002, but "+e.magic;e.name=n.getSjisStringsAsUnicode(20)}(),function(){var e,t=a.metadata;t.motionCount=n.getUint32(),a.motions=[];for(var r=0;r<t.motionCount;r++)a.motions.push((e=void 0,(e={}).boneName=n.getSjisStringsAsUnicode(15),e.frameNum=n.getUint32(),e.position=n.getFloat32Array(3),e.rotation=n.getFloat32Array(4),e.interpolation=n.getUint8Array(64),e))}(),function(){var e,t=a.metadata;t.morphCount=n.getUint32(),a.morphs=[];for(var r=0;r<t.morphCount;r++)a.morphs.push((e=void 0,(e={}).morphName=n.getSjisStringsAsUnicode(15),e.frameNum=n.getUint32(),e.weight=n.getFloat32(),e))}(),function(){var e,t=a.metadata;t.cameraCount=n.getUint32(),a.cameras=[];for(var r=0;r<t.cameraCount;r++)a.cameras.push((e=void 0,(e={}).frameNum=n.getUint32(),e.distance=n.getFloat32(),e.position=n.getFloat32Array(3),e.rotation=n.getFloat32Array(3),e.interpolation=n.getUint8Array(24),e.fov=n.getUint32(),e.perspective=n.getUint8(),e))}(),!0===t&&this.leftToRightVmd(a),a},n.prototype.parseVpd=function(e,t){var r={metadata:{}};r.metadata.coordinateSystem="left",r.bones=[];var a=e.replace(/\/\/\w*(\r|\n|\r\n)/g,"").split(/\r|\n|\r\n/);function n(){throw"the file seems not vpd file."}return"Vocaloid Pose Data file"!==a[0]&&n(),a.length<4&&n(),r.metadata.parentFile=a[2],r.metadata.boneCount=parseInt(a[3]),function(){for(var e=/^\s*(Bone[0-9]+)\s*\{\s*(.*)$/,t=/^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/,i=/^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/,o=/^\s*}/,s=r.bones,l=null,u=null,c=null,d=4;d<a.length;d++){var f,h=a[d];null!==(f=h.match(e))&&(null!==l&&n(),l=f[2]),null!==(f=h.match(t))&&(null!==u&&n(),u=[parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3])]),null!==(f=h.match(i))&&(null!==c&&n(),c=[parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3]),parseFloat(f[4])]),null!==(f=h.match(o))&&(null!==l&&null!==u&&null!==c||n(),s.push({name:l,translation:u,quaternion:c}),l=null,u=null,c=null)}null===l&&null===u&&null===c||n()}(),!0===t&&this.leftToRightVpd(r),r},n.prototype.mergeVmds=function(e){var t={metadata:{}};t.metadata.name=e[0].metadata.name,t.metadata.coordinateSystem=e[0].metadata.coordinateSystem,t.metadata.motionCount=0,t.metadata.morphCount=0,t.metadata.cameraCount=0,t.motions=[],t.morphs=[],t.cameras=[];for(var r=0;r<e.length;r++){var a=e[r];t.metadata.motionCount+=a.metadata.motionCount,t.metadata.morphCount+=a.metadata.morphCount,t.metadata.cameraCount+=a.metadata.cameraCount;for(var n=0;n<a.metadata.motionCount;n++)t.motions.push(a.motions[n]);for(n=0;n<a.metadata.morphCount;n++)t.morphs.push(a.morphs[n]);for(n=0;n<a.metadata.cameraCount;n++)t.cameras.push(a.cameras[n])}return t},n.prototype.leftToRightModel=function(e){if("right"!==e.metadata.coordinateSystem){e.metadata.coordinateSystem="right";for(var t=new a,r=0;r<e.metadata.vertexCount;r++)t.leftToRightVector3(e.vertices[r].position),t.leftToRightVector3(e.vertices[r].normal);for(r=0;r<e.metadata.faceCount;r++)t.leftToRightIndexOrder(e.faces[r].indices);for(r=0;r<e.metadata.boneCount;r++)t.leftToRightVector3(e.bones[r].position);for(r=0;r<e.metadata.morphCount;r++){var n=e.morphs[r];if("pmx"!==e.metadata.format||1===n.type)for(var i=0;i<n.elements.length;i++)t.leftToRightVector3(n.elements[i].position)}for(r=0;r<e.metadata.rigidBodyCount;r++)t.leftToRightVector3(e.rigidBodies[r].position),t.leftToRightEuler(e.rigidBodies[r].rotation);for(r=0;r<e.metadata.constraintCount;r++)t.leftToRightVector3(e.constraints[r].position),t.leftToRightEuler(e.constraints[r].rotation),t.leftToRightVector3Range(e.constraints[r].translationLimitation1,e.constraints[r].translationLimitation2),t.leftToRightEulerRange(e.constraints[r].rotationLimitation1,e.constraints[r].rotationLimitation2)}},n.prototype.leftToRightVmd=function(e){if("right"!==e.metadata.coordinateSystem){e.metadata.coordinateSystem="right";for(var t=new a,r=0;r<e.metadata.motionCount;r++)t.leftToRightVector3(e.motions[r].position),t.leftToRightQuaternion(e.motions[r].rotation);for(r=0;r<e.metadata.cameraCount;r++)t.leftToRightVector3(e.cameras[r].position),t.leftToRightEuler(e.cameras[r].rotation)}},n.prototype.leftToRightVpd=function(e){if("right"!==e.metadata.coordinateSystem){e.metadata.coordinateSystem="right";for(var t=new a,r=0;r<e.bones.length;r++)t.leftToRightVector3(e.bones[r].translation),t.leftToRightQuaternion(e.bones[r].quaternion)}},e.CharsetEncoder=t,e.Parser=n,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(){function e(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.dracoLoader=null}function t(){var e={};return{get:function(t){return e[t]},add:function(t,r){e[t]=r},remove:function(t){delete e[t]},removeAll:function(){e={}}}}e.prototype={constructor:e,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this,o=void 0!==this.path?this.path:a.LoaderUtils.extractUrlBase(e),s=new a.FileLoader(i.manager);s.setResponseType("arraybuffer"),s.load(e,(function(e){try{i.parse(e,o,t,n)}catch(e){if(void 0===n)throw e;n(e)}}),r,n)},setCrossOrigin:function(e){return this.crossOrigin=e,this},setPath:function(e){return this.path=e,this},setDRACOLoader:function(e){return this.dracoLoader=e,this},parse:function(e,t,l,u){var h,p={};if("string"==typeof e)h=e;else if(a.LoaderUtils.decodeText(new Uint8Array(e,0,4))===s){try{p[r.KHR_BINARY_GLTF]=new c(e)}catch(e){return void(u&&u(e))}h=p[r.KHR_BINARY_GLTF].content}else h=a.LoaderUtils.decodeText(new Uint8Array(e));var m=JSON.parse(h);void 0===m.asset||m.asset.version[0]<2?u&&u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported. Use LegacyGLTFLoader instead.")):(m.extensionsUsed&&(m.extensionsUsed.indexOf(r.KHR_LIGHTS)>=0&&(p[r.KHR_LIGHTS]=new i(m)),m.extensionsUsed.indexOf(r.KHR_MATERIALS_UNLIT)>=0&&(p[r.KHR_MATERIALS_UNLIT]=new o(m)),m.extensionsUsed.indexOf(r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS)>=0&&(p[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]=new f),m.extensionsUsed.indexOf(r.KHR_DRACO_MESH_COMPRESSION)>=0&&(p[r.KHR_DRACO_MESH_COMPRESSION]=new d(this.dracoLoader)),m.extensionsUsed.indexOf(r.MSFT_TEXTURE_DDS)>=0&&(p[r.MSFT_TEXTURE_DDS]=new n)),new k(m,p,{path:t||this.path||"",crossOrigin:this.crossOrigin,manager:this.manager}).parse((function(e,t,r,a,n){l({scene:e,scenes:t,cameras:r,animations:a,asset:n})}),u))}};var r={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS:"KHR_lights",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function n(){if(!a.DDSLoader)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=r.MSFT_TEXTURE_DDS,this.ddsLoader=new a.DDSLoader}function i(e){this.name=r.KHR_LIGHTS,this.lights={};var t=(e.extensions&&e.extensions[r.KHR_LIGHTS]||{}).lights||{};for(var n in t){var i,o=t[n],s=(new a.Color).fromArray(o.color);switch(o.type){case"directional":(i=new a.DirectionalLight(s)).target.position.set(0,0,1),i.add(i.target);break;case"point":i=new a.PointLight(s);break;case"spot":i=new a.SpotLight(s),o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,i.angle=o.spot.outerConeAngle,i.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,i.target.position.set(0,0,1),i.add(i.target);break;case"ambient":i=new a.AmbientLight(s)}i&&(i.decay=2,void 0!==o.intensity&&(i.intensity=o.intensity),i.name=o.name||"light_"+n,this.lights[n]=i)}}function o(e){this.name=r.KHR_MATERIALS_UNLIT}o.prototype.getMaterialType=function(e){return a.MeshBasicMaterial},o.prototype.extendParams=function(e,t,r){var n=[];e.color=new a.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;e.color.fromArray(o),e.opacity=o[3]}void 0!==i.baseColorTexture&&n.push(r.assignTexture(e,"map",i.baseColorTexture.index))}return Promise.all(n)};var s="glTF",l=12,u={JSON:1313821514,BIN:5130562};function c(e){this.name=r.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,l);if(this.header={magic:a.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==s)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected. Use LegacyGLTFLoader instead.");for(var n=new DataView(e,l),i=0;i<n.byteLength;){var o=n.getUint32(i,!0);i+=4;var c=n.getUint32(i,!0);if(i+=4,c===u.JSON){var d=new Uint8Array(e,l+i,o);this.content=a.LoaderUtils.decodeText(d)}else if(c===u.BIN){var f=l+i;this.body=e.slice(f,f+o)}i+=o}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}function d(e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=r.KHR_DRACO_MESH_COMPRESSION,this.dracoLoader=e}function f(){return{name:r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return a.ShaderMaterial},extendParams:function(e,t,r){var n=t.extensions[this.name],i=a.ShaderLib.standard,o=a.UniformsUtils.clone(i.uniforms),s=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),l=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),u=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),c=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),d=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","material.specularRoughness = clamp( 1.0 - glossinessFactor, 0.04, 1.0 );","material.specularColor = specularFactor.rgb;"].join("\n"),f=i.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",s).replace("#include <metalnessmap_pars_fragment>",l).replace("#include <roughnessmap_fragment>",u).replace("#include <metalnessmap_fragment>",c).replace("#include <lights_physical_fragment>",d);delete o.roughness,delete o.metalness,delete o.roughnessMap,delete o.metalnessMap,o.specular={value:(new a.Color).setHex(1118481)},o.glossiness={value:.5},o.specularMap={value:null},o.glossinessMap={value:null},e.vertexShader=i.vertexShader,e.fragmentShader=f,e.uniforms=o,e.defines={STANDARD:""},e.color=new a.Color(1,1,1),e.opacity=1;var h=[];if(Array.isArray(n.diffuseFactor)){var p=n.diffuseFactor;e.color.fromArray(p),e.opacity=p[3]}if(void 0!==n.diffuseTexture&&h.push(r.assignTexture(e,"map",n.diffuseTexture.index)),e.emissive=new a.Color(0,0,0),e.glossiness=void 0!==n.glossinessFactor?n.glossinessFactor:1,e.specular=new a.Color(1,1,1),Array.isArray(n.specularFactor)&&e.specular.fromArray(n.specularFactor),void 0!==n.specularGlossinessTexture){var m=n.specularGlossinessTexture.index;h.push(r.assignTexture(e,"glossinessMap",m)),h.push(r.assignTexture(e,"specularMap",m))}return Promise.all(h)},createMaterial:function(e){var t=new a.ShaderMaterial({defines:e.defines,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,fog:!0,lights:!0,opacity:e.opacity,transparent:e.transparent});return t.isGLTFSpecularGlossinessMaterial=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t.extensions.derivatives=!0,t},cloneMaterial:function(e){var t=e.clone();t.isGLTFSpecularGlossinessMaterial=!0;for(var r=this.specularGlossinessParams,a=0,n=r.length;a<n;a++)t[r[a]]=e[r[a]];return t},refreshUniforms:function(e,t,r,a,n,i){if(!0===n.isGLTFSpecularGlossinessMaterial){var o,s,l,u=n.uniforms,c=n.defines;if(u.opacity.value=n.opacity,u.diffuse.value.copy(n.color),u.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),u.map.value=n.map,u.specularMap.value=n.specularMap,u.alphaMap.value=n.alphaMap,u.lightMap.value=n.lightMap,u.lightMapIntensity.value=n.lightMapIntensity,u.aoMap.value=n.aoMap,u.aoMapIntensity.value=n.aoMapIntensity,n.map?o=n.map:n.specularMap?o=n.specularMap:n.displacementMap?o=n.displacementMap:n.normalMap?o=n.normalMap:n.bumpMap?o=n.bumpMap:n.glossinessMap?o=n.glossinessMap:n.alphaMap?o=n.alphaMap:n.emissiveMap&&(o=n.emissiveMap),void 0!==o)if(o.isWebGLRenderTarget&&(o=o.texture),void 0!==o.matrix){if(!0===o.matrixAutoUpdate){s=o.offset,l=o.repeat;var d=o.rotation,f=o.center;o.matrix.setUvTransform(s.x,s.y,l.x,l.y,d,f.x,f.y)}u.uvTransform.value.copy(o.matrix)}else s=o.offset,l=o.repeat,u.offsetRepeat.value.set(s.x,s.y,l.x,l.y);u.envMap.value=n.envMap,u.envMapIntensity.value=n.envMapIntensity,u.flipEnvMap.value=n.envMap&&n.envMap.isCubeTexture?-1:1,u.refractionRatio.value=n.refractionRatio,u.specular.value.copy(n.specular),u.glossiness.value=n.glossiness,u.glossinessMap.value=n.glossinessMap,u.emissiveMap.value=n.emissiveMap,u.bumpMap.value=n.bumpMap,u.normalMap.value=n.normalMap,u.displacementMap.value=n.displacementMap,u.displacementScale.value=n.displacementScale,u.displacementBias.value=n.displacementBias,null!==u.glossinessMap.value&&void 0===c.USE_GLOSSINESSMAP&&(c.USE_GLOSSINESSMAP="",c.USE_ROUGHNESSMAP=""),null===u.glossinessMap.value&&void 0!==c.USE_GLOSSINESSMAP&&(delete c.USE_GLOSSINESSMAP,delete c.USE_ROUGHNESSMAP)}}}}function h(e,t,r,n){a.Interpolant.call(this,e,t,r,n)}d.prototype.decodePrimitive=function(e,t){var r=this.dracoLoader,a=e.extensions[this.name].bufferView,n=e.extensions[this.name].attributes,i={};for(var o in n)o in _&&(i[_[o]]=n[o]);return t.getDependency("bufferView",a).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,t,i)}))}))},h.prototype=Object.create(a.Interpolant.prototype),h.prototype.constructor=h,h.prototype.interpolate_=function(e,t,r,a){for(var n=this.resultBuffer,i=this.sampleValues,o=this.valueSize,s=2*o,l=3*o,u=a-t,c=(r-t)/u,d=c*c,f=d*c,h=e*l,p=h-l,m=2*f-3*d+1,v=f-2*d+c,g=-2*f+3*d,y=f-d,x=0;x!==o;x++){var b=i[p+x+o],w=i[p+x+s]*u,A=i[h+x+o],M=i[h+x]*u;n[x]=m*b+v*w+g*A+y*M}return n};var p=0,m=1,v=2,g=3,y=4,x=5,b=6,w=(Number,a.Matrix3,a.Matrix4,a.Vector2,a.Vector3,a.Vector4,a.Texture,{5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array}),A={9728:a.NearestFilter,9729:a.LinearFilter,9984:a.NearestMipMapNearestFilter,9985:a.LinearMipMapNearestFilter,9986:a.NearestMipMapLinearFilter,9987:a.LinearMipMapLinearFilter},M={33071:a.ClampToEdgeWrapping,33648:a.MirroredRepeatWrapping,10497:a.RepeatWrapping},T={6406:a.AlphaFormat,6407:a.RGBFormat,6408:a.RGBAFormat,6409:a.LuminanceFormat,6410:a.LuminanceAlphaFormat},S={5121:a.UnsignedByteType,32819:a.UnsignedShort4444Type,32820:a.UnsignedShort5551Type,33635:a.UnsignedShort565Type},E=(a.BackSide,a.FrontSide,a.NeverDepth,a.LessDepth,a.EqualDepth,a.LessEqualDepth,a.GreaterEqualDepth,a.NotEqualDepth,a.GreaterEqualDepth,a.AlwaysDepth,a.AddEquation,a.SubtractEquation,a.ReverseSubtractEquation,a.ZeroFactor,a.OneFactor,a.SrcColorFactor,a.OneMinusSrcColorFactor,a.SrcAlphaFactor,a.OneMinusSrcAlphaFactor,a.DstAlphaFactor,a.OneMinusDstAlphaFactor,a.DstColorFactor,a.OneMinusDstColorFactor,a.SrcAlphaSaturateFactor,{SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16}),_={POSITION:"position",NORMAL:"normal",TEXCOORD_0:"uv",TEXCOORD0:"uv",TEXCOORD:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",COLOR0:"color",COLOR:"color",WEIGHTS_0:"skinWeight",WEIGHT:"skinWeight",JOINTS_0:"skinIndex",JOINT:"skinIndex"},F={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},P={CUBICSPLINE:a.InterpolateSmooth,LINEAR:a.InterpolateLinear,STEP:a.InterpolateDiscrete},L="OPAQUE",C="MASK",O="BLEND";function N(e,t){return"string"!=typeof e||""===e?"":/^(https?:)?\/\//i.test(e)?e:/^data:.*,.*$/i.test(e)?e:/^blob:.*$/i.test(e)?e:t+e}function R(e,t,r,a){for(var n=e.geometry,i=r.targets,o=!1,s=!1,l=0,u=i.length;l<u;l++){if(void 0!==(f=i[l]).POSITION&&(o=!0),void 0!==f.NORMAL&&(s=!0),o&&s)break}if(o||s){var c=[],d=[];for(l=0,u=i.length;l<u;l++){var f=i[l],h="morphTarget"+l;if(o){if(void 0!==f.POSITION){var p=U(a[f.POSITION]);p.name=h;for(var m=n.attributes.position,v=0,g=p.count;v<g;v++)p.setXYZ(v,p.getX(v)+m.getX(v),p.getY(v)+m.getY(v),p.getZ(v)+m.getZ(v))}else p=n.attributes.position;c.push(p)}if(s){if(void 0!==f.NORMAL){var y;(y=U(a[f.NORMAL])).name=h;var x=n.attributes.normal;for(v=0,g=y.count;v<g;v++)y.setXYZ(v,y.getX(v)+x.getX(v),y.getY(v)+x.getY(v),y.getZ(v)+x.getZ(v))}else y=n.attributes.normal;d.push(y)}}if(o&&(n.morphAttributes.position=c),s&&(n.morphAttributes.normal=d),e.updateMorphTargets(),void 0!==t.weights)for(l=0,u=t.weights.length;l<u;l++)e.morphTargetInfluences[l]=t.weights[l];if(t.extras&&Array.isArray(t.extras.targetNames)){var b=t.extras.targetNames;if(e.morphTargetInfluences.length===b.length){e.morphTargetDictionary={};for(l=0,u=b.length;l<u;l++)e.morphTargetDictionary[b[l]]=l}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}}function I(e,t){if(e.indices!==t.indices)return!1;var r=e.attributes||{},a=t.attributes||{},n=Object.keys(r),i=Object.keys(a);if(n.length!==i.length)return!1;for(var o=0,s=n.length;o<s;o++){var l=n[o];if(r[l]!==a[l])return!1}return!0}function D(e,t){for(var r=0,a=e.length;r<a;r++){var n=e[r];if(I(n.primitive,t))return n.promise}return null}function U(e){if(e.isInterleavedBufferAttribute){for(var t=e.count,r=e.itemSize,n=e.array.slice(0,t*r),i=0;i<t;++i)n[i]=e.getX(i),r>=2&&(n[i+1]=e.getY(i)),r>=3&&(n[i+2]=e.getZ(i)),r>=4&&(n[i+3]=e.getW(i));return new a.BufferAttribute(n,r,e.normalized)}return e.clone()}function k(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new t,this.primitiveCache=[],this.textureLoader=new a.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new a.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer")}function B(e,t,r){var a=t.attributes;for(var n in a){var i=_[n],o=r[a[n]];i&&(i in e.attributes||e.addAttribute(i,o))}void 0===t.indices||e.index||e.setIndex(r[t.indices])}return k.prototype.parse=function(e,t){var r=this.json;this.cache.removeAll(),this.markDefs(),this.getMultiDependencies(["scene","animation","camera"]).then((function(t){var a=t.scenes||[],n=a[r.scene||0],i=t.animations||[],o=r.asset,s=t.cameras||[];e(n,a,s,i,o)})).catch(t)},k.prototype.markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],r=this.json.meshes||[],a={},n={},i=0,o=t.length;i<o;i++)for(var s=t[i].joints,l=0,u=s.length;l<u;l++)e[s[l]].isBone=!0;for(var c=0,d=e.length;c<d;c++){var f=e[c];void 0!==f.mesh&&(void 0===a[f.mesh]&&(a[f.mesh]=n[f.mesh]=0),a[f.mesh]++,void 0!==f.skin&&(r[f.mesh].isSkinnedMesh=!0))}this.json.meshReferences=a,this.json.meshUses=n},k.prototype.getDependency=function(e,t){var r=e+":"+t,a=this.cache.get(r);if(!a){switch(e){case"scene":a=this.loadScene(t);break;case"node":a=this.loadNode(t);break;case"mesh":a=this.loadMesh(t);break;case"accessor":a=this.loadAccessor(t);break;case"bufferView":a=this.loadBufferView(t);break;case"buffer":a=this.loadBuffer(t);break;case"material":a=this.loadMaterial(t);break;case"texture":a=this.loadTexture(t);break;case"skin":a=this.loadSkin(t);break;case"animation":a=this.loadAnimation(t);break;case"camera":a=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(r,a)}return a},k.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var r=this,a=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(a.map((function(t,a){return r.getDependency(e,a)}))),this.cache.add(e,t)}return t},k.prototype.getMultiDependencies=function(e){for(var t={},r=[],a=0,n=e.length;a<n;a++){var i=e[a],o=this.getDependencies(i);o=o.then(function(e,r){t[e]=r}.bind(this,i+("mesh"===i?"es":"s"))),r.push(o)}return Promise.all(r).then((function(){return t}))},k.prototype.loadBuffer=function(e){var t=this.json.buffers[e],a=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[r.KHR_BINARY_GLTF].body);var n=this.options;return new Promise((function(e,r){a.load(N(t.uri,n.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))},k.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){var r=t.byteLength||0,a=t.byteOffset||0;return e.slice(a,a+r)}))},k.prototype.loadAccessor=function(e){var t=this,r=this.json,n=this.json.accessors[e];if(void 0===n.bufferView&&void 0===n.sparse)return null;var i=[];return void 0!==n.bufferView?i.push(this.getDependency("bufferView",n.bufferView)):i.push(null),void 0!==n.sparse&&(i.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(i).then((function(e){var i,o,s=e[0],l=E[n.type],u=w[n.componentType],c=u.BYTES_PER_ELEMENT,d=c*l,f=n.byteOffset||0,h=r.bufferViews[n.bufferView].byteStride,p=!0===n.normalized;if(h&&h!==d){var m="InterleavedBuffer:"+n.bufferView+":"+n.componentType,v=t.cache.get(m);v||(i=new u(s),v=new a.InterleavedBuffer(i,h/c),t.cache.add(m,v)),o=new a.InterleavedBufferAttribute(v,l,f/c,p)}else i=null===s?new u(n.count*l):new u(s,f,n.count*l),o=new a.BufferAttribute(i,l,p);if(void 0!==n.sparse){var g=E.SCALAR,y=w[n.sparse.indices.componentType],x=n.sparse.indices.byteOffset||0,b=n.sparse.values.byteOffset||0,A=new y(e[1],x,n.sparse.count*g),M=new u(e[2],b,n.sparse.count*l);null!==s&&o.setArray(o.array.slice());for(var T=0,S=A.length;T<S;T++){var _=A[T];if(o.setX(_,M[T*l]),l>=2&&o.setY(_,M[T*l+1]),l>=3&&o.setZ(_,M[T*l+2]),l>=4&&o.setW(_,M[T*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))},k.prototype.loadTexture=function(e){var t,n=this,i=this.json,o=this.options,s=this.textureLoader,l=window.URL||window.webkitURL,u=i.textures[e],c=u.extensions||{},d=(t=c[r.MSFT_TEXTURE_DDS]?i.images[c[r.MSFT_TEXTURE_DDS].source]:i.images[u.source]).uri,f=!1;return void 0!==t.bufferView&&(d=n.getDependency("bufferView",t.bufferView).then((function(e){f=!0;var r=new Blob([e],{type:t.mimeType});return d=l.createObjectURL(r)}))),Promise.resolve(d).then((function(e){var t=a.Loader.Handlers.get(e);return t||(t=c[r.MSFT_TEXTURE_DDS]?n.extensions[r.MSFT_TEXTURE_DDS].ddsLoader:s),new Promise((function(r,a){t.load(N(e,o.path),r,void 0,a)}))})).then((function(e){!0===f&&l.revokeObjectURL(d),e.flipY=!1,void 0!==u.name&&(e.name=u.name),c[r.MSFT_TEXTURE_DDS]||(e.format=void 0!==u.format?T[u.format]:a.RGBAFormat),void 0!==u.internalFormat&&e.format!==T[u.internalFormat]&&console.warn("THREE.GLTFLoader: Three.js does not support texture internalFormat which is different from texture format. internalFormat will be forced to be the same value as format."),e.type=void 0!==u.type?S[u.type]:a.UnsignedByteType;var t=(i.samplers||{})[u.sampler]||{};return e.magFilter=A[t.magFilter]||a.LinearFilter,e.minFilter=A[t.minFilter]||a.LinearMipMapLinearFilter,e.wrapS=M[t.wrapS]||a.RepeatWrapping,e.wrapT=M[t.wrapT]||a.RepeatWrapping,e}))},k.prototype.assignTexture=function(e,t,r){return this.getDependency("texture",r).then((function(r){e[t]=r}))},k.prototype.loadMaterial=function(e){this.json;var t,n=this.extensions,i=this.json.materials[e],o={},s=i.extensions||{},l=[];if(s[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var u=n[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];t=u.getMaterialType(i),l.push(u.extendParams(o,i,this))}else if(s[r.KHR_MATERIALS_UNLIT]){var c=n[r.KHR_MATERIALS_UNLIT];t=c.getMaterialType(i),l.push(c.extendParams(o,i,this))}else{t=a.MeshStandardMaterial;var d=i.pbrMetallicRoughness||{};if(o.color=new a.Color(1,1,1),o.opacity=1,Array.isArray(d.baseColorFactor)){var f=d.baseColorFactor;o.color.fromArray(f),o.opacity=f[3]}if(void 0!==d.baseColorTexture&&l.push(this.assignTexture(o,"map",d.baseColorTexture.index)),o.metalness=void 0!==d.metallicFactor?d.metallicFactor:1,o.roughness=void 0!==d.roughnessFactor?d.roughnessFactor:1,void 0!==d.metallicRoughnessTexture){var h=d.metallicRoughnessTexture.index;l.push(this.assignTexture(o,"metalnessMap",h)),l.push(this.assignTexture(o,"roughnessMap",h))}}!0===i.doubleSided&&(o.side=a.DoubleSide);var p=i.alphaMode||L;return p===O?o.transparent=!0:(o.transparent=!1,p===C&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&t!==a.MeshBasicMaterial&&(l.push(this.assignTexture(o,"normalMap",i.normalTexture.index)),o.normalScale=new a.Vector2(1,1),void 0!==i.normalTexture.scale&&o.normalScale.set(i.normalTexture.scale,i.normalTexture.scale)),void 0!==i.occlusionTexture&&t!==a.MeshBasicMaterial&&(l.push(this.assignTexture(o,"aoMap",i.occlusionTexture.index)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&t!==a.MeshBasicMaterial&&(o.emissive=(new a.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&t!==a.MeshBasicMaterial&&l.push(this.assignTexture(o,"emissiveMap",i.emissiveTexture.index)),Promise.all(l).then((function(){var e;return e=t===a.ShaderMaterial?n[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(o):new t(o),void 0!==i.name&&(e.name=i.name),e.normalScale&&(e.normalScale.y=-e.normalScale.y),e.map&&(e.map.encoding=a.sRGBEncoding),e.emissiveMap&&(e.emissiveMap.encoding=a.sRGBEncoding),i.extras&&(e.userData=i.extras),e}))},k.prototype.loadGeometries=function(e){var t=this,n=this.extensions,i=this.primitiveCache;return this.getDependencies("accessor").then((function(o){for(var s=[],l=0,u=e.length;l<u;l++){var c=e[l],d=D(i,c);if(d)s.push(d);else if(c.extensions&&c.extensions[r.KHR_DRACO_MESH_COMPRESSION]){var f=n[r.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c,t).then((function(e){return B(e,c,o),e}));i.push({primitive:c,promise:f}),s.push(f)}else{var h=new a.BufferGeometry;B(h,c,o);f=Promise.resolve(h);i.push({primitive:c,promise:f}),s.push(f)}}return Promise.all(s)}))},k.prototype.loadMesh=function(e){var t=this,n=(this.json,this.extensions),i=this.json.meshes[e];return this.getMultiDependencies(["accessor","material"]).then((function(o){var s=new a.Group,l=i.primitives;return t.loadGeometries(l).then((function(u){for(var c=0,d=l.length;c<d;c++){var f=l[c],h=u[c],w=void 0===f.material?new a.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:a.FrontSide}):o.materials[f.material];w.aoMap&&void 0===h.attributes.uv2&&void 0!==h.attributes.uv&&(console.log("THREE.GLTFLoader: Duplicating UVs to support aoMap."),h.addAttribute("uv2",new a.BufferAttribute(h.attributes.uv.array,2)));var A,M=void 0!==h.attributes.color,T=void 0===h.attributes.normal,S=!0===i.isSkinnedMesh,E=void 0!==f.targets;if(M||T||S||E)if(w.isGLTFSpecularGlossinessMaterial)w=n[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].cloneMaterial(w);else w=w.clone();if(M&&(w.vertexColors=a.VertexColors,w.needsUpdate=!0),T&&(w.flatShading=!0),f.mode===y||f.mode===x||f.mode===b||void 0===f.mode)S?(A=new a.SkinnedMesh(h,w),w.skinning=!0):A=new a.Mesh(h,w),f.mode===x?A.drawMode=a.TriangleStripDrawMode:f.mode===b&&(A.drawMode=a.TriangleFanDrawMode);else if(f.mode===m||f.mode===g||f.mode===v){var _="LineBasicMaterial:"+w.uuid,F=t.cache.get(_);F||(F=new a.LineBasicMaterial,a.Material.prototype.copy.call(F,w),F.color.copy(w.color),F.lights=!1,t.cache.add(_,F)),w=F,A=f.mode===m?new a.LineSegments(h,w):f.mode===g?new a.Line(h,w):new a.LineLoop(h,w)}else{if(f.mode!==p)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+f.mode);_="PointsMaterial:"+w.uuid;var P=t.cache.get(_);P||(P=new a.PointsMaterial,a.Material.prototype.copy.call(P,w),P.color.copy(w.color),P.map=w.map,P.lights=!1,t.cache.add(_,P)),w=P,A=new a.Points(h,w)}if(A.name=i.name||"mesh_"+e,E&&(R(A,i,f,o.accessors),w.morphTargets=!0,void 0!==A.geometry.morphAttributes.normal&&(w.morphNormals=!0)),void 0!==i.extras&&(A.userData=i.extras),void 0!==f.extras&&(A.geometry.userData=f.extras),!0===w.isGLTFSpecularGlossinessMaterial&&(A.onBeforeRender=n[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].refreshUniforms),!(l.length>1))return A;A.name+="_"+c,s.add(A)}return s}))}))},k.prototype.loadCamera=function(e){var t,r=this.json.cameras[e],n=r[r.type];if(n)return"perspective"===r.type?t=new a.PerspectiveCamera(a.Math.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):"orthographic"===r.type&&(t=new a.OrthographicCamera(n.xmag/-2,n.xmag/2,n.ymag/2,n.ymag/-2,n.znear,n.zfar)),void 0!==r.name&&(t.name=r.name),r.extras&&(t.userData=r.extras),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")},k.prototype.loadSkin=function(e){var t=this.json.skins[e],r={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(r):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return r.inverseBindMatrices=e,r}))},k.prototype.loadAnimation=function(e){this.json;var t=this.json.animations[e];return this.getMultiDependencies(["accessor","node"]).then((function(r){for(var n=[],i=0,o=t.channels.length;i<o;i++){var s=t.channels[i],l=t.samplers[s.sampler];if(l){var u=s.target,c=void 0!==u.node?u.node:u.id,d=void 0!==t.parameters?t.parameters[l.input]:l.input,f=void 0!==t.parameters?t.parameters[l.output]:l.output,p=r.accessors[d],m=r.accessors[f],v=r.nodes[c];if(v){var g;switch(v.updateMatrix(),v.matrixAutoUpdate=!0,F[u.path]){case F.weights:g=a.NumberKeyframeTrack;break;case F.rotation:g=a.QuaternionKeyframeTrack;break;case F.position:case F.scale:default:g=a.VectorKeyframeTrack}var y=v.name?v.name:v.uuid,x=void 0!==l.interpolation?P[l.interpolation]:a.InterpolateLinear,b=[];F[u.path]===F.weights?v.traverse((function(e){!0===e.isMesh&&!0===e.material.morphTargets&&b.push(e.name?e.name:e.uuid)})):b.push(y);for(var w=0,A=b.length;w<A;w++){var M=new g(b[w]+"."+F[u.path],a.AnimationUtils.arraySlice(p.array,0),a.AnimationUtils.arraySlice(m.array,0),x);"CUBICSPLINE"===l.interpolation&&(M.createInterpolant=function(e){return new h(this.times,this.values,this.getValueSize()/3,e)},M.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),n.push(M)}}}}c=void 0!==t.name?t.name:"animation_"+e;return new a.AnimationClip(c,void 0,n)}))},k.prototype.loadNode=function(e){this.json;var t=this.extensions,n=this.json.meshReferences,i=this.json.meshUses,o=this.json.nodes[e];return this.getMultiDependencies(["mesh","skin","camera","light"]).then((function(e){var s;if(!0===o.isBone)s=new a.Bone;else if(void 0!==o.mesh){var l=e.meshes[o.mesh];if(s=l.clone(),!0===l.isGroup)for(var u=0,c=l.children.length;u<c;u++){var d=l.children[u];d.material&&!0===d.material.isGLTFSpecularGlossinessMaterial&&(s.children[u].onBeforeRender=d.onBeforeRender)}else l.material&&!0===l.material.isGLTFSpecularGlossinessMaterial&&(s.onBeforeRender=l.onBeforeRender);n[o.mesh]>1&&(s.name+="_instance_"+i[o.mesh]++)}else if(void 0!==o.camera)s=e.cameras[o.camera];else if(o.extensions&&o.extensions[r.KHR_LIGHTS]&&void 0!==o.extensions[r.KHR_LIGHTS].light){s=t[r.KHR_LIGHTS].lights[o.extensions[r.KHR_LIGHTS].light]}else s=new a.Object3D;if(void 0!==o.name&&(s.name=a.PropertyBinding.sanitizeNodeName(o.name)),o.extras&&(s.userData=o.extras),void 0!==o.matrix){var f=new a.Matrix4;f.fromArray(o.matrix),s.applyMatrix(f)}else void 0!==o.translation&&s.position.fromArray(o.translation),void 0!==o.rotation&&s.quaternion.fromArray(o.rotation),void 0!==o.scale&&s.scale.fromArray(o.scale);return s}))},k.prototype.loadScene=function(){function e(t,r,n,i,o){var s=i[t],l=n.nodes[t];if(void 0!==l.skin)for(var u=!0===s.isGroup?s.children:[s],c=0,d=u.length;c<d;c++){for(var f=u[c],h=o[l.skin],p=[],m=[],v=0,g=h.joints.length;v<g;v++){var y=h.joints[v],x=i[y];if(x){p.push(x);var b=new a.Matrix4;void 0!==h.inverseBindMatrices&&b.fromArray(h.inverseBindMatrices.array,16*v),m.push(b)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',y)}f.bind(new a.Skeleton(p,m),f.matrixWorld)}if(r.add(s),l.children){var w=l.children;for(c=0,d=w.length;c<d;c++){e(w[c],s,n,i,o)}}}return function(t){var n=this.json,i=this.extensions,o=this.json.scenes[t];return this.getMultiDependencies(["node","skin"]).then((function(t){var s=new a.Scene;void 0!==o.name&&(s.name=o.name),o.extras&&(s.userData=o.extras);for(var l=o.nodes||[],u=0,c=l.length;u<c;u++)e(l[u],s,n,t.nodes,t.skins);if(o.extensions&&o.extensions[r.KHR_LIGHTS]&&void 0!==o.extensions[r.KHR_LIGHTS].light){var d=i[r.KHR_LIGHTS].lights;s.add(d[o.extensions[r.KHR_LIGHTS].light])}return s}))}}(),e}();t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};(n.prototype=Object.create(a.DataTextureLoader.prototype))._parser=function(e){var t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:case 4:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},r=function(e,t,r){t=t||1024;for(var a=e.pos,n=-1,i=0,o="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));0>(n=s.indexOf("\n"))&&i<t&&a<e.byteLength;)o+=s,i+=s.length,a+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(a,a+128)));return-1<n&&(!1!==r&&(e.pos+=i+n+1),o+s.slice(0,n))},n=new Uint8Array(e);n.byteLength;n.pos=0;var i=function(e){var a,n,i=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,o=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,s=/^\s*FORMAT=(\S+)\s*$/,l=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,u={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};if(e.pos>=e.byteLength||!(a=r(e)))return t(1,"no header found");if(!(n=a.match(/^#\?(\S+)$/)))return t(3,"bad initial token");for(u.valid|=1,u.programtype=n[1],u.string+=a+"\n";!1!==(a=r(e));)if(u.string+=a+"\n","#"!==a.charAt(0)){if((n=a.match(i))&&(u.gamma=parseFloat(n[1],10)),(n=a.match(o))&&(u.exposure=parseFloat(n[1],10)),(n=a.match(s))&&(u.valid|=2,u.format=n[1]),(n=a.match(l))&&(u.valid|=4,u.height=parseInt(n[1],10),u.width=parseInt(n[2],10)),2&u.valid&&4&u.valid)break}else u.comments+=a+"\n";return 2&u.valid?4&u.valid?u:t(3,"missing image size specifier"):t(3,"missing format specifier")}(n);if(-1!==i){var o=i.width,s=i.height,l=function(e,r,a){var n,i,o,s,l,u,c,d,f,h,p,m,v,g=r,y=a;if(g<8||g>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(g!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");if(!(n=new Uint8Array(4*r*a))||!n.length)return t(4,"unable to allocate buffer space");for(i=0,o=0,d=4*g,v=new Uint8Array(4),u=new Uint8Array(d);y>0&&o<e.byteLength;){if(o+4>e.byteLength)return t(1);if(v[0]=e[o++],v[1]=e[o++],v[2]=e[o++],v[3]=e[o++],2!=v[0]||2!=v[1]||(v[2]<<8|v[3])!=g)return t(3,"bad rgbe scanline format");for(c=0;c<d&&o<e.byteLength;){if((m=(s=e[o++])>128)&&(s-=128),0===s||c+s>d)return t(3,"bad scanline data");if(m)for(l=e[o++],f=0;f<s;f++)u[c++]=l;else u.set(e.subarray(o,o+s),c),c+=s,o+=s}for(h=g,f=0;f<h;f++)p=0,n[i]=u[f+p],p+=g,n[i+1]=u[f+p],p+=g,n[i+2]=u[f+p],p+=g,n[i+3]=u[f+p],i+=4;y--}return n}(n.subarray(n.pos),o,s);if(-1!==l)return{width:o,height:s,data:l,header:i.string,gamma:i.gamma,exposure:i.exposure,format:a.RGBEFormat,type:a.UnsignedByteType}}return null},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(8);var o=((a=i)&&a.__esModule?a:{default:a}).default,s={Validator:{isValid:function(e){return null!=e},verifyInput:function(e,t){return null==e?t:e}}};s.Callbacks=function(){var e=s.Validator;function t(){this.onProgress=null,this.onMeshAlter=null,this.onLoad=null,this.onLoadMaterials=null}return t.prototype.setCallbackOnProgress=function(t){this.onProgress=e.verifyInput(t,this.onProgress)},t.prototype.setCallbackOnMeshAlter=function(t){this.onMeshAlter=e.verifyInput(t,this.onMeshAlter)},t.prototype.setCallbackOnLoad=function(t){this.onLoad=e.verifyInput(t,this.onLoad)},t.prototype.setCallbackOnLoadMaterials=function(t){this.onLoadMaterials=e.verifyInput(t,this.onLoadMaterials)},t}(),s.LoadedMeshUserOverride=function(){function e(e,t){this.disregardMesh=!0===e,this.alteredMesh=!0===t,this.meshes=[]}return e.prototype.addMesh=function(e){this.meshes.push(e),this.alteredMesh=!0},e.prototype.isDisregardMesh=function(){return this.disregardMesh},e.prototype.providesAlteredMeshes=function(){return this.alteredMesh},e}(),s.ResourceDescriptor=function(){var e=s.Validator;function t(t,r){var a=t.split("/");a.length<2?(this.path=null,this.name=t,this.url=t):(this.path=e.verifyInput(a.slice(0,a.length-1).join("/")+"/",null),this.name=e.verifyInput(a[a.length-1],null),this.url=t),this.extension=e.verifyInput(r,"default"),this.extension=this.extension.trim(),this.content=null}return t.prototype.setContent=function(t){this.content=e.verifyInput(t,null)},t}(),s.PrepData=function(){var e=s.Validator;function t(t){this.logging={enabled:!0,debug:!1},this.modelName=e.verifyInput(t,""),this.resources=[],this.callbacks=new s.Callbacks}return t.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t},t.prototype.getCallbacks=function(){return this.callbacks},t.prototype.addResource=function(e){this.resources.push(e)},t.prototype.clone=function(){var e,t,r=new s.PrepData(this.modelName);for(e in r.logging.enabled=this.logging.enabled,r.logging.debug=this.logging.debug,r.resources=this.resources,r.callbacks=this.callbacks,this)t=this[e],r.hasOwnProperty(e)||"function"==typeof this[e]||(r[e]=t);return r},t.prototype.checkResourceDescriptorFiles=function(t,r){var a,n,i,o,s={};for(var l in t)if(a=t[l],o=!1,e.isValid(a.name))if(e.isValid(a.content)){for(i=0;i<r.length&&!o;i++)if(n=r[i],a.extension.toLowerCase()===n.ext.toLowerCase())if(n.ignore)o=!0;else if("ArrayBuffer"===n.type){if(!(a.content instanceof ArrayBuffer||a.content instanceof Uint8Array))throw"Provided content is not of type ArrayBuffer! Aborting...";s[n.ext]=a,o=!0}else if("String"===n.type){if(!("string"==typeof a.content||a.content instanceof String))throw"Provided content is not of type String! Aborting...";s[n.ext]=a,o=!0}if(!o)throw'Unidentified resource "'+a.name+'": '+a.url}else{if(!("string"==typeof a.name||a.name instanceof String))throw"Provided file is not properly defined! Aborting...";for(i=0;i<r.length&&!o;i++)n=r[i],a.extension.toLowerCase()===n.ext.toLowerCase()&&(n.ignore||(s[n.ext]=a),o=!0);if(!o)throw'Unidentified resource "'+a.name+'": '+a.url}return s},t}(),s.MeshBuilder=function(){var e="1.2.0",t=s.Validator;function r(){console.info("Using THREE.LoaderSupport.MeshBuilder version: "+e),this.logging={enabled:!0,debug:!1},this.callbacks=new s.Callbacks,this.materials=[]}return r.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t},r.prototype.init=function(){var e=new n.MeshStandardMaterial({color:14479871});e.name="defaultMaterial";var t=new n.MeshStandardMaterial({color:14479871});t.name="defaultVertexColorMaterial",t.vertexColors=n.VertexColors;var r=new n.LineBasicMaterial;r.name="defaultLineMaterial";var a=new n.PointsMaterial({size:1});a.name="defaultPointMaterial";var i={};i[e.name]=e,i[t.name]=t,i[r.name]=r,i[a.name]=a,this.updateMaterials({cmd:"materialData",materials:{materialCloneInstructions:null,serializedMaterials:null,runtimeMaterials:i}})},r.prototype.setMaterials=function(e){var r={cmd:"materialData",materials:{materialCloneInstructions:null,serializedMaterials:null,runtimeMaterials:t.isValid(this.callbacks.onLoadMaterials)?this.callbacks.onLoadMaterials(e):e}};this.updateMaterials(r)},r.prototype._setCallbacks=function(e){t.isValid(e.onProgress)&&this.callbacks.setCallbackOnProgress(e.onProgress),t.isValid(e.onMeshAlter)&&this.callbacks.setCallbackOnMeshAlter(e.onMeshAlter),t.isValid(e.onLoad)&&this.callbacks.setCallbackOnLoad(e.onLoad),t.isValid(e.onLoadMaterials)&&this.callbacks.setCallbackOnLoadMaterials(e.onLoadMaterials)},r.prototype.processPayload=function(e){return"meshData"===e.cmd?this.buildMeshes(e):"materialData"===e.cmd?(this.updateMaterials(e),null):void 0},r.prototype.buildMeshes=function(e){var r,a,i,o=e.params.meshName,s=new n.BufferGeometry;s.addAttribute("position",new n.BufferAttribute(new Float32Array(e.buffers.vertices),3)),t.isValid(e.buffers.indices)&&s.setIndex(new n.BufferAttribute(new Uint32Array(e.buffers.indices),1)),t.isValid(e.buffers.colors)&&s.addAttribute("color",new n.BufferAttribute(new Float32Array(e.buffers.colors),3)),t.isValid(e.buffers.normals)?s.addAttribute("normal",new n.BufferAttribute(new Float32Array(e.buffers.normals),3)):s.computeVertexNormals(),t.isValid(e.buffers.uvs)&&s.addAttribute("uv",new n.BufferAttribute(new Float32Array(e.buffers.uvs),2));var l=e.materials.materialNames,u=e.materials.multiMaterial,c=[];for(i in l)a=l[i],r=this.materials[a],u&&c.push(r);if(u){r=c;var d,f=e.materials.materialGroups;for(i in f)d=f[i],s.addGroup(d.start,d.count,d.index)}var h,p,m,v=[],g=this.callbacks.onMeshAlter,y=!0,x=t.verifyInput(e.geometryType,0);if(t.isValid(g)&&(p=g({detail:{meshName:o,bufferGeometry:s,material:r,geometryType:x}}),t.isValid(p))){if(!p.isDisregardMesh()&&p.providesAlteredMeshes())for(var b in p.meshes)v.push(p.meshes[b]);y=!1}if(y&&(e.computeBoundingSphere&&s.computeBoundingSphere(),(h=0===x?new n.Mesh(s,r):1===x?new n.LineSegments(s,r):new n.Points(s,r)).name=o,v.push(h)),t.isValid(v)&&v.length>0){var w=[];for(var b in v)h=v[b],w[b]=h.name;m="Adding mesh(es) ("+w.length+": "+w+") from input mesh: "+o,m+=" ("+(100*e.progress.numericalValue).toFixed(2)+"%)"}else m="Not adding mesh: "+o,m+=" ("+(100*e.progress.numericalValue).toFixed(2)+"%)";var A=this.callbacks.onProgress;t.isValid(A)&&A(new CustomEvent("MeshBuilderEvent",{detail:{type:"progress",modelName:e.params.meshName,text:m,numericalValue:e.progress.numericalValue}}));return v},r.prototype.updateMaterials=function(e){var r,a,i=e.materials.materialCloneInstructions;if(t.isValid(i)){var o=i.materialNameOrg,s=this.materials[o];if(t.isValid(o)){r=s.clone(),a=i.materialName,r.name=a;var l=i.materialProperties;for(var u in l)r.hasOwnProperty(u)&&l.hasOwnProperty(u)&&(r[u]=l[u]);this.materials[a]=r}else console.warn('Requested material "'+o+'" is not available!')}var c=e.materials.serializedMaterials;if(t.isValid(c)&&Object.keys(c).length>0){var d,f=new n.MaterialLoader;for(a in c)d=c[a],t.isValid(d)&&(r=f.parse(d),this.logging.enabled&&console.info('De-serialized material with name "'+a+'" will be added.'),this.materials[a]=r)}if(c=e.materials.runtimeMaterials,t.isValid(c)&&Object.keys(c).length>0)for(a in c)r=c[a],this.logging.enabled&&console.info('Material with name "'+a+'" will be added.'),this.materials[a]=r},r.prototype.getMaterialsJSON=function(){var e,t={};for(var r in this.materials)e=this.materials[r],t[r]=e.toJSON();return t},r.prototype.getMaterials=function(){return this.materials},r}(),s.WorkerRunnerRefImpl=function(){function e(){var e=this;self.addEventListener("message",(function(t){e.processMessage(t.data)}),!1)}return e.prototype.applyProperties=function(e,t){var r,a,n;for(r in t)a="set"+r.substring(0,1).toLocaleUpperCase()+r.substring(1),n=t[r],"function"==typeof e[a]?e[a](n):e.hasOwnProperty(r)&&(e[r]=n)},e.prototype.processMessage=function(e){if("run"===e.cmd){var t={callbackMeshBuilder:function(e){self.postMessage(e)},callbackProgress:function(t){e.logging.enabled&&e.logging.debug&&console.debug("WorkerRunner: progress: "+t)}},r=new Parser;"function"==typeof r.setLogging&&r.setLogging(e.logging.enabled,e.logging.debug),this.applyProperties(r,e.params),this.applyProperties(r,e.materials),this.applyProperties(r,t),r.workerScope=self,r.parse(e.data.input,e.data.options),e.logging.enabled&&console.log("WorkerRunner: Run complete!"),t.callbackMeshBuilder({cmd:"complete",msg:"WorkerRunner completed run."})}else console.error("WorkerRunner: Received unknown command: "+e.cmd)},e}(),s.WorkerSupport=function(){var e="2.2.0",t=s.Validator,r=function(){function e(){this._reset()}return e.prototype._reset=function(){this.logging={enabled:!0,debug:!1},this.worker=null,this.runnerImplName=null,this.callbacks={meshBuilder:null,onLoad:null},this.terminateRequested=!1,this.queuedMessage=null,this.started=!1,this.forceCopy=!1},e.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t},e.prototype.setForceCopy=function(e){this.forceCopy=!0===e},e.prototype.initWorker=function(e,t){this.runnerImplName=t;var r=new Blob([e],{type:"application/javascript"});this.worker=new Worker(o.URL.createObjectURL(r)),this.worker.onmessage=this._receiveWorkerMessage,this.worker.runtimeRef=this,this._postMessage()},e.prototype._receiveWorkerMessage=function(e){var t=e.data;switch(t.cmd){case"meshData":case"materialData":case"imageData":this.runtimeRef.callbacks.meshBuilder(t);break;case"complete":this.runtimeRef.queuedMessage=null,this.started=!1,this.runtimeRef.callbacks.onLoad(t.msg),this.runtimeRef.terminateRequested&&(this.runtimeRef.logging.enabled&&console.info("WorkerSupport ["+this.runtimeRef.runnerImplName+"]: Run is complete. Terminating application on request!"),this.runtimeRef._terminate());break;case"error":console.error("WorkerSupport ["+this.runtimeRef.runnerImplName+"]: Reported error: "+t.msg),this.runtimeRef.queuedMessage=null,this.started=!1,this.runtimeRef.callbacks.onLoad(t.msg),this.runtimeRef.terminateRequested&&(this.runtimeRef.logging.enabled&&console.info("WorkerSupport ["+this.runtimeRef.runnerImplName+"]: Run reported error. Terminating application on request!"),this.runtimeRef._terminate());break;default:console.error("WorkerSupport ["+this.runtimeRef.runnerImplName+"]: Received unknown command: "+t.cmd)}},e.prototype.setCallbacks=function(e,r){this.callbacks.meshBuilder=t.verifyInput(e,this.callbacks.meshBuilder),this.callbacks.onLoad=t.verifyInput(r,this.callbacks.onLoad)},e.prototype.run=function(e){if(t.isValid(this.queuedMessage))console.warn("Already processing message. Rejecting new run instruction");else{if(this.queuedMessage=e,this.started=!0,!t.isValid(this.callbacks.meshBuilder))throw'Unable to run as no "MeshBuilder" callback is set.';if(!t.isValid(this.callbacks.onLoad))throw'Unable to run as no "onLoad" callback is set.';"run"!==e.cmd&&(e.cmd="run"),t.isValid(e.logging)?(e.logging.enabled=!0===e.logging.enabled,e.logging.debug=!0===e.logging.debug):e.logging={enabled:!0,debug:!1},this._postMessage()}},e.prototype._postMessage=function(){var e;t.isValid(this.queuedMessage)&&t.isValid(this.worker)&&(this.queuedMessage.data.input instanceof ArrayBuffer?(e=this.forceCopy?this.queuedMessage.data.input.slice(0):this.queuedMessage.data.input,this.worker.postMessage(this.queuedMessage,[e])):this.worker.postMessage(this.queuedMessage))},e.prototype.setTerminateRequested=function(e){this.terminateRequested=!0===e,this.terminateRequested&&t.isValid(this.worker)&&!t.isValid(this.queuedMessage)&&this.started&&(this.logging.enabled&&console.info("Worker is terminated immediately as it is not running!"),this._terminate())},e.prototype._terminate=function(){this.worker.terminate(),this._reset()},e}();function a(){if(console.info("Using THREE.LoaderSupport.WorkerSupport version: "+e),this.logging={enabled:!0,debug:!1},void 0===o.Worker)throw"This browser does not support web workers!";if(void 0===o.Blob)throw"This browser does not support Blob!";if("function"!=typeof o.URL.createObjectURL)throw"This browser does not support Object creation from URL!";this.loaderWorker=new r}a.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t,this.loaderWorker.setLogging(this.logging.enabled,this.logging.debug)},a.prototype.setForceWorkerDataCopy=function(e){this.loaderWorker.setForceCopy(e)},a.prototype.validate=function(e,r,a,o,u){if(!t.isValid(this.loaderWorker.worker)){this.logging.enabled&&(console.info("WorkerSupport: Building worker code..."),console.time("buildWebWorkerCode")),t.isValid(u)?this.logging.enabled&&console.info('WorkerSupport: Using "'+u.name+'" as Runner class for worker.'):(u=s.WorkerRunnerRefImpl,this.logging.enabled&&console.info('WorkerSupport: Using DEFAULT "THREE.LoaderSupport.WorkerRunnerRefImpl" as Runner class for worker.'));var c=e(i,l);c+="var Parser = "+r+";\n\n",c+=l(u.name,u),c+="new "+u.name+"();\n\n";var d=this;if(t.isValid(a)&&a.length>0){var f="";!function e(t,r){if(0===r.length)d.loaderWorker.initWorker(f+c,u.name),d.logging.enabled&&console.timeEnd("buildWebWorkerCode");else{var a=new n.FileLoader;a.setPath(t),a.setResponseType("text"),a.load(r[0],(function(a){f+=a,e(t,r)})),r.shift()}}(o,a)}else this.loaderWorker.initWorker(c,u.name),this.logging.enabled&&console.timeEnd("buildWebWorkerCode")}},a.prototype.setCallbacks=function(e,t){this.loaderWorker.setCallbacks(e,t)},a.prototype.run=function(e){this.loaderWorker.run(e)},a.prototype.setTerminateRequested=function(e){this.loaderWorker.setTerminateRequested(e)};var i=function(e,t){var r,a=e+" = {\n";for(var n in t)"string"==typeof(r=t[n])||r instanceof String?a+="\t"+n+': "'+(r=(r=r.replace("\n","\\n")).replace("\r","\\r"))+'",\n':r instanceof Array?a+="\t"+n+": ["+r+"],\n":Number.isInteger(r)?a+="\t"+n+": "+r+",\n":"function"==typeof r&&(a+="\t"+n+": "+r+",\n");return a+="}\n\n"},l=function(e,r,a,n,i){var o,s,l="",u=t.isValid(a)?a:r.name;for(var c in i=t.verifyInput(i,[]),r.prototype)o=r.prototype[c],"constructor"===c?s="\tfunction "+u+o.toString().replace("function","")+";\n\n":"function"==typeof o&&i.indexOf(c)<0&&(l+="\t"+u+".prototype."+c+" = "+o.toString()+";\n\n");l+="\treturn "+u+";\n",l+="})();\n\n";var d="";return t.isValid(n)&&(d+="\n",d+=u+".prototype = Object.create( "+n+".prototype );\n",d+=u+".constructor = "+u+";\n",d+="\n"),t.isValid(s)?l=e+" = (function () {\n\n"+d+s+l:(s=e+" = (function () {\n\n",l=(s+=d+"\t"+r.prototype.constructor.toString()+"\n\n")+l),l};return a}(),s.WorkerDirector=function(){var e="2.2.0",t=s.Validator,r=16,a=8192;function i(n){if(console.info("Using THREE.LoaderSupport.WorkerDirector version: "+e),this.logging={enabled:!0,debug:!1},this.maxQueueSize=a,this.maxWebWorkers=r,this.crossOrigin=null,!t.isValid(n))throw"Provided invalid classDef: "+n;this.workerDescription={classDef:n,globalCallbacks:{},workerSupports:{},forceWorkerDataCopy:!0},this.objectsCompleted=0,this.instructionQueue=[],this.instructionQueuePointer=0,this.callbackOnFinishedProcessing=null}return i.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t},i.prototype.getMaxQueueSize=function(){return this.maxQueueSize},i.prototype.getMaxWebWorkers=function(){return this.maxWebWorkers},i.prototype.setCrossOrigin=function(e){this.crossOrigin=e},i.prototype.setForceWorkerDataCopy=function(e){this.workerDescription.forceWorkerDataCopy=!0===e},i.prototype.prepareWorkers=function(e,i,o){t.isValid(e)&&(this.workerDescription.globalCallbacks=e),this.maxQueueSize=Math.min(i,a),this.maxWebWorkers=Math.min(o,r),this.maxWebWorkers=Math.min(this.maxWebWorkers,this.maxQueueSize),this.objectsCompleted=0,this.instructionQueue=[],this.instructionQueuePointer=0;for(var s=0;s<this.maxWebWorkers;s++){var l=new n.LoaderSupport.WorkerSupport;l.setLogging(this.logging.enabled,this.logging.debug),l.setForceWorkerDataCopy(this.workerDescription.forceWorkerDataCopy),this.workerDescription.workerSupports[s]={instanceNo:s,inUse:!1,terminateRequested:!1,workerSupport:l,loader:null}}},i.prototype.enqueueForRun=function(e){this.instructionQueue.length<this.maxQueueSize&&this.instructionQueue.push(e)},i.prototype.isRunning=function(){var e=Object.keys(this.workerDescription.workerSupports);return this.instructionQueue.length>0&&this.instructionQueuePointer<this.instructionQueue.length||e.length>0},i.prototype.processQueue=function(){var e,t;for(var r in this.workerDescription.workerSupports)(t=this.workerDescription.workerSupports[r]).inUse||(this.instructionQueuePointer<this.instructionQueue.length?(e=this.instructionQueue[this.instructionQueuePointer],this._kickWorkerRun(e,t),this.instructionQueuePointer++):this._deregister(t));this.isRunning()||null===this.callbackOnFinishedProcessing||(this.callbackOnFinishedProcessing(),this.callbackOnFinishedProcessing=null)},i.prototype._kickWorkerRun=function(e,r){r.inUse=!0,r.workerSupport.setTerminateRequested(r.terminateRequested),this.logging.enabled&&console.info("\nAssigning next item from queue to worker (queue length: "+this.instructionQueue.length+")\n\n");var a=this,n=e.getCallbacks(),i=this.workerDescription.globalCallbacks;r.loader=this._buildLoader(r.instanceNo);var o=new s.Callbacks;o.setCallbackOnLoad((function(e){t.isValid(i.onLoad)&&i.onLoad(e),t.isValid(n.onLoad)&&n.onLoad(e),a.objectsCompleted++,r.inUse=!1,a.processQueue()})),o.setCallbackOnProgress((function(e){t.isValid(i.onProgress)&&i.onProgress(e),t.isValid(n.onProgress)&&n.onProgress(e)})),o.setCallbackOnMeshAlter((function(e){t.isValid(i.onMeshAlter)&&i.onMeshAlter(e),t.isValid(n.onMeshAlter)&&n.onMeshAlter(e)})),e.callbacks=o,r.loader.run(e,r.workerSupport)},i.prototype._buildLoader=function(e){var r=this.workerDescription.classDef,a=Object.create(r.prototype);if(r.call(a,n.DefaultLoadingManager),!a.hasOwnProperty("instanceNo"))throw r.name+' has no property "instanceNo".';if(a.instanceNo=e,!a.hasOwnProperty("workerSupport"))throw r.name+' has no property "workerSupport".';if("function"!=typeof a.run)throw r.name+' has no function "run".';return a.hasOwnProperty("callbacks")&&t.isValid(a.callbacks)||(console.warn(r.name+' has an invalid property "callbacks". Will change to "THREE.LoaderSupport.Callbacks"'),a.callbacks=new n.LoaderSupport.Callbacks),a},i.prototype._deregister=function(e){if(t.isValid(e)){e.workerSupport.setTerminateRequested(!0),this.logging.enabled&&console.info("Requested termination of worker #"+e.instanceNo+".");var r=e.loader.callbacks;t.isValid(r.onProgress)&&r.onProgress({detail:{text:""}}),delete this.workerDescription.workerSupports[e.instanceNo]}},i.prototype.tearDown=function(e){for(var r in this.logging.enabled&&console.info("WorkerDirector received the deregister call. Terminating all workers!"),this.instructionQueuePointer=this.instructionQueue.length,this.callbackOnFinishedProcessing=t.verifyInput(e,null),this.workerDescription.workerSupports)this.workerDescription.workerSupports[r].terminateRequested=!0},i}(),t.default=s},function(e,t,r){(function(t){var r;r="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=r}).call(t,r(67))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(this.manager);o.setPath(this.path),o.load(e,(function(e){t(i.parse(e))}),r,n)},setPath:function(e){return this.path=e,this},setTexturePath:function(e){return this.texturePath=e,this},setBaseUrl:function(e){return console.warn("THREE.MTLLoader: .setBaseUrl() is deprecated. Use .setTexturePath( path ) for texture path or .setPath( path ) for general base path instead."),this.setTexturePath(e)},setCrossOrigin:function(e){return this.crossOrigin=e,this},setMaterialOptions:function(e){return this.materialOptions=e,this},parse:function(e){for(var t=e.split("\n"),r={},a=/\s+/,i={},o=0;o<t.length;o++){var s=t[o];if(0!==(s=s.trim()).length&&"#"!==s.charAt(0)){var l=s.indexOf(" "),u=l>=0?s.substring(0,l):s;u=u.toLowerCase();var c=l>=0?s.substring(l+1):"";if(c=c.trim(),"newmtl"===u)r={name:c},i[c]=r;else if(r)if("ka"===u||"kd"===u||"ks"===u){var d=c.split(a,3);r[u]=[parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2])]}else r[u]=c}}var f=new n.MaterialCreator(this.texturePath||this.path,this.materialOptions);return f.setCrossOrigin(this.crossOrigin),f.setManager(this.manager),f.setMaterials(i),f}},(n.MaterialCreator=function(e,t){this.baseUrl=e||"",this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:a.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:a.RepeatWrapping}).prototype={constructor:n.MaterialCreator,crossOrigin:"Anonymous",setCrossOrigin:function(e){this.crossOrigin=e},setManager:function(e){this.manager=e},setMaterials:function(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(e){if(!this.options)return e;var t={};for(var r in e){var a=e[r],n={};for(var i in t[r]=n,a){var o=!0,s=a[i],l=i.toLowerCase();switch(l){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(o=!1)}o&&(n[l]=s)}}return t},preload:function(){for(var e in this.materialsInfo)this.create(e)},getIndex:function(e){return this.nameLookup[e]},getAsArray:function(){var e=0;for(var t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray},create:function(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]},createMaterial_:function(e){var t=this,r=this.materialsInfo[e],n={name:e,side:this.side};function i(e,r){if(!n[e]){var a,i,o=t.getTextureParams(r,n),s=t.loadTexture((a=t.baseUrl,"string"!=typeof(i=o.url)||""===i?"":/^https?:\/\//i.test(i)?i:a+i));s.repeat.copy(o.scale),s.offset.copy(o.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,n[e]=s}}for(var o in r){var s,l=r[o];if(""!==l)switch(o.toLowerCase()){case"kd":n.color=(new a.Color).fromArray(l);break;case"ks":n.specular=(new a.Color).fromArray(l);break;case"map_kd":i("map",l);break;case"map_ks":i("specularMap",l);break;case"norm":i("normalMap",l);break;case"map_bump":case"bump":i("bumpMap",l);break;case"ns":n.shininess=parseFloat(l);break;case"d":(s=parseFloat(l))<1&&(n.opacity=s,n.transparent=!0);break;case"tr":s=parseFloat(l),this.options&&this.options.invertTrProperty&&(s=1-s),s>0&&(n.opacity=1-s,n.transparent=!0)}}return this.materials[e]=new a.MeshPhongMaterial(n),this.materials[e]},getTextureParams:function(e,t){var r,n={scale:new a.Vector2(1,1),offset:new a.Vector2(0,0)},i=e.split(/\s+/);return(r=i.indexOf("-bm"))>=0&&(t.bumpScale=parseFloat(i[r+1]),i.splice(r,2)),(r=i.indexOf("-s"))>=0&&(n.scale.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),(r=i.indexOf("-o"))>=0&&(n.offset.set(parseFloat(i[r+1]),parseFloat(i[r+2])),i.splice(r,4)),n.url=i.join(" ").trim(),n},loadTexture:function(e,t,r,n,i){var o,s=a.Loader.Handlers.get(e),l=void 0!==this.manager?this.manager:a.DefaultLoadingManager;return null===s&&(s=new a.TextureLoader(l)),s.setCrossOrigin&&s.setCrossOrigin(this.crossOrigin),o=s.load(e,r,n,i),void 0!==t&&(o.mapping=t),o}},t.default=n},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _three=__webpack_require__(0),THREE=_interopRequireWildcard(_three);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var Volume=function(e,t,r,a,n){if(arguments.length>0){switch(this.xLength=Number(e)||1,this.yLength=Number(t)||1,this.zLength=Number(r)||1,a){case"Uint8":case"uint8":case"uchar":case"unsigned char":case"uint8_t":this.data=new Uint8Array(n);break;case"Int8":case"int8":case"signed char":case"int8_t":this.data=new Int8Array(n);break;case"Int16":case"int16":case"short":case"short int":case"signed short":case"signed short int":case"int16_t":this.data=new Int16Array(n);break;case"Uint16":case"uint16":case"ushort":case"unsigned short":case"unsigned short int":case"uint16_t":this.data=new Uint16Array(n);break;case"Int32":case"int32":case"int":case"signed int":case"int32_t":this.data=new Int32Array(n);break;case"Uint32":case"uint32":case"uint":case"unsigned int":case"uint32_t":this.data=new Uint32Array(n);break;case"longlong":case"long long":case"long long int":case"signed long long":case"signed long long int":case"int64":case"int64_t":case"ulonglong":case"unsigned long long":case"unsigned long long int":case"uint64":case"uint64_t":throw"Error in THREE.Volume constructor : this type is not supported in JavaScript";case"Float32":case"float32":case"float":this.data=new Float32Array(n);break;case"Float64":case"float64":case"double":this.data=new Float64Array(n);break;default:this.data=new Uint8Array(n)}if(this.data.length!==this.xLength*this.yLength*this.zLength)throw"Error in THREE.Volume constructor, lengths are not matching arrayBuffer size"}this.spacing=[1,1,1],this.offset=[0,0,0],this.matrix=new THREE.Matrix3,this.matrix.identity();var i=-1/0;Object.defineProperty(this,"lowerThreshold",{get:function(){return i},set:function(e){i=e,this.sliceList.forEach((function(e){e.geometryNeedsUpdate=!0}))}});var o=1/0;Object.defineProperty(this,"upperThreshold",{get:function(){return o},set:function(e){o=e,this.sliceList.forEach((function(e){e.geometryNeedsUpdate=!0}))}}),this.sliceList=[]};Volume.prototype={constructor:Volume,getData:function(e,t,r){return this.data[r*this.xLength*this.yLength+t*this.xLength+e]},access:function(e,t,r){return r*this.xLength*this.yLength+t*this.xLength+e},reverseAccess:function(e){var t=Math.floor(e/(this.yLength*this.xLength)),r=Math.floor((e-t*this.yLength*this.xLength)/this.xLength);return[e-t*this.yLength*this.xLength-r*this.xLength,r,t]},map:function(e,t){var r=this.data.length;t=t||this;for(var a=0;a<r;a++)this.data[a]=e.call(t,this.data[a],a,this.data);return this},extractPerpendicularPlane:function extractPerpendicularPlane(axis,RASIndex){var iLength,jLength,sliceAccess,planeMatrix=(new THREE.Matrix4).identity(),volume=this,planeWidth,planeHeight,firstSpacing,secondSpacing,positionOffset,IJKIndex,axisInIJK=new THREE.Vector3,firstDirection=new THREE.Vector3,secondDirection=new THREE.Vector3,dimensions=new THREE.Vector3(this.xLength,this.yLength,this.zLength);switch(axis){case"x":axisInIJK.set(1,0,0),firstDirection.set(0,0,-1),secondDirection.set(0,-1,0),firstSpacing=this.spacing[2],secondSpacing=this.spacing[1],IJKIndex=new THREE.Vector3(RASIndex,0,0),planeMatrix.multiply((new THREE.Matrix4).makeRotationY(Math.PI/2)),positionOffset=(volume.RASDimensions[0]-1)/2,planeMatrix.setPosition(new THREE.Vector3(RASIndex-positionOffset,0,0));break;case"y":axisInIJK.set(0,1,0),firstDirection.set(1,0,0),secondDirection.set(0,0,1),firstSpacing=this.spacing[0],secondSpacing=this.spacing[2],IJKIndex=new THREE.Vector3(0,RASIndex,0),planeMatrix.multiply((new THREE.Matrix4).makeRotationX(-Math.PI/2)),positionOffset=(volume.RASDimensions[1]-1)/2,planeMatrix.setPosition(new THREE.Vector3(0,RASIndex-positionOffset,0));break;case"z":default:axisInIJK.set(0,0,1),firstDirection.set(1,0,0),secondDirection.set(0,-1,0),firstSpacing=this.spacing[0],secondSpacing=this.spacing[1],IJKIndex=new THREE.Vector3(0,0,RASIndex),positionOffset=(volume.RASDimensions[2]-1)/2,planeMatrix.setPosition(new THREE.Vector3(0,0,RASIndex-positionOffset))}firstDirection.applyMatrix4(volume.inverseMatrix).normalize(),firstDirection.argVar="i",secondDirection.applyMatrix4(volume.inverseMatrix).normalize(),secondDirection.argVar="j",axisInIJK.applyMatrix4(volume.inverseMatrix).normalize(),iLength=Math.floor(Math.abs(firstDirection.dot(dimensions))),jLength=Math.floor(Math.abs(secondDirection.dot(dimensions))),planeWidth=Math.abs(iLength*firstSpacing),planeHeight=Math.abs(jLength*secondSpacing),IJKIndex=Math.abs(Math.round(IJKIndex.applyMatrix4(volume.inverseMatrix).dot(axisInIJK)));var base=[new THREE.Vector3(1,0,0),new THREE.Vector3(0,1,0),new THREE.Vector3(0,0,1)],iDirection=[firstDirection,secondDirection,axisInIJK].find((function(e){return Math.abs(e.dot(base[0]))>.9})),jDirection=[firstDirection,secondDirection,axisInIJK].find((function(e){return Math.abs(e.dot(base[1]))>.9})),kDirection=[firstDirection,secondDirection,axisInIJK].find((function(e){return Math.abs(e.dot(base[2]))>.9})),argumentsWithInversion=["volume.xLength-1-","volume.yLength-1-","volume.zLength-1-"],argArray=[iDirection,jDirection,kDirection].map((function(e,t){return(e.dot(base[t])>0?"":argumentsWithInversion[t])+(e===axisInIJK?"IJKIndex":e.argVar)})),argString=argArray.join(",");return sliceAccess=eval("(function sliceAccess (i,j) {return volume.access( "+argString+");})"),{iLength:iLength,jLength:jLength,sliceAccess:sliceAccess,matrix:planeMatrix,planeWidth:planeWidth,planeHeight:planeHeight}},extractSlice:function(e,t){var r=new THREE.VolumeSlice(this,t,e);return this.sliceList.push(r),r},repaintAllSlices:function(){return this.sliceList.forEach((function(e){e.repaint()})),this},computeMinMax:function(){var e=1/0,t=-1/0,r=this.data.length,a=0;for(a=0;a<r;a++)if(!isNaN(this.data[a])){var n=this.data[a];e=Math.min(e,n),t=Math.max(t,n)}return this.min=e,this.max=t,[e,t]}},exports.default=Volume},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","float l = linearToRelativeLuminance( texel.rgb );","gl_FragColor = vec4( l, l, l, texel.w );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},averageLuminance:{value:1},luminanceMap:{value:null},maxLuminance:{value:16},minLuminance:{value:.01},middleGrey:{value:.6}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","uniform sampler2D tDiffuse;","varying vec2 vUv;","uniform float middleGrey;","uniform float minLuminance;","uniform float maxLuminance;","#ifdef ADAPTED_LUMINANCE","uniform sampler2D luminanceMap;","#else","uniform float averageLuminance;","#endif","vec3 ToneMap( vec3 vColor ) {","#ifdef ADAPTED_LUMINANCE","float fLumAvg = texture2D(luminanceMap, vec2(0.5, 0.5)).r;","#else","float fLumAvg = averageLuminance;","#endif","float fLumPixel = linearToRelativeLuminance( vColor );","float fLumScaled = (fLumPixel * middleGrey) / max( minLuminance, fLumAvg );","float fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (maxLuminance * maxLuminance)))) / (1.0 + fLumScaled);","return fLumCompressed * vColor;","}","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","gl_FragColor = vec4( ToneMap( texel.xyz ), texel.w );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={defines:{KERNEL_SIZE_FLOAT:"25.0",KERNEL_SIZE_INT:"25"},uniforms:{tDiffuse:{value:null},uImageIncrement:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)(.001953125,0)},cKernel:{value:[]}},vertexShader:["uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","vUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float cKernel[ KERNEL_SIZE_INT ];","uniform sampler2D tDiffuse;","uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","vec2 imageCoord = vUv;","vec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );","for( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {","sum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];","imageCoord += uImageIncrement;","}","gl_FragColor = sum;","}"].join("\n"),buildKernel:function(e){function t(e,t){return Math.exp(-e*e/(2*t*t))}var r,a,n,i,o=2*Math.ceil(3*e)+1;for(o>25&&(o=25),i=.5*(o-1),a=new Array(o),n=0,r=0;r<o;++r)a[r]=t(r-i,e),n+=a[r];for(r=0;r<o;++r)a[r]/=n;return a}};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={defines:{DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},aspect:{value:1},aperture:{value:.025},maxblur:{value:1},nearClip:{value:1},farClip:{value:1e3}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","varying vec2 vUv;","uniform sampler2D tColor;","uniform sampler2D tDepth;","uniform float maxblur;","uniform float aperture;","uniform float nearClip;","uniform float farClip;","uniform float focus;","uniform float aspect;","#include <packing>","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, nearClip, farClip );","\t#else","\treturn orthographicDepthToViewZ( depth, nearClip, farClip );","\t#endif","}","void main() {","vec2 aspectcorrect = vec2( 1.0, aspect );","float viewZ = getViewZ( getDepth( vUv ) );","float factor = ( focus + viewZ );","vec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );","vec2 dofblur9 = dofblur * 0.9;","vec2 dofblur7 = dofblur * 0.7;","vec2 dofblur4 = dofblur * 0.4;","vec4 col = vec4( 0.0 );","col += texture2D( tColor, vUv.xy );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );","col += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );","col += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );","gl_FragColor = col / 41.0;","gl_FragColor.a = 1.0;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={uniforms:{tDiffuse:{value:null},tSize:{value:new a.Vector2(256,256)},center:{value:new a.Vector2(.5,.5)},angle:{value:1.57},scale:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec2 center;","uniform float angle;","uniform float scale;","uniform vec2 tSize;","uniform sampler2D tDiffuse;","varying vec2 vUv;","float pattern() {","float s = sin( angle ), c = cos( angle );","vec2 tex = vUv * tSize - center;","vec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;","return ( sin( point.x ) * sin( point.y ) ) * 4.0;","}","void main() {","vec4 color = texture2D( tDiffuse, vUv );","float average = ( color.r + color.g + color.b ) / 3.0;","gl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );","}"].join("\n")};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},time:{value:0},nIntensity:{value:.5},sIntensity:{value:.05},sCount:{value:4096},grayscale:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","uniform float time;","uniform bool grayscale;","uniform float nIntensity;","uniform float sIntensity;","uniform float sCount;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 cTextureScreen = texture2D( tDiffuse, vUv );","float dx = rand( vUv + time );","vec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx, 0.0, 1.0 );","vec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );","cResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;","cResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );","if( grayscale ) {","cResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );","}","gl_FragColor = vec4( cResult, cTextureScreen.a );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},tDisp:{value:null},byp:{value:0},amount:{value:.08},angle:{value:.02},seed:{value:.02},seed_x:{value:.02},seed_y:{value:.02},distortion_x:{value:.5},distortion_y:{value:.6},col_s:{value:.05}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform int byp;","uniform sampler2D tDiffuse;","uniform sampler2D tDisp;","uniform float amount;","uniform float angle;","uniform float seed;","uniform float seed_x;","uniform float seed_y;","uniform float distortion_x;","uniform float distortion_y;","uniform float col_s;","varying vec2 vUv;","float rand(vec2 co){","return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);","}","void main() {","if(byp<1) {","vec2 p = vUv;","float xs = floor(gl_FragCoord.x / 0.5);","float ys = floor(gl_FragCoord.y / 0.5);","vec4 normal = texture2D (tDisp, p*seed*seed);","if(p.y<distortion_x+col_s && p.y>distortion_x-col_s*seed) {","if(seed_x>0.){","p.y = 1. - (p.y + distortion_y);","}","else {","p.y = distortion_y;","}","}","if(p.x<distortion_y+col_s && p.x>distortion_y-col_s*seed) {","if(seed_y>0.){","p.x=distortion_x;","}","else {","p.x = 1. - (p.x + distortion_x);","}","}","p.x+=normal.x*seed_x*(seed/5.);","p.y+=normal.y*seed_y*(seed/5.);","vec2 offset = amount * vec2( cos(angle), sin(angle));","vec4 cr = texture2D(tDiffuse, p + offset);","vec4 cga = texture2D(tDiffuse, p);","vec4 cb = texture2D(tDiffuse, p - offset);","gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);","vec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);","gl_FragColor = gl_FragColor+ snow;","}","else {","gl_FragColor=texture2D (tDiffuse, vUv);","}","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},shape:{value:1},radius:{value:4},rotateR:{value:Math.PI/12*1},rotateG:{value:Math.PI/12*2},rotateB:{value:Math.PI/12*3},scatter:{value:0},width:{value:1},height:{value:1},blending:{value:1},blendingMode:{value:1},greyscale:{value:!1},disable:{value:!1}},vertexShader:["varying vec2 vUV;","void main() {","vUV = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),fragmentShader:["#define SQRT2_MINUS_ONE 0.41421356","#define SQRT2_HALF_MINUS_ONE 0.20710678","#define PI2 6.28318531","#define SHAPE_DOT 1","#define SHAPE_ELLIPSE 2","#define SHAPE_LINE 3","#define SHAPE_SQUARE 4","#define BLENDING_LINEAR 1","#define BLENDING_MULTIPLY 2","#define BLENDING_ADD 3","#define BLENDING_LIGHTER 4","#define BLENDING_DARKER 5","uniform sampler2D tDiffuse;","uniform float radius;","uniform float rotateR;","uniform float rotateG;","uniform float rotateB;","uniform float scatter;","uniform float width;","uniform float height;","uniform int shape;","uniform bool disable;","uniform float blending;","uniform int blendingMode;","varying vec2 vUV;","uniform bool greyscale;","const int samples = 8;","float blend( float a, float b, float t ) {","return a * ( 1.0 - t ) + b * t;","}","float hypot( float x, float y ) {","return sqrt( x * x + y * y );","}","float rand( vec2 seed ){","return fract( sin( dot( seed.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 );","}","float distanceToDotRadius( float channel, vec2 coord, vec2 normal, vec2 p, float angle, float rad_max ) {","float dist = hypot( coord.x - p.x, coord.y - p.y );","float rad = channel;","if ( shape == SHAPE_DOT ) {","rad = pow( abs( rad ), 1.125 ) * rad_max;","} else if ( shape == SHAPE_ELLIPSE ) {","rad = pow( abs( rad ), 1.125 ) * rad_max;","if ( dist != 0.0 ) {","float dot_p = abs( ( p.x - coord.x ) / dist * normal.x + ( p.y - coord.y ) / dist * normal.y );","dist = ( dist * ( 1.0 - SQRT2_HALF_MINUS_ONE ) ) + dot_p * dist * SQRT2_MINUS_ONE;","}","} else if ( shape == SHAPE_LINE ) {","rad = pow( abs( rad ), 1.5) * rad_max;","float dot_p = ( p.x - coord.x ) * normal.x + ( p.y - coord.y ) * normal.y;","dist = hypot( normal.x * dot_p, normal.y * dot_p );","} else if ( shape == SHAPE_SQUARE ) {","float theta = atan( p.y - coord.y, p.x - coord.x ) - angle;","float sin_t = abs( sin( theta ) );","float cos_t = abs( cos( theta ) );","rad = pow( abs( rad ), 1.4 );","rad = rad_max * ( rad + ( ( sin_t > cos_t ) ? rad - sin_t * rad : rad - cos_t * rad ) );","}","return rad - dist;","}","struct Cell {","vec2 normal;","vec2 p1;","vec2 p2;","vec2 p3;","vec2 p4;","float samp2;","float samp1;","float samp3;","float samp4;","};","vec4 getSample( vec2 point ) {","vec4 tex = texture2D( tDiffuse, vec2( point.x / width, point.y / height ) );","float base = rand( vec2( floor( point.x ), floor( point.y ) ) ) * PI2;","float step = PI2 / float( samples );","float dist = radius * 0.66;","for ( int i = 0; i < samples; ++i ) {","float r = base + step * float( i );","vec2 coord = point + vec2( cos( r ) * dist, sin( r ) * dist );","tex += texture2D( tDiffuse, vec2( coord.x / width, coord.y / height ) );","}","tex /= float( samples ) + 1.0;","return tex;","}","float getDotColour( Cell c, vec2 p, int channel, float angle, float aa ) {","float dist_c_1, dist_c_2, dist_c_3, dist_c_4, res;","if ( channel == 0 ) {","c.samp1 = getSample( c.p1 ).r;","c.samp2 = getSample( c.p2 ).r;","c.samp3 = getSample( c.p3 ).r;","c.samp4 = getSample( c.p4 ).r;","} else if (channel == 1) {","c.samp1 = getSample( c.p1 ).g;","c.samp2 = getSample( c.p2 ).g;","c.samp3 = getSample( c.p3 ).g;","c.samp4 = getSample( c.p4 ).g;","} else {","c.samp1 = getSample( c.p1 ).b;","c.samp3 = getSample( c.p3 ).b;","c.samp2 = getSample( c.p2 ).b;","c.samp4 = getSample( c.p4 ).b;","}","dist_c_1 = distanceToDotRadius( c.samp1, c.p1, c.normal, p, angle, radius );","dist_c_2 = distanceToDotRadius( c.samp2, c.p2, c.normal, p, angle, radius );","dist_c_3 = distanceToDotRadius( c.samp3, c.p3, c.normal, p, angle, radius );","dist_c_4 = distanceToDotRadius( c.samp4, c.p4, c.normal, p, angle, radius );","res = ( dist_c_1 > 0.0 ) ? clamp( dist_c_1 / aa, 0.0, 1.0 ) : 0.0;","res += ( dist_c_2 > 0.0 ) ? clamp( dist_c_2 / aa, 0.0, 1.0 ) : 0.0;","res += ( dist_c_3 > 0.0 ) ? clamp( dist_c_3 / aa, 0.0, 1.0 ) : 0.0;","res += ( dist_c_4 > 0.0 ) ? clamp( dist_c_4 / aa, 0.0, 1.0 ) : 0.0;","res = clamp( res, 0.0, 1.0 );","return res;","}","Cell getReferenceCell( vec2 p, vec2 origin, float grid_angle, float step ) {","Cell c;","vec2 n = vec2( cos( grid_angle ), sin( grid_angle ) );","float threshold = step * 0.5;","float dot_normal = n.x * ( p.x - origin.x ) + n.y * ( p.y - origin.y );","float dot_line = -n.y * ( p.x - origin.x ) + n.x * ( p.y - origin.y );","vec2 offset = vec2( n.x * dot_normal, n.y * dot_normal );","float offset_normal = mod( hypot( offset.x, offset.y ), step );","float normal_dir = ( dot_normal < 0.0 ) ? 1.0 : -1.0;","float normal_scale = ( ( offset_normal < threshold ) ? -offset_normal : step - offset_normal ) * normal_dir;","float offset_line = mod( hypot( ( p.x - offset.x ) - origin.x, ( p.y - offset.y ) - origin.y ), step );","float line_dir = ( dot_line < 0.0 ) ? 1.0 : -1.0;","float line_scale = ( ( offset_line < threshold ) ? -offset_line : step - offset_line ) * line_dir;","c.normal = n;","c.p1.x = p.x - n.x * normal_scale + n.y * line_scale;","c.p1.y = p.y - n.y * normal_scale - n.x * line_scale;","if ( scatter != 0.0 ) {","float off_mag = scatter * threshold * 0.5;","float off_angle = rand( vec2( floor( c.p1.x ), floor( c.p1.y ) ) ) * PI2;","c.p1.x += cos( off_angle ) * off_mag;","c.p1.y += sin( off_angle ) * off_mag;","}","float normal_step = normal_dir * ( ( offset_normal < threshold ) ? step : -step );","float line_step = line_dir * ( ( offset_line < threshold ) ? step : -step );","c.p2.x = c.p1.x - n.x * normal_step;","c.p2.y = c.p1.y - n.y * normal_step;","c.p3.x = c.p1.x + n.y * line_step;","c.p3.y = c.p1.y - n.x * line_step;","c.p4.x = c.p1.x - n.x * normal_step + n.y * line_step;","c.p4.y = c.p1.y - n.y * normal_step - n.x * line_step;","return c;","}","float blendColour( float a, float b, float t ) {","if ( blendingMode == BLENDING_LINEAR ) {","return blend( a, b, 1.0 - t );","} else if ( blendingMode == BLENDING_ADD ) {","return blend( a, min( 1.0, a + b ), t );","} else if ( blendingMode == BLENDING_MULTIPLY ) {","return blend( a, max( 0.0, a * b ), t );","} else if ( blendingMode == BLENDING_LIGHTER ) {","return blend( a, max( a, b ), t );","} else if ( blendingMode == BLENDING_DARKER ) {","return blend( a, min( a, b ), t );","} else {","return blend( a, b, 1.0 - t );","}","}","void main() {","if ( ! disable ) {","vec2 p = vec2( vUV.x * width, vUV.y * height );","vec2 origin = vec2( 0, 0 );","float aa = ( radius < 2.5 ) ? radius * 0.5 : 1.25;","Cell cell_r = getReferenceCell( p, origin, rotateR, radius );","Cell cell_g = getReferenceCell( p, origin, rotateG, radius );","Cell cell_b = getReferenceCell( p, origin, rotateB, radius );","float r = getDotColour( cell_r, p, 0, rotateR, aa );","float g = getDotColour( cell_g, p, 1, rotateG, aa );","float b = getDotColour( cell_b, p, 2, rotateB, aa );","vec4 colour = texture2D( tDiffuse, vUV );","r = blendColour( r, colour.r, blending );","g = blendColour( g, colour.g, blending );","b = blendColour( b, colour.b, blending );","if ( greyscale ) {","r = g = b = (r + b + g) / 3.0;","}","gl_FragColor = vec4( r, g, b, 1.0 );","} else {","gl_FragColor = texture2D( tDiffuse, vUV );","}","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={defines:{NUM_SAMPLES:7,NUM_RINGS:4,NORMAL_TEXTURE:0,DIFFUSE_TEXTURE:0,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{type:"t",value:null},tDiffuse:{type:"t",value:null},tNormal:{type:"t",value:null},size:{type:"v2",value:new a.Vector2(512,512)},cameraNear:{type:"f",value:1},cameraFar:{type:"f",value:100},cameraProjectionMatrix:{type:"m4",value:new a.Matrix4},cameraInverseProjectionMatrix:{type:"m4",value:new a.Matrix4},scale:{type:"f",value:1},intensity:{type:"f",value:.1},bias:{type:"f",value:.5},minResolution:{type:"f",value:0},kernelRadius:{type:"f",value:100},randomSeed:{type:"f",value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","varying vec2 vUv;","#if DIFFUSE_TEXTURE == 1","uniform sampler2D tDiffuse;","#endif","uniform sampler2D tDepth;","#if NORMAL_TEXTURE == 1","uniform sampler2D tNormal;","#endif","uniform float cameraNear;","uniform float cameraFar;","uniform mat4 cameraProjectionMatrix;","uniform mat4 cameraInverseProjectionMatrix;","uniform float scale;","uniform float intensity;","uniform float bias;","uniform float kernelRadius;","uniform float minResolution;","uniform vec2 size;","uniform float randomSeed;","// RGBA depth","#include <packing>","vec4 getDefaultColor( const in vec2 screenPosition ) {","\t#if DIFFUSE_TEXTURE == 1","\treturn texture2D( tDiffuse, vUv );","\t#else","\treturn vec4( 1.0 );","\t#endif","}","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );","\t#else","\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );","\t#endif","}","vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {","\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];","\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );","\tclipPosition *= clipW; // unprojection.","\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;","}","vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {","\t#if NORMAL_TEXTURE == 1","\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );","\t#else","\treturn normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );","\t#endif","}","float scaleDividedByCameraFar;","float minResolutionMultipliedByCameraFar;","float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {","\tvec3 viewDelta = sampleViewPosition - centerViewPosition;","\tfloat viewDistance = length( viewDelta );","\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;","\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );","}","// moving costly divides into consts","const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );","const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );","float getAmbientOcclusion( const in vec3 centerViewPosition ) {","\t// precompute some variables require in getOcclusion.","\tscaleDividedByCameraFar = scale / cameraFar;","\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;","\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );","\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/","\tfloat angle = rand( vUv + randomSeed ) * PI2;","\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;","\tvec2 radiusStep = radius;","\tfloat occlusionSum = 0.0;","\tfloat weightSum = 0.0;","\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {","\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;","\t\tradius += radiusStep;","\t\tangle += ANGLE_STEP;","\t\tfloat sampleDepth = getDepth( sampleUv );","\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {","\t\t\tcontinue;","\t\t}","\t\tfloat sampleViewZ = getViewZ( sampleDepth );","\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );","\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );","\t\tweightSum += 1.0;","\t}","\tif( weightSum == 0.0 ) discard;","\treturn occlusionSum * ( intensity / weightSum );","}","void main() {","\tfloat centerDepth = getDepth( vUv );","\tif( centerDepth >= ( 1.0 - EPSILON ) ) {","\t\tdiscard;","\t}","\tfloat centerViewZ = getViewZ( centerDepth );","\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );","\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );","\tgl_FragColor = getDefaultColor( vUv );","\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;","}"].join("\n")};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={defines:{KERNEL_RADIUS:4,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDiffuse:{type:"t",value:null},size:{type:"v2",value:new a.Vector2(512,512)},sampleUvOffsets:{type:"v2v",value:[new a.Vector2(0,0)]},sampleWeights:{type:"1fv",value:[1]},tDepth:{type:"t",value:null},cameraNear:{type:"f",value:10},cameraFar:{type:"f",value:1e3},depthCutoff:{type:"f",value:10}},vertexShader:["#include <common>","uniform vec2 size;","varying vec2 vUv;","varying vec2 vInvSize;","void main() {","\tvUv = uv;","\tvInvSize = 1.0 / size;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","#include <packing>","uniform sampler2D tDiffuse;","uniform sampler2D tDepth;","uniform float cameraNear;","uniform float cameraFar;","uniform float depthCutoff;","uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];","uniform float sampleWeights[ KERNEL_RADIUS + 1 ];","varying vec2 vUv;","varying vec2 vInvSize;","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );","\t#else","\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );","\t#endif","}","void main() {","\tfloat depth = getDepth( vUv );","\tif( depth >= ( 1.0 - EPSILON ) ) {","\t\tdiscard;","\t}","\tfloat centerViewZ = -getViewZ( depth );","\tbool rBreak = false, lBreak = false;","\tfloat weightSum = sampleWeights[0];","\tvec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;","\tfor( int i = 1; i <= KERNEL_RADIUS; i ++ ) {","\t\tfloat sampleWeight = sampleWeights[i];","\t\tvec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;","\t\tvec2 sampleUv = vUv + sampleUvOffset;","\t\tfloat viewZ = -getViewZ( getDepth( sampleUv ) );","\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;","\t\tif( ! rBreak ) {","\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;","\t\t\tweightSum += sampleWeight;","\t\t}","\t\tsampleUv = vUv - sampleUvOffset;","\t\tviewZ = -getViewZ( getDepth( sampleUv ) );","\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;","\t\tif( ! lBreak ) {","\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;","\t\t\tweightSum += sampleWeight;","\t\t}","\t}","\tgl_FragColor = diffuseSum / weightSum;","}"].join("\n")};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","#include <packing>","void main() {","float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );","gl_FragColor = vec4( vec3( depth ), opacity );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={createSampleWeights:function(e,t){for(var r=function(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)},a=[],n=0;n<=e;n++)a.push(r(n,t));return a},createSampleOffsets:function(e,t){for(var r=[],a=0;a<=e;a++)r.push(t.clone().multiplyScalar(a));return r},configure:function(e,t,r,n){e.defines.KERNEL_RADIUS=t,e.uniforms.sampleUvOffsets.value=a.createSampleOffsets(t,n),e.uniforms.sampleWeights.value=a.createSampleWeights(t,r),e.needsUpdate=!0}};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=[{defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new a.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","void SMAAEdgeDetectionVS( vec2 texcoord ) {","vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );","vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );","vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );","}","void main() {","vUv = uv;","SMAAEdgeDetectionVS( vUv );","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {","vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );","vec4 delta;","vec3 C = texture2D( colorTex, texcoord ).rgb;","vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;","vec3 t = abs( C - Cleft );","delta.x = max( max( t.r, t.g ), t.b );","vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;","t = abs( C - Ctop );","delta.y = max( max( t.r, t.g ), t.b );","vec2 edges = step( threshold, delta.xy );","if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )","discard;","vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;","t = abs( C - Cright );","delta.z = max( max( t.r, t.g ), t.b );","vec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;","t = abs( C - Cbottom );","delta.w = max( max( t.r, t.g ), t.b );","float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );","vec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;","t = abs( C - Cleftleft );","delta.z = max( max( t.r, t.g ), t.b );","vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;","t = abs( C - Ctoptop );","delta.w = max( max( t.r, t.g ), t.b );","maxDelta = max( max( maxDelta, delta.z ), delta.w );","edges.xy *= step( 0.5 * maxDelta, delta.xy );","return vec4( edges, 0.0, 0.0 );","}","void main() {","gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );","}"].join("\n")},{defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new a.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","varying vec2 vPixcoord;","void SMAABlendingWeightCalculationVS( vec2 texcoord ) {","vPixcoord = texcoord / resolution;","vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );","vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );","vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );","}","void main() {","vUv = uv;","SMAABlendingWeightCalculationVS( vUv );","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )","uniform sampler2D tDiffuse;","uniform sampler2D tArea;","uniform sampler2D tSearch;","uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[3];","varying vec2 vPixcoord;","vec2 round( vec2 x ) {","return sign( x ) * floor( abs( x ) + 0.5 );","}","float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {","e.r = bias + e.r * scale;","return 255.0 * texture2D( searchTex, e, 0.0 ).r;","}","float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","vec2 e = vec2( 0.0, 1.0 );","for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","e = texture2D( edgesTex, texcoord, 0.0 ).rg;","texcoord -= vec2( 2.0, 0.0 ) * resolution;","if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;","}","texcoord.x += 0.25 * resolution.x;","texcoord.x += resolution.x;","texcoord.x += 2.0 * resolution.x;","texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);","return texcoord.x;","}","float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","vec2 e = vec2( 0.0, 1.0 );","for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","e = texture2D( edgesTex, texcoord, 0.0 ).rg;","texcoord += vec2( 2.0, 0.0 ) * resolution;","if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;","}","texcoord.x -= 0.25 * resolution.x;","texcoord.x -= resolution.x;","texcoord.x -= 2.0 * resolution.x;","texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );","return texcoord.x;","}","float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","vec2 e = vec2( 1.0, 0.0 );","for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","e = texture2D( edgesTex, texcoord, 0.0 ).rg;","texcoord += vec2( 0.0, 2.0 ) * resolution;","if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;","}","texcoord.y -= 0.25 * resolution.y;","texcoord.y -= resolution.y;","texcoord.y -= 2.0 * resolution.y;","texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );","return texcoord.y;","}","float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","vec2 e = vec2( 1.0, 0.0 );","for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","e = texture2D( edgesTex, texcoord, 0.0 ).rg;","texcoord -= vec2( 0.0, 2.0 ) * resolution;","if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;","}","texcoord.y += 0.25 * resolution.y;","texcoord.y += resolution.y;","texcoord.y += 2.0 * resolution.y;","texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );","return texcoord.y;","}","vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {","vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;","texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );","texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;","return texture2D( areaTex, texcoord, 0.0 ).rg;","}","vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {","vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );","vec2 e = texture2D( edgesTex, texcoord ).rg;","if ( e.g > 0.0 ) {","vec2 d;","vec2 coords;","coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );","coords.y = offset[ 1 ].y;","d.x = coords.x;","float e1 = texture2D( edgesTex, coords, 0.0 ).r;","coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );","d.y = coords.x;","d = d / resolution.x - pixcoord.x;","vec2 sqrt_d = sqrt( abs( d ) );","coords.y -= 1.0 * resolution.y;","float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;","weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );","}","if ( e.r > 0.0 ) {","vec2 d;","vec2 coords;","coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );","coords.x = offset[ 0 ].x;","d.x = coords.y;","float e1 = texture2D( edgesTex, coords, 0.0 ).g;","coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );","d.y = coords.y;","d = d / resolution.y - pixcoord.y;","vec2 sqrt_d = sqrt( abs( d ) );","coords.y -= 1.0 * resolution.y;","float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;","weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );","}","return weights;","}","void main() {","gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );","}"].join("\n")},{uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new a.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 2 ];","void SMAANeighborhoodBlendingVS( vec2 texcoord ) {","vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );","vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );","}","void main() {","vUv = uv;","SMAANeighborhoodBlendingVS( vUv );","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform sampler2D tColor;","uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 2 ];","vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {","vec4 a;","a.xz = texture2D( blendTex, texcoord ).xz;","a.y = texture2D( blendTex, offset[ 1 ].zw ).g;","a.w = texture2D( blendTex, offset[ 1 ].xy ).a;","if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {","return texture2D( colorTex, texcoord, 0.0 );","} else {","vec2 offset;","offset.x = a.a > a.b ? a.a : -a.b;","offset.y = a.g > a.r ? -a.g : a.r;","if ( abs( offset.x ) > abs( offset.y )) {","offset.y = 0.0;","} else {","offset.x = 0.0;","}","vec4 C = texture2D( colorTex, texcoord, 0.0 );","texcoord += sign( offset ) * resolution;","vec4 Cop = texture2D( colorTex, texcoord, 0.0 );","float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );","C.xyz = pow(C.xyz, vec3(2.2));","Cop.xyz = pow(Cop.xyz, vec3(2.2));","vec4 mixed = mix(C, Cop, s);","mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));","return mixed;","}","}","void main() {","gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );","}"].join("\n")}];t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(2));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r,o){n.default.call(this),this.scene=e,this.camera=t,this.sampleLevel=4,this.unbiased=!0,this.clearColor=void 0!==r?r:0,this.clearAlpha=void 0!==o?o:0,void 0===i.default&&console.error("THREE.SSAARenderPass relies on THREE.CopyShader");var s=i.default;this.copyUniforms=a.UniformsUtils.clone(s.uniforms),this.copyMaterial=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,premultipliedAlpha:!0,transparent:!0,blending:a.AdditiveBlending,depthTest:!1,depthWrite:!1}),this.camera2=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene2=new a.Scene,this.quad2=new a.Mesh(new a.PlaneBufferGeometry(2,2),this.copyMaterial),this.quad2.frustumCulled=!1,this.scene2.add(this.quad2)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,dispose:function(){this.sampleRenderTarget&&(this.sampleRenderTarget.dispose(),this.sampleRenderTarget=null)},setSize:function(e,t){this.sampleRenderTarget&&this.sampleRenderTarget.setSize(e,t)},render:function(e,t,r){this.sampleRenderTarget||(this.sampleRenderTarget=new a.WebGLRenderTarget(r.width,r.height,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat}),this.sampleRenderTarget.texture.name="SSAARenderPass.sample");var n=s.JitterVectors[Math.max(0,Math.min(this.sampleLevel,5))],i=e.autoClear;e.autoClear=!1;var o=e.getClearColor().getHex(),l=e.getClearAlpha(),u=1/n.length;this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture;for(var c=r.width,d=r.height,f=0;f<n.length;f++){var h=n[f];this.camera.setViewOffset&&this.camera.setViewOffset(c,d,.0625*h[0],.0625*h[1],c,d);var p=u;if(this.unbiased)p+=1/32*((f+.5)/n.length-.5);this.copyUniforms.opacity.value=p,e.setClearColor(this.clearColor,this.clearAlpha),e.render(this.scene,this.camera,this.sampleRenderTarget,!0),0===f&&e.setClearColor(0,0),e.render(this.scene2,this.camera2,this.renderToScreen?null:t,0===f)}this.camera.clearViewOffset&&this.camera.clearViewOffset(),e.autoClear=i,e.setClearColor(o,l)}}),s.JitterVectors=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]],t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},tDepth:{value:null},size:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)(512,512)},cameraNear:{value:1},cameraFar:{value:100},radius:{value:32},onlyAO:{value:0},aoClamp:{value:.25},lumInfluence:{value:.7}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float cameraNear;","uniform float cameraFar;","#ifdef USE_LOGDEPTHBUF","uniform float logDepthBufFC;","#endif","uniform float radius;","uniform bool onlyAO;","uniform vec2 size;","uniform float aoClamp;","uniform float lumInfluence;","uniform sampler2D tDiffuse;","uniform sampler2D tDepth;","varying vec2 vUv;","#define DL 2.399963229728653","#define EULER 2.718281828459045","const int samples = 64;","const bool useNoise = true;","const float noiseAmount = 0.0004;","const float diffArea = 0.4;","const float gDisplace = 0.4;","#include <packing>","vec2 rand( const vec2 coord ) {","vec2 noise;","if ( useNoise ) {","float nx = dot ( coord, vec2( 12.9898, 78.233 ) );","float ny = dot ( coord, vec2( 12.9898, 78.233 ) * 2.0 );","noise = clamp( fract ( 43758.5453 * sin( vec2( nx, ny ) ) ), 0.0, 1.0 );","} else {","float ff = fract( 1.0 - coord.s * ( size.x / 2.0 ) );","float gg = fract( coord.t * ( size.y / 2.0 ) );","noise = vec2( 0.25, 0.75 ) * vec2( ff ) + vec2( 0.75, 0.25 ) * gg;","}","return ( noise * 2.0 - 1.0 ) * noiseAmount;","}","float readDepth( const in vec2 coord ) {","float cameraFarPlusNear = cameraFar + cameraNear;","float cameraFarMinusNear = cameraFar - cameraNear;","float cameraCoef = 2.0 * cameraNear;","#ifdef USE_LOGDEPTHBUF","float logz = unpackRGBAToDepth( texture2D( tDepth, coord ) );","float w = pow(2.0, (logz / logDepthBufFC)) - 1.0;","float z = (logz / w) + 1.0;","#else","float z = unpackRGBAToDepth( texture2D( tDepth, coord ) );","#endif","return cameraCoef / ( cameraFarPlusNear - z * cameraFarMinusNear );","}","float compareDepths( const in float depth1, const in float depth2, inout int far ) {","float garea = 8.0;","float diff = ( depth1 - depth2 ) * 100.0;","if ( diff < gDisplace ) {","garea = diffArea;","} else {","far = 1;","}","float dd = diff - gDisplace;","float gauss = pow( EULER, -2.0 * ( dd * dd ) / ( garea * garea ) );","return gauss;","}","float calcAO( float depth, float dw, float dh ) {","vec2 vv = vec2( dw, dh );","vec2 coord1 = vUv + radius * vv;","vec2 coord2 = vUv - radius * vv;","float temp1 = 0.0;","float temp2 = 0.0;","int far = 0;","temp1 = compareDepths( depth, readDepth( coord1 ), far );","if ( far > 0 ) {","temp2 = compareDepths( readDepth( coord2 ), depth, far );","temp1 += ( 1.0 - temp1 ) * temp2;","}","return temp1;","}","void main() {","vec2 noise = rand( vUv );","float depth = readDepth( vUv );","float tt = clamp( depth, aoClamp, 1.0 );","float w = ( 1.0 / size.x ) / tt + ( noise.x * ( 1.0 - noise.x ) );","float h = ( 1.0 / size.y ) / tt + ( noise.y * ( 1.0 - noise.y ) );","float ao = 0.0;","float dz = 1.0 / float( samples );","float l = 0.0;","float z = 1.0 - dz / 2.0;","for ( int i = 0; i <= samples; i ++ ) {","float r = sqrt( 1.0 - z );","float pw = cos( l ) * r;","float ph = sin( l ) * r;","ao += calcAO( depth, pw * w, ph * h );","z = z - dz;","l = l + DL;","}","ao /= float( samples );","ao = 1.0 - ao;","vec3 color = texture2D( tDiffuse, vUv ).rgb;","vec3 lumcoeff = vec3( 0.299, 0.587, 0.114 );","float lum = dot( color.rgb, lumcoeff );","vec3 luminance = vec3( lum );","vec3 final = vec3( color * mix( vec3( ao ), vec3( 1.0 ), luminance * lumInfluence ) );","if ( onlyAO ) {","final = vec3( mix( vec3( ao ), vec3( 1.0 ), luminance * lumInfluence ) );","}","gl_FragColor = vec4( final, 1.0 );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={shaderID:"luminosityHighPass",uniforms:{tDiffuse:{type:"t",value:null},luminosityThreshold:{type:"f",value:1},smoothWidth:{type:"f",value:1},defaultColor:{type:"c",value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Color)(0)},defaultOpacity:{type:"f",value:0}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec3 defaultColor;","uniform float defaultOpacity;","uniform float luminosityThreshold;","uniform float smoothWidth;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","vec3 luma = vec3( 0.299, 0.587, 0.114 );","float v = dot( texel.xyz, luma );","vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );","float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );","gl_FragColor = mix( outputColor, texel, alpha );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r(28);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var n=r(40);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(48);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(90);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var s=r(112);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var l=r(144);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VRControls=t.TransformControls=t.TrackballControls=t.PointerLockControls=t.OrthographicTrackballControls=t.OrbitControls=t.FlyControls=t.FirstPersonControls=t.EditorControls=t.DragControls=t.DeviceOrientationControls=void 0;var a=p(r(29)),n=p(r(30)),i=p(r(31)),o=p(r(32)),s=p(r(33)),l=p(r(34)),u=p(r(35)),c=p(r(36)),d=p(r(37)),f=p(r(38)),h=p(r(39));function p(e){return e&&e.__esModule?e:{default:e}}t.DeviceOrientationControls=a.default,t.DragControls=n.default,t.EditorControls=i.default,t.FirstPersonControls=o.default,t.FlyControls=s.default,t.OrbitControls=l.default,t.OrthographicTrackballControls=u.default,t.PointerLockControls=c.default,t.TrackballControls=d.default,t.TransformControls=f.default,t.VRControls=h.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(e){var t=this;this.object=e,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var r,n,i,o,s=function(e){t.deviceOrientation=e},l=function(){t.screenOrientation=window.orientation||0},u=(r=new a.Vector3(0,0,1),n=new a.Euler,i=new a.Quaternion,o=new a.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5)),function(e,t,a,s,l){n.set(a,t,-s,"YXZ"),e.setFromEuler(n),e.multiply(o),e.multiply(i.setFromAxisAngle(r,-l))});this.connect=function(){l(),window.addEventListener("orientationchange",l,!1),window.addEventListener("deviceorientation",s,!1),t.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",l,!1),window.removeEventListener("deviceorientation",s,!1),t.enabled=!1},this.update=function(){if(!1!==t.enabled){var e=t.deviceOrientation;if(e){var r=e.alpha?a.Math.degToRad(e.alpha)+t.alphaOffset:0,n=e.beta?a.Math.degToRad(e.beta):0,i=e.gamma?a.Math.degToRad(e.gamma):0,o=t.screenOrientation?a.Math.degToRad(t.screenOrientation):0;u(t.object.quaternion,r,n,i,o)}}},this.dispose=function(){t.disconnect()},this.connect()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t,r){if(e instanceof a.Camera){console.warn("THREE.DragControls: Constructor now expects ( objects, camera, domElement )");var n=e;e=t,t=n}var i=new a.Plane,o=new a.Raycaster,s=new a.Vector2,l=new a.Vector3,u=new a.Vector3,c=null,d=null,f=this;function h(){r.addEventListener("mousemove",m,!1),r.addEventListener("mousedown",v,!1),r.addEventListener("mouseup",g,!1),r.addEventListener("mouseleave",g,!1),r.addEventListener("touchmove",y,!1),r.addEventListener("touchstart",x,!1),r.addEventListener("touchend",b,!1)}function p(){r.removeEventListener("mousemove",m,!1),r.removeEventListener("mousedown",v,!1),r.removeEventListener("mouseup",g,!1),r.removeEventListener("mouseleave",g,!1),r.removeEventListener("touchmove",y,!1),r.removeEventListener("touchstart",x,!1),r.removeEventListener("touchend",b,!1)}function m(a){a.preventDefault();var n=r.getBoundingClientRect();if(s.x=(a.clientX-n.left)/n.width*2-1,s.y=-(a.clientY-n.top)/n.height*2+1,o.setFromCamera(s,t),c&&f.enabled)return o.ray.intersectPlane(i,u)&&c.position.copy(u.sub(l)),void f.dispatchEvent({type:"drag",object:c});o.setFromCamera(s,t);var h=o.intersectObjects(e);if(h.length>0){var p=h[0].object;i.setFromNormalAndCoplanarPoint(t.getWorldDirection(i.normal),p.position),d!==p&&(f.dispatchEvent({type:"hoveron",object:p}),r.style.cursor="pointer",d=p)}else null!==d&&(f.dispatchEvent({type:"hoveroff",object:d}),r.style.cursor="auto",d=null)}function v(a){a.preventDefault(),o.setFromCamera(s,t);var n=o.intersectObjects(e);n.length>0&&(c=n[0].object,o.ray.intersectPlane(i,u)&&l.copy(u).sub(c.position),r.style.cursor="move",f.dispatchEvent({type:"dragstart",object:c}))}function g(e){e.preventDefault(),c&&(f.dispatchEvent({type:"dragend",object:c}),c=null),r.style.cursor="auto"}function y(e){e.preventDefault(),e=e.changedTouches[0];var a=r.getBoundingClientRect();if(s.x=(e.clientX-a.left)/a.width*2-1,s.y=-(e.clientY-a.top)/a.height*2+1,o.setFromCamera(s,t),c&&f.enabled)return o.ray.intersectPlane(i,u)&&c.position.copy(u.sub(l)),void f.dispatchEvent({type:"drag",object:c})}function x(a){a.preventDefault(),a=a.changedTouches[0];var n=r.getBoundingClientRect();s.x=(a.clientX-n.left)/n.width*2-1,s.y=-(a.clientY-n.top)/n.height*2+1,o.setFromCamera(s,t);var d=o.intersectObjects(e);d.length>0&&(c=d[0].object,i.setFromNormalAndCoplanarPoint(t.getWorldDirection(i.normal),c.position),o.ray.intersectPlane(i,u)&&l.copy(u).sub(c.position),r.style.cursor="move",f.dispatchEvent({type:"dragstart",object:c}))}function b(e){e.preventDefault(),c&&(f.dispatchEvent({type:"dragend",object:c}),c=null),r.style.cursor="auto"}h(),this.enabled=!0,this.activate=h,this.deactivate=p,this.dispose=function(){p()},this.setObjects=function(){console.error("THREE.DragControls: setObjects() has been removed.")},this.on=function(e,t){console.warn("THREE.DragControls: on() has been deprecated. Use addEventListener() instead."),f.addEventListener(e,t)},this.off=function(e,t){console.warn("THREE.DragControls: off() has been deprecated. Use removeEventListener() instead."),f.removeEventListener(e,t)},this.notify=function(e){console.error("THREE.DragControls: notify() has been deprecated. Use dispatchEvent() instead."),f.dispatchEvent({type:e})}};(n.prototype=Object.create(a.EventDispatcher.prototype)).constructor=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){t=void 0!==t?t:document,this.enabled=!0,this.center=new a.Vector3,this.panSpeed=.001,this.zoomSpeed=.001,this.rotationSpeed=.005;var r=this,n=new a.Vector3,i={NONE:-1,ROTATE:0,ZOOM:1,PAN:2},o=i.NONE,s=this.center,l=new a.Matrix3,u=new a.Vector2,c=new a.Vector2,d=new a.Spherical,f={type:"change"};function h(e){!1!==r.enabled&&(0===e.button?o=i.ROTATE:1===e.button?o=i.ZOOM:2===e.button&&(o=i.PAN),c.set(e.clientX,e.clientY),t.addEventListener("mousemove",p,!1),t.addEventListener("mouseup",m,!1),t.addEventListener("mouseout",m,!1),t.addEventListener("dblclick",m,!1))}function p(e){if(!1!==r.enabled){u.set(e.clientX,e.clientY);var t=u.x-c.x,n=u.y-c.y;o===i.ROTATE?r.rotate(new a.Vector3(-t*r.rotationSpeed,-n*r.rotationSpeed,0)):o===i.ZOOM?r.zoom(new a.Vector3(0,0,n)):o===i.PAN&&r.pan(new a.Vector3(-t,n,0)),c.set(e.clientX,e.clientY)}}function m(e){t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseup",m,!1),t.removeEventListener("mouseout",m,!1),t.removeEventListener("dblclick",m,!1),o=i.NONE}function v(e){e.preventDefault(),r.zoom(new a.Vector3(0,0,e.deltaY))}function g(e){e.preventDefault()}this.focus=function(t){var n,i=(new a.Box3).setFromObject(t);!1===i.isEmpty()?(s.copy(i.getCenter()),n=i.getBoundingSphere().radius):(s.setFromMatrixPosition(t.matrixWorld),n=.1);var o=new a.Vector3(0,0,1);o.applyQuaternion(e.quaternion),o.multiplyScalar(4*n),e.position.copy(s).add(o),r.dispatchEvent(f)},this.pan=function(t){var a=e.position.distanceTo(s);t.multiplyScalar(a*r.panSpeed),t.applyMatrix3(l.getNormalMatrix(e.matrix)),e.position.add(t),s.add(t),r.dispatchEvent(f)},this.zoom=function(t){var a=e.position.distanceTo(s);t.multiplyScalar(a*r.zoomSpeed),t.length()>a||(t.applyMatrix3(l.getNormalMatrix(e.matrix)),e.position.add(t),r.dispatchEvent(f))},this.rotate=function(t){n.copy(e.position).sub(s),d.setFromVector3(n),d.theta+=t.x,d.phi+=t.y,d.makeSafe(),n.setFromSpherical(d),e.position.copy(s).add(n),e.lookAt(s),r.dispatchEvent(f)},this.dispose=function(){t.removeEventListener("contextmenu",g,!1),t.removeEventListener("mousedown",h,!1),t.removeEventListener("wheel",v,!1),t.removeEventListener("mousemove",p,!1),t.removeEventListener("mouseup",m,!1),t.removeEventListener("mouseout",m,!1),t.removeEventListener("dblclick",m,!1),t.removeEventListener("touchstart",w,!1),t.removeEventListener("touchmove",A,!1)},t.addEventListener("contextmenu",g,!1),t.addEventListener("mousedown",h,!1),t.addEventListener("wheel",v,!1);var y=[new a.Vector3,new a.Vector3,new a.Vector3],x=[new a.Vector3,new a.Vector3,new a.Vector3],b=null;function w(e){if(!1!==r.enabled){switch(e.touches.length){case 1:y[0].set(e.touches[0].pageX,e.touches[0].pageY,0),y[1].set(e.touches[0].pageX,e.touches[0].pageY,0);break;case 2:y[0].set(e.touches[0].pageX,e.touches[0].pageY,0),y[1].set(e.touches[1].pageX,e.touches[1].pageY,0),b=y[0].distanceTo(y[1])}x[0].copy(y[0]),x[1].copy(y[1])}}function A(e){if(!1!==r.enabled){switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:y[0].set(e.touches[0].pageX,e.touches[0].pageY,0),y[1].set(e.touches[0].pageX,e.touches[0].pageY,0),r.rotate(y[0].sub(o(y[0],x)).multiplyScalar(-r.rotationSpeed));break;case 2:y[0].set(e.touches[0].pageX,e.touches[0].pageY,0),y[1].set(e.touches[1].pageX,e.touches[1].pageY,0);var t=y[0].distanceTo(y[1]);r.zoom(new a.Vector3(0,0,b-t)),b=t;var n=y[0].clone().sub(o(y[0],x)),i=y[1].clone().sub(o(y[1],x));n.x=-n.x,i.x=-i.x,r.pan(n.add(i).multiplyScalar(.5))}x[0].copy(y[0]),x[1].copy(y[1])}function o(e,t){var r=t[0];for(var a in t)r.distanceTo(e)>t[a].distanceTo(e)&&(r=t[a]);return r}}t.addEventListener("touchstart",w,!1),t.addEventListener("touchmove",A,!1)};(n.prototype=Object.create(a.EventDispatcher.prototype)).constructor=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(e,t){function r(e){e.preventDefault()}this.object=e,this.target=new a.Vector3(0,0,0),this.domElement=void 0!==t?t:document,this.enabled=!0,this.movementSpeed=1,this.lookSpeed=.005,this.lookVertical=!0,this.autoForward=!1,this.activeLook=!0,this.heightSpeed=!1,this.heightCoef=1,this.heightMin=0,this.heightMax=1,this.constrainVertical=!1,this.verticalMin=0,this.verticalMax=Math.PI,this.autoSpeedFactor=0,this.mouseX=0,this.mouseY=0,this.lat=0,this.lon=0,this.phi=0,this.theta=0,this.moveForward=!1,this.moveBackward=!1,this.moveLeft=!1,this.moveRight=!1,this.mouseDragOn=!1,this.viewHalfX=0,this.viewHalfY=0,this.domElement!==document&&this.domElement.setAttribute("tabindex",-1),this.handleResize=function(){this.domElement===document?(this.viewHalfX=window.innerWidth/2,this.viewHalfY=window.innerHeight/2):(this.viewHalfX=this.domElement.offsetWidth/2,this.viewHalfY=this.domElement.offsetHeight/2)},this.onMouseDown=function(e){if(this.domElement!==document&&this.domElement.focus(),e.preventDefault(),e.stopPropagation(),this.activeLook)switch(e.button){case 0:this.moveForward=!0;break;case 2:this.moveBackward=!0}this.mouseDragOn=!0},this.onMouseUp=function(e){if(e.preventDefault(),e.stopPropagation(),this.activeLook)switch(e.button){case 0:this.moveForward=!1;break;case 2:this.moveBackward=!1}this.mouseDragOn=!1},this.onMouseMove=function(e){this.domElement===document?(this.mouseX=e.pageX-this.viewHalfX,this.mouseY=e.pageY-this.viewHalfY):(this.mouseX=e.pageX-this.domElement.offsetLeft-this.viewHalfX,this.mouseY=e.pageY-this.domElement.offsetTop-this.viewHalfY)},this.onKeyDown=function(e){switch(e.keyCode){case 38:case 87:this.moveForward=!0;break;case 37:case 65:this.moveLeft=!0;break;case 40:case 83:this.moveBackward=!0;break;case 39:case 68:this.moveRight=!0;break;case 82:this.moveUp=!0;break;case 70:this.moveDown=!0}},this.onKeyUp=function(e){switch(e.keyCode){case 38:case 87:this.moveForward=!1;break;case 37:case 65:this.moveLeft=!1;break;case 40:case 83:this.moveBackward=!1;break;case 39:case 68:this.moveRight=!1;break;case 82:this.moveUp=!1;break;case 70:this.moveDown=!1}},this.update=function(e){if(!1!==this.enabled){if(this.heightSpeed){var t=a.Math.clamp(this.object.position.y,this.heightMin,this.heightMax)-this.heightMin;this.autoSpeedFactor=e*(t*this.heightCoef)}else this.autoSpeedFactor=0;var r=e*this.movementSpeed;(this.moveForward||this.autoForward&&!this.moveBackward)&&this.object.translateZ(-(r+this.autoSpeedFactor)),this.moveBackward&&this.object.translateZ(r),this.moveLeft&&this.object.translateX(-r),this.moveRight&&this.object.translateX(r),this.moveUp&&this.object.translateY(r),this.moveDown&&this.object.translateY(-r);var n=e*this.lookSpeed;this.activeLook||(n=0);var i=1;this.constrainVertical&&(i=Math.PI/(this.verticalMax-this.verticalMin)),this.lon+=this.mouseX*n,this.lookVertical&&(this.lat-=this.mouseY*n*i),this.lat=Math.max(-85,Math.min(85,this.lat)),this.phi=a.Math.degToRad(90-this.lat),this.theta=a.Math.degToRad(this.lon),this.constrainVertical&&(this.phi=a.Math.mapLinear(this.phi,0,Math.PI,this.verticalMin,this.verticalMax));var o=this.target,s=this.object.position;o.x=s.x+100*Math.sin(this.phi)*Math.cos(this.theta),o.y=s.y+100*Math.cos(this.phi),o.z=s.z+100*Math.sin(this.phi)*Math.sin(this.theta),this.object.lookAt(o)}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",r,!1),this.domElement.removeEventListener("mousedown",i,!1),this.domElement.removeEventListener("mousemove",n,!1),this.domElement.removeEventListener("mouseup",o,!1),window.removeEventListener("keydown",s,!1),window.removeEventListener("keyup",l,!1)};var n=u(this,this.onMouseMove),i=u(this,this.onMouseDown),o=u(this,this.onMouseUp),s=u(this,this.onKeyDown),l=u(this,this.onKeyUp);function u(e,t){return function(){t.apply(e,arguments)}}this.domElement.addEventListener("contextmenu",r,!1),this.domElement.addEventListener("mousemove",n,!1),this.domElement.addEventListener("mousedown",i,!1),this.domElement.addEventListener("mouseup",o,!1),window.addEventListener("keydown",s,!1),window.addEventListener("keyup",l,!1),this.handleResize()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(e,t){function r(e,t){return function(){t.apply(e,arguments)}}function n(e){e.preventDefault()}this.object=e,this.domElement=void 0!==t?t:document,t&&this.domElement.setAttribute("tabindex",-1),this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1,this.tmpQuaternion=new a.Quaternion,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new a.Vector3(0,0,0),this.rotationVector=new a.Vector3(0,0,0),this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)},this.keydown=function(e){if(!e.altKey){switch(e.keyCode){case 16:this.movementSpeedMultiplier=.1;break;case 87:this.moveState.forward=1;break;case 83:this.moveState.back=1;break;case 65:this.moveState.left=1;break;case 68:this.moveState.right=1;break;case 82:this.moveState.up=1;break;case 70:this.moveState.down=1;break;case 38:this.moveState.pitchUp=1;break;case 40:this.moveState.pitchDown=1;break;case 37:this.moveState.yawLeft=1;break;case 39:this.moveState.yawRight=1;break;case 81:this.moveState.rollLeft=1;break;case 69:this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.keyCode){case 16:this.movementSpeedMultiplier=1;break;case 87:this.moveState.forward=0;break;case 83:this.moveState.back=0;break;case 65:this.moveState.left=0;break;case 68:this.moveState.right=0;break;case 82:this.moveState.up=0;break;case 70:this.moveState.down=0;break;case 38:this.moveState.pitchUp=0;break;case 40:this.moveState.pitchDown=0;break;case 37:this.moveState.yawLeft=0;break;case 39:this.moveState.yawRight=0;break;case 81:this.moveState.rollLeft=0;break;case 69:this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.domElement!==document&&this.domElement.focus(),e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||this.mouseStatus>0){var t=this.getContainerDimensions(),r=t.size[0]/2,a=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-r)/r,this.moveState.pitchDown=(e.pageY-t.offset[1]-a)/a,this.updateRotationVector()}},this.mouseup=function(e){if(e.preventDefault(),e.stopPropagation(),this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){var t=e*this.movementSpeed,r=e*this.rollSpeed;this.object.translateX(this.moveVector.x*t),this.object.translateY(this.moveVector.y*t),this.object.translateZ(this.moveVector.z*t),this.tmpQuaternion.set(this.rotationVector.x*r,this.rotationVector.y*r,this.rotationVector.z*r,1).normalize(),this.object.quaternion.multiply(this.tmpQuaternion),this.object.rotation.setFromQuaternion(this.object.quaternion,this.object.rotation.order)},this.updateMovementVector=function(){var e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",n,!1),this.domElement.removeEventListener("mousedown",o,!1),this.domElement.removeEventListener("mousemove",i,!1),this.domElement.removeEventListener("mouseup",s,!1),window.removeEventListener("keydown",l,!1),window.removeEventListener("keyup",u,!1)};var i=r(this,this.mousemove),o=r(this,this.mousedown),s=r(this,this.mouseup),l=r(this,this.keydown),u=r(this,this.keyup);this.domElement.addEventListener("contextmenu",n,!1),this.domElement.addEventListener("mousemove",i,!1),this.domElement.addEventListener("mousedown",o,!1),this.domElement.addEventListener("mouseup",s,!1),window.addEventListener("keydown",l,!1),window.addEventListener("keyup",u,!1),this.updateMovementVector(),this.updateRotationVector()}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){var r,n,i,o,s;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!1,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:a.MOUSE.LEFT,ZOOM:a.MOUSE.MIDDLE,PAN:a.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return m.phi},this.getAzimuthalAngle=function(){return m.theta},this.saveState=function(){l.target0.copy(l.target),l.position0.copy(l.object.position),l.zoom0=l.object.zoom},this.reset=function(){l.target.copy(l.target0),l.object.position.copy(l.position0),l.object.zoom=l.zoom0,l.object.updateProjectionMatrix(),l.dispatchEvent(u),l.update(),h=f.NONE},this.update=(r=new a.Vector3,n=(new a.Quaternion).setFromUnitVectors(e.up,new a.Vector3(0,1,0)),i=n.clone().inverse(),o=new a.Vector3,s=new a.Quaternion,function(){var e=l.object.position;return r.copy(e).sub(l.target),r.applyQuaternion(n),m.setFromVector3(r),l.autoRotate&&h===f.NONE&&L(2*Math.PI/60/60*l.autoRotateSpeed),m.theta+=v.theta,m.phi+=v.phi,m.theta=Math.max(l.minAzimuthAngle,Math.min(l.maxAzimuthAngle,m.theta)),m.phi=Math.max(l.minPolarAngle,Math.min(l.maxPolarAngle,m.phi)),m.makeSafe(),m.radius*=g,m.radius=Math.max(l.minDistance,Math.min(l.maxDistance,m.radius)),l.target.add(y),r.setFromSpherical(m),r.applyQuaternion(i),e.copy(l.target).add(r),l.object.lookAt(l.target),!0===l.enableDamping?(v.theta*=1-l.dampingFactor,v.phi*=1-l.dampingFactor,y.multiplyScalar(1-l.dampingFactor)):(v.set(0,0,0),y.set(0,0,0)),g=1,!!(x||o.distanceToSquared(l.object.position)>p||8*(1-s.dot(l.object.quaternion))>p)&&(l.dispatchEvent(u),o.copy(l.object.position),s.copy(l.object.quaternion),x=!1,!0)}),this.dispose=function(){l.domElement.removeEventListener("contextmenu",Y,!1),l.domElement.removeEventListener("mousedown",k,!1),l.domElement.removeEventListener("wheel",V,!1),l.domElement.removeEventListener("touchstart",z,!1),l.domElement.removeEventListener("touchend",H,!1),l.domElement.removeEventListener("touchmove",X,!1),document.removeEventListener("mousemove",B,!1),document.removeEventListener("mouseup",j,!1),window.removeEventListener("keydown",G,!1)};var l=this,u={type:"change"},c={type:"start"},d={type:"end"},f={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY_PAN:4},h=f.NONE,p=1e-6,m=new a.Spherical,v=new a.Spherical,g=1,y=new a.Vector3,x=!1,b=new a.Vector2,w=new a.Vector2,A=new a.Vector2,M=new a.Vector2,T=new a.Vector2,S=new a.Vector2,E=new a.Vector2,_=new a.Vector2,F=new a.Vector2;function P(){return Math.pow(.95,l.zoomSpeed)}function L(e){v.theta-=e}function C(e){v.phi-=e}var O,N=(O=new a.Vector3,function(e,t){O.setFromMatrixColumn(t,0),O.multiplyScalar(-e),y.add(O)}),R=function(){var e=new a.Vector3;return function(t,r){!0===l.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(l.object.up,e)),e.multiplyScalar(t),y.add(e)}}(),I=function(){var e=new a.Vector3;return function(t,r){var a=l.domElement===document?l.domElement.body:l.domElement;if(l.object.isPerspectiveCamera){var n=l.object.position;e.copy(n).sub(l.target);var i=e.length();i*=Math.tan(l.object.fov/2*Math.PI/180),N(2*t*i/a.clientHeight,l.object.matrix),R(2*r*i/a.clientHeight,l.object.matrix)}else l.object.isOrthographicCamera?(N(t*(l.object.right-l.object.left)/l.object.zoom/a.clientWidth,l.object.matrix),R(r*(l.object.top-l.object.bottom)/l.object.zoom/a.clientHeight,l.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),l.enablePan=!1)}}();function D(e){l.object.isPerspectiveCamera?g/=e:l.object.isOrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom*e)),l.object.updateProjectionMatrix(),x=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function U(e){l.object.isPerspectiveCamera?g*=e:l.object.isOrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom/e)),l.object.updateProjectionMatrix(),x=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function k(e){if(!1!==l.enabled){switch(e.preventDefault(),e.button){case l.mouseButtons.ORBIT:if(!1===l.enableRotate)return;!function(e){b.set(e.clientX,e.clientY)}(e),h=f.ROTATE;break;case l.mouseButtons.ZOOM:if(!1===l.enableZoom)return;!function(e){E.set(e.clientX,e.clientY)}(e),h=f.DOLLY;break;case l.mouseButtons.PAN:if(!1===l.enablePan)return;!function(e){M.set(e.clientX,e.clientY)}(e),h=f.PAN}h!==f.NONE&&(document.addEventListener("mousemove",B,!1),document.addEventListener("mouseup",j,!1),l.dispatchEvent(c))}}function B(e){if(!1!==l.enabled)switch(e.preventDefault(),h){case f.ROTATE:if(!1===l.enableRotate)return;!function(e){w.set(e.clientX,e.clientY),A.subVectors(w,b).multiplyScalar(l.rotateSpeed);var t=l.domElement===document?l.domElement.body:l.domElement;L(2*Math.PI*A.x/t.clientHeight),C(2*Math.PI*A.y/t.clientHeight),b.copy(w),l.update()}(e);break;case f.DOLLY:if(!1===l.enableZoom)return;!function(e){_.set(e.clientX,e.clientY),F.subVectors(_,E),F.y>0?D(P()):F.y<0&&U(P()),E.copy(_),l.update()}(e);break;case f.PAN:if(!1===l.enablePan)return;!function(e){T.set(e.clientX,e.clientY),S.subVectors(T,M).multiplyScalar(l.panSpeed),I(S.x,S.y),M.copy(T),l.update()}(e)}}function j(e){!1!==l.enabled&&(document.removeEventListener("mousemove",B,!1),document.removeEventListener("mouseup",j,!1),l.dispatchEvent(d),h=f.NONE)}function V(e){!1===l.enabled||!1===l.enableZoom||h!==f.NONE&&h!==f.ROTATE||(e.preventDefault(),e.stopPropagation(),l.dispatchEvent(c),function(e){e.deltaY<0?U(P()):e.deltaY>0&&D(P()),l.update()}(e),l.dispatchEvent(d))}function G(e){!1!==l.enabled&&!1!==l.enableKeys&&!1!==l.enablePan&&function(e){switch(e.keyCode){case l.keys.UP:I(0,l.keyPanSpeed),l.update();break;case l.keys.BOTTOM:I(0,-l.keyPanSpeed),l.update();break;case l.keys.LEFT:I(l.keyPanSpeed,0),l.update();break;case l.keys.RIGHT:I(-l.keyPanSpeed,0),l.update()}}(e)}function z(e){if(!1!==l.enabled){switch(e.preventDefault(),e.touches.length){case 1:if(!1===l.enableRotate)return;!function(e){b.set(e.touches[0].pageX,e.touches[0].pageY)}(e),h=f.TOUCH_ROTATE;break;case 2:if(!1===l.enableZoom&&!1===l.enablePan)return;!function(e){if(l.enableZoom){var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(t*t+r*r);E.set(0,a)}if(l.enablePan){var n=.5*(e.touches[0].pageX+e.touches[1].pageX),i=.5*(e.touches[0].pageY+e.touches[1].pageY);M.set(n,i)}}(e),h=f.TOUCH_DOLLY_PAN;break;default:h=f.NONE}h!==f.NONE&&l.dispatchEvent(c)}}function X(e){if(!1!==l.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===l.enableRotate)return;if(h!==f.TOUCH_ROTATE)return;!function(e){w.set(e.touches[0].pageX,e.touches[0].pageY),A.subVectors(w,b).multiplyScalar(l.rotateSpeed);var t=l.domElement===document?l.domElement.body:l.domElement;L(2*Math.PI*A.x/t.clientHeight),C(2*Math.PI*A.y/t.clientHeight),b.copy(w),l.update()}(e);break;case 2:if(!1===l.enableZoom&&!1===l.enablePan)return;if(h!==f.TOUCH_DOLLY_PAN)return;!function(e){if(l.enableZoom){var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(t*t+r*r);_.set(0,a),F.set(0,Math.pow(_.y/E.y,l.zoomSpeed)),D(F.y),E.copy(_)}if(l.enablePan){var n=.5*(e.touches[0].pageX+e.touches[1].pageX),i=.5*(e.touches[0].pageY+e.touches[1].pageY);T.set(n,i),S.subVectors(T,M).multiplyScalar(l.panSpeed),I(S.x,S.y),M.copy(T)}l.update()}(e);break;default:h=f.NONE}}function H(e){!1!==l.enabled&&(l.dispatchEvent(d),h=f.NONE)}function Y(e){!1!==l.enabled&&e.preventDefault()}l.domElement.addEventListener("contextmenu",Y,!1),l.domElement.addEventListener("mousedown",k,!1),l.domElement.addEventListener("wheel",V,!1),l.domElement.addEventListener("touchstart",z,!1),l.domElement.addEventListener("touchend",H,!1),l.domElement.addEventListener("touchmove",X,!1),window.addEventListener("keydown",G,!1),this.update()};(n.prototype=Object.create(a.EventDispatcher.prototype)).constructor=n,Object.defineProperties(n.prototype,{center:{get:function(){return console.warn("THREE.OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}}),t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){var r=this,n={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.radius=0,this.rotateSpeed=1,this.zoomSpeed=1.2,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.noRoll=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.keys=[65,83,68],this.target=new a.Vector3;var i=!0,o=n.NONE,s=n.NONE,l=new a.Vector3,u=new a.Vector3,c=new a.Vector3,d=new a.Vector2,f=new a.Vector2,h=0,p=0,m=new a.Vector2,v=new a.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.left0=this.object.left,this.right0=this.object.right,this.top0=this.object.top,this.bottom0=this.object.bottom;var g={type:"change"},y={type:"start"},x={type:"end"};this.handleResize=function(){if(this.domElement===document)this.screen.left=0,this.screen.top=0,this.screen.width=window.innerWidth,this.screen.height=window.innerHeight;else{var e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height}this.radius=.5*Math.min(this.screen.width,this.screen.height),this.left0=this.object.left,this.right0=this.object.right,this.top0=this.object.top,this.bottom0=this.object.bottom},this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)};var b,w,A,M,T,S,E=(b=new a.Vector2,function(e,t){return b.set((e-r.screen.left)/r.screen.width,(t-r.screen.top)/r.screen.height),b}),_=function(){var e=new a.Vector3,t=new a.Vector3,n=new a.Vector3;return function(a,i){n.set((a-.5*r.screen.width-r.screen.left)/r.radius,(.5*r.screen.height+r.screen.top-i)/r.radius,0);var o=n.length();return r.noRoll?o<Math.SQRT1_2?n.z=Math.sqrt(1-o*o):n.z=.5/o:o>1?n.normalize():n.z=Math.sqrt(1-o*o),l.copy(r.object.position).sub(r.target),e.copy(r.object.up).setLength(n.y),e.add(t.copy(r.object.up).cross(l).setLength(n.x)),e.add(l.setLength(n.z)),e}}();function F(e){!1!==r.enabled&&(window.removeEventListener("keydown",F),s=o,o===n.NONE&&(e.keyCode!==r.keys[n.ROTATE]||r.noRotate?e.keyCode!==r.keys[n.ZOOM]||r.noZoom?e.keyCode!==r.keys[n.PAN]||r.noPan||(o=n.PAN):o=n.ZOOM:o=n.ROTATE))}function P(e){!1!==r.enabled&&(o=s,window.addEventListener("keydown",F,!1))}function L(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o===n.NONE&&(o=e.button),o!==n.ROTATE||r.noRotate?o!==n.ZOOM||r.noZoom?o!==n.PAN||r.noPan||(m.copy(E(e.pageX,e.pageY)),v.copy(m)):(d.copy(E(e.pageX,e.pageY)),f.copy(d)):(u.copy(_(e.pageX,e.pageY)),c.copy(u)),document.addEventListener("mousemove",C,!1),document.addEventListener("mouseup",O,!1),r.dispatchEvent(y))}function C(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o!==n.ROTATE||r.noRotate?o!==n.ZOOM||r.noZoom?o!==n.PAN||r.noPan||v.copy(E(e.pageX,e.pageY)):f.copy(E(e.pageX,e.pageY)):c.copy(_(e.pageX,e.pageY)))}function O(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o=n.NONE,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",O),r.dispatchEvent(x))}function N(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),d.y+=.01*e.deltaY,r.dispatchEvent(y),r.dispatchEvent(x))}function R(e){if(!1!==r.enabled){switch(e.touches.length){case 1:o=n.TOUCH_ROTATE,u.copy(_(e.touches[0].pageX,e.touches[0].pageY)),c.copy(u);break;case 2:o=n.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY;p=h=Math.sqrt(t*t+a*a);var i=(e.touches[0].pageX+e.touches[1].pageX)/2,s=(e.touches[0].pageY+e.touches[1].pageY)/2;m.copy(E(i,s)),v.copy(m);break;default:o=n.NONE}r.dispatchEvent(y)}}function I(e){if(!1!==r.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:c.copy(_(e.touches[0].pageX,e.touches[0].pageY));break;case 2:var t=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY;p=Math.sqrt(t*t+a*a);var i=(e.touches[0].pageX+e.touches[1].pageX)/2,s=(e.touches[0].pageY+e.touches[1].pageY)/2;v.copy(E(i,s));break;default:o=n.NONE}}function D(e){if(!1!==r.enabled){switch(e.touches.length){case 1:c.copy(_(e.touches[0].pageX,e.touches[0].pageY)),u.copy(c);break;case 2:h=p=0;var t=(e.touches[0].pageX+e.touches[1].pageX)/2,a=(e.touches[0].pageY+e.touches[1].pageY)/2;v.copy(E(t,a)),m.copy(v)}o=n.NONE,r.dispatchEvent(x)}}function U(e){e.preventDefault()}this.rotateCamera=(w=new a.Vector3,A=new a.Quaternion,function(){var e=Math.acos(u.dot(c)/u.length()/c.length());e&&(w.crossVectors(u,c).normalize(),e*=r.rotateSpeed,A.setFromAxisAngle(w,-e),l.applyQuaternion(A),r.object.up.applyQuaternion(A),c.applyQuaternion(A),r.staticMoving?u.copy(c):(A.setFromAxisAngle(w,e*(r.dynamicDampingFactor-1)),u.applyQuaternion(A)),i=!0)}),this.zoomCamera=function(){if(o===n.TOUCH_ZOOM_PAN){var e=p/h;h=p,r.object.zoom*=e,i=!0}else{e=1+(f.y-d.y)*r.zoomSpeed;Math.abs(e-1)>1e-6&&e>0&&(r.object.zoom/=e,r.staticMoving?d.copy(f):d.y+=(f.y-d.y)*this.dynamicDampingFactor,i=!0)}},this.panCamera=(M=new a.Vector2,T=new a.Vector3,S=new a.Vector3,function(){if(M.copy(v).sub(m),M.lengthSq()){var e=(r.object.right-r.object.left)/r.object.zoom,t=(r.object.top-r.object.bottom)/r.object.zoom;M.x*=e,M.y*=t,S.copy(l).cross(r.object.up).setLength(M.x),S.add(T.copy(r.object.up).setLength(M.y)),r.object.position.add(S),r.target.add(S),r.staticMoving?m.copy(v):m.add(M.subVectors(v,m).multiplyScalar(r.dynamicDampingFactor)),i=!0}}),this.update=function(){l.subVectors(r.object.position,r.target),r.noRotate||r.rotateCamera(),r.noZoom||(r.zoomCamera(),i&&r.object.updateProjectionMatrix()),r.noPan||r.panCamera(),r.object.position.addVectors(r.target,l),r.object.lookAt(r.target),i&&(r.dispatchEvent(g),i=!1)},this.reset=function(){o=n.NONE,s=n.NONE,r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.up.copy(r.up0),l.subVectors(r.object.position,r.target),r.object.left=r.left0,r.object.right=r.right0,r.object.top=r.top0,r.object.bottom=r.bottom0,r.object.lookAt(r.target),r.dispatchEvent(g),i=!1},this.dispose=function(){this.domElement.removeEventListener("contextmenu",U,!1),this.domElement.removeEventListener("mousedown",L,!1),this.domElement.removeEventListener("wheel",N,!1),this.domElement.removeEventListener("touchstart",R,!1),this.domElement.removeEventListener("touchend",D,!1),this.domElement.removeEventListener("touchmove",I,!1),document.removeEventListener("mousemove",C,!1),document.removeEventListener("mouseup",O,!1),window.removeEventListener("keydown",F,!1),window.removeEventListener("keyup",P,!1)},this.domElement.addEventListener("contextmenu",U,!1),this.domElement.addEventListener("mousedown",L,!1),this.domElement.addEventListener("wheel",N,!1),this.domElement.addEventListener("touchstart",R,!1),this.domElement.addEventListener("touchend",D,!1),this.domElement.addEventListener("touchmove",I,!1),window.addEventListener("keydown",F,!1),window.addEventListener("keyup",P,!1),this.handleResize(),this.update()};(n.prototype=Object.create(a.EventDispatcher.prototype)).constructor=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(e){var t=this;e.rotation.set(0,0,0);var r=new a.Object3D;r.add(e);var n=new a.Object3D;n.position.y=10,n.add(r);var i,o,s=Math.PI/2,l=function(e){if(!1!==t.enabled){var a=e.movementX||e.mozMovementX||e.webkitMovementX||0,i=e.movementY||e.mozMovementY||e.webkitMovementY||0;n.rotation.y-=.002*a,r.rotation.x-=.002*i,r.rotation.x=Math.max(-s,Math.min(s,r.rotation.x))}};this.dispose=function(){document.removeEventListener("mousemove",l,!1)},document.addEventListener("mousemove",l,!1),this.enabled=!1,this.getObject=function(){return n},this.getDirection=(i=new a.Vector3(0,0,-1),o=new a.Euler(0,0,0,"YXZ"),function(e){return o.set(r.rotation.x,n.rotation.y,0),e.copy(i).applyEuler(o),e})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){var r=this,n={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4};this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=[65,83,68],this.target=new a.Vector3;var i=new a.Vector3,o=n.NONE,s=n.NONE,l=new a.Vector3,u=new a.Vector2,c=new a.Vector2,d=new a.Vector3,f=0,h=new a.Vector2,p=new a.Vector2,m=0,v=0,g=new a.Vector2,y=new a.Vector2;this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone();var x={type:"change"},b={type:"start"},w={type:"end"};this.handleResize=function(){if(this.domElement===document)this.screen.left=0,this.screen.top=0,this.screen.width=window.innerWidth,this.screen.height=window.innerHeight;else{var e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height}},this.handleEvent=function(e){"function"==typeof this[e.type]&&this[e.type](e)};var A,M,T,S,E,_,F,P,L,C,O,N=(A=new a.Vector2,function(e,t){return A.set((e-r.screen.left)/r.screen.width,(t-r.screen.top)/r.screen.height),A}),R=function(){var e=new a.Vector2;return function(t,a){return e.set((t-.5*r.screen.width-r.screen.left)/(.5*r.screen.width),(r.screen.height+2*(r.screen.top-a))/r.screen.width),e}}();function I(e){!1!==r.enabled&&(window.removeEventListener("keydown",I),s=o,o===n.NONE&&(e.keyCode!==r.keys[n.ROTATE]||r.noRotate?e.keyCode!==r.keys[n.ZOOM]||r.noZoom?e.keyCode!==r.keys[n.PAN]||r.noPan||(o=n.PAN):o=n.ZOOM:o=n.ROTATE))}function D(e){!1!==r.enabled&&(o=s,window.addEventListener("keydown",I,!1))}function U(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o===n.NONE&&(o=e.button),o!==n.ROTATE||r.noRotate?o!==n.ZOOM||r.noZoom?o!==n.PAN||r.noPan||(g.copy(N(e.pageX,e.pageY)),y.copy(g)):(h.copy(N(e.pageX,e.pageY)),p.copy(h)):(c.copy(R(e.pageX,e.pageY)),u.copy(c)),document.addEventListener("mousemove",k,!1),document.addEventListener("mouseup",B,!1),r.dispatchEvent(b))}function k(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o!==n.ROTATE||r.noRotate?o!==n.ZOOM||r.noZoom?o!==n.PAN||r.noPan||y.copy(N(e.pageX,e.pageY)):p.copy(N(e.pageX,e.pageY)):(u.copy(c),c.copy(R(e.pageX,e.pageY))))}function B(e){!1!==r.enabled&&(e.preventDefault(),e.stopPropagation(),o=n.NONE,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",B),r.dispatchEvent(w))}function j(e){if(!1!==r.enabled&&!0!==r.noZoom){switch(e.preventDefault(),e.stopPropagation(),e.deltaMode){case 2:h.y-=.025*e.deltaY;break;case 1:h.y-=.01*e.deltaY;break;default:h.y-=25e-5*e.deltaY}r.dispatchEvent(b),r.dispatchEvent(w)}}function V(e){if(!1!==r.enabled){switch(e.touches.length){case 1:o=n.TOUCH_ROTATE,c.copy(R(e.touches[0].pageX,e.touches[0].pageY)),u.copy(c);break;default:o=n.TOUCH_ZOOM_PAN;var t=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY;v=m=Math.sqrt(t*t+a*a);var i=(e.touches[0].pageX+e.touches[1].pageX)/2,s=(e.touches[0].pageY+e.touches[1].pageY)/2;g.copy(N(i,s)),y.copy(g)}r.dispatchEvent(b)}}function G(e){if(!1!==r.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:u.copy(c),c.copy(R(e.touches[0].pageX,e.touches[0].pageY));break;default:var t=e.touches[0].pageX-e.touches[1].pageX,a=e.touches[0].pageY-e.touches[1].pageY;v=Math.sqrt(t*t+a*a);var n=(e.touches[0].pageX+e.touches[1].pageX)/2,i=(e.touches[0].pageY+e.touches[1].pageY)/2;y.copy(N(n,i))}}function z(e){if(!1!==r.enabled){switch(e.touches.length){case 0:o=n.NONE;break;case 1:o=n.TOUCH_ROTATE,c.copy(R(e.touches[0].pageX,e.touches[0].pageY)),u.copy(c)}r.dispatchEvent(w)}}function X(e){!1!==r.enabled&&e.preventDefault()}this.rotateCamera=(T=new a.Vector3,S=new a.Quaternion,E=new a.Vector3,_=new a.Vector3,F=new a.Vector3,P=new a.Vector3,function(){P.set(c.x-u.x,c.y-u.y,0),(M=P.length())?(l.copy(r.object.position).sub(r.target),E.copy(l).normalize(),_.copy(r.object.up).normalize(),F.crossVectors(_,E).normalize(),_.setLength(c.y-u.y),F.setLength(c.x-u.x),P.copy(_.add(F)),T.crossVectors(P,l).normalize(),M*=r.rotateSpeed,S.setFromAxisAngle(T,M),l.applyQuaternion(S),r.object.up.applyQuaternion(S),d.copy(T),f=M):!r.staticMoving&&f&&(f*=Math.sqrt(1-r.dynamicDampingFactor),l.copy(r.object.position).sub(r.target),S.setFromAxisAngle(d,f),l.applyQuaternion(S),r.object.up.applyQuaternion(S)),u.copy(c)}),this.zoomCamera=function(){var e;o===n.TOUCH_ZOOM_PAN?(e=m/v,m=v,l.multiplyScalar(e)):(1!==(e=1+(p.y-h.y)*r.zoomSpeed)&&e>0&&l.multiplyScalar(e),r.staticMoving?h.copy(p):h.y+=(p.y-h.y)*this.dynamicDampingFactor)},this.panCamera=(L=new a.Vector2,C=new a.Vector3,O=new a.Vector3,function(){L.copy(y).sub(g),L.lengthSq()&&(L.multiplyScalar(l.length()*r.panSpeed),O.copy(l).cross(r.object.up).setLength(L.x),O.add(C.copy(r.object.up).setLength(L.y)),r.object.position.add(O),r.target.add(O),r.staticMoving?g.copy(y):g.add(L.subVectors(y,g).multiplyScalar(r.dynamicDampingFactor)))}),this.checkDistances=function(){r.noZoom&&r.noPan||(l.lengthSq()>r.maxDistance*r.maxDistance&&(r.object.position.addVectors(r.target,l.setLength(r.maxDistance)),h.copy(p)),l.lengthSq()<r.minDistance*r.minDistance&&(r.object.position.addVectors(r.target,l.setLength(r.minDistance)),h.copy(p)))},this.update=function(){l.subVectors(r.object.position,r.target),r.noRotate||r.rotateCamera(),r.noZoom||r.zoomCamera(),r.noPan||r.panCamera(),r.object.position.addVectors(r.target,l),r.checkDistances(),r.object.lookAt(r.target),i.distanceToSquared(r.object.position)>1e-6&&(r.dispatchEvent(x),i.copy(r.object.position))},this.reset=function(){o=n.NONE,s=n.NONE,r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.up.copy(r.up0),l.subVectors(r.object.position,r.target),r.object.lookAt(r.target),r.dispatchEvent(x),i.copy(r.object.position)},this.dispose=function(){this.domElement.removeEventListener("contextmenu",X,!1),this.domElement.removeEventListener("mousedown",U,!1),this.domElement.removeEventListener("wheel",j,!1),this.domElement.removeEventListener("touchstart",V,!1),this.domElement.removeEventListener("touchend",z,!1),this.domElement.removeEventListener("touchmove",G,!1),document.removeEventListener("mousemove",k,!1),document.removeEventListener("mouseup",B,!1),window.removeEventListener("keydown",I,!1),window.removeEventListener("keyup",D,!1)},this.domElement.addEventListener("contextmenu",X,!1),this.domElement.addEventListener("mousedown",U,!1),this.domElement.addEventListener("wheel",j,!1),this.domElement.addEventListener("touchstart",V,!1),this.domElement.addEventListener("touchend",z,!1),this.domElement.addEventListener("touchmove",G,!1),window.addEventListener("keydown",I,!1),window.addEventListener("keyup",D,!1),this.handleResize(),this.update()};(n.prototype=Object.create(a.EventDispatcher.prototype)).constructor=n,t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(){var e=function(e){a.MeshBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.fog=!1,this.side=a.FrontSide,this.transparent=!0,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};(e.prototype=Object.create(a.MeshBasicMaterial.prototype)).constructor=e;var t=function(e){a.LineBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.fog=!1,this.transparent=!0,this.linewidth=1,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};(t.prototype=Object.create(a.LineBasicMaterial.prototype)).constructor=t;var r=new e({visible:!1,transparent:!1}),n=function(){this.init=function(){a.Object3D.call(this),this.handles=new a.Object3D,this.pickers=new a.Object3D,this.planes=new a.Object3D,this.add(this.handles),this.add(this.pickers),this.add(this.planes);var e=new a.PlaneBufferGeometry(50,50,2,2),t=new a.MeshBasicMaterial({visible:!1,side:a.DoubleSide}),r={XY:new a.Mesh(e,t),YZ:new a.Mesh(e,t),XZ:new a.Mesh(e,t),XYZE:new a.Mesh(e,t)};for(var n in this.activePlane=r.XYZE,r.YZ.rotation.set(0,Math.PI/2,0),r.XZ.rotation.set(-Math.PI/2,0,0),r)r[n].name=n,this.planes.add(r[n]),this.planes[n]=r[n];var i=function(e,t){for(var r in e)for(n=e[r].length;n--;){var a=e[r][n][0],i=e[r][n][1],o=e[r][n][2];a.name=r,a.renderOrder=1/0,i&&a.position.set(i[0],i[1],i[2]),o&&a.rotation.set(o[0],o[1],o[2]),t.add(a)}};i(this.handleGizmos,this.handles),i(this.pickerGizmos,this.pickers),this.traverse((function(e){if(e instanceof a.Mesh){e.updateMatrix();var t=e.geometry.clone();t.applyMatrix(e.matrix),e.geometry=t,e.position.set(0,0,0),e.rotation.set(0,0,0),e.scale.set(1,1,1)}}))},this.highlight=function(e){this.traverse((function(t){t.material&&t.material.highlight&&(t.name===e?t.material.highlight(!0):t.material.highlight(!1))}))}};(n.prototype=Object.create(a.Object3D.prototype)).constructor=n,n.prototype.update=function(e,t){var r=new a.Vector3(0,0,0),n=new a.Vector3(0,1,0),i=new a.Matrix4;this.traverse((function(a){-1!==a.name.search("E")?a.quaternion.setFromRotationMatrix(i.lookAt(t,r,n)):-1===a.name.search("X")&&-1===a.name.search("Y")&&-1===a.name.search("Z")||a.quaternion.setFromEuler(e)}))};var i=function(){n.call(this);var i=new a.Geometry,o=new a.Mesh(new a.CylinderGeometry(0,.05,.2,12,1,!1));o.position.y=.5,o.updateMatrix(),i.merge(o.geometry,o.matrix);var s=new a.BufferGeometry;s.addAttribute("position",new a.Float32BufferAttribute([0,0,0,1,0,0],3));var l=new a.BufferGeometry;l.addAttribute("position",new a.Float32BufferAttribute([0,0,0,0,1,0],3));var u=new a.BufferGeometry;u.addAttribute("position",new a.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new a.Mesh(i,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new a.Line(s,new t({color:16711680}))]],Y:[[new a.Mesh(i,new e({color:65280})),[0,.5,0]],[new a.Line(l,new t({color:65280}))]],Z:[[new a.Mesh(i,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new a.Line(u,new t({color:255}))]],XYZ:[[new a.Mesh(new a.OctahedronGeometry(.1,0),new e({color:16777215,opacity:.25})),[0,0,0],[0,0,0]]],XY:[[new a.Mesh(new a.PlaneBufferGeometry(.29,.29),new e({color:16776960,opacity:.25})),[.15,.15,0]]],YZ:[[new a.Mesh(new a.PlaneBufferGeometry(.29,.29),new e({color:65535,opacity:.25})),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new a.Mesh(new a.PlaneBufferGeometry(.29,.29),new e({color:16711935,opacity:.25})),[.15,0,.15],[-Math.PI/2,0,0]]]},this.pickerGizmos={X:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[0,.6,0]]],Z:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new a.Mesh(new a.OctahedronGeometry(.2,0),r)]],XY:[[new a.Mesh(new a.PlaneBufferGeometry(.4,.4),r),[.2,.2,0]]],YZ:[[new a.Mesh(new a.PlaneBufferGeometry(.4,.4),r),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new a.Mesh(new a.PlaneBufferGeometry(.4,.4),r),[.2,0,.2],[-Math.PI/2,0,0]]]},this.setActivePlane=function(e,t){var r=new a.Matrix4;t.applyMatrix4(r.getInverse(r.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE),"XY"===e&&(this.activePlane=this.planes.XY),"YZ"===e&&(this.activePlane=this.planes.YZ),"XZ"===e&&(this.activePlane=this.planes.XZ)},this.init()};(i.prototype=Object.create(n.prototype)).constructor=i;var o=function(){n.call(this);var e=function(e,t,r){var n=new a.BufferGeometry,i=[];r=r||1;for(var o=0;o<=64*r;++o)"x"===t&&i.push(0,Math.cos(o/32*Math.PI)*e,Math.sin(o/32*Math.PI)*e),"y"===t&&i.push(Math.cos(o/32*Math.PI)*e,0,Math.sin(o/32*Math.PI)*e),"z"===t&&i.push(Math.sin(o/32*Math.PI)*e,Math.cos(o/32*Math.PI)*e,0);return n.addAttribute("position",new a.Float32BufferAttribute(i,3)),n};this.handleGizmos={X:[[new a.Line(new e(1,"x",.5),new t({color:16711680}))]],Y:[[new a.Line(new e(1,"y",.5),new t({color:65280}))]],Z:[[new a.Line(new e(1,"z",.5),new t({color:255}))]],E:[[new a.Line(new e(1.25,"z",1),new t({color:13421568}))]],XYZE:[[new a.Line(new e(1,"z",1),new t({color:7895160}))]]},this.pickerGizmos={X:[[new a.Mesh(new a.TorusBufferGeometry(1,.12,4,12,Math.PI),r),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new a.Mesh(new a.TorusBufferGeometry(1,.12,4,12,Math.PI),r),[0,0,0],[Math.PI/2,0,0]]],Z:[[new a.Mesh(new a.TorusBufferGeometry(1,.12,4,12,Math.PI),r),[0,0,0],[0,0,-Math.PI/2]]],E:[[new a.Mesh(new a.TorusBufferGeometry(1.25,.12,2,24),r)]],XYZE:[[new a.Mesh(new a.TorusBufferGeometry(1,.12,2,24),r)]]},this.pickerGizmos.XYZE[0][0].visible=!1,this.setActivePlane=function(e){"E"===e&&(this.activePlane=this.planes.XYZE),"X"===e&&(this.activePlane=this.planes.YZ),"Y"===e&&(this.activePlane=this.planes.XZ),"Z"===e&&(this.activePlane=this.planes.XY)},this.update=function(e,t){n.prototype.update.apply(this,arguments);var r=new a.Matrix4,i=new a.Euler(0,0,1),o=new a.Quaternion,s=new a.Vector3(1,0,0),l=new a.Vector3(0,1,0),u=new a.Vector3(0,0,1),c=new a.Quaternion,d=new a.Quaternion,f=new a.Quaternion,h=t.clone();i.copy(this.planes.XY.rotation),o.setFromEuler(i),r.makeRotationFromQuaternion(o).getInverse(r),h.applyMatrix4(r),this.traverse((function(e){o.setFromEuler(i),"X"===e.name&&(c.setFromAxisAngle(s,Math.atan2(-h.y,h.z)),o.multiplyQuaternions(o,c),e.quaternion.copy(o)),"Y"===e.name&&(d.setFromAxisAngle(l,Math.atan2(h.x,h.z)),o.multiplyQuaternions(o,d),e.quaternion.copy(o)),"Z"===e.name&&(f.setFromAxisAngle(u,Math.atan2(h.y,h.x)),o.multiplyQuaternions(o,f),e.quaternion.copy(o))}))},this.init()};(o.prototype=Object.create(n.prototype)).constructor=o;var s=function(){n.call(this);var i=new a.Geometry,o=new a.Mesh(new a.BoxGeometry(.125,.125,.125));o.position.y=.5,o.updateMatrix(),i.merge(o.geometry,o.matrix);var s=new a.BufferGeometry;s.addAttribute("position",new a.Float32BufferAttribute([0,0,0,1,0,0],3));var l=new a.BufferGeometry;l.addAttribute("position",new a.Float32BufferAttribute([0,0,0,0,1,0],3));var u=new a.BufferGeometry;u.addAttribute("position",new a.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new a.Mesh(i,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new a.Line(s,new t({color:16711680}))]],Y:[[new a.Mesh(i,new e({color:65280})),[0,.5,0]],[new a.Line(l,new t({color:65280}))]],Z:[[new a.Mesh(i,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new a.Line(u,new t({color:255}))]],XYZ:[[new a.Mesh(new a.BoxBufferGeometry(.125,.125,.125),new e({color:16777215,opacity:.25}))]]},this.pickerGizmos={X:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[0,.6,0]]],Z:[[new a.Mesh(new a.CylinderBufferGeometry(.2,0,1,4,1,!1),r),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new a.Mesh(new a.BoxBufferGeometry(.4,.4,.4),r)]]},this.setActivePlane=function(e,t){var r=new a.Matrix4;t.applyMatrix4(r.getInverse(r.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE)},this.init()};(s.prototype=Object.create(n.prototype)).constructor=s;var l=function(e,t){a.Object3D.call(this),t=void 0!==t?t:document,this.object=void 0,this.visible=!1,this.translationSnap=null,this.rotationSnap=null,this.space="world",this.size=1,this.axis=null;var r=this,n="translate",l=!1,u={translate:new i,rotate:new o,scale:new s};for(var c in u){var d=u[c];d.visible=c===n,this.add(d)}var f={type:"change"},h={type:"mouseDown"},p={type:"mouseUp",mode:n},m={type:"objectChange"},v=new a.Raycaster,g=new a.Vector2,y=new a.Vector3,x=new a.Vector3,b=new a.Vector3,w=new a.Vector3,A=1,M=new a.Matrix4,T=new a.Vector3,S=new a.Matrix4,E=new a.Vector3,_=new a.Quaternion,F=new a.Vector3(1,0,0),P=new a.Vector3(0,1,0),L=new a.Vector3(0,0,1),C=new a.Quaternion,O=new a.Quaternion,N=new a.Quaternion,R=new a.Quaternion,I=new a.Quaternion,D=new a.Vector3,U=new a.Vector3,k=new a.Matrix4,B=new a.Matrix4,j=new a.Vector3,V=new a.Vector3,G=new a.Euler,z=new a.Matrix4,X=new a.Vector3,H=new a.Euler;function Y(e){if(void 0!==r.object&&!0!==l&&(void 0===e.button||0===e.button)){var t=K(e.changedTouches?e.changedTouches[0]:e,u[n].pickers.children),a=null;t&&(a=t.object.name,e.preventDefault()),r.axis!==a&&(r.axis=a,r.update(),r.dispatchEvent(f))}}function W(e){if(void 0!==r.object&&!0!==l&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e;if(0===t.button||void 0===t.button){var a=K(t,u[n].pickers.children);if(a){e.preventDefault(),e.stopPropagation(),r.axis=a.object.name,r.dispatchEvent(h),r.update(),T.copy(X).sub(V).normalize(),u[n].setActivePlane(r.axis,T);var i=K(t,[u[n].activePlane]);i&&(D.copy(r.object.position),U.copy(r.object.scale),k.extractRotation(r.object.matrix),z.extractRotation(r.object.matrixWorld),B.extractRotation(r.object.parent.matrixWorld),j.setFromMatrixScale(S.getInverse(r.object.parent.matrixWorld)),x.copy(i.point))}}l=!0}}function Q(e){if(void 0!==r.object&&null!==r.axis&&!1!==l&&(void 0===e.button||0===e.button)){var t=K(e.changedTouches?e.changedTouches[0]:e,[u[n].activePlane]);!1!==t&&(e.preventDefault(),e.stopPropagation(),y.copy(t.point),"translate"===n?(y.sub(x),y.multiply(j),"local"===r.space&&(y.applyMatrix4(S.getInverse(z)),-1===r.axis.search("X")&&(y.x=0),-1===r.axis.search("Y")&&(y.y=0),-1===r.axis.search("Z")&&(y.z=0),y.applyMatrix4(k),r.object.position.copy(D),r.object.position.add(y)),"world"!==r.space&&-1===r.axis.search("XYZ")||(-1===r.axis.search("X")&&(y.x=0),-1===r.axis.search("Y")&&(y.y=0),-1===r.axis.search("Z")&&(y.z=0),y.applyMatrix4(S.getInverse(B)),r.object.position.copy(D),r.object.position.add(y)),null!==r.translationSnap&&("local"===r.space&&r.object.position.applyMatrix4(S.getInverse(z)),-1!==r.axis.search("X")&&(r.object.position.x=Math.round(r.object.position.x/r.translationSnap)*r.translationSnap),-1!==r.axis.search("Y")&&(r.object.position.y=Math.round(r.object.position.y/r.translationSnap)*r.translationSnap),-1!==r.axis.search("Z")&&(r.object.position.z=Math.round(r.object.position.z/r.translationSnap)*r.translationSnap),"local"===r.space&&r.object.position.applyMatrix4(z))):"scale"===n?(y.sub(x),y.multiply(j),"local"===r.space&&("XYZ"===r.axis?(A=1+y.y/Math.max(U.x,U.y,U.z),r.object.scale.x=U.x*A,r.object.scale.y=U.y*A,r.object.scale.z=U.z*A):(y.applyMatrix4(S.getInverse(z)),"X"===r.axis&&(r.object.scale.x=U.x*(1+y.x/U.x)),"Y"===r.axis&&(r.object.scale.y=U.y*(1+y.y/U.y)),"Z"===r.axis&&(r.object.scale.z=U.z*(1+y.z/U.z))))):"rotate"===n&&(y.sub(V),y.multiply(j),E.copy(x).sub(V),E.multiply(j),"E"===r.axis?(y.applyMatrix4(S.getInverse(M)),E.applyMatrix4(S.getInverse(M)),b.set(Math.atan2(y.z,y.y),Math.atan2(y.x,y.z),Math.atan2(y.y,y.x)),w.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),_.setFromRotationMatrix(S.getInverse(B)),I.setFromAxisAngle(T,b.z-w.z),C.setFromRotationMatrix(z),_.multiplyQuaternions(_,I),_.multiplyQuaternions(_,C),r.object.quaternion.copy(_)):"XYZE"===r.axis?(I.setFromEuler(y.clone().cross(E).normalize()),_.setFromRotationMatrix(S.getInverse(B)),O.setFromAxisAngle(I,-y.clone().angleTo(E)),C.setFromRotationMatrix(z),_.multiplyQuaternions(_,O),_.multiplyQuaternions(_,C),r.object.quaternion.copy(_)):"local"===r.space?(y.applyMatrix4(S.getInverse(z)),E.applyMatrix4(S.getInverse(z)),b.set(Math.atan2(y.z,y.y),Math.atan2(y.x,y.z),Math.atan2(y.y,y.x)),w.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),C.setFromRotationMatrix(k),null!==r.rotationSnap?(O.setFromAxisAngle(F,Math.round((b.x-w.x)/r.rotationSnap)*r.rotationSnap),N.setFromAxisAngle(P,Math.round((b.y-w.y)/r.rotationSnap)*r.rotationSnap),R.setFromAxisAngle(L,Math.round((b.z-w.z)/r.rotationSnap)*r.rotationSnap)):(O.setFromAxisAngle(F,b.x-w.x),N.setFromAxisAngle(P,b.y-w.y),R.setFromAxisAngle(L,b.z-w.z)),"X"===r.axis&&C.multiplyQuaternions(C,O),"Y"===r.axis&&C.multiplyQuaternions(C,N),"Z"===r.axis&&C.multiplyQuaternions(C,R),r.object.quaternion.copy(C)):"world"===r.space&&(b.set(Math.atan2(y.z,y.y),Math.atan2(y.x,y.z),Math.atan2(y.y,y.x)),w.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),_.setFromRotationMatrix(S.getInverse(B)),null!==r.rotationSnap?(O.setFromAxisAngle(F,Math.round((b.x-w.x)/r.rotationSnap)*r.rotationSnap),N.setFromAxisAngle(P,Math.round((b.y-w.y)/r.rotationSnap)*r.rotationSnap),R.setFromAxisAngle(L,Math.round((b.z-w.z)/r.rotationSnap)*r.rotationSnap)):(O.setFromAxisAngle(F,b.x-w.x),N.setFromAxisAngle(P,b.y-w.y),R.setFromAxisAngle(L,b.z-w.z)),C.setFromRotationMatrix(z),"X"===r.axis&&_.multiplyQuaternions(_,O),"Y"===r.axis&&_.multiplyQuaternions(_,N),"Z"===r.axis&&_.multiplyQuaternions(_,R),_.multiplyQuaternions(_,C),r.object.quaternion.copy(_))),r.update(),r.dispatchEvent(f),r.dispatchEvent(m))}}function q(e){e.preventDefault(),void 0!==e.button&&0!==e.button||(l&&null!==r.axis&&(p.mode=n,r.dispatchEvent(p)),l=!1,"TouchEvent"in window&&e instanceof TouchEvent?(r.axis=null,r.update(),r.dispatchEvent(f)):Y(e))}function K(r,a){var n=t.getBoundingClientRect(),i=(r.clientX-n.left)/n.width,o=(r.clientY-n.top)/n.height;g.set(2*i-1,-2*o+1),v.setFromCamera(g,e);var s=v.intersectObjects(a,!0);return!!s[0]&&s[0]}t.addEventListener("mousedown",W,!1),t.addEventListener("touchstart",W,!1),t.addEventListener("mousemove",Y,!1),t.addEventListener("touchmove",Y,!1),t.addEventListener("mousemove",Q,!1),t.addEventListener("touchmove",Q,!1),t.addEventListener("mouseup",q,!1),t.addEventListener("mouseout",q,!1),t.addEventListener("touchend",q,!1),t.addEventListener("touchcancel",q,!1),t.addEventListener("touchleave",q,!1),this.dispose=function(){t.removeEventListener("mousedown",W),t.removeEventListener("touchstart",W),t.removeEventListener("mousemove",Y),t.removeEventListener("touchmove",Y),t.removeEventListener("mousemove",Q),t.removeEventListener("touchmove",Q),t.removeEventListener("mouseup",q),t.removeEventListener("mouseout",q),t.removeEventListener("touchend",q),t.removeEventListener("touchcancel",q),t.removeEventListener("touchleave",q)},this.attach=function(e){this.object=e,this.visible=!0,this.update()},this.detach=function(){this.object=void 0,this.visible=!1,this.axis=null},this.getMode=function(){return n},this.setMode=function(e){for(var t in"scale"===(n=e||n)&&(r.space="local"),u)u[t].visible=t===n;this.update(),r.dispatchEvent(f)},this.setTranslationSnap=function(e){r.translationSnap=e},this.setRotationSnap=function(e){r.rotationSnap=e},this.setSize=function(e){r.size=e,this.update(),r.dispatchEvent(f)},this.setSpace=function(e){r.space=e,this.update(),r.dispatchEvent(f)},this.update=function(){void 0!==r.object&&(r.object.updateMatrixWorld(),V.setFromMatrixPosition(r.object.matrixWorld),G.setFromRotationMatrix(S.extractRotation(r.object.matrixWorld)),e.updateMatrixWorld(),X.setFromMatrixPosition(e.matrixWorld),H.setFromRotationMatrix(S.extractRotation(e.matrixWorld)),A=V.distanceTo(X)/6*r.size,this.position.copy(V),this.scale.set(A,A,A),e instanceof a.PerspectiveCamera?T.copy(X).sub(V).normalize():e instanceof a.OrthographicCamera&&T.copy(X).normalize(),"local"===r.space?u[n].update(G,T):"world"===r.space&&u[n].update(new a.Euler,T),u[n].highlight(r.axis))}};return(l.prototype=Object.create(a.Object3D.prototype)).constructor=l,l}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(e,t){var r,n,i=this,o=new a.Matrix4,s=null;"VRFrameData"in window&&(s=new VRFrameData),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(e){n=e,e.length>0?r=e[0]:t&&t("VR input not available.")})).catch((function(){console.warn("THREE.VRControls: Unable to get VR Displays")})),this.scale=1,this.standing=!1,this.userHeight=1.6,this.getVRDisplay=function(){return r},this.setVRDisplay=function(e){r=e},this.getVRDisplays=function(){return console.warn("THREE.VRControls: getVRDisplays() is being deprecated."),n},this.getStandingMatrix=function(){return o},this.update=function(){var t;r&&(r.getFrameData?(r.getFrameData(s),t=s.pose):r.getPose&&(t=r.getPose()),null!==t.orientation&&e.quaternion.fromArray(t.orientation),null!==t.position?e.position.fromArray(t.position):e.position.set(0,0,0),this.standing&&(r.stageParameters?(e.updateMatrix(),o.fromArray(r.stageParameters.sittingToStandingTransform),e.applyMatrix(o)):e.position.setY(e.position.y+this.userHeight)),e.position.multiplyScalar(i.scale))},this.dispose=function(){r=null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypedGeometryExporter=t.STLExporter=t.STLBinaryExporter=t.PLYExporter=t.OBJExporter=t.MMDExporter=t.GLTFExporter=void 0;var a=c(r(41)),n=c(r(42)),i=c(r(43)),o=c(r(44)),s=c(r(45)),l=c(r(46)),u=c(r(47));function c(e){return e&&e.__esModule?e:{default:e}}t.GLTFExporter=a.default,t.MMDExporter=n.default,t.OBJExporter=i.default,t.PLYExporter=o.default,t.STLBinaryExporter=s.default,t.STLExporter=l.default,t.TypedGeometryExporter=u.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,FLOAT:5126,UNSIGNED_INT:5125,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987},i={1003:n.NEAREST,1004:n.NEAREST_MIPMAP_NEAREST,1005:n.NEAREST_MIPMAP_LINEAR,1006:n.LINEAR,1007:n.LINEAR_MIPMAP_NEAREST,1008:n.LINEAR_MIPMAP_LINEAR},o={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"},s=function(){};s.prototype={constructor:s,parse:function(e,t,r){(r=Object.assign({},{trs:!1,onlyVisible:!0,truncateDrawRange:!0,embedImages:!0,animations:[],forceIndices:!1,forcePowerOfTwoTextures:!1},r)).animations.length>0&&(r.trs=!0);var s,l={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},u=0,c=[],d=[],f=new Map,h=[],p={},m={attributes:new Map,materials:new Map,textures:new Map};function v(e,t){return e.length===t.length&&e.every((function(e,r){return e===t[r]}))}function g(e){return 4*Math.ceil(e/4)}function y(e,t){t=t||0;var r=g(e.byteLength);if(r!==e.byteLength){var a=new Uint8Array(r);if(a.set(new Uint8Array(e)),0!==t)for(var n=e.byteLength;n<r;n++)a[n]=t;return a.buffer}return e}function x(e){return l.buffers||(l.buffers=[{byteLength:0}]),c.push(e),0}function b(e,t,a,i){var o;if(e.array.constructor===Float32Array)o=n.FLOAT;else if(e.array.constructor===Uint32Array)o=n.UNSIGNED_INT;else if(e.array.constructor===Uint16Array)o=n.UNSIGNED_SHORT;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type.");o=n.UNSIGNED_BYTE}if(void 0===a&&(a=0),void 0===i&&(i=e.count),r.truncateDrawRange&&void 0!==t&&null===t.index){var s=a+i,c=t.drawRange.count===1/0?e.count:t.drawRange.start+t.drawRange.count;a=Math.max(a,t.drawRange.start),(i=Math.min(s,c)-a)<0&&(i=0)}if(0===i)return null;var d,f=function(e,t,r){for(var a={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)},n=t;n<t+r;n++)for(var i=0;i<e.itemSize;i++){var o=e.array[n*e.itemSize+i];a.min[i]=Math.min(a.min[i],o),a.max[i]=Math.max(a.max[i],o)}return a}(e,a,i);void 0!==t&&(d=e===t.index?n.ELEMENT_ARRAY_BUFFER:n.ARRAY_BUFFER);var h=function(e,t,r,a,i){var o;l.bufferViews||(l.bufferViews=[]),o=t===n.UNSIGNED_BYTE?1:t===n.UNSIGNED_SHORT?2:4;for(var s=g(a*e.itemSize*o),c=new DataView(new ArrayBuffer(s)),d=0,f=r;f<r+a;f++)for(var h=0;h<e.itemSize;h++){var p=e.array[f*e.itemSize+h];t===n.FLOAT?c.setFloat32(d,p,!0):t===n.UNSIGNED_INT?c.setUint32(d,p,!0):t===n.UNSIGNED_SHORT?c.setUint16(d,p,!0):t===n.UNSIGNED_BYTE&&c.setUint8(d,p),d+=o}var m={buffer:x(c.buffer),byteOffset:u,byteLength:s};return void 0!==i&&(m.target=i),i===n.ARRAY_BUFFER&&(m.byteStride=e.itemSize*o),u+=s,l.bufferViews.push(m),{id:l.bufferViews.length-1,byteLength:0}}(e,o,a,i,d),p={bufferView:h.id,byteOffset:h.byteOffset,componentType:o,count:i,max:f.max,min:f.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",16:"MAT4"}[e.itemSize]};return l.accessors||(l.accessors=[]),l.accessors.push(p),l.accessors.length-1}function w(e){l.images||(l.images=[]);var t=e.format===a.RGBAFormat?"image/png":"image/jpeg",n={mimeType:t};if(r.embedImages){var i=s=s||document.createElement("canvas");i.width=e.image.width,i.height=e.image.height,r.forcePowerOfTwoTextures&&!function(e){return a.Math.isPowerOfTwo(e.width)&&a.Math.isPowerOfTwo(e.height)}(e.image)&&(console.warn("GLTFExporter: Resized non-power-of-two image.",e.image),i.width=a.Math.floorPowerOfTwo(i.width),i.height=a.Math.floorPowerOfTwo(i.height));var o=i.getContext("2d");!0===e.flipY&&(o.translate(0,i.height),o.scale(1,-1)),o.drawImage(e.image,0,0,i.width,i.height),!0===r.binary?d.push(new Promise((function(e){i.toBlob((function(t){(function(e){return l.bufferViews||(l.bufferViews=[]),new Promise((function(t){var r=new window.FileReader;r.readAsArrayBuffer(e),r.onloadend=function(){var e=y(r.result),a={buffer:x(e),byteOffset:u,byteLength:e.byteLength};u+=e.byteLength,l.bufferViews.push(a),t(l.bufferViews.length-1)}}))})(t).then((function(t){n.bufferView=t,e()}))}),t)}))):n.uri=i.toDataURL(t)}else n.uri=e.image.src;return l.images.push(n),l.images.length-1}function A(e){l.samplers||(l.samplers=[]);var t={magFilter:i[e.magFilter],minFilter:i[e.minFilter],wrapS:i[e.wrapS],wrapT:i[e.wrapT]};return l.samplers.push(t),l.samplers.length-1}function M(e){if(m.textures.has(e))return m.textures.get(e);l.textures||(l.textures=[]);var t={sampler:A(e),source:w(e)};l.textures.push(t);var r=l.textures.length-1;return m.textures.set(e,r),r}function T(e){if(m.materials.has(e))return m.materials.get(e);if(l.materials||(l.materials=[]),e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;var t={pbrMetallicRoughness:{}};e.isMeshBasicMaterial?(t.extensions={KHR_materials_unlit:{}},p.KHR_materials_unlit=!0):e.isMeshStandardMaterial||console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");var r=e.color.toArray().concat([e.opacity]);if(v(r,[1,1,1,1])||(t.pbrMetallicRoughness.baseColorFactor=r),e.isMeshStandardMaterial?(t.pbrMetallicRoughness.metallicFactor=e.metalness,t.pbrMetallicRoughness.roughnessFactor=e.roughness):e.isMeshBasicMaterial?(t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9):(t.pbrMetallicRoughness.metallicFactor=.5,t.pbrMetallicRoughness.roughnessFactor=.5),(e.metalnessMap||e.roughnessMap)&&(e.metalnessMap===e.roughnessMap?t.pbrMetallicRoughness.metallicRoughnessTexture={index:M(e.metalnessMap)}:console.warn("THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.")),e.map&&(t.pbrMetallicRoughness.baseColorTexture={index:M(e.map)}),e.isMeshBasicMaterial||e.isLineBasicMaterial||e.isPointsMaterial);else{var n=e.emissive.clone().multiplyScalar(e.emissiveIntensity).toArray();v(n,[0,0,0])||(t.emissiveFactor=n),e.emissiveMap&&(t.emissiveTexture={index:M(e.emissiveMap)})}e.normalMap&&(t.normalTexture={index:M(e.normalMap)},-1!==e.normalScale.x&&(e.normalScale.x!==e.normalScale.y&&console.warn("THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X."),t.normalTexture.scale=e.normalScale.x)),e.aoMap&&(t.occlusionTexture={index:M(e.aoMap)},1!==e.aoMapIntensity&&(t.occlusionTexture.strength=e.aoMapIntensity)),(e.transparent||e.alphaTest>0)&&(t.alphaMode=e.opacity<1?"BLEND":"MASK",e.alphaTest>0&&.5!==e.alphaTest&&(t.alphaCutoff=e.alphaTest)),e.side===a.DoubleSide&&(t.doubleSided=!0),""!==e.name&&(t.name=e.name),l.materials.push(t);var i=l.materials.length-1;return m.materials.set(e,i),i}function S(e){var t,i=e.geometry;if(e.isLineSegments)t=n.LINES;else if(e.isLineLoop)t=n.LINE_LOOP;else if(e.isLine)t=n.LINE_STRIP;else if(e.isPoints)t=n.POINTS;else{if(!i.isBufferGeometry){var o=new a.BufferGeometry;o.fromGeometry(i),i=o}e.drawMode===a.TriangleFanDrawMode?(console.warn("GLTFExporter: TriangleFanDrawMode and wireframe incompatible."),t=n.TRIANGLE_FAN):t=e.drawMode===a.TriangleStripDrawMode?e.material.wireframe?n.LINE_STRIP:n.TRIANGLE_STRIP:e.material.wireframe?n.LINES:n.TRIANGLES}var s={},u={},c=[],d=[],f={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},h=i.getAttribute("normal");for(var p in void 0===h||function(e){if(m.attributes.has(e))return!1;for(var t=new a.Vector3,r=0,n=e.count;r<n;r++)if(Math.abs(t.fromArray(e.array,3*r).length()-1)>5e-4)return!1;return!0}(h)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),i.addAttribute("normal",function(e){if(m.attributes.has(e))return m.textures.get(e);for(var t=e.clone(),r=new a.Vector3,n=0,i=t.count;n<i;n++)r.fromArray(t.array,3*n),0===r.x&&0===r.y&&0===r.z?r.setX(1):r.normalize(),r.toArray(t.array,3*n);return m.attributes.set(e,t),t}(h))),i.attributes){var v=i.attributes[p];p=f[p]||p.toUpperCase();var g=v.array;if("JOINTS_0"!==p||g instanceof Uint16Array||g instanceof Uint8Array||(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),v=new a.BufferAttribute(new Uint16Array(g),v.itemSize,v.normalized)),"MORPH"!==p.substr(0,5)){var y=b(v,i);null!==y&&(u[p]=y)}}if(void 0!==h&&i.addAttribute("normal",h),0===Object.keys(u).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){var x=[],w=[],A={};if(void 0!==e.morphTargetDictionary)for(var M in e.morphTargetDictionary)A[e.morphTargetDictionary[M]]=M;for(var S=0;S<e.morphTargetInfluences.length;++S){var E={},_=!1;for(var p in i.morphAttributes)if("position"===p||"normal"===p){v=i.morphAttributes[p][S];for(var F=i.attributes[p],P=v.clone(),L=0,C=v.count;L<C;L++)P.setXYZ(L,v.getX(L)-F.getX(L),v.getY(L)-F.getY(L),v.getZ(L)-F.getZ(L));E[p.toUpperCase()]=b(P,i)}else _||(console.warn("GLTFExporter: Only POSITION and NORMAL morph are supported."),_=!0);d.push(E),x.push(e.morphTargetInfluences[S]),void 0!==e.morphTargetDictionary&&w.push(A[S])}s.weights=x,w.length>0&&(s.extras={},s.extras.targetNames=w)}var O=r.forceIndices,N=Array.isArray(e.material);if(N&&0===e.geometry.groups.length)return null;!O&&null===i.index&&N&&(console.warn("THREE.GLTFExporter: Creating index for non-indexed multi-material mesh."),O=!0);var R=!1;if(null===i.index&&O){for(var I=[],D=(S=0,i.attributes.position.count);S<D;S++)I[S]=S;i.setIndex(I),R=!0}var U=N?e.material:[e.material],k=N?e.geometry.groups:[{materialIndex:0,start:void 0,count:void 0}];for(S=0,D=k.length;S<D;S++){var B={mode:t,attributes:u};d.length>0&&(B.targets=d),null!==i.index&&(B.indices=b(i.index,i,k[S].start,k[S].count));var j=T(U[k[S].materialIndex]);null!==j&&(B.material=j),c.push(B)}return R&&i.setIndex(null),s.primitives=c,l.meshes||(l.meshes=[]),l.meshes.push(s),l.meshes.length-1}function E(e,t){l.animations||(l.animations=[]);for(var r=[],n=[],i=0;i<e.tracks.length;++i){var s=e.tracks[i],u=a.PropertyBinding.parseTrackName(s.name),c=a.PropertyBinding.findNode(t,u.nodeName),d=o[u.propertyName];if("bones"===u.objectName&&(c=!0===c.isSkinnedMesh?c.skeleton.getBoneByName(u.objectIndex):void 0),!c||!d)return console.warn('THREE.GLTFExporter: Could not export animation track "%s".',s.name),null;var h,p=s.values.length/s.times.length;d===o.morphTargetInfluences&&(p/=c.morphTargetInfluences.length),!0===s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(h="CUBICSPLINE",p/=3):h=s.getInterpolation()===a.InterpolateDiscrete?"STEP":"LINEAR",n.push({input:b(new a.BufferAttribute(s.times,1)),output:b(new a.BufferAttribute(s.values,p)),interpolation:h}),r.push({sampler:n.length-1,target:{node:f.get(c),path:d}})}return l.animations.push({name:e.name||"clip_"+l.animations.length,samplers:n,channels:r}),l.animations.length-1}function _(e){var t=l.nodes[f.get(e)],r=e.skeleton,n=e.skeleton.bones[0];if(void 0===n)return null;for(var i=[],o=new Float32Array(16*r.bones.length),s=0;s<r.bones.length;++s)i.push(f.get(r.bones[s])),r.boneInverses[s].toArray(o,16*s);return void 0===l.skins&&(l.skins=[]),l.skins.push({inverseBindMatrices:b(new a.BufferAttribute(o,16)),joints:i,skeleton:f.get(n)}),t.skin=l.skins.length-1}function F(e){if(e.isLight)return console.warn("GLTFExporter: Unsupported node type:",e.constructor.name),null;l.nodes||(l.nodes=[]);var t={};if(r.trs){var n=e.quaternion.toArray(),i=e.position.toArray(),o=e.scale.toArray();v(n,[0,0,0,1])||(t.rotation=n),v(i,[0,0,0])||(t.translation=i),v(o,[1,1,1])||(t.scale=o)}else e.updateMatrix(),v(e.matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])||(t.matrix=e.matrix.elements);if(""!==e.name&&(t.name=String(e.name)),e.userData&&Object.keys(e.userData).length>0)try{t.extras=JSON.parse(JSON.stringify(e.userData))}catch(e){throw new Error("THREE.GLTFExporter: userData can't be serialized")}if(e.isMesh||e.isLine||e.isPoints){var s=S(e);null!==s&&(t.mesh=s)}else e.isCamera&&(t.camera=function(e){l.cameras||(l.cameras=[]);var t=e.isOrthographicCamera,r={type:t?"orthographic":"perspective"};return t?r.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:a.Math.degToRad(e.fov)/e.aspect,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(r.name=e.type),l.cameras.push(r),l.cameras.length-1}(e));if(e.isSkinnedMesh&&h.push(e),e.children.length>0){for(var u=[],c=0,d=e.children.length;c<d;c++){var p=e.children[c];if(p.visible||!1===r.onlyVisible){var m=F(p);null!==m&&u.push(m)}}u.length>0&&(t.children=u)}l.nodes.push(t);var g=l.nodes.length-1;return f.set(e,g),g}function P(e){l.scenes||(l.scenes=[],l.scene=0);var t={nodes:[]};""!==e.name&&(t.name=e.name),l.scenes.push(t);for(var a=[],n=0,i=e.children.length;n<i;n++){var o=e.children[n];if(o.visible||!1===r.onlyVisible){var s=F(o);null!==s&&a.push(s)}}a.length>0&&(t.nodes=a)}!function(e){e=e instanceof Array?e:[e];for(var t=[],n=0;n<e.length;n++)e[n]instanceof a.Scene?P(e[n]):t.push(e[n]);for(t.length>0&&function(e){var t=new a.Scene;t.name="AuxScene";for(var r=0;r<e.length;r++)t.children.push(e[r]);P(t)}(t),n=0;n<h.length;++n)_(h[n]);for(n=0;n<r.animations.length;++n)E(r.animations[n],e[0])}(e),Promise.all(d).then((function(){var e=new Blob(c,{type:"application/octet-stream"}),a=Object.keys(p);if(a.length>0&&(l.extensionsUsed=a),l.buffers&&l.buffers.length>0){l.buffers[0].byteLength=e.size;var n=new window.FileReader;if(!0===r.binary){n.readAsArrayBuffer(e),n.onloadend=function(){var e=y(n.result),r=new DataView(new ArrayBuffer(8));r.setUint32(0,e.byteLength,!0),r.setUint32(4,5130562,!0);var a=y(function(e){if(void 0!==window.TextEncoder)return(new TextEncoder).encode(e).buffer;for(var t=new Uint8Array(new ArrayBuffer(e.length)),r=0,a=e.length;r<a;r++){var n=e.charCodeAt(r);t[r]=n>255?32:n}return t.buffer}(JSON.stringify(l)),32),i=new DataView(new ArrayBuffer(8));i.setUint32(0,a.byteLength,!0),i.setUint32(4,1313821514,!0);var o=new ArrayBuffer(12),s=new DataView(o);s.setUint32(0,1179937895,!0),s.setUint32(4,2,!0);var u=12+i.byteLength+a.byteLength+r.byteLength+e.byteLength;s.setUint32(8,u,!0);var c=new Blob([o,i,a,r,e],{type:"application/octet-stream"}),d=new window.FileReader;d.readAsArrayBuffer(c),d.onloadend=function(){t(d.result)}}}else n.readAsDataURL(e),n.onloadend=function(){var e=n.result;l.buffers[0].uri=e,t(l)}}else t(l)}))}},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(0)),n=i(r(4));function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}t.default=function(){var e;this.parseVpd=function(t,r,i){if(!0!==t.isSkinnedMesh)return console.warn("THREE.MMDExporter: parseVpd() requires SkinnedMesh instance."),null;function o(e){Math.abs(e)<1e-6&&(e=0);var t=e.toString();-1===t.indexOf(".")&&(t+=".");var r=(t+="000000").indexOf(".");return t.slice(0,r)+"."+t.slice(r+1,r+7)}function s(e){for(var t=[],r=0,a=e.length;r<a;r++)t.push(o(e[r]));return t.join(",")}t.updateMatrixWorld(!0);var l=t.skeleton.bones,u=function(e){var t=e.clone();return t.pose(),t.skeleton.bones}(t),c=new a.Vector3,d=new a.Quaternion,f=new a.Quaternion,h=new a.Matrix4,p=[];p.push("Vocaloid Pose Data file"),p.push(""),p.push((""!==t.name?t.name.replace(/\s/g,"_"):"skin")+".osm;"),p.push(l.length+";"),p.push("");for(var m=0,v=l.length;m<v;m++){var g=l[m],y=u[m];!0===i&&void 0!==g.userData.ik&&void 0!==g.userData.ik.originalMatrix?h.fromArray(g.userData.ik.originalMatrix):h.copy(g.matrix),c.setFromMatrixPosition(h),d.setFromRotationMatrix(h);var x=c.sub(y.position).toArray(),b=f.copy(y.quaternion).conjugate().multiply(d).toArray();x[2]=-x[2],b[0]=-b[0],b[1]=-b[1],p.push("Bone"+m+"{"+g.name),p.push(" "+s(x)+";"),p.push(" "+s(b)+";"),p.push("}"),p.push("")}p.push("");var w=p.join("\n");return!0===r?function(t){if(void 0===e){var r=(new n.CharsetEncoder).s2uTable;e={};for(var a=Object.keys(r),i=0,o=a.length;i<o;i++){var s=a[i],l=r[s];s=parseInt(s),e[l]=s}}var u=[];for(i=0,o=t.length;i<o;i++){var c=t.charCodeAt(i);if(void 0===(l=e[c]))throw"cannot convert charcode 0x"+c.toString(16);l>255?(u.push(l>>8&255),u.push(255&l)):u.push(255&l)}return new Uint8Array(u)}(w):w}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(){};n.prototype={constructor:n,parse:function(e){var t,r,n,i,o,s="",l=0,u=0,c=0,d=new a.Vector3,f=new a.Vector3,h=new a.Vector2,p=[];return e.traverse((function(e){e instanceof a.Mesh&&function(e){var n=0,m=0,v=0,g=e.geometry,y=new a.Matrix3;if(g instanceof a.Geometry&&(g=(new a.BufferGeometry).setFromObject(e)),g instanceof a.BufferGeometry){var x=g.getAttribute("position"),b=g.getAttribute("normal"),w=g.getAttribute("uv"),A=g.getIndex();if(s+="o "+e.name+"\n",e.material&&e.material.name&&(s+="usemtl "+e.material.name+"\n"),void 0!==x)for(t=0,i=x.count;t<i;t++,n++)d.x=x.getX(t),d.y=x.getY(t),d.z=x.getZ(t),d.applyMatrix4(e.matrixWorld),s+="v "+d.x+" "+d.y+" "+d.z+"\n";if(void 0!==w)for(t=0,i=w.count;t<i;t++,v++)h.x=w.getX(t),h.y=w.getY(t),s+="vt "+h.x+" "+h.y+"\n";if(void 0!==b)for(y.getNormalMatrix(e.matrixWorld),t=0,i=b.count;t<i;t++,m++)f.x=b.getX(t),f.y=b.getY(t),f.z=b.getZ(t),f.applyMatrix3(y),s+="vn "+f.x+" "+f.y+" "+f.z+"\n";if(null!==A)for(t=0,i=A.count;t<i;t+=3){for(o=0;o<3;o++)r=A.getX(t+o)+1,p[o]=l+r+(b||w?"/"+(w?u+r:"")+(b?"/"+(c+r):""):"");s+="f "+p.join(" ")+"\n"}else for(t=0,i=x.count;t<i;t+=3){for(o=0;o<3;o++)r=t+o+1,p[o]=l+r+(b||w?"/"+(w?u+r:"")+(b?"/"+(c+r):""):"");s+="f "+p.join(" ")+"\n"}}else console.warn("THREE.OBJExporter.parseMesh(): geometry type unsupported",g);l+=n,u+=v,c+=m}(e),e instanceof a.Line&&function(e){var o=0,u=e.geometry,c=e.type;if(u instanceof a.Geometry&&(u=(new a.BufferGeometry).setFromObject(e)),u instanceof a.BufferGeometry){var f=u.getAttribute("position");if(s+="o "+e.name+"\n",void 0!==f)for(t=0,i=f.count;t<i;t++,o++)d.x=f.getX(t),d.y=f.getY(t),d.z=f.getZ(t),d.applyMatrix4(e.matrixWorld),s+="v "+d.x+" "+d.y+" "+d.z+"\n";if("Line"===c){for(s+="l ",r=1,i=f.count;r<=i;r++)s+=l+r+" ";s+="\n"}if("LineSegments"===c)for(n=(r=1)+1,i=f.count;r<i;n=(r+=2)+1)s+="l "+(l+r)+" "+(l+n)+"\n"}else console.warn("THREE.OBJExporter.parseLine(): geometry type unsupported",u);l+=o}(e)})),s}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(){};n.prototype={constructor:n,parse:function(e,t){!0!==Array.isArray(t)&&(t=[]);var r=-1===t.indexOf("normal"),n=-1===t.indexOf("color"),i=-1===t.indexOf("uv"),o=0,s=0,l="",u="",c=new a.Vector3,d=new a.Matrix3;e.traverse((function(e){if(e instanceof a.Mesh){var t=e,f=t.geometry;if(f instanceof a.Geometry&&(f=(new a.BufferGeometry).setFromObject(t)),f instanceof a.BufferGeometry){var h=f.getAttribute("position"),p=f.getAttribute("normal"),m=f.getAttribute("uv"),v=f.getAttribute("color"),g=f.getIndex();if(d.getNormalMatrix(t.matrixWorld),void 0===h)return;for(var y=0,x=h.count;y<x;y++){c.x=h.getX(y),c.y=h.getY(y),c.z=h.getZ(y),c.applyMatrix4(t.matrixWorld);var b=c.x+" "+c.y+" "+c.z;!0===r&&(void 0!==p?(c.x=p.getX(y),c.y=p.getY(y),c.z=p.getZ(y),c.applyMatrix3(d),b+=" "+c.x+" "+c.y+" "+c.z):b+=" 0 0 0"),!0===i&&(void 0!==m?b+=" "+m.getX(y)+" "+m.getY(y):!1!==i&&(b+=" 0 0")),!0===n&&(b+=void 0!==v?" "+Math.floor(v.getX(y))+" "+Math.floor(v.getY(y))+" "+Math.floor(v.getZ(y)):" 255 255 255"),l+=b+"\n"}if(null!==g)for(y=0,x=g.count;y<x;y+=3)u+="3 "+(g.getX(y+0)+o),u+=" "+(g.getX(y+1)+o),u+=" "+(g.getX(y+2)+o)+"\n";else for(y=0,x=h.count;y<x;y+=3)u+="3 "+(o+y)+" "+(o+y+1)+" "+(o+y+2)+"\n";o+=h.count,s+=g?g.count/3:h.count/3}}}));var f="ply\nformat ascii 1.0\nelement vertex "+o+"\nproperty float x\nproperty float y\nproperty float z\n";return!0===r&&(f+="property float nx\nproperty float ny\nproperty float nz\n"),!0===i&&(f+="property float s\nproperty float t\n"),!0===n&&(f+="property uchar red\nproperty uchar green\nproperty uchar blue\n"),f+="element face "+s+"\nproperty list uchar int vertex_index\nend_header\n"+l+"\n"+u+"\n"}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n,i,o=function(){};o.prototype={constructor:o,parse:(n=new a.Vector3,i=new a.Matrix3,function(e){var t=[],r=0;e.traverse((function(e){if(e instanceof a.Mesh){var n=e.geometry;n instanceof a.BufferGeometry&&(n=(new a.Geometry).fromBufferGeometry(n)),n instanceof a.Geometry&&(r+=n.faces.length,t.push({geometry:n,matrix:e.matrixWorld}))}}));var o=80,s=new ArrayBuffer(2*r+3*r*4*4+80+4),l=new DataView(s);return l.setUint32(o,r,!0),o+=4,t.forEach((function(e){var t=e.geometry.vertices,r=e.geometry.faces;i.getNormalMatrix(e.matrix);for(var a=0,s=r.length;a<s;a++){var u=r[a];n.copy(u.normal).applyMatrix3(i).normalize(),l.setFloat32(o,n.x,!0),o+=4,l.setFloat32(o,n.y,!0),o+=4,l.setFloat32(o,n.z,!0),o+=4;for(var c=[u.a,u.b,u.c],d=0;d<3;d++)n.copy(t[c[d]]).applyMatrix4(e.matrix),l.setFloat32(o,n.x,!0),o+=4,l.setFloat32(o,n.y,!0),o+=4,l.setFloat32(o,n.z,!0),o+=4;l.setUint16(o,0,!0),o+=2}})),l})},t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n,i,o=function(){};o.prototype={constructor:o,parse:(n=new a.Vector3,i=new a.Matrix3,function(e){var t="";return t+="solid exported\n",e.traverse((function(e){if(e instanceof a.Mesh){var r=e.geometry,o=e.matrixWorld;if(r instanceof a.BufferGeometry&&(r=(new a.Geometry).fromBufferGeometry(r)),r instanceof a.Geometry){var s=r.vertices,l=r.faces;i.getNormalMatrix(o);for(var u=0,c=l.length;u<c;u++){var d=l[u];n.copy(d.normal).applyMatrix3(i).normalize(),t+="\tfacet normal "+n.x+" "+n.y+" "+n.z+"\n",t+="\t\touter loop\n";for(var f=[d.a,d.b,d.c],h=0;h<3;h++)n.copy(s[f[h]]).applyMatrix4(o),t+="\t\t\tvertex "+n.x+" "+n.y+" "+n.z+"\n";t+="\t\tendloop\n",t+="\tendfacet\n"}}}})),t+="endsolid exported\n"})},t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){};a.prototype={constructor:a,parse:function(e){var t={metadata:{version:4,type:"TypedGeometry",generator:"TypedGeometryExporter"}},r=["vertices","normals","uvs"];for(var a in r){for(var n=r[a],i=e[n],o=[],s=0,l=i.length;s<l;s++)o[s]=i[s];t[n]=o}var u=e.boundingSphere;return null!==u&&(t.boundingSphere={center:u.center.toArray(),radius:u.radius}),t}},t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XLoader=t.VTKLoader=t.UTF8Loader=t.VRMLoader=t.VRMLLoader=t.TTFLoader=t.TGALoader=t.TDSLoader=t.SVGLoader=t.STLLoader=t.RGBELoader=t.PVRLoader=t.PRWMLoader=t.PLYLoader=t.PlayCanvasLoader=t.PDBLoader=t.PCDLoader=t.OBJLoader2=t.OBJLoader=t.NRRDLoader=t.NodeMaterialLoader=t.MTLLoader=t.MMDLoader=t.MD2Loader=t.LoaderSupport=t.KTXLoader=t.KMZLoader=t.HDRCubeTextureLoader=t.GLTFLoader=t.GCodeLoader=t.FBXLoader=t.EXRLoader=t.EquiangularToCubeGenerator=t.DRACOLoader=t.DDSLoader=t.ColladaLoader=t.BVHLoader=t.BinaryLoader=t.BabylonLoader=t.AWDLoader=t.AssimpLoader=t.AssimpJSONLoader=t.AMFLoader=t.ThreeMFLoader=void 0;var a=W(r(49)),n=W(r(50)),i=W(r(51)),o=W(r(52)),s=W(r(53)),l=W(r(54)),u=W(r(55)),c=W(r(56)),d=W(r(57)),f=W(r(58)),h=W(r(59)),p=W(r(60)),m=W(r(61)),v=W(r(62)),g=W(r(63)),y=W(r(5)),x=W(r(64)),b=W(r(65)),w=W(r(66)),A=W(r(7)),M=W(r(68)),T=W(r(69)),S=W(r(9)),E=W(r(70)),_=W(r(71)),F=W(r(72)),P=W(r(73)),L=W(r(74)),C=W(r(75)),O=W(r(76)),N=W(r(77)),R=W(r(78)),I=W(r(79)),D=W(r(6)),U=W(r(80)),k=W(r(81)),B=W(r(82)),j=W(r(83)),V=W(r(84)),G=W(r(85)),z=W(r(86)),X=W(r(87)),H=W(r(88)),Y=W(r(89));function W(e){return e&&e.__esModule?e:{default:e}}t.ThreeMFLoader=a.default,t.AMFLoader=n.default,t.AssimpJSONLoader=i.default,t.AssimpLoader=o.default,t.AWDLoader=s.default,t.BabylonLoader=l.default,t.BinaryLoader=u.default,t.BVHLoader=c.default,t.ColladaLoader=d.default,t.DDSLoader=f.default,t.DRACOLoader=h.default,t.EquiangularToCubeGenerator=p.default,t.EXRLoader=m.default,t.FBXLoader=v.default,t.GCodeLoader=g.default,t.GLTFLoader=y.default,t.HDRCubeTextureLoader=x.default,t.KMZLoader=b.default,t.KTXLoader=w.default,t.LoaderSupport=A.default,t.MD2Loader=M.default,t.MMDLoader=T.default,t.MTLLoader=S.default,t.NodeMaterialLoader=E.default,t.NRRDLoader=_.default,t.OBJLoader=F.default,t.OBJLoader2=P.default,t.PCDLoader=L.default,t.PDBLoader=C.default,t.PlayCanvasLoader=O.default,t.PLYLoader=N.default,t.PRWMLoader=R.default,t.PVRLoader=I.default,t.RGBELoader=D.default,t.STLLoader=U.default,t.SVGLoader=k.default,t.TDSLoader=B.default,t.TGALoader=j.default,t.TTFLoader=V.default,t.VRMLLoader=G.default,t.VRMLoader=z.default,t.UTF8Loader=X.default,t.VTKLoader=H.default,t.XLoader=Y.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.availableExtensions=[]};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){var t=this;function r(e){var t={type:e.getAttribute("type")},r=e.getAttribute("id");r&&(t.id=r);var a=e.getAttribute("pid");a&&(t.pid=a);var n=e.getAttribute("pindex");n&&(t.pindex=n);var i=e.getAttribute("thumbnail");i&&(t.thumbnail=i);var o=e.getAttribute("partnumber");o&&(t.partnumber=o);var s=e.getAttribute("name");s&&(t.name=s);var l=e.querySelector("mesh");l&&(t.mesh=function(e,t){for(var r={},a=[],n=e.querySelectorAll("vertices vertex"),i=0;i<n.length;i++){var o=n[i],s=o.getAttribute("x"),l=o.getAttribute("y"),u=o.getAttribute("z");a.push(parseFloat(s),parseFloat(l),parseFloat(u))}for(r.vertices=new Float32Array(a.length),i=0;i<a.length;i++)r.vertices[i]=a[i];var c=[],d=[],f=e.querySelectorAll("triangles triangle");for(i=0;i<f.length;i++){var h=f[i],p=h.getAttribute("v1"),m=h.getAttribute("v2"),v=h.getAttribute("v3"),g=h.getAttribute("p1"),y=h.getAttribute("p2"),x=h.getAttribute("p3"),b=h.getAttribute("pid");d.push(parseInt(p,10),parseInt(m,10),parseInt(v,10));var w={};g&&(w.p1=parseInt(g,10)),y&&(w.p2=parseInt(y,10)),x&&(w.p3=parseInt(x,10)),b&&(w.pid=b),0<Object.keys(w).length&&c.push(w)}for(r.triangleProperties=c,r.triangles=new Uint32Array(d.length),i=0;i<d.length;i++)r.triangles[i]=d[i];return r}(l));var u=e.querySelector("components");return u&&(t.components=void 0),t}function n(e){var t={unit:e.getAttribute("unit")||"millimeter"},n=e.querySelectorAll("metadata");n&&(t.metadata=function(e){for(var t={},r=0;r<e.length;r++){var a=e[r],n=a.getAttribute("name");0<=["Title","Designer","Description","Copyright","LicenseTerms","Rating","CreationDate","ModificationDate"].indexOf(n)&&(t[n]=a.textContent)}return t}(n));var i=e.querySelector("resources");i&&(t.resources=function(e){var t={},a=e.querySelector("basematerials");a&&(t.basematerial=void 0),t.object={};for(var n=e.querySelectorAll("object"),i=0;i<n.length;i++){var o=r(n[i]);t.object[o.id]=o}return t}(i));var o=e.querySelector("build");return o&&(t.build=function(e){for(var t=[],r=e.querySelectorAll("item"),n=0;n<r.length;n++){var i=r[n],o={objectid:i.getAttribute("objectid")},s=i.getAttribute("transform");if(s){var l=[];s.split(" ").forEach((function(e){l.push(parseFloat(e))}));var u=new a.Matrix4;o.transform=u.set(l[0],l[3],l[6],l[9],l[1],l[4],l[7],l[10],l[2],l[5],l[8],l[11],0,0,0,1)}t.push(o)}return t}(o)),t}function i(e,t){var r=new a.BufferGeometry;r.setIndex(new a.BufferAttribute(e.triangles,1)),r.addAttribute("position",new a.BufferAttribute(e.vertices,3)),e.colors&&r.addAttribute("color",new a.BufferAttribute(e.colors,3)),r.computeBoundingSphere();var n={flatShading:!0};e.colors&&0<e.colors.length?n.vertexColors=a.VertexColors:n.color=11184895;var i=new a.MeshPhongMaterial(n);return new a.Mesh(r,i)}function o(e,r,a,n){if(e){for(var i=[],o=Object.keys(e),s=0;s<o.length;s++)for(var l=o[s],u=0;u<t.availableExtensions.length;u++){(c=t.availableExtensions[u]).ns===l&&i.push(c)}for(s=0;s<i.length;s++){var c;(c=i[s]).apply(a,e[c.ns],r)}}}var s=function(e){var t,r,i=null,o=null,s=[],l=[],u=[],c=[],d={},f={};try{i=new JSZip(e)}catch(e){if(e instanceof ReferenceError)return console.error("THREE.ThreeMFLoader: jszip missing and file is compressed."),null}for(o in i.files)o.match(/\.rels$/)?t=o:o.match(/^3D\/.*\.model$/)?s.push(o):o.match(/^3D\/Metadata\/.*\.xml$/)?l.push(o):o.match(/^3D\/Textures\/.*/)?u.push(o):o.match(/^3D\/Other\/.*/)&&c.push(o);var h=new Uint8Array(i.file(t).asArrayBuffer());r=function(e){var t=(new DOMParser).parseFromString(e,"application/xml").querySelector("Relationship"),r=t.getAttribute("Target"),a=t.getAttribute("Id"),n=t.getAttribute("Type");return{target:r,id:a,type:n}}(a.LoaderUtils.decodeText(h));for(var p=0;p<s.length;p++){var m=s[p],v=new Uint8Array(i.file(m).asArrayBuffer()),g=a.LoaderUtils.decodeText(v),y=(new DOMParser).parseFromString(g,"application/xml");"model"!==y.documentElement.nodeName.toLowerCase()&&console.error("THREE.ThreeMFLoader: Error loading 3MF - no 3MF document found: ",m);var x=y.querySelector("model"),b={};for(p=0;p<x.attributes.length;p++){var w=x.attributes[p];w.name.match(/^xmlns:(.+)$/)&&(b[w.value]=RegExp.$1)}var A=n(x);A.xml=x,0<Object.keys(b).length&&(A.extensions=b),d[m]=A}for(p=0;p<u.length;p++){var M=u[p];f[M]=i.file(M).asBinary()}return{rels:r,model:d,printTicket:{},texture:f,other:{}}}(e);return function(e,t,r){for(var n=new a.Group,i=r.model[t.target.substring(1)].build,o=0;o<i.length;o++){var s=i[o],l=e[s.objectid];s.transform&&l.geometry.applyMatrix(s.transform),n.add(l)}return n}(function(e){for(var t=e.model,r={},a=Object.keys(t),n=0;n<a.length;n++)for(var s=t[a[n]],l=s.xml,u=s.extensions,c=Object.keys(s.resources.object),d=0;d<c.length;d++){var f=c[d],h=s.resources.object[f].mesh;o(u,h,l),r[f]=i(h)}return r}(s),s.rels,s)},addExtension:function(e){this.availableExtensions.push(e)}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e){for(var t="AMF Material",n=e.attributes.id.textContent,i={r:1,g:1,b:1,a:1},o=null,s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];"metadata"===l.nodeName&&void 0!==l.attributes.type?"name"===l.attributes.type.value&&(t=l.textContent):"color"===l.nodeName&&(i=r(l))}return o=new a.MeshPhongMaterial({flatShading:!0,color:new a.Color(i.r,i.g,i.b),name:t}),1!==i.a&&(o.transparent=!0,o.opacity=i.a),{id:n,material:o}}function r(e){for(var t={r:1,g:1,b:1,a:1},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];"r"===a.nodeName?t.r=a.textContent:"g"===a.nodeName?t.g=a.textContent:"b"===a.nodeName?t.b=a.textContent:"a"===a.nodeName&&(t.a=a.textContent)}return t}function n(e){var t={name:"",triangles:[],materialid:null},r=e.firstElementChild;for(void 0!==e.attributes.materialid&&(t.materialId=e.attributes.materialid.nodeValue);r;){if("metadata"===r.nodeName)void 0!==r.attributes.type&&"name"===r.attributes.type.value&&(t.name=r.textContent);else if("triangle"===r.nodeName){var a=r.getElementsByTagName("v1")[0].textContent,n=r.getElementsByTagName("v2")[0].textContent,i=r.getElementsByTagName("v3")[0].textContent;t.triangles.push(a,n,i)}r=r.nextElementSibling}return t}function i(e){for(var t=[],r=[],a=e.firstElementChild;a;){if("vertex"===a.nodeName)for(var n=a.firstElementChild;n;){if("coordinates"===n.nodeName){var i=n.getElementsByTagName("x")[0].textContent,o=n.getElementsByTagName("y")[0].textContent,s=n.getElementsByTagName("z")[0].textContent;t.push(i,o,s)}else if("normal"===n.nodeName){var l=n.getElementsByTagName("nx")[0].textContent,u=n.getElementsByTagName("ny")[0].textContent,c=n.getElementsByTagName("nz")[0].textContent;r.push(l,u,c)}n=n.nextElementSibling}a=a.nextElementSibling}return{vertices:t,normals:r}}function o(e){for(var t=e.attributes.id.textContent,a={name:"amfobject",meshes:[]},o=null,s=e.firstElementChild;s;){if("metadata"===s.nodeName)void 0!==s.attributes.type&&"name"===s.attributes.type.value&&(a.name=s.textContent);else if("color"===s.nodeName)o=r(s);else if("mesh"===s.nodeName){for(var l=s.firstElementChild,u={vertices:[],normals:[],volumes:[],color:o};l;){if("vertices"===l.nodeName){var c=i(l);u.normals=u.normals.concat(c.normals),u.vertices=u.vertices.concat(c.vertices)}else"volume"===l.nodeName&&u.volumes.push(n(l));l=l.nextElementSibling}a.meshes.push(u)}s=s.nextElementSibling}return{id:t,obj:a}}var s,l,u=function(e){var t=new DataView(e);if("PK"===String.fromCharCode(t.getUint8(0),t.getUint8(1))){var r=null,n=null;console.log("THREE.AMFLoader: Loading Zip");try{r=new JSZip(e)}catch(e){if(e instanceof ReferenceError)return console.log("THREE.AMFLoader: jszip missing and file is compressed."),null}for(n in r.files)if(".amf"===n.toLowerCase().substr(-4))break;console.log("THREE.AMFLoader: Trying to load file asset: "+n),t=new DataView(r.file(n).asArrayBuffer())}var i=a.LoaderUtils.decodeText(t),o=(new DOMParser).parseFromString(i,"application/xml");return"amf"!==o.documentElement.nodeName.toLowerCase()?(console.log("THREE.AMFLoader: Error loading AMF - no AMF document found."),null):o}(e),c="",d="",f=function(e){var t=1,r="millimeter";void 0!==e.documentElement.attributes.unit&&(r=e.documentElement.attributes.unit.value.toLowerCase());var a={millimeter:1,inch:25.4,feet:304.8,meter:1e3,micron:.001};return void 0!==a[r]&&(t=a[r]),console.log("THREE.AMFLoader: Unit scale: "+t),t}(u),h={},p={},m=u.documentElement.childNodes;for(s=0;s<m.length;s++){var v=m[s];if("metadata"===v.nodeName)void 0!==v.attributes.type&&("name"===v.attributes.type.value?c=v.textContent:"author"===v.attributes.type.value&&(d=v.textContent));else if("material"===v.nodeName){var g=t(v);h[g.id]=g.material}else if("object"===v.nodeName){var y=o(v);p[y.id]=y.obj}}var x=new a.Group,b=new a.MeshPhongMaterial({color:11184895,flatShading:!0});for(var w in x.name=c,x.userData.author=d,x.userData.loader="AMF",p){var A=p[w],M=A.meshes,T=new a.Group;for(T.name=A.name||"",s=0;s<M.length;s++){var S=b,E=M[s],_=new a.Float32BufferAttribute(E.vertices,3),F=null;if(E.normals.length&&(F=new a.Float32BufferAttribute(E.normals,3)),E.color){var P=E.color;(S=b.clone()).color=new a.Color(P.r,P.g,P.b),1!==P.a&&(S.transparent=!0,S.opacity=P.a)}var L=E.volumes;for(l=0;l<L.length;l++){var C=L[l],O=new a.BufferGeometry,N=S;O.setIndex(C.triangles),O.addAttribute("position",_.clone()),F&&O.addAttribute("normal",F.clone()),void 0!==h[C.materialId]&&(N=h[C.materialId]),O.scale(f,f,f),T.add(new a.Mesh(O,N.clone()))}}x.add(T)}return x}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this,o=a.LoaderUtils.extractUrlBase(e);new a.FileLoader(this.manager).load(e,(function(e){var r=JSON.parse(e),a=r.__metadata__;if(void 0!==a){if("assimp2json"!==a.format)return void n("THREE.AssimpJSONLoader: Not an assimp2json scene.");if(a.version<100&&a.version>=200)return void n("THREE.AssimpJSONLoader: Unsupported assimp2json file format version.")}t(i.parse(r,o))}),r,n)},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){function r(e,t){for(var r=new Array(e.length),a=0;a<e.length;++a)r[a]=t.call(this,e[a]);return r}var n=new a.TextureLoader(this.manager);n.setPath(t).setCrossOrigin(this.crossOrigin);var i=r(e.meshes,(function(e){var t,r,n,i=new a.BufferGeometry,o=[],s=e.vertices||[],l=e.normals||[],u=e.texturecoords||[],c=e.colors||[];for(u=u[0]||[],t=0,r=e.faces.length;t<r;t++)n=e.faces[t],o.push(n[0],n[1],n[2]);return i.setIndex(o),i.addAttribute("position",new a.Float32BufferAttribute(s,3)),l.length>0&&i.addAttribute("normal",new a.Float32BufferAttribute(l,3)),u.length>0&&i.addAttribute("uv",new a.Float32BufferAttribute(u,2)),c.length>0&&i.addAttribute("color",new a.Float32BufferAttribute(c,3)),i.computeBoundingSphere(),i})),o=r(e.materials,(function(e){var t=new a.MeshPhongMaterial;for(var r in e.properties){var i=e.properties[r],o=i.key,s=i.value;switch(o){case"$tex.file":var l=i.semantic;if(1===l||2===l||5===l||6===l){var u;switch(l){case 1:u="map";break;case 2:u="specularMap";break;case 5:u="bumpMap";break;case 6:u="normalMap"}var c=n.load(s);c.wrapS=c.wrapT=a.RepeatWrapping,t[u]=c}break;case"?mat.name":t.name=s;break;case"$clr.diffuse":t.color.fromArray(s);break;case"$clr.specular":t.specular.fromArray(s);break;case"$clr.emissive":t.emissive.fromArray(s);break;case"$mat.shininess":t.shininess=s;break;case"$mat.shadingm":t.flatShading=1===s;break;case"$mat.opacity":s<1&&(t.opacity=s,t.transparent=!0)}}return t}));return function e(t,r,n,i){var o,s,l=new a.Object3D;for(l.name=r.name||"",l.matrix=(new a.Matrix4).fromArray(r.transformation).transpose(),l.matrix.decompose(l.position,l.quaternion,l.scale),o=0;r.meshes&&o<r.meshes.length;o++)s=r.meshes[o],l.add(new a.Mesh(n[s],i[t.meshes[s].materialindex]));for(o=0;r.children&&o<r.children.length;o++)l.add(e(t,r.children[o],n,i));return l}(e,e.rootnode,i,o)}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this,o=a.LoaderUtils.extractUrlBase(e),s=new a.FileLoader(this.manager);s.setResponseType("arraybuffer"),s.load(e,(function(e){t(i.parse(e,o))}),r,n)},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){var r=new a.TextureLoader(this.manager);r.setPath(t).setCrossOrigin(this.crossOrigin);var n={KeyFrame:function(e,t){this.time=e,this.matrix=t.clone(),this.position=new a.Vector3,this.quaternion=new a.Quaternion,this.scale=new a.Vector3(1,1,1),this.matrix.decompose(this.position,this.quaternion,this.scale),this.clone=function(){return new n.KeyFrame(this.time,this.matrix)},this.lerp=function(e,t){var r=(t-=this.time)/(e.time-this.time),a=1-r,i=this.position,o=this.quaternion,s=e.position,l=e.quaternion;return n.KeyFrame.tempAniPos.x=i.x*a+s.x*r,n.KeyFrame.tempAniPos.y=i.y*a+s.y*r,n.KeyFrame.tempAniPos.z=i.z*a+s.z*r,n.KeyFrame.tempAniQuat.set(o.x,o.y,o.z,o.w),n.KeyFrame.tempAniQuat.slerp(l,r),n.KeyFrame.tempAniMatrix.compose(n.KeyFrame.tempAniPos,n.KeyFrame.tempAniQuat,n.KeyFrame.tempAniScale)}}};n.KeyFrame.tempAniPos=new a.Vector3,n.KeyFrame.tempAniQuat=new a.Quaternion,n.KeyFrame.tempAniScale=new a.Vector3(1,1,1),n.KeyFrame.tempAniMatrix=new a.Matrix4,n.KeyFrameTrack=function(){this.keys=[],this.target=null,this.time=0,this.length=0,this._accelTable={},this.fps=20,this.addKey=function(e){this.keys.push(e)},this.init=function(){if(this.sortKeys(),this.keys.length>0?this.length=this.keys[this.keys.length-1].time:this.length=0,this.fps)for(var e=0;e<this.length*this.fps;e++)for(var t=0;t<this.keys.length;t++){if(this.keys[t].time==e){this._accelTable[e]=t;break}if(this.keys[t].time<e/this.fps&&this.keys[t+1]&&this.keys[t+1].time>=e/this.fps){this._accelTable[e]=t;break}}},this.parseFromThree=function(e){var t=e.fps;this.target=e.node;for(var r=e.hierarchy[0].keys,a=0;a<r.length;a++)this.addKey(new n.KeyFrame(a/t||r[a].time,r[a].targets[0].data));this.init()},this.parseFromCollada=function(e){for(var t=e.keys,r=this.fps,a=0;a<t.length;a++)this.addKey(new n.KeyFrame(a/r||t[a].time,t[a].matrix));this.init()},this.sortKeys=function(){this.keys.sort(this.keySortFunc)},this.keySortFunc=function(e,t){return e.time-t.time},this.clone=function(){var e=new n.KeyFrameTrack;e.target=this.target,e.time=this.time,e.length=this.length;for(var t=0;t<this.keys.length;t++)e.addKey(this.keys[t].clone());return e.init(),e},this.reTarget=function(e,t){t||(t=n.TrackTargetNodeNameCompare),this.target=t(e,this.target)},this.keySearchAccel=function(e){return e*=this.fps,e=Math.floor(e),this._accelTable[e]||0},this.setTime=function(e){e=Math.abs(e),this.length&&(e=e%this.length+.05);for(var t=null,r=null,a=this.keySearchAccel(e);a<this.keys.length;a++){if(this.keys[a].time==e){t=this.keys[a],r=this.keys[a];break}if(this.keys[a].time<e&&this.keys[a+1]&&this.keys[a+1].time>e){t=this.keys[a],r=this.keys[a+1];break}if(this.keys[a].time<e&&a==this.keys.length-1){t=this.keys[a],(r=this.keys[0].clone()).time+=this.length+.05;break}}return t&&r&&t!==r?(this.target.matrixAutoUpdate=!1,this.target.matrix.copy(t.lerp(r,e)),void(this.target.matrixWorldNeedsUpdate=!0)):t&&r&&t==r?(this.target.matrixAutoUpdate=!1,this.target.matrix.copy(t.matrix),void(this.target.matrixWorldNeedsUpdate=!0)):void 0}},n.TrackTargetNodeNameCompare=function(e,t){return function e(t,r){if(t.name==r)return t;for(var a=0;a<t.children.length;a++){var n=e(t.children[a],r);if(n)return n}return null}(e,t.name)},n.Animation=function(){this.tracks=[],this.length=0,this.addTrack=function(e){this.tracks.push(e),this.length=Math.max(e.length,this.length)},this.setTime=function(e){this.time=e;for(var t=0;t<this.tracks.length;t++)this.tracks[t].setTime(e)},this.clone=function(e,t){t||(t=n.TrackTargetNodeNameCompare);var r=new n.Animation;r.target=e;for(var a=0;a<this.tracks.length;a++){var i=this.tracks[a].clone();i.reTarget(e,t),r.addTrack(i)}return r}};var i=4660,o=4661,s=4662,l=4663,u=4664,c=4665,d=4666,f=4667,h=4668,p=4669,m=4670,v=1,g=2,y=4,x=256,b=65536,w=1,A=4,M=1,T=3,S=1,E=6,_=8,F=10,P=4;function L(e){return x<<e}function C(e){return b<<e}function O(e,t){var r=new a.Bone;for(var n in r.matrix.copy(e.matrix),r.matrixWorld.copy(e.matrixWorld),r.position.copy(e.position),r.quaternion.copy(e.quaternion),r.scale.copy(e.scale),t.nodeCount++,r.name="bone_"+e.name+t.nodeCount.toString(),t.nodeToBoneMap[e.name]||(t.nodeToBoneMap[e.name]=[]),t.nodeToBoneMap[e.name].push(r),e.children){var i=O(e.children[n],t);i&&r.add(i)}return r}function N(e,t){for(var r=[],a=0;a<e.length;a++)r.push({i:e[a],w:t[a]});for(r.sort((function(e,t){return t.w-e.w}));r.length<4;)r.push({i:0,w:0});r.length>4&&(r.length=4);var n=0;for(a=0;a<4;a++)n+=r[a].w*r[a].w;n=Math.sqrt(n);for(a=0;a<4;a++)r[a].w=r[a].w/n,e[a]=r[a].i,t[a]=r[a].w}function R(e,t){if(0==e.name.indexOf("bone_"+t))return e;for(var r in e.children){var a=R(e.children[r],t);if(a)return a}}function I(){this.mPrimitiveTypes=0,this.mNumVertices=0,this.mNumFaces=0,this.mNumBones=0,this.mMaterialIndex=0,this.mVertices=[],this.mNormals=[],this.mTangents=[],this.mBitangents=[],this.mColors=[[]],this.mTextureCoords=[[]],this.mFaces=[],this.mBones=[],this.hookupSkeletons=function(e,t){if(0!=this.mBones.length){for(var r=[],n=[],i=e.findNode(this.mBones[0].mName);i.mParent&&i.mParent.isBone;)i=i.mParent;var o=O(u=i.toTHREE(e),e);this.threeNode.add(o);for(var s=0;s<this.mBones.length;s++){if(c=R(o,this.mBones[s].mName)){var l=c;r.push(l),n.push(this.mBones[s].mOffsetMatrix.toTHREE())}else{if(!(i=e.findNode(this.mBones[s].mName)))return;var u;(u=i.toTHREE(e)).parent,o=O(u,e);this.threeNode.add(o);var c;l=c=R(o,this.mBones[s].mName);r.push(l),n.push(this.mBones[s].mOffsetMatrix.toTHREE())}}var d=new a.Skeleton(r,n);this.threeNode.bind(d,new a.Matrix4),this.threeNode.material.skinning=!0}},this.toTHREE=function(e){if(this.threeNode)return this.threeNode;var t,r,n=new a.BufferGeometry;if(t=e.mMaterials[this.mMaterialIndex]?e.mMaterials[this.mMaterialIndex].toTHREE(e):new a.MeshLambertMaterial,n.setIndex(new a.BufferAttribute(new Uint32Array(this.mIndexArray),1)),n.addAttribute("position",new a.BufferAttribute(this.mVertexBuffer,3)),this.mNormalBuffer&&this.mNormalBuffer.length>0&&n.addAttribute("normal",new a.BufferAttribute(this.mNormalBuffer,3)),this.mColorBuffer&&this.mColorBuffer.length>0&&n.addAttribute("color",new a.BufferAttribute(this.mColorBuffer,4)),this.mTexCoordsBuffers[0]&&this.mTexCoordsBuffers[0].length>0&&n.addAttribute("uv",new a.BufferAttribute(new Float32Array(this.mTexCoordsBuffers[0]),2)),this.mTexCoordsBuffers[1]&&this.mTexCoordsBuffers[1].length>0&&n.addAttribute("uv1",new a.BufferAttribute(new Float32Array(this.mTexCoordsBuffers[1]),2)),this.mTangentBuffer&&this.mTangentBuffer.length>0&&n.addAttribute("tangents",new a.BufferAttribute(this.mTangentBuffer,3)),this.mBitangentBuffer&&this.mBitangentBuffer.length>0&&n.addAttribute("bitangents",new a.BufferAttribute(this.mBitangentBuffer,3)),this.mBones.length>0){for(var i=[],o=[],s=0;s<this.mBones.length;s++)for(var l=0;l<this.mBones[s].mWeights.length;l++){var u=this.mBones[s].mWeights[l];u&&(i[u.mVertexId]||(i[u.mVertexId]=[]),o[u.mVertexId]||(o[u.mVertexId]=[]),i[u.mVertexId].push(u.mWeight),o[u.mVertexId].push(parseInt(s)))}for(var s in o)N(o[s],i[s]);var c=[],d=[];for(s=0;s<i.length;s++)for(l=0;l<4;l++)i[s]&&o[s]?(c.push(i[s][l]),d.push(o[s][l])):(c.push(0),d.push(0));n.addAttribute("skinWeight",new a.BufferAttribute(new Float32Array(c),P)),n.addAttribute("skinIndex",new a.BufferAttribute(new Float32Array(d),P))}return 0==this.mBones.length&&(r=new a.Mesh(n,t)),this.mBones.length>0&&(r=new a.SkinnedMesh(n,t)),this.threeNode=r,r}}function D(){this.mNumIndices=0,this.mIndices=[]}function U(){this.x=0,this.y=0,this.z=0,this.toTHREE=function(){return new a.Vector3(this.x,this.y,this.z)}}function k(){this.r=0,this.g=0,this.b=0,this.a=0,this.toTHREE=function(){return new a.Color(this.r,this.g,this.b,1)}}function B(){this.x=0,this.y=0,this.z=0,this.w=0,this.toTHREE=function(){return new a.Quaternion(this.x,this.y,this.z,this.w)}}function j(){this.mVertexId=0,this.mWeight=0}function V(){this.data=[],this.toString=function(){var e="";return this.data.forEach((function(t){e+=String.fromCharCode(t)})),e.replace(/[^\x20-\x7E]+/g,"")}}function G(){this.mTime=0,this.mValue=null}function z(){this.mTime=0,this.mValue=null}function X(){this.mName="",this.mTransformation=[],this.mNumChildren=0,this.mNumMeshes=0,this.mMeshes=[],this.mChildren=[],this.toTHREE=function(e){if(this.threeNode)return this.threeNode;var t=new a.Object3D;t.name=this.mName,t.matrix=this.mTransformation.toTHREE();for(var r=0;r<this.mChildren.length;r++)t.add(this.mChildren[r].toTHREE(e));for(r=0;r<this.mMeshes.length;r++)t.add(e.mMeshes[this.mMeshes[r]].toTHREE(e));return this.threeNode=t,t.matrix.decompose(t.position,t.quaternion,t.scale),t}}function H(){this.mName="",this.mNumWeights=0,this.mOffsetMatrix=0}function Y(){this.mKey="",this.mSemantic=0,this.mIndex=0,this.mData=[],this.mDataLength=0,this.mType=0,this.dataAsColor=function(){var e=new Uint8Array(this.mData).buffer,t=new DataView(e),r=t.getFloat32(0,!0),n=t.getFloat32(4,!0),i=t.getFloat32(8,!0);return new a.Color(r,n,i)},this.dataAsFloat=function(){var e=new Uint8Array(this.mData).buffer;return new DataView(e).getFloat32(0,!0)},this.dataAsBool=function(){var e=new Uint8Array(this.mData).buffer;return!!new DataView(e).getFloat32(0,!0)},this.dataAsString=function(){var e=new V;return e.data=this.mData,e.toString()},this.dataAsMap=function(){var e=new V;e.data=this.mData;var t=e.toString();return-1!=(t=t.replace(/\\/g,"/")).indexOf("/")&&(t=t.substr(t.lastIndexOf("/")+1)),r.load(t)}}var W={"?mat.name":"name","$mat.shadingm":"shading","$mat.twosided":"twoSided","$mat.wireframe":"wireframe","$clr.ambient":"ambient","$clr.diffuse":"color","$clr.specular":"specular","$clr.emissive":"emissive","$clr.transparent":"transparent","$clr.reflective":"reflect","$mat.shininess":"shininess","$mat.reflectivity":"reflectivity","$mat.refracti":"refraction","$tex.file":"map"},Q={"?mat.name":"string","$mat.shadingm":"bool","$mat.twosided":"bool","$mat.wireframe":"bool","$clr.ambient":"color","$clr.diffuse":"color","$clr.specular":"color","$clr.emissive":"color","$clr.transparent":"color","$clr.reflective":"color","$mat.shininess":"float","$mat.reflectivity":"float","$mat.refracti":"float","$tex.file":"map"};function q(){this.mNumAllocated=0,this.mNumProperties=0,this.mProperties=[],this.toTHREE=function(e){this.mProperties[0].dataAsString();for(var t=new a.MeshPhongMaterial,r=0;r<this.mProperties.length;r++)if("float"==Q[this.mProperties[r].mKey]&&(t[W[this.mProperties[r].mKey]]=this.mProperties[r].dataAsFloat()),"color"==Q[this.mProperties[r].mKey]&&(t[W[this.mProperties[r].mKey]]=this.mProperties[r].dataAsColor()),"bool"==Q[this.mProperties[r].mKey]&&(t[W[this.mProperties[r].mKey]]=this.mProperties[r].dataAsBool()),"string"==Q[this.mProperties[r].mKey]&&(t[W[this.mProperties[r].mKey]]=this.mProperties[r].dataAsString()),"map"==Q[this.mProperties[r].mKey]){var n=this.mProperties[r];n.mSemantic==S&&(t.map=this.mProperties[r].dataAsMap()),n.mSemantic==E&&(t.normalMap=this.mProperties[r].dataAsMap()),n.mSemantic==F&&(t.lightMap=this.mProperties[r].dataAsMap()),n.mSemantic==_&&(t.alphaMap=this.mProperties[r].dataAsMap())}return t.ambient.r=.53,t.ambient.g=.53,t.ambient.b=.53,t.color.r=1,t.color.g=1,t.color.b=1,t}}function K(e,t,r){var n=new a.Vector3,i=1-r;return n.x=e.x*r+t.x*i,n.y=e.y*r+t.y*i,n.z=e.z*r+t.z*i,n}function Z(e,t,r){return e.clone().slerp(t,1-r)}function J(e,t,r,a){if(1==e.length)return e[0].mValue.toTHREE();for(var n=1/0,i=null,o=null,s=0;s<e.length;s++){var l=Math.abs(e[s].mTime-t);l<n&&e[s].mTime<=t&&(n=l,i=e[s],o=e[s+1])}if(i){if(o){var u=o.mTime-i.mTime,c=(i.mTime-t)/u;return a(i.mValue.toTHREE(),o.mValue.toTHREE(),c)}(o=e[0].clone()).mTime+=r;u=o.mTime-i.mTime,c=(i.mTime-t)/u;return a(i.mValue.toTHREE(),o.mValue.toTHREE(),c)}return null}function $(){this.mNodeName="",this.mNumPositionKeys=0,this.mNumRotationKeys=0,this.mNumScalingKeys=0,this.mPositionKeys=[],this.mRotationKeys=[],this.mScalingKeys=[],this.mPreState="",this.mPostState="",this.init=function(e){function t(t){t.mTime/=e}e||(e=1),this.mPositionKeys.forEach(t),this.mRotationKeys.forEach(t),this.mScalingKeys.forEach(t)},this.sortKeys=function(){function e(e,t){return e.mTime-t.mTime}this.mPositionKeys.sort(e),this.mRotationKeys.sort(e),this.mScalingKeys.sort(e)},this.getLength=function(){return Math.max(Math.max.apply(null,this.mPositionKeys.map((function(e){return e.mTime}))),Math.max.apply(null,this.mRotationKeys.map((function(e){return e.mTime}))),Math.max.apply(null,this.mScalingKeys.map((function(e){return e.mTime}))))},this.toTHREE=function(e,t){this.sortKeys();for(var r=this.getLength(),i=new n.KeyFrameTrack,o=0;o<r;o+=.05){var s=new a.Matrix4,l=o,u=J(this.mPositionKeys,l,r,K),c=J(this.mScalingKeys,l,r,K),d=J(this.mRotationKeys,l,r,Z);s.compose(u,d,c);var f=new n.KeyFrame(l,s);i.addKey(f)}i.target=e.findNode(this.mNodeName).toTHREE();var h=[i];if(e.nodeToBoneMap[this.mNodeName])for(o=0;o<e.nodeToBoneMap[this.mNodeName].length;o++){var p=i.clone();p.target=e.nodeToBoneMap[this.mNodeName][o],h.push(p)}return h}}function ee(){this.mName="",this.mDuration=0,this.mTicksPerSecond=0,this.mNumChannels=0,this.mChannels=[],this.toTHREE=function(e){var t=new n.Animation;for(var r in this.mChannels){this.mChannels[r].init(this.mTicksPerSecond);var a=this.mChannels[r].toTHREE(e);for(var i in a)a[i].init(),t.addTrack(a[i])}return t.length=Math.max.apply(null,t.tracks.map((function(e){return e.length}))),t}}function te(){this.mWidth=0,this.mHeight=0,this.texAchFormatHint=[],this.pcData=[]}function re(){this.mName="",this.mType=0,this.mAttenuationConstant=0,this.mAttenuationLinear=0,this.mAttenuationQuadratic=0,this.mAngleInnerCone=0,this.mAngleOuterCone=0,this.mColorDiffuse=null,this.mColorSpecular=null,this.mColorAmbient=null}function ae(){this.mName="",this.mPosition=null,this.mLookAt=null,this.mUp=null,this.mHorizontalFOV=0,this.mClipPlaneNear=0,this.mClipPlaneFar=0,this.mAspect=0}function ne(){this.mFlags=0,this.mNumMeshes=0,this.mNumMaterials=0,this.mNumAnimations=0,this.mNumTextures=0,this.mNumLights=0,this.mNumCameras=0,this.mRootNode=null,this.mMeshes=[],this.mMaterials=[],this.mAnimations=[],this.mLights=[],this.mCameras=[],this.nodeToBoneMap={},this.findNode=function(e,t){if(t||(t=this.mRootNode),t.mName==e)return t;for(var r=0;r<t.mChildren.length;r++){var a=this.findNode(e,t.mChildren[r]);if(a)return a}return null},this.toTHREE=function(){this.nodeCount=0,function(e){for(var t in e.mMeshes){var r=e.mMeshes[t];for(var a in r.mBones){var n=e.findNode(r.mBones[a].mName);n&&(n.isBone=!0)}}}(this);var e=this.mRootNode.toTHREE(this);for(var t in this.mMeshes)this.mMeshes[t].hookupSkeletons(this,e);if(this.mAnimations.length>0)var r=this.mAnimations[0].toTHREE(this);return{object:e,animation:r}}}function ie(){this.elements=[[],[],[],[]],this.toTHREE=function(){for(var e=new a.Matrix4,t=0;t<4;++t)for(var r=0;r<4;++r)e.elements[4*t+r]=this.elements[r][t];return e}}var oe=!0;function se(e){var t=e.getFloat32(e.readOffset,oe);return e.readOffset+=4,t}function le(e){var t=e.getFloat64(e.readOffset,oe);return e.readOffset+=8,t}function ue(e){var t=e.getUint16(e.readOffset,oe);return e.readOffset+=2,t}function ce(e){var t=e.getUint32(e.readOffset,oe);return e.readOffset+=4,t}function de(e){var t=e.getUint32(e.readOffset,oe);return e.readOffset+=4,t}function fe(e){var t=new U;return t.x=se(e),t.y=se(e),t.z=se(e),t}function he(e){var t=new k;return t.r=se(e),t.g=se(e),t.b=se(e),t}function pe(e){var t=new V,r=ce(e);return e.ReadBytes(t.data,1,r),t.toString()}function me(e){var t=new j;return t.mVertexId=ce(e),t.mWeight=se(e),t}function ve(e){for(var t=new ie,r=0;r<4;++r)for(var a=0;a<4;++a)t.elements[r][a]=se(e);return t}function ge(e){var t=new G;return t.mTime=le(e),t.mValue=fe(e),t}function ye(e){var t=new z;return t.mTime=le(e),t.mValue=function(e){var t=new B;return t.w=se(e),t.x=se(e),t.y=se(e),t.z=se(e),t}(e),t}function xe(e,t,r){for(var a=0;a<r;a++)t[a]=ge(e)}function be(e,t,r){return e.Seek(sizeof(t)*r,Re)}function we(e){if(!e)throw"asset failed"}function Ae(e,t){return we(de(e)==d),de(e),t.mName=pe(e),t.mNumWeights=ce(e),t.mOffsetMatrix=ve(e),Oe?be(e,t.mWeights,t.mNumWeights):(t.mWeights=[],function(e,t,r){for(var a=0;a<r;a++)t[a]=me(e)}(e,t.mWeights,t.mNumWeights)),t}function Me(e,t){we(de(e)==l),de(e),t.mPrimitiveTypes=ce(e),t.mNumVertices=ce(e),t.mNumFaces=ce(e),t.mNumBones=ce(e),t.mMaterialIndex=ce(e),t.mNumUVComponents=[];var r=ce(e);r&v&&(Oe?be(e,t.mVertices,t.mNumVertices):(t.mVertices=[],t.mVertexBuffer=e.subArray32(e.readOffset,e.readOffset+3*t.mNumVertices*4),e.Seek(3*t.mNumVertices*4,Re))),r&g&&(Oe?be(e,t.mNormals,t.mNumVertices):(t.mNormals=[],t.mNormalBuffer=e.subArray32(e.readOffset,e.readOffset+3*t.mNumVertices*4),e.Seek(3*t.mNumVertices*4,Re))),r&y&&(Oe?(be(e,t.mTangents,t.mNumVertices),be(e,t.mBitangents,t.mNumVertices)):(t.mTangents=[],t.mTangentBuffer=e.subArray32(e.readOffset,e.readOffset+3*t.mNumVertices*4),e.Seek(3*t.mNumVertices*4,Re),t.mBitangents=[],t.mBitangentBuffer=e.subArray32(e.readOffset,e.readOffset+3*t.mNumVertices*4),e.Seek(3*t.mNumVertices*4,Re)));for(var a=0;a<w&&r&C(a);++a)Oe?be(e,t.mColors[a],t.mNumVertices):(t.mColors[a]=[],t.mColorBuffer=e.subArray32(e.readOffset,e.readOffset+4*t.mNumVertices*4),e.Seek(4*t.mNumVertices*4,Re));t.mTexCoordsBuffers=[];for(a=0;a<A&&r&L(a);++a)if(t.mNumUVComponents[a]=ce(e),Oe)be(e,t.mTextureCoords[a],t.mNumVertices);else{t.mTextureCoords[a]=[],t.mTexCoordsBuffers[a]=[];for(var n=0;n<t.mNumVertices;n++)t.mTexCoordsBuffers[a].push(se(e)),t.mTexCoordsBuffers[a].push(se(e)),se(e)}if(Oe)ce(e);else{t.mFaces=[];t.mIndexArray=[];for(var i=0;i<t.mNumFaces;++i){var o=t.mFaces[i]=new D;o.mNumIndices=ue(e),o.mIndices=[];for(var s=0;s<o.mNumIndices;++s)t.mNumVertices<65536?o.mIndices[s]=ue(e):o.mIndices[s]=ce(e);if(3===o.mNumIndices)t.mIndexArray.push(o.mIndices[0]),t.mIndexArray.push(o.mIndices[1]),t.mIndexArray.push(o.mIndices[2]);else{if(4!==o.mNumIndices)throw new Error("Sorry, can't currently triangulate polys. Use the triangulate preprocessor in Assimp.");t.mIndexArray.push(o.mIndices[0]),t.mIndexArray.push(o.mIndices[1]),t.mIndexArray.push(o.mIndices[2]),t.mIndexArray.push(o.mIndices[2]),t.mIndexArray.push(o.mIndices[3]),t.mIndexArray.push(o.mIndices[0])}}}if(t.mNumBones){t.mBones=[];for(s=0;s<t.mNumBones;++s)t.mBones[s]=new H,Ae(e,t.mBones[s])}}function Te(e,t){we(de(e)==m),de(e),t.mKey=pe(e),t.mSemantic=ce(e),t.mIndex=ce(e),t.mDataLength=ce(e),t.mType=ce(e),t.mData=[],e.ReadBytes(t.mData,1,t.mDataLength)}function Se(e,t){if(we(de(e)==p),de(e),t.mNumAllocated=t.mNumProperties=ce(e),t.mNumProperties){t.mProperties&&delete t.mProperties,t.mProperties=[];for(var r=0;r<t.mNumProperties;++r)t.mProperties[r]=new Y,Te(e,t.mProperties[r])}}function Ee(e,t){we(de(e)==u),de(e),t.mNodeName=pe(e),t.mNumPositionKeys=ce(e),t.mNumRotationKeys=ce(e),t.mNumScalingKeys=ce(e),t.mPreState=ce(e),t.mPostState=ce(e),t.mNumPositionKeys&&(Oe?be(e,t.mPositionKeys,t.mNumPositionKeys):(t.mPositionKeys=[],xe(e,t.mPositionKeys,t.mNumPositionKeys))),t.mNumRotationKeys&&(Oe?be(e,t.mRotationKeys,t.mNumRotationKeys):(t.mRotationKeys=[],function(e,t,r){for(var a=0;a<r;a++)t[a]=ye(e)}(e,t.mRotationKeys,t.mNumRotationKeys))),t.mNumScalingKeys&&(Oe?be(e,t.mScalingKeys,t.mNumScalingKeys):(t.mScalingKeys=[],xe(e,t.mScalingKeys,t.mNumScalingKeys)))}function _e(e,t){if(we(de(e)==f),de(e),t.mName=pe(e),t.mDuration=le(e),t.mTicksPerSecond=le(e),t.mNumChannels=ce(e),t.mNumChannels){t.mChannels=[];for(var r=0;r<t.mNumChannels;++r)t.mChannels[r]=new $,Ee(e,t.mChannels[r])}}function Fe(e,t){we(de(e)==s),de(e),t.mWidth=ce(e),t.mHeight=ce(e),e.ReadBytes(t.achFormatHint,1,4),Oe||(t.mHeight?(t.pcData=[],e.ReadBytes(t.pcData,1,t.mWidth*t.mHeight*4)):(t.pcData=[],e.ReadBytes(t.pcData,1,t.mWidth)))}function Pe(e,t){we(de(e)==o),de(e),t.mName=pe(e),t.mType=ce(e),t.mType!=M&&(t.mAttenuationConstant=se(e),t.mAttenuationLinear=se(e),t.mAttenuationQuadratic=se(e)),t.mColorDiffuse=he(e),t.mColorSpecular=he(e),t.mColorAmbient=he(e),t.mType==T&&(t.mAngleInnerCone=se(e),t.mAngleOuterCone=se(e))}function Le(e,t){we(de(e)==i),de(e),t.mName=pe(e),t.mPosition=fe(e),t.mLookAt=fe(e),t.mUp=fe(e),t.mHorizontalFOV=se(e),t.mClipPlaneNear=se(e),t.mClipPlaneFar=se(e),t.mAspect=se(e)}function Ce(e,t){if(we(de(e)==c),de(e),t.mFlags=ce(e),t.mNumMeshes=ce(e),t.mNumMaterials=ce(e),t.mNumAnimations=ce(e),t.mNumTextures=ce(e),t.mNumLights=ce(e),t.mNumCameras=ce(e),t.mRootNode=new X,t.mRootNode=function e(t,r,a){we(de(t)==h),de(t);var n=new X;if(n.mParent=r,n.mDepth=a,n.mName=pe(t),n.mTransformation=ve(t),n.mNumChildren=ce(t),n.mNumMeshes=ce(t),n.mNumMeshes){n.mMeshes=[];for(var i=0;i<n.mNumMeshes;++i)n.mMeshes[i]=ce(t)}if(n.mNumChildren){n.mChildren=[];for(i=0;i<n.mNumChildren;++i){var o=e(t,n,a++);n.mChildren[i]=o}}return n}(e,null,0),t.mNumMeshes){t.mMeshes=[];for(var r=0;r<t.mNumMeshes;++r)t.mMeshes[r]=new I,Me(e,t.mMeshes[r])}if(t.mNumMaterials){t.mMaterials=[];for(r=0;r<t.mNumMaterials;++r)t.mMaterials[r]=new q,Se(e,t.mMaterials[r])}if(t.mNumAnimations){t.mAnimations=[];for(r=0;r<t.mNumAnimations;++r)t.mAnimations[r]=new ee,_e(e,t.mAnimations[r])}if(t.mNumTextures){t.mTextures=[];for(r=0;r<t.mNumTextures;++r)t.mTextures[r]=new te,Fe(e,t.mTextures[r])}if(t.mNumLights){t.mLights=[];for(r=0;r<t.mNumLights;++r)t.mLights[r]=new re,Pe(e,t.mLights[r])}if(t.mNumCameras){t.mCameras=[];for(r=0;r<t.mNumCameras;++r)t.mCameras[r]=new ae,Le(e,t.mCameras[r])}}var Oe,Ne,Re=0,Ie=1;return function(e){var t=new ne,r=new DataView(e);if(function(e){e.readOffset=0,e.Seek=function(t,r){r==Re&&(e.readOffset+=t),r==Ie&&(e.readOffset=t)},e.ReadBytes=function(e,t,r){for(var a,n,i=t*r,o=0;o<i;o++)e[o]=(n=void 0,n=(a=this).getUint8(a.readOffset),a.readOffset+=1,n)},e.subArray32=function(e,t){var r=this.buffer.slice(e,t);return new Float32Array(r)},e.subArrayUint16=function(e,t){var r=this.buffer.slice(e,t);return new Uint16Array(r)},e.subArrayUint8=function(e,t){var r=this.buffer.slice(e,t);return new Uint8Array(r)},e.subArrayUint32=function(e,t){var r=this.buffer.slice(e,t);return new Uint32Array(r)}}(r),r.Seek(44,Re),ce(r),ce(r),ce(r),ce(r),Oe=ue(r)>0,Ne=ue(r)>0,Oe)throw"Shortened binaries are not supported!";if(r.Seek(256,Re),r.Seek(128,Re),r.Seek(64,Re),!Ne)return Ce(r,t),t.toTHREE();var a=de(r),n=r.FileSize()-r.Tell(),i=[];r.Read(i,1,n);var o=[];uncompress(o,a,i,n),Ce(new ArrayBuffer(o),t)}(e)}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(){function e(){this.id=0,this.data=null}function t(){}t.prototype={set:function(e,t){this[e]=t},get:function(e,t){return this.hasOwnProperty(e)?this[e]:t}};var r=function(t){this.manager=void 0!==t?t:a.DefaultLoadingManager,this.trunk=new a.Object3D,this.materialFactory=void 0,this._url="",this._baseDir="",this._data=void 0,this._ptr=0,this._version=[],this._streaming=!1,this._optimized_for_accuracy=!1,this._compression=0,this._bodylen=4294967295,this._blocks=[new e],this._accuracyMatrix=!1,this._accuracyGeo=!1,this._accuracyProps=!1};return r.prototype={constructor:r,load:function(e,t,r,n){var i=this;this._url=e,this._baseDir=e.substr(0,e.lastIndexOf("/")+1);var o=new a.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){var t=e.byteLength;for(this._ptr=0,this._data=new DataView(e),this._parseHeader(),0!=this._compression&&console.error("compressed AWD not supported"),this._streaming||this._bodylen==e.byteLength-this._ptr||console.error("AWDLoader: body len does not match file length",this._bodylen,t-this._ptr);this._ptr<t;)this.parseNextBlock();return this.trunk},parseNextBlock:function(){var t,r,a=this.readU32(),n=(this.readU8(),this.readU8()),i=(this.readU8(),this.readU32());switch(n){case 1:t=this.parseMeshData(i);break;case 22:t=this.parseContainer(i);break;case 23:t=this.parseMeshInstance(i);break;case 81:t=this.parseMaterial(i);break;case 82:t=this.parseTexture(i);break;case 101:t=this.parseSkeleton(i);break;case 112:t=this.parseMeshPoseAnimation(i,!1);break;case 113:t=this.parseVertexAnimationSet(i);break;case 102:t=this.parseSkeletonPose(i);break;case 103:t=this.parseSkeletonAnimation(i);break;case 122:t=this.parseAnimatorSet(i);break;default:this._ptr+=i}this._blocks[a]=r=new e,r.data=t,r.id=a},_parseHeader:function(){var e=this._version;if(4282180!=(this.readU8()<<16|this.readU8()<<8|this.readU8()))throw new Error("AWDLoader - bad magic");e[0]=this.readU8(),e[1]=this.readU8();var t=this.readU16();this._streaming=1==(1&t),2===e[0]&&1===e[1]&&(this._accuracyMatrix=2==(2&t),this._accuracyGeo=4==(4&t),this._accuracyProps=8==(8&t)),this._geoNrType=this._accuracyGeo?8:7,this._matrixNrType=this._accuracyMatrix?8:7,this._propsNrType=this._accuracyProps?8:7,this._optimized_for_accuracy=2==(2&t),this._compression=this.readU8(),this._bodylen=this.readU32()},parseContainer:function(e){var t=new a.Object3D,r=this.readU32(),n=this.parseMatrix4();return t.name=this.readUTF(),t.applyMatrix(n),(this._blocks[r].data||this.trunk).add(t),this.parseProperties({1:this._matrixNrType,2:this._matrixNrType,3:this._matrixNrType,4:4}),t.extra=this.parseUserAttributes(),t},parseMeshInstance:function(e){var t,r,n,i,o,s,l,u,c,d,f,h,p;for(s=this.readU32(),u=this.parseMatrix4(),t=this.readUTF(),l=this.readU32(),h=this.readU16(),n=this.getBlock(l),c=[],p=0;p<h;p++)f=this.readU32(),d=this.getBlock(f),c.push(d);if(o=[],(i=n.length)>1)for(r=new a.Object3D,p=0;p<i;p++){var m=new a.Mesh(n[p]);o.push(m),r.add(m)}else r=new a.Mesh(n[0]),o.push(r);r.applyMatrix(u),r.name=t,(this.getBlock(s)||this.trunk).add(r);var v=c.length,g=Math.max(i,v);for(p=0;p<g;p++)o[p%i].material=c[p%v];return this.parseProperties(null),r.extra=this.parseUserAttributes(),r},parseMaterial:function(e){var t,r,n,i,o,s;for(t=this.readUTF(),r=this.readU8(),s=this.readU8(),n=this.parseProperties({1:3,2:23,11:21,12:7,13:21}),0;0<s;){this.readU16();this.parseProperties(null),this.parseUserAttributes()}if(o=this.parseUserAttributes(),void 0!==this.materialFactory&&(i=this.materialFactory(t)))return i;if(i=new a.MeshPhongMaterial,1===r)i.color.setHex(n.get(1,13421772));else if(2===r){var l=n.get(2,0);i.map=this.getBlock(l)}return i.extra=o,i.alphaThreshold=n.get(12,0),i.repeat=n.get(13,!1),i},parseTexture:function(e){var t,r;this.readUTF();if(0===this.readU8()){r=this.readU32();var a=this.readUTFBytes(r);console.log(a),t=this.loadTexture(a)}return this.parseProperties(null),this.parseUserAttributes(),t},loadTexture:function(e){var t=new a.Texture;return new a.ImageLoader(this.manager).load(this._baseDir+e,(function(e){t.image=e,t.needsUpdate=!0})),t},parseSkeleton:function(e){this.readUTF();var t=this.readU16(),r=[],n=0;for(this.parseProperties(null);n<t;){var i,o;this.readU16(),(i=new a.Bone).parent=this.readU16()-1,i.name=this.readUTF(),o=this.parseMatrix4(),i.skinMatrix=o,this.parseProperties(null),this.parseUserAttributes(),r.push(i),n++}return this.parseUserAttributes(),r},parseSkeletonPose:function(e){this.readUTF();var t=this.readU16();this.parseProperties(null);for(var r=[],n=0;n<t;){var i;i=1===this.readU8()?this.parseMatrix4():new a.Matrix4,r[n]=i,n++}return this.parseUserAttributes(),r},parseSkeletonAnimation:function(e){this.readUTF();var t,r,a,n=[],i=this.readU16();this.parseProperties(null);for(var o=0;o<i;)r=this.readU32(),t=this.readU16(),a=this._blocks[r].data,n.push({pose:a,duration:t}),o++;if(0!==n.length)return this.parseUserAttributes(),n},parseVertexAnimationSet:function(e){this.readUTF();for(var t,r=this.readU16(),a=(this.parseProperties({1:5}),0),n=[];a<r;)t=this.readU32(),n.push(this._blocks[t].data),a++;return this.parseUserAttributes(),n},parseAnimatorSet:function(e){this.readUTF();var t,r,a=this.readU16(),n=this.parseProperties({1:23});t=this.readU32();for(var i=this.readU16(),o=[],s=0;s<i;s++)o.push(this.readU32());this.readU16(),Boolean(this.readU8());this.parseUserAttributes(),this.parseUserAttributes();var l,u=[];for(s=0;s<o.length;s++)u.push(this._blocks[o[s]].data);for(r=this._blocks[t].data,1==a&&(l={animationSet:r,skeleton:this._blocks[n.get(1,0)].data}),s=0;s<u.length;s++)u[s].animator=l;return l},parseMeshData:function(e){var t,r,n=this.readUTF(),i=this.readU16(),o=0,s=[];for(this.parseProperties({1:this._geoNrType,2:this._geoNrType});o<i;){var l,u,c;for((t=new a.BufferGeometry).name=n,s.push(t),l=this.readU32(),u=this._ptr+l,this.parseProperties({1:this._geoNrType,2:this._geoNrType});this._ptr<u;){var d=0,f=this.readU8(),h=(this.readU8(),this.readU32()),p=h+this._ptr;if(1===f)for(r=new Float32Array(h/12*3),c=new a.BufferAttribute(r,3),t.addAttribute("position",c),d=0;this._ptr<p;)r[d]=-this.readF32(),r[d+1]=this.readF32(),r[d+2]=this.readF32(),d+=3;else if(2===f)for(r=new Uint16Array(h/2),c=new a.BufferAttribute(r,1),t.setIndex(c),d=0;this._ptr<p;)r[d+1]=this.readU16(),r[d]=this.readU16(),r[d+2]=this.readU16(),d+=3;else if(3===f)for(r=new Float32Array(h/8*2),c=new a.BufferAttribute(r,2),t.addAttribute("uv",c),d=0;this._ptr<p;)r[d]=this.readF32(),r[d+1]=1-this.readF32(),d+=2;else if(4===f)for(r=new Float32Array(h/12*3),c=new a.BufferAttribute(r,3),t.addAttribute("normal",c),d=0;this._ptr<p;)r[d]=-this.readF32(),r[d+1]=this.readF32(),r[d+2]=this.readF32(),d+=3;else this._ptr=p}this.parseUserAttributes(),t.computeBoundingSphere(),o++}return this.parseUserAttributes(),s},parseMeshPoseAnimation:function(e,t){var r,a,n,i,o,s,l,u,c,d=1,f=0,h={},p=[],m=(this.readUTF(),this.readU32()),v=this.getBlock(m);if(null!==v){for((s=v.geometry).morphTargets=[],t||(d=this.readU16()),r=this.readU16(),l=this.readU16(),u=0;u<l;)p.push(this.readU16()),u++;for(c=this.parseProperties({1:21,2:21}),h.looping=c.get(1,!0),h.stitchFinalFrame=c.get(2,!1),a=0;a<d;){for(this.readU16(),n=0;n<r;)for(u=0,i=this.readU32(),o=this._ptr+i;u<l;){if(1===p[u]){var g=new Float32Array(i/4);for(s.morphTargets.push({array:g}),f=0;this._ptr<o;)g[f]=this.readF32(),g[f+1]=this.readF32(),g[f+2]=this.readF32(),f+=3;n++}else this._ptr=o;u++}a++}return this.parseUserAttributes(),null}console.log("parseMeshPoseAnimation target mesh not found at:",m)},getBlock:function(e){return this._blocks[e].data},parseMatrix4:function(){var e=new a.Matrix4,t=e.elements;return t[0]=this.readF32(),t[1]=this.readF32(),t[2]=this.readF32(),t[3]=0,t[4]=this.readF32(),t[5]=this.readF32(),t[6]=this.readF32(),t[7]=0,t[8]=this.readF32(),t[9]=this.readF32(),t[10]=this.readF32(),t[11]=0,t[12]=-this.readF32(),t[13]=this.readF32(),t[14]=this.readF32(),t[15]=1,e},parseProperties:function(e){var r=this.readU32(),a=this._ptr+r,n=new t;if(e)for(;this._ptr<a;){var i,o=this.readU16(),s=this.readU32();e.hasOwnProperty(o)?(i=e[o],n.set(o,this.parseAttrValue(i,s))):this._ptr+=s}return n},parseUserAttributes:function(){return this._ptr=this.readU32()+this._ptr,null},parseAttrValue:function(e,t){var r,a;switch(e){case 1:r=1,a=this.readI8;break;case 2:r=2,a=this.readI16;break;case 3:r=4,a=this.readI32;break;case 21:case 4:r=1,a=this.readU8;break;case 5:r=2,a=this.readU16;break;case 6:case 23:r=4,a=this.readU32;break;case 7:r=4,a=this.readF32;break;case 8:r=8,a=this.readF64;break;case 41:case 42:case 43:case 44:case 45:case 46:case 47:r=8,a=this.readF64}if(r<t){var n,i,o;for(n=[],i=0,o=t/r;i<o;)n.push(a.call(this)),i++;return n}return a.call(this)},readU8:function(){return this._data.getUint8(this._ptr++)},readI8:function(){return this._data.getInt8(this._ptr++)},readU16:function(){var e=this._data.getUint16(this._ptr,!0);return this._ptr+=2,e},readI16:function(){var e=this._data.getInt16(this._ptr,!0);return this._ptr+=2,e},readU32:function(){var e=this._data.getUint32(this._ptr,!0);return this._ptr+=4,e},readI32:function(){var e=this._data.getInt32(this._ptr,!0);return this._ptr+=4,e},readF32:function(){var e=this._data.getFloat32(this._ptr,!0);return this._ptr+=4,e},readF64:function(){var e=this._data.getFloat64(this._ptr,!0);return this._ptr+=8,e},readUTF:function(){var e=this.readU16();return this.readUTFBytes(e)},readUTFBytes:function(e){for(var t=[],r=0;t.length<e;){var a=this._data.getUint8(this._ptr++,!0);if(a<128)t[r++]=String.fromCharCode(a);else if(a>191&&a<224){var n=this._data.getUint8(this._ptr++,!0);t[r++]=String.fromCharCode((31&a)<<6|63&n)}else{n=this._data.getUint8(this._ptr++,!0);var i=this._data.getUint8(this._ptr++,!0);t[r++]=String.fromCharCode((15&a)<<12|(63&n)<<6|63&i)}}return t.join("")}},r}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(JSON.parse(e)))}),r,n)},parse:function(e){function t(e){var t=new a.BufferGeometry,r=e.indices,n=e.positions,i=e.normals,o=e.uvs;t.setIndex(r);for(var s=2,l=n.length;s<l;s+=3)n[s]=-n[s];if(t.addAttribute("position",new a.Float32BufferAttribute(n,3)),i){for(s=2,l=i.length;s<l;s+=3)i[s]=-i[s];t.addAttribute("normal",new a.Float32BufferAttribute(i,3))}o&&t.addAttribute("uv",new a.Float32BufferAttribute(o,2));var u=e.subMeshes;if(u)for(s=0,l=u.length;s<l;s++){var c=u[s];t.addGroup(c.indexStart,c.indexCount)}return t}return function(e,r){for(var n={},i=new a.Scene,o=e.cameras,s=0,l=o.length;s<l;s++){var u=o[s],c=new a.PerspectiveCamera(u.fov/Math.PI*180,1.33,u.minZ,u.maxZ);c.name=u.name,c.position.fromArray(u.position),u.rotation&&c.rotation.fromArray(u.rotation),n[u.id]=c}var d=e.lights;for(s=0,l=d.length;s<l;s++){var f;switch((u=d[s]).type){case 0:f=new a.PointLight;break;case 1:f=new a.DirectionalLight;break;case 2:f=new a.SpotLight;break;case 3:f=new a.HemisphereLight}f.name=u.name,u.position&&f.position.set(u.position[0],u.position[1],-u.position[2]),f.color.fromArray(u.diffuse),u.groundColor&&f.groundColor.fromArray(u.groundColor),u.intensity&&(f.intensity=u.intensity),n[u.id]=f,i.add(f)}var h=e.meshes;for(s=0,l=h.length;s<l;s++){var p;if((u=h[s]).indices){var m=t(u);p=new a.Mesh(m,r[u.materialId])}else p=new a.Group;p.name=u.name,p.position.set(u.position[0],u.position[1],-u.position[2]),p.rotation.fromArray(u.rotation),u.rotationQuaternion&&p.quaternion.fromArray(u.rotationQuaternion),p.scale.fromArray(u.scaling),u.parentId?n[u.parentId].add(p):i.add(p),n[u.id]=p}return i}(e,function(e){for(var t={},r=0,n=e.materials.length;r<n;r++){var i=e.materials[r],o=new a.MeshPhongMaterial;o.name=i.name,o.color.fromArray(i.diffuse),o.emissive.fromArray(i.emissive),o.specular.fromArray(i.specular),o.shininess=i.specularPower,o.opacity=i.alpha,t[i.id]=o}if(e.multiMaterials)for(r=0,n=e.multiMaterials.length;r<n;r++){i=e.multiMaterials[r];console.warn("THREE.BabylonLoader: Multi materials not yet supported."),t[i.id]=new a.MeshPhongMaterial}return t}(e))}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){"boolean"==typeof e&&(console.warn("THREE.BinaryLoader: showStatus parameter has been removed from constructor."),e=void 0),this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this.texturePath||a.LoaderUtils.extractUrlBase(e),o=this.binaryPath||a.LoaderUtils.extractUrlBase(e),s=this;new a.FileLoader(this.manager).load(e,(function(e){var l=JSON.parse(e),u=o+l.buffers,c=new a.FileLoader(s.manager);c.setResponseType("arraybuffer"),c.load(u,(function(e){s.parse(e,t,i,l.materials)}),r,n)}),r,n)},setBinaryPath:function(e){this.binaryPath=e},setCrossOrigin:function(e){this.crossOrigin=e},setTexturePath:function(e){this.texturePath=e},parse:function(e,t,r,n){var i=function(){var t,r,n,i,o,s,l,u,c,d,f,h,p,m,v,g,y,x,b=this,w=0,A=[],M=[];function T(e){return e%4?4-e%4:0}function S(e,t,r){return a.LoaderUtils.decodeText(new Uint8Array(e,t,r))}function E(e,t){return new Uint8Array(e,t,1)[0]}function _(e,t){return new Uint32Array(e,t,1)[0]}function F(t,r){var n,i,o,s,l,u,c,d,f,h,p=new Uint32Array(e,r,3*t);for(n=0;n<t;n++)i=p[3*n],o=p[3*n+1],s=p[3*n+2],l=M[2*i],d=M[2*i+1],u=M[2*o],f=M[2*o+1],c=M[2*s],h=M[2*s+1],b.faceVertexUvs[0].push([new a.Vector2(l,d),new a.Vector2(u,f),new a.Vector2(c,h)])}function P(t,r){var n,i,o,s,l,u,c,d,f,h,p,m,v,g=new Uint32Array(e,r,4*t);for(n=0;n<t;n++)i=g[4*n],o=g[4*n+1],s=g[4*n+2],l=g[4*n+3],u=M[2*i],h=M[2*i+1],c=M[2*o],p=M[2*o+1],d=M[2*s],m=M[2*s+1],f=M[2*l],v=M[2*l+1],b.faceVertexUvs[0].push([new a.Vector2(u,h),new a.Vector2(c,p),new a.Vector2(f,v)]),b.faceVertexUvs[0].push([new a.Vector2(c,p),new a.Vector2(d,m),new a.Vector2(f,v)])}function L(t,r,n){var i,o,s,l,u,c=new Uint32Array(e,r,3*t),d=new Uint16Array(e,n,t);for(i=0;i<t;i++)o=c[3*i],s=c[3*i+1],l=c[3*i+2],u=d[i],b.faces.push(new a.Face3(o,s,l,null,null,u))}function C(t,r,n){var i,o,s,l,u,c,d=new Uint32Array(e,r,4*t),f=new Uint16Array(e,n,t);for(i=0;i<t;i++)o=d[4*i],s=d[4*i+1],l=d[4*i+2],u=d[4*i+3],c=f[i],b.faces.push(new a.Face3(o,s,u,null,null,c)),b.faces.push(new a.Face3(s,l,u,null,null,c))}function O(t,r,n,i){var o,s,l,u,c,d,f,h,p=new Uint32Array(e,r,3*t),m=new Uint32Array(e,n,3*t),v=new Uint16Array(e,i,t);for(o=0;o<t;o++){s=p[3*o],l=p[3*o+1],u=p[3*o+2],d=m[3*o],f=m[3*o+1],h=m[3*o+2],c=v[o];var g=A[3*d],y=A[3*d+1],x=A[3*d+2],w=A[3*f],M=A[3*f+1],T=A[3*f+2],S=A[3*h],E=A[3*h+1],_=A[3*h+2];b.faces.push(new a.Face3(s,l,u,[new a.Vector3(g,y,x),new a.Vector3(w,M,T),new a.Vector3(S,E,_)],null,c))}}function N(t,r,n,i){var o,s,l,u,c,d,f,h,p,m,v=new Uint32Array(e,r,4*t),g=new Uint32Array(e,n,4*t),y=new Uint16Array(e,i,t);for(o=0;o<t;o++){s=v[4*o],l=v[4*o+1],u=v[4*o+2],c=v[4*o+3],f=g[4*o],h=g[4*o+1],p=g[4*o+2],m=g[4*o+3],d=y[o];var x=A[3*f],w=A[3*f+1],M=A[3*f+2],T=A[3*h],S=A[3*h+1],E=A[3*h+2],_=A[3*p],F=A[3*p+1],P=A[3*p+2],L=A[3*m],C=A[3*m+1],O=A[3*m+2];b.faces.push(new a.Face3(s,l,c,[new a.Vector3(x,w,M),new a.Vector3(T,S,E),new a.Vector3(L,C,O)],null,d)),b.faces.push(new a.Face3(l,u,c,[new a.Vector3(T,S,E),new a.Vector3(_,F,P),new a.Vector3(L,C,O)],null,d))}}a.Geometry.call(this),w+=(t=function(e,t){return{signature:S(e,t,12),header_bytes:E(e,t+12),vertex_coordinate_bytes:E(e,t+13),normal_coordinate_bytes:E(e,t+14),uv_coordinate_bytes:E(e,t+15),vertex_index_bytes:E(e,t+16),normal_index_bytes:E(e,t+17),uv_index_bytes:E(e,t+18),material_index_bytes:E(e,t+19),nvertices:_(e,t+20),nnormals:_(e,t+20+4),nuvs:_(e,t+20+8),ntri_flat:_(e,t+20+12),ntri_smooth:_(e,t+20+16),ntri_flat_uv:_(e,t+20+20),ntri_smooth_uv:_(e,t+20+24),nquad_flat:_(e,t+20+28),nquad_smooth:_(e,t+20+32),nquad_flat_uv:_(e,t+20+36),nquad_smooth_uv:_(e,t+20+40)}}(e,w)).header_bytes,d=3*t.vertex_index_bytes+t.material_index_bytes,f=4*t.vertex_index_bytes+t.material_index_bytes,h=t.ntri_flat*d,p=t.ntri_smooth*(d+3*t.normal_index_bytes),m=t.ntri_flat_uv*(d+3*t.uv_index_bytes),v=t.ntri_smooth_uv*(d+3*t.normal_index_bytes+3*t.uv_index_bytes),g=t.nquad_flat*f,y=t.nquad_smooth*(f+4*t.normal_index_bytes),x=t.nquad_flat_uv*(f+4*t.uv_index_bytes),w+=function(r){var n,i,o,s,l=t.nvertices,u=new Float32Array(e,r,3*l);for(n=0;n<l;n++)i=u[3*n],o=u[3*n+1],s=u[3*n+2],b.vertices.push(new a.Vector3(i,o,s));return 3*l*Float32Array.BYTES_PER_ELEMENT}(w),w+=function(r){var a=t.nnormals;if(a){var n,i,o,s,l=new Int8Array(e,r,3*a);for(n=0;n<a;n++)i=l[3*n],o=l[3*n+1],s=l[3*n+2],A.push(i/127,o/127,s/127)}return 3*a*Int8Array.BYTES_PER_ELEMENT}(w),w+=T(3*t.nnormals),c=(u=(l=(s=(o=(i=(n=(r=w+=function(r){var a=t.nuvs;if(a){var n,i,o,s=new Float32Array(e,r,2*a);for(n=0;n<a;n++)i=s[2*n],o=s[2*n+1],M.push(i,o)}return 2*a*Float32Array.BYTES_PER_ELEMENT}(w))+h+T(2*t.ntri_flat))+p+T(2*t.ntri_smooth))+m+T(2*t.ntri_flat_uv))+v+T(2*t.ntri_smooth_uv))+g+T(2*t.nquad_flat))+y+T(2*t.nquad_smooth))+x+T(2*t.nquad_flat_uv),function(e){var r=t.ntri_flat_uv;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*3,n=a+r*Uint32Array.BYTES_PER_ELEMENT*3;L(r,e,n),F(r,a)}}(i),function(e){var r=t.ntri_smooth_uv;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*3,n=a+r*Uint32Array.BYTES_PER_ELEMENT*3,i=n+r*Uint32Array.BYTES_PER_ELEMENT*3;O(r,e,a,i),F(r,n)}}(o),function(e){var r=t.nquad_flat_uv;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*4,n=a+r*Uint32Array.BYTES_PER_ELEMENT*4;C(r,e,n),P(r,a)}}(u),function(e){var r=t.nquad_smooth_uv;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*4,n=a+r*Uint32Array.BYTES_PER_ELEMENT*4,i=n+r*Uint32Array.BYTES_PER_ELEMENT*4;N(r,e,a,i),P(r,n)}}(c),function(e){var r=t.ntri_flat;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*3;L(r,e,a)}}(r),function(e){var r=t.ntri_smooth;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*3,n=a+r*Uint32Array.BYTES_PER_ELEMENT*3;O(r,e,a,n)}}(n),function(e){var r=t.nquad_flat;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*4;C(r,e,a)}}(s),function(e){var r=t.nquad_smooth;if(r){var a=e+r*Uint32Array.BYTES_PER_ELEMENT*4,n=a+r*Uint32Array.BYTES_PER_ELEMENT*4;N(r,e,a,n)}}(l),this.computeFaceNormals()};(i.prototype=Object.create(a.Geometry.prototype)).constructor=i,t(new i,a.Loader.prototype.initMaterials(n,r,this.crossOrigin))}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.animateBonePositions=!0,this.animateBoneRotations=!0};n.prototype={constructor:n,load:function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e,r,n){if("ENDSITE"!==n.type){var i={time:r,position:new a.Vector3,rotation:new a.Quaternion};n.frames.push(i);for(var o=new a.Quaternion,s=new a.Vector3(1,0,0),l=new a.Vector3(0,1,0),u=new a.Vector3(0,0,1),c=0;c<n.channels.length;c++)switch(n.channels[c]){case"Xposition":i.position.x=parseFloat(e.shift().trim());break;case"Yposition":i.position.y=parseFloat(e.shift().trim());break;case"Zposition":i.position.z=parseFloat(e.shift().trim());break;case"Xrotation":o.setFromAxisAngle(s,parseFloat(e.shift().trim())*Math.PI/180),i.rotation.multiply(o);break;case"Yrotation":o.setFromAxisAngle(l,parseFloat(e.shift().trim())*Math.PI/180),i.rotation.multiply(o);break;case"Zrotation":o.setFromAxisAngle(u,parseFloat(e.shift().trim())*Math.PI/180),i.rotation.multiply(o);break;default:console.warn("THREE.BVHLoader: Invalid channel type.")}for(c=0;c<n.children.length;c++)t(e,r,n.children[c])}}function r(e){for(var t;0===(t=e.shift().trim()).length;);return t}var n=this,i=function(e){"HIERARCHY"!==r(e)&&console.error("THREE.BVHLoader: HIERARCHY expected.");var n=[],i=function e(t,n,i){var o={name:"",type:"",frames:[]};i.push(o);var s=n.split(/[\s]+/);"END"===s[0].toUpperCase()&&"SITE"===s[1].toUpperCase()?(o.type="ENDSITE",o.name="ENDSITE"):(o.name=s[1],o.type=s[0].toUpperCase());"{"!==r(t)&&console.error("THREE.BVHLoader: Expected opening { after type & name");s=r(t).split(/[\s]+/);"OFFSET"!==s[0]&&console.error("THREE.BVHLoader: Expected OFFSET but got: "+s[0]);4!==s.length&&console.error("THREE.BVHLoader: Invalid number of values for OFFSET.");var l=new a.Vector3(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3]));(isNaN(l.x)||isNaN(l.y)||isNaN(l.z))&&console.error("THREE.BVHLoader: Invalid values of OFFSET.");o.offset=l;if("ENDSITE"!==o.type){"CHANNELS"!==(s=r(t).split(/[\s]+/))[0]&&console.error("THREE.BVHLoader: Expected CHANNELS definition.");var u=parseInt(s[1]);o.channels=s.splice(2,u),o.children=[]}for(;;){var c=r(t);if("}"===c)return o;o.children.push(e(t,c,i))}}(e,r(e),n);"MOTION"!==r(e)&&console.error("THREE.BVHLoader: MOTION expected.");var o=r(e).split(/[\s]+/),s=parseInt(o[1]);isNaN(s)&&console.error("THREE.BVHLoader: Failed to read number of frames."),o=r(e).split(/[\s]+/);var l=parseFloat(o[2]);isNaN(l)&&console.error("THREE.BVHLoader: Failed to read frame time.");for(var u=0;u<s;u++)t(o=r(e).split(/[\s]+/),u*l,i);return n}(e.split(/[\r\n]+/g)),o=[];!function e(t,r){var n=new a.Bone;if(r.push(n),n.position.add(t.offset),n.name=t.name,"ENDSITE"!==t.type)for(var i=0;i<t.children.length;i++)n.add(e(t.children[i],r));return n}(i[0],o);var s=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];if("ENDSITE"!==i.type){for(var o=[],s=[],l=[],u=0;u<i.frames.length;u++){var c=i.frames[u];o.push(c.time),s.push(c.position.x+i.offset.x),s.push(c.position.y+i.offset.y),s.push(c.position.z+i.offset.z),l.push(c.rotation.x),l.push(c.rotation.y),l.push(c.rotation.z),l.push(c.rotation.w)}n.animateBonePositions&&t.push(new a.VectorKeyframeTrack(".bones["+i.name+"].position",o,s)),n.animateBoneRotations&&t.push(new a.QuaternionKeyframeTrack(".bones["+i.name+"].quaternion",o,l))}}return new a.AnimationClip("animation",-1,t)}(i);return{skeleton:new a.Skeleton(o),clip:s}}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this,o=void 0===i.path?a.LoaderUtils.extractUrlBase(e):i.path;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(e,o))}),r,n)},setPath:function(e){this.path=e},options:{set convertUpAxis(e){console.warn("THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.")}},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e,t){function r(e,t){for(var r=[],a=e.childNodes,n=0,i=a.length;n<i;n++){var o=a[n];o.nodeName===t&&r.push(o)}return r}function n(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),r=new Array(t.length),a=0,n=t.length;a<n;a++)r[a]=t[a];return r}function i(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),r=new Array(t.length),a=0,n=t.length;a<n;a++)r[a]=parseFloat(t[a]);return r}function o(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),r=new Array(t.length),a=0,n=t.length;a<n;a++)r[a]=parseInt(t[a]);return r}function s(e){return e.substring(1)}function l(e){return 0===Object.keys(e).length}function u(e){return void 0!==e&&!0===e.hasAttribute("meter")?parseFloat(e.getAttribute("meter")):1}function c(e){return void 0!==e?e.textContent:"Y_UP"}function d(e,t,a,n){var i=r(e,t)[0];if(void 0!==i)for(var o=r(i,a),s=0;s<o.length;s++)n(o[s])}function f(e,t){for(var r in e){e[r].build=t(e[r])}}function h(e,t){return void 0!==e.build?e.build:(e.build=t(e),e.build)}function p(e){for(var t={inputs:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":var i=s(n.getAttribute("source")),o=n.getAttribute("semantic");t.inputs[o]=i}}return t}function m(e){var t={},r=e.getAttribute("target").split("/"),a=r.shift(),n=r.shift(),i=-1!==n.indexOf("("),o=-1!==n.indexOf(".");if(o)r=n.split("."),n=r.shift(),t.member=r.shift();else if(i){var l=n.split("(");n=l.shift();for(var u=0;u<l.length;u++)l[u]=parseInt(l[u].replace(/\)/,""));t.indices=l}return t.id=a,t.sid=n,t.arraySyntax=i,t.memberSyntax=o,t.sampler=s(e.getAttribute("source")),t}function v(e){var t=[],r=e.channels,a=e.samplers,n=e.sources;for(var i in r)if(r.hasOwnProperty(i)){var o=r[i],s=a[o.sampler],l=s.inputs.INPUT,u=s.inputs.OUTPUT;A(y(o,n[l],n[u]),t)}return t}function g(e){return h(ze.animations[e],v)}function y(e,t,r){var a,n,i,o,s,l,u=ze.nodes[e.id],c=Oe(u.id),d=u.transforms[e.sid],f=u.matrix.clone().transpose(),h={};switch(d){case"matrix":for(i=0,o=t.array.length;i<o;i++)if(a=t.array[i],n=i*r.stride,void 0===h[a]&&(h[a]={}),!0===e.arraySyntax){var p=r.array[n],m=e.indices[0]+4*e.indices[1];h[a][m]=p}else for(s=0,l=r.stride;s<l;s++)h[a][s]=r.array[n+s];break;case"translate":case"rotate":case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',d)}var v=function(e,t){var r=[];for(var a in e)r.push({time:parseFloat(a),value:e[a]});r.sort((function(e,t){return e.time-t.time}));for(var n=0;n<16;n++)M(r,n,t.elements[n]);return r}(h,f);return{name:c.uuid,keyframes:v}}var x=new a.Vector3,b=new a.Vector3,w=new a.Quaternion;function A(e,t){for(var r=e.keyframes,n=e.name,i=[],o=[],s=[],l=[],u=0,c=r.length;u<c;u++){var d=r[u],f=d.time,h=d.value;Me.fromArray(h).transpose(),Me.decompose(x,w,b),i.push(f),o.push(x.x,x.y,x.z),s.push(w.x,w.y,w.z,w.w),l.push(b.x,b.y,b.z)}return o.length>0&&t.push(new a.VectorKeyframeTrack(n+".position",i,o)),s.length>0&&t.push(new a.QuaternionKeyframeTrack(n+".quaternion",i,s)),l.length>0&&t.push(new a.VectorKeyframeTrack(n+".scale",i,l)),t}function M(e,t,r){var a,n,i,o=!0;for(n=0,i=e.length;n<i;n++)void 0===(a=e[n]).value[t]?a.value[t]=null:o=!1;if(!0===o)for(n=0,i=e.length;n<i;n++)(a=e[n]).value[t]=r;else!function(e,t){for(var r,a,n=0,i=e.length;n<i;n++){var o=e[n];if(null===o.value[t]){if(r=T(e,n,t),a=S(e,n,t),null===r){o.value[t]=a.value[t];continue}if(null===a){o.value[t]=r.value[t];continue}E(o,r,a,t)}}}(e,t)}function T(e,t,r){for(;t>=0;){var a=e[t];if(null!==a.value[r])return a;t--}return null}function S(e,t,r){for(;t<e.length;){var a=e[t];if(null!==a.value[r])return a;t++}return null}function E(e,t,r,a){r.time-t.time!=0?e.value[a]=(e.time-t.time)*(r.value[a]-t.value[a])/(r.time-t.time)+t.value[a]:e.value[a]=t.value[a]}function _(e){for(var t=[],r=e.name,n=e.end-e.start||-1,i=e.animations,o=0,s=i.length;o<s;o++)for(var l=g(i[o]),u=0,c=l.length;u<c;u++)t.push(l[u]);return new a.AnimationClip(r,n,t)}function F(e){return h(ze.clips[e],_)}function P(e){for(var t={sources:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=i(n.textContent);break;case"source":var o=n.getAttribute("id");t.sources[o]=ie(n);break;case"joints":t.joints=L(n);break;case"vertex_weights":t.vertexWeights=C(n)}}return t}function L(e){for(var t={inputs:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":var i=n.getAttribute("semantic"),o=s(n.getAttribute("source"));t.inputs[i]=o}}return t}function C(e){for(var t={inputs:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":var i=n.getAttribute("semantic"),l=s(n.getAttribute("source")),u=parseInt(n.getAttribute("offset"));t.inputs[i]={id:l,offset:u};break;case"vcount":t.vcount=o(n.textContent);break;case"v":t.v=o(n.textContent)}}return t}function O(e){var t={id:e.id},r=ze.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){var t,r,n,i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,s=e.vertexWeights,l=s.vcount,u=s.v,c=s.inputs.JOINT.offset,d=s.inputs.WEIGHT.offset,f=e.sources[e.joints.inputs.JOINT],h=e.sources[e.joints.inputs.INV_BIND_MATRIX],p=o[s.inputs.WEIGHT.id].array,m=0;for(t=0,n=l.length;t<n;t++){var v=l[t],g=[];for(r=0;r<v;r++){var y=u[m+c],x=u[m+d],b=p[x];g.push({index:y,weight:b}),m+=2}for(g.sort(T),r=0;r<4;r++){var w=g[r];void 0!==w?(i.indices.array.push(w.index),i.weights.array.push(w.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(i.bindMatrix=(new a.Matrix4).fromArray(e.bindShapeMatrix).transpose(),t=0,n=f.array.length;t<n;t++){var A=f.array[t],M=(new a.Matrix4).fromArray(h.array,t*h.stride).transpose();i.joints.push({name:A,boneInverse:M})}return i;function T(e,t){return t.weight-e.weight}}(e.skin),r.sources.skinIndices=t.skin.indices,r.sources.skinWeights=t.skin.weights),t}function N(e){return void 0!==e.build?e.build:e.init_from}function R(e){var t=ze.images[e];return void 0!==t?h(t,N):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",e),null)}function I(e){for(var t={surfaces:{},samplers:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"newparam":D(n,t);break;case"technique":t.technique=B(n);break;case"extra":t.extra=H(n)}}return t}function D(e,t){for(var r=e.getAttribute("sid"),a=0,n=e.childNodes.length;a<n;a++){var i=e.childNodes[a];if(1===i.nodeType)switch(i.nodeName){case"surface":t.surfaces[r]=U(i);break;case"sampler2D":t.samplers[r]=k(i)}}}function U(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"init_from":t.init_from=n.textContent}}return t}function k(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"source":t.source=n.textContent}}return t}function B(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=n.nodeName,t.parameters=j(n)}}return t}function j(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"emission":case"diffuse":case"specular":case"shininess":case"transparency":t[n.nodeName]=V(n);break;case"transparent":t[n.nodeName]={opaque:n.getAttribute("opaque"),data:V(n)}}}return t}function V(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"color":t[n.nodeName]=i(n.textContent);break;case"float":t[n.nodeName]=parseFloat(n.textContent);break;case"texture":t[n.nodeName]={id:n.getAttribute("texture"),extra:G(n)}}}return t}function G(e){for(var t={technique:{}},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"extra":z(n,t)}}return t}function z(e,t){for(var r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"technique":X(n,t)}}}function X(e,t){for(var r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[n.nodeName]=parseFloat(n.textContent);break;case"wrapU":case"wrapV":"TRUE"===n.textContent.toUpperCase()?t.technique[n.nodeName]=1:"FALSE"===n.textContent.toUpperCase()?t.technique[n.nodeName]=0:t.technique[n.nodeName]=parseInt(n.textContent)}}}function H(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"technique":t.technique=Y(n)}}return t}function Y(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"double_sided":t[n.nodeName]=parseInt(n.textContent)}}return t}function W(e){return e}function Q(e){var t,r,n=(t=e.url,h(ze.effects[t],W)),i=n.profile.technique,o=n.profile.extra;switch(i.type){case"phong":case"blinn":r=new a.MeshPhongMaterial;break;case"lambert":r=new a.MeshLambertMaterial;break;default:r=new a.MeshBasicMaterial}function s(e){var t=n.profile.samplers[e.id],r=null;void 0!==t?r=R(n.profile.surfaces[t.source].init_from):(console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),r=R(e.id));if(null!==r){var i=Be.load(r),o=e.extra;if(void 0!==o&&void 0!==o.technique&&!1===l(o.technique)){var s=o.technique;i.wrapS=s.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,i.wrapT=s.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,i.offset.set(s.offsetU||0,s.offsetV||0),i.repeat.set(s.repeatU||1,s.repeatV||1)}else i.wrapS=a.RepeatWrapping,i.wrapT=a.RepeatWrapping;return i}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}r.name=e.name;var u=i.parameters;for(var c in u){var d=u[c];switch(c){case"diffuse":d.color&&r.color.fromArray(d.color),d.texture&&(r.map=s(d.texture));break;case"specular":d.color&&r.specular&&r.specular.fromArray(d.color),d.texture&&(r.specularMap=s(d.texture));break;case"shininess":d.float&&r.shininess&&(r.shininess=d.float);break;case"emission":d.color&&r.emissive&&r.emissive.fromArray(d.color),d.texture&&(r.emissiveMap=s(d.texture))}}var f=u.transparent,p=u.transparency;if(void 0===p&&f&&(p={float:1}),void 0===f&&p&&(f={opaque:"A_ONE",data:{color:[1,1,1,1]}}),f&&p)if(f.data.texture)r.transparent=!0;else{var m=f.data.color;switch(f.opaque){case"A_ONE":r.opacity=m[3]*p.float;break;case"RGB_ZERO":r.opacity=1-m[0]*p.float;break;case"A_ZERO":r.opacity=1-m[3]*p.float;break;case"RGB_ONE":r.opacity=m[0]*p.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',f.opaque)}r.opacity<1&&(r.transparent=!0)}return void 0!==o&&void 0!==o.technique&&1===o.technique.double_sided&&(r.side=a.DoubleSide),r}function q(e){return h(ze.materials[e],Q)}function K(e){for(var t=0;t<e.childNodes.length;t++){var r=e.childNodes[t];switch(r.nodeName){case"technique_common":return Z(r)}}return{}}function Z(e){for(var t={},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];switch(a.nodeName){case"perspective":case"orthographic":t.technique=a.nodeName,t.parameters=J(a)}}return t}function J(e){for(var t={},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];switch(a.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[a.nodeName]=parseFloat(a.textContent)}}return t}function $(e){var t;switch(e.optics.technique){case"perspective":t=new a.PerspectiveCamera(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":var r=e.optics.parameters.ymag,n=e.optics.parameters.xmag,i=e.optics.parameters.aspect_ratio;n=void 0===n?r*i:n,r=void 0===r?n/i:r,n*=.5,r*=.5,t=new a.OrthographicCamera(-n,n,r,-r,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new a.PerspectiveCamera}return t.name=e.name,t}function ee(e){var t=ze.cameras[e];return void 0!==t?h(t,$):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",e),null)}function te(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=n.nodeName,t.parameters=re(n)}}return t}function re(e){for(var t={},r=0,n=e.childNodes.length;r<n;r++){var o=e.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"color":var s=i(o.textContent);t.color=(new a.Color).fromArray(s);break;case"falloff_angle":t.falloffAngle=parseFloat(o.textContent);break;case"quadratic_attenuation":var l=parseFloat(o.textContent);t.distance=l?Math.sqrt(1/l):0}}return t}function ae(e){var t;switch(e.technique){case"directional":t=new a.DirectionalLight;break;case"point":t=new a.PointLight;break;case"spot":t=new a.SpotLight;break;case"ambient":t=new a.AmbientLight}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function ne(e){var t=ze.lights[e];return void 0!==t?h(t,ae):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",e),null)}function ie(e){for(var t={array:[],stride:3},a=0;a<e.childNodes.length;a++){var o=e.childNodes[a];if(1===o.nodeType)switch(o.nodeName){case"float_array":t.array=i(o.textContent);break;case"Name_array":t.array=n(o.textContent);break;case"technique_common":var s=r(o,"accessor")[0];void 0!==s&&(t.stride=parseInt(s.getAttribute("stride")))}}return t}function oe(e){for(var t={},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];1===a.nodeType&&(t[a.getAttribute("semantic")]=s(a.getAttribute("source")))}return t}function se(e){for(var t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"input":var i=s(n.getAttribute("source")),l=n.getAttribute("semantic"),u=parseInt(n.getAttribute("offset"));t.inputs[l]={id:i,offset:u},t.stride=Math.max(t.stride,u+1),"TEXCOORD"===l&&(t.hasUV=!0);break;case"vcount":t.vcount=o(n.textContent);break;case"p":t.p=o(n.textContent)}}return t}function le(e){for(var t=0,r=0,a=e.length;r<a;r++){!0===e[r].hasUV&&t++}t>0&&t<e.length&&(e.uvsNeedsFix=!0)}function ue(e){var t={},r=e.sources,a=e.vertices,n=e.primitives;if(0===n.length)return{};var i=function(e){for(var t={},r=0;r<e.length;r++){var a=e[r];void 0===t[a.type]&&(t[a.type]=[]),t[a.type].push(a)}return t}(n);for(var o in i){var s=i[o];le(s),t[o]=ce(s,r,a)}return t}function ce(e,t,r){for(var n={},i={array:[],stride:0},o={array:[],stride:0},s={array:[],stride:0},l={array:[],stride:0},u=[],c=4,d=[],f=4,h=new a.BufferGeometry,p=[],m=0,v=0;v<e.length;v++){var g=e[v],y=g.inputs,x=0;switch(g.type){case"lines":case"linestrips":x=2*g.count;break;case"triangles":x=3*g.count;break;case"polylist":for(var b=0;b<g.count;b++){var w=g.vcount[b];switch(w){case 3:x+=3;break;case 4:x+=6;break;default:x+=3*(w-2)}}break;default:console.warn("THREE.ColladaLoader: Unknow primitive type:",g.type)}for(var A in h.addGroup(m,x,v),m+=x,g.material&&p.push(g.material),y){var M=y[A];switch(A){case"VERTEX":for(var T in r){var S=r[T];switch(T){case"POSITION":var E=i.array.length;if(de(g,t[S],M.offset,i.array),i.stride=t[S].stride,t.skinWeights&&t.skinIndices&&(de(g,t.skinIndices,M.offset,u),de(g,t.skinWeights,M.offset,d)),!1===g.hasUV&&!0===e.uvsNeedsFix){x=(i.array.length-E)/i.stride;for(var _=0;_<x;_++)s.array.push(0,0)}break;case"NORMAL":de(g,t[S],M.offset,o.array),o.stride=t[S].stride;break;case"COLOR":de(g,t[S],M.offset,l.array),l.stride=t[S].stride;break;case"TEXCOORD":de(g,t[S],M.offset,s.array),s.stride=t[S].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',T)}}break;case"NORMAL":de(g,t[M.id],M.offset,o.array),o.stride=t[M.id].stride;break;case"COLOR":de(g,t[M.id],M.offset,l.array),l.stride=t[M.id].stride;break;case"TEXCOORD":de(g,t[M.id],M.offset,s.array),s.stride=t[M.id].stride}}}return i.array.length>0&&h.addAttribute("position",new a.Float32BufferAttribute(i.array,i.stride)),o.array.length>0&&h.addAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&h.addAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),s.array.length>0&&h.addAttribute("uv",new a.Float32BufferAttribute(s.array,s.stride)),u.length>0&&h.addAttribute("skinIndex",new a.Float32BufferAttribute(u,c)),d.length>0&&h.addAttribute("skinWeight",new a.Float32BufferAttribute(d,f)),n.data=h,n.type=e[0].type,n.materialKeys=p,n}function de(e,t,r,a){var n=e.p,i=e.stride,o=e.vcount;function s(e){for(var t=n[e+r]*u,i=t+u;t<i;t++)a.push(l[t])}var l=t.array,u=t.stride;if(void 0!==e.vcount)for(var c=0,d=0,f=o.length;d<f;d++){var h=o[d];if(4===h){var p=c+1*i,m=c+2*i,v=c+3*i;s(c+0*i),s(p),s(v),s(p),s(m),s(v)}else if(3===h){p=c+1*i,m=c+2*i;s(c+0*i),s(p),s(m)}else if(h>4)for(var g=1,y=h-2;g<=y;g++){p=c+i*g,m=c+i*(g+1);s(c+0*i),s(p),s(m)}c+=i*h}else for(d=0,f=n.length;d<f;d+=i)s(d)}function fe(e){return h(ze.geometries[e],ue)}function he(e){return void 0!==e.build?e.build:e}function pe(e,t){for(var r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"joint":t.joints[a.getAttribute("sid")]=me(a);break;case"link":t.links.push(ge(a))}}}function me(e){for(var t,r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"prismatic":case"revolute":t=ve(a)}}return t}function ve(e,t){t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"axis":var o=i(n.textContent);t.axis.fromArray(o);break;case"limits":var s=n.getElementsByTagName("max")[0],l=n.getElementsByTagName("min")[0];t.limits.max=parseFloat(s.textContent),t.limits.min=parseFloat(l.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ge(e){for(var t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"attachment_full":t.attachments.push(ye(a));break;case"matrix":case"translate":case"rotate":t.transforms.push(xe(a))}}return t}function ye(e){for(var t={joint:e.getAttribute("joint").split("/").pop(),transforms:[],links:[]},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"link":t.links.push(ge(a));break;case"matrix":case"translate":case"rotate":t.transforms.push(xe(a))}}return t}function xe(e){var t={type:e.nodeName},r=i(e.textContent);switch(t.type){case"matrix":t.obj=new a.Matrix4,t.obj.fromArray(r).transpose();break;case"translate":t.obj=new a.Vector3,t.obj.fromArray(r);break;case"rotate":t.obj=new a.Vector3,t.obj.fromArray(r),t.angle=a.Math.degToRad(r[3])}return t}function be(e){for(var t={target:e.getAttribute("target").split("/").pop()},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"axis":var n=a.getElementsByTagName("param")[0];t.axis=n.textContent;var i=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=i.substr(0,i.length-1)}}return t}function we(e){return void 0!==e.build?e.build:e}function Ae(e){for(var t=[],r=De.querySelector('[id="'+e.id+'"]'),n=0;n<r.childNodes.length;n++){var o=r.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"matrix":var s=i(o.textContent),l=(new a.Matrix4).fromArray(s).transpose();t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l});break;case"translate":case"scale":s=i(o.textContent);var u=(new a.Vector3).fromArray(s);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:u});break;case"rotate":s=i(o.textContent),u=(new a.Vector3).fromArray(s);var c=a.Math.degToRad(s[3]);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:u,angle:c})}}return t}var Me=new a.Matrix4,Te=new a.Vector3;function Se(e){for(var t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}},r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"node":t.nodes.push(n.getAttribute("id")),Se(n);break;case"instance_camera":t.instanceCameras.push(s(n.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(Ee(n));break;case"instance_light":t.instanceLights.push(s(n.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(Ee(n));break;case"instance_node":t.instanceNodes.push(s(n.getAttribute("url")));break;case"matrix":var o=i(n.textContent);t.matrix.multiply(Me.fromArray(o).transpose()),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":o=i(n.textContent);Te.fromArray(o),t.matrix.multiply(Me.makeTranslation(Te.x,Te.y,Te.z)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":o=i(n.textContent);var l=a.Math.degToRad(o[3]);t.matrix.multiply(Me.makeRotationAxis(Te.fromArray(o),l)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":o=i(n.textContent);t.matrix.scale(Te.fromArray(o)),t.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return ze.nodes[t.id]=t,t}function Ee(e){for(var t={id:s(e.getAttribute("url")),materials:{},skeletons:[]},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];switch(a.nodeName){case"bind_material":for(var n=a.getElementsByTagName("instance_material"),i=0;i<n.length;i++){var o=n[i],l=o.getAttribute("symbol"),u=o.getAttribute("target");t.materials[l]=s(u)}break;case"skeleton":t.skeletons.push(s(a.textContent))}}return t}function _e(e,t){var r,n,i,o=[],s=[];for(r=0;r<e.length;r++){var l=e[r];if(i=l,void 0!==ze.nodes[i])Fe(Oe(l),t,o);else if(Re(l))for(var u=ze.visualScenes[l].children,c=0;c<u.length;c++){var d=u[c];if("JOINT"===d.type)Fe(Oe(d.id),t,o)}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",l)}for(r=0;r<t.length;r++)for(c=0;c<o.length;c++)if((n=o[c]).bone.name===t[r].name){s[r]=n,n.processed=!0;break}for(r=0;r<o.length;r++)!1===(n=o[r]).processed&&(s.push(n),n.processed=!0);var f=[],h=[];for(r=0;r<s.length;r++)n=s[r],f.push(n.bone),h.push(n.boneInverse);return new a.Skeleton(f,h)}function Fe(e,t,r){e.traverse((function(e){if(!0===e.isBone){for(var n,i=0;i<t.length;i++){var o=t[i];if(o.name===e.name){n=o.boneInverse;break}}void 0===n&&(n=new a.Matrix4),r.push({bone:e,boneInverse:n,processed:!1})}}))}function Pe(e){for(var t,r=[],n=e.matrix,i=e.nodes,o=e.type,s=e.instanceCameras,l=e.instanceControllers,u=e.instanceLights,c=e.instanceGeometries,d=e.instanceNodes,f=0,p=i.length;f<p;f++)r.push(Oe(i[f]));for(f=0,p=s.length;f<p;f++){var m=ee(s[f]);null!==m&&r.push(m.clone())}for(f=0,p=l.length;f<p;f++)for(var v=l[f],g=(t=v.id,h(ze.controllers[t],O)),y=Ce(fe(g.id),v.materials),x=_e(v.skeletons,g.skin.joints),b=0,w=y.length;b<w;b++){var A;(A=y[b]).isSkinnedMesh&&(A.bind(x,g.skin.bindMatrix),A.normalizeSkinWeights()),r.push(A)}for(f=0,p=u.length;f<p;f++){var M=ne(u[f]);null!==M&&r.push(M.clone())}for(f=0,p=c.length;f<p;f++)for(b=0,w=(y=Ce(fe((v=c[f]).id),v.materials)).length;b<w;b++)r.push(y[b]);for(f=0,p=d.length;f<p;f++)r.push(Oe(d[f]).clone());if(0===i.length&&1===r.length)A=r[0];else{A="JOINT"===o?new a.Bone:new a.Group;for(f=0;f<r.length;f++)A.add(r[f])}return""===A.name&&(A.name="JOINT"===o?e.sid:e.name),A.matrix.copy(n),A.matrix.decompose(A.position,A.quaternion,A.scale),A}function Le(e,t){for(var r=[],a=0,n=e.length;a<n;a++){var i=t[e[a]];r.push(q(i))}return r}function Ce(e,t){var r=[];for(var n in e){var i=e[n],o=Le(i.materialKeys,t);0===o.length&&("lines"===n||"linestrips"===n?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial));var s=void 0!==i.data.attributes.skinIndex;if(s)for(var l=0,u=o.length;l<u;l++)o[l].skinning=!0;var c,d=1===o.length?o[0]:o;switch(n){case"lines":c=new a.LineSegments(i.data,d);break;case"linestrips":c=new a.Line(i.data,d);break;case"triangles":case"polylist":c=s?new a.SkinnedMesh(i.data,d):new a.Mesh(i.data,d)}r.push(c)}return r}function Oe(e){return h(ze.nodes[e],Pe)}function Ne(e){var t=new a.Group;t.name=e.name;for(var r=e.children,n=0;n<r.length;n++){var i=r[n];t.add(Oe(i.id))}return t}function Re(e){return void 0!==ze.visualScenes[e]}function Ie(e){return h(ze.visualScenes[e],Ne)}if(0===e.length)return{scene:new a.Scene};var De=r((new DOMParser).parseFromString(e,"application/xml"),"COLLADA")[0],Ue=De.getAttribute("version");console.log("THREE.ColladaLoader: File version",Ue);var ke=function(e){return{unit:u(r(e,"unit")[0]),upAxis:c(r(e,"up_axis")[0])}}(r(De,"asset")[0]),Be=new a.TextureLoader(this.manager);Be.setPath(t).setCrossOrigin(this.crossOrigin);var je=[],Ve={},Ge=0,ze={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},kinematicsScenes:{}};d(De,"library_animations","animation",(function(e){for(var t={sources:{},samplers:{},channels:{}},r=0,a=e.childNodes.length;r<a;r++){var n,i=e.childNodes[r];if(1===i.nodeType)switch(i.nodeName){case"source":n=i.getAttribute("id"),t.sources[n]=ie(i);break;case"sampler":n=i.getAttribute("id"),t.samplers[n]=p(i);break;case"channel":n=i.getAttribute("target"),t.channels[n]=m(i);break;default:console.log(i)}}ze.animations[e.getAttribute("id")]=t})),d(De,"library_animation_clips","animation_clip",(function(e){for(var t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"instance_animation":t.animations.push(s(n.getAttribute("url")))}}ze.clips[e.getAttribute("id")]=t})),d(De,"library_controllers","controller",(function(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"skin":t.id=s(n.getAttribute("source")),t.skin=P(n);break;case"morph":t.id=s(n.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.")}}ze.controllers[e.getAttribute("id")]=t})),d(De,"library_images","image",(function(e){var t={init_from:r(e,"init_from")[0].textContent};ze.images[e.getAttribute("id")]=t})),d(De,"library_effects","effect",(function(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"profile_COMMON":t.profile=I(n)}}ze.effects[e.getAttribute("id")]=t})),d(De,"library_materials","material",(function(e){for(var t={name:e.getAttribute("name")},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"instance_effect":t.url=s(n.getAttribute("url"))}}ze.materials[e.getAttribute("id")]=t})),d(De,"library_cameras","camera",(function(e){for(var t={name:e.getAttribute("name")},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"optics":t.optics=K(n)}}ze.cameras[e.getAttribute("id")]=t})),d(De,"library_lights","light",(function(e){for(var t={},r=0,a=e.childNodes.length;r<a;r++){var n=e.childNodes[r];if(1===n.nodeType)switch(n.nodeName){case"technique_common":t=te(n)}}ze.lights[e.getAttribute("id")]=t})),d(De,"library_geometries","geometry",(function(e){var t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},a=r(e,"mesh")[0];if(void 0!==a){for(var n=0;n<a.childNodes.length;n++){var i=a.childNodes[n];if(1===i.nodeType){var o=i.getAttribute("id");switch(i.nodeName){case"source":t.sources[o]=ie(i);break;case"vertices":t.vertices=oe(i);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",i.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(se(i));break;default:console.log(i)}}}ze.geometries[e.getAttribute("id")]=t}})),d(De,"library_nodes","node",Se),d(De,"library_visual_scenes","visual_scene",(function(e){var t={name:e.getAttribute("name"),children:[]};!function(e){for(var t=e.getElementsByTagName("node"),r=0;r<t.length;r++){var a=t[r];!1===a.hasAttribute("id")&&a.setAttribute("id","three_default_"+Ge++)}}(e);for(var a=r(e,"node"),n=0;n<a.length;n++)t.children.push(Se(a[n]));ze.visualScenes[e.getAttribute("id")]=t})),d(De,"library_kinematics_models","kinematics_model",(function(e){for(var t={name:e.getAttribute("name")||"",joints:{},links:[]},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"technique_common":pe(a,t)}}ze.kinematicsModels[e.getAttribute("id")]=t})),d(De,"scene","instance_kinematics_scene",(function(e){for(var t={bindJointAxis:[]},r=0;r<e.childNodes.length;r++){var a=e.childNodes[r];if(1===a.nodeType)switch(a.nodeName){case"bind_joint_axis":t.bindJointAxis.push(be(a))}}ze.kinematicsScenes[s(e.getAttribute("url"))]=t})),f(ze.animations,v),f(ze.clips,_),f(ze.controllers,O),f(ze.images,N),f(ze.effects,W),f(ze.materials,Q),f(ze.cameras,$),f(ze.lights,ae),f(ze.geometries,ue),f(ze.visualScenes,Ne),function(){var e=ze.clips;if(!0===l(e)){if(!1===l(ze.animations)){var t=[];for(var r in ze.animations)for(var n=g(r),i=0,o=n.length;i<o;i++)t.push(n[i]);je.push(new a.AnimationClip("default",-1,t))}}else for(var r in e)je.push(F(r))}(),function(){var e=Object.keys(ze.kinematicsModels)[0],t=Object.keys(ze.kinematicsScenes)[0],r=Object.keys(ze.visualScenes)[0];if(void 0!==e&&void 0!==t){for(var n,i=(n=e,h(ze.kinematicsModels[n],he)),o=function(e){return h(ze.kinematicsScenes[e],we)}(t),s=Ie(r),l=o.bindJointAxis,u={},c=0,d=l.length;c<d;c++){var f=l[c],p=De.querySelector('[sid="'+f.target+'"]');if(p){var m=p.parentElement;g(f.jointIndex,m)}}var v=new a.Matrix4;Ve={joints:i&&i.joints,getJointValue:function(e){var t=u[e];if(t)return t.position;console.warn("THREE.ColladaLoader: Joint "+e+" doesn't exist.")},setJointValue:function(e,t){var r=u[e];if(r){var n=r.joint;if(t>n.limits.max||t<n.limits.min)console.warn("THREE.ColladaLoader: Joint "+e+" value "+t+" outside of limits (min: "+n.limits.min+", max: "+n.limits.max+").");else if(n.static)console.warn("THREE.ColladaLoader: Joint "+e+" is static.");else{var i=r.object,o=n.axis,s=r.transforms;Me.identity();for(var l=0;l<s.length;l++){var c=s[l];if(c.sid&&-1!==c.sid.indexOf(e))switch(n.type){case"revolute":Me.multiply(v.makeRotationAxis(o,a.Math.degToRad(t)));break;case"prismatic":Me.multiply(v.makeTranslation(o.x*t,o.y*t,o.z*t));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+n.type)}else switch(c.type){case"matrix":Me.multiply(c.obj);break;case"translate":Me.multiply(v.makeTranslation(c.obj.x,c.obj.y,c.obj.z));break;case"scale":Me.scale(c.obj);break;case"rotate":Me.multiply(v.makeRotationAxis(c.obj,c.angle))}}i.matrix.copy(Me),i.matrix.decompose(i.position,i.quaternion,i.scale),u[e].position=t}}else console.log("THREE.ColladaLoader: "+e+" does not exist.")}}}function g(e,t){var r=t.getAttribute("name"),a=i.joints[e];s.traverse((function(n){n.name===r&&(u[e]={object:n,transforms:Ae(t),joint:a,position:a.zeroPosition})}))}}();var Xe=function(e){return Ie(s(r(e,"instance_visual_scene")[0].getAttribute("url")))}(r(De,"scene")[0]);return"Z_UP"===ke.upAxis&&Xe.quaternion.setFromEuler(new a.Euler(-Math.PI/2,0,0)),Xe.scale.multiplyScalar(ke.unit),{animations:je,kinematics:Ve,library:ze,scene:Xe}}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function e(){this._parser=e.parse};(n.prototype=Object.create(a.CompressedTextureLoader.prototype)).constructor=n,n.parse=function(e,t){var r={mipmaps:[],width:0,height:0,format:null,mipmapCount:1};function n(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function i(e,t,r,a){for(var n=r*a*4,i=new Uint8Array(e,t,n),o=new Uint8Array(n),s=0,l=0,u=0;u<a;u++)for(var c=0;c<r;c++){var d=i[l],f=i[++l],h=i[++l],p=i[++l];l++,o[s]=h,o[++s]=f,o[++s]=d,o[++s]=p,s++}return o}var o,s=n("DXT1"),l=n("DXT3"),u=n("DXT5"),c=n("ETC1"),d=new Int32Array(e,0,31);if(542327876!==d[0])return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),r;if(4&!d[20])return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),r;var f,h=d[21],p=!1;switch(h){case s:o=8,r.format=a.RGB_S3TC_DXT1_Format;break;case l:o=16,r.format=a.RGBA_S3TC_DXT3_Format;break;case u:o=16,r.format=a.RGBA_S3TC_DXT5_Format;break;case c:o=8,r.format=a.RGB_ETC1_Format;break;default:if(!(32===d[22]&&16711680&d[23]&&65280&d[24]&&255&d[25]&&4278190080&d[26]))return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",(f=h,String.fromCharCode(255&f,f>>8&255,f>>16&255,f>>24&255))),r;p=!0,o=64,r.format=a.RGBAFormat}r.mipmapCount=1,131072&d[2]&&!1!==t&&(r.mipmapCount=Math.max(1,d[7]));var m=d[28];if(r.isCubemap=!!(512&m),r.isCubemap&&(!(1024&m)||!(2048&m)||!(4096&m)||!(8192&m)||!(16384&m)||!(32768&m)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),r;r.width=d[4],r.height=d[3];for(var v=d[1]+4,g=r.isCubemap?6:1,y=0;y<g;y++)for(var x=r.width,b=r.height,w=0;w<r.mipmapCount;w++){if(p)var A=(M=i(e,v,x,b)).length;else{A=Math.max(4,x)/4*Math.max(4,b)/4*o;var M=new Uint8Array(e,v,A)}var T={data:M,width:x,height:b};r.mipmaps.push(T),v+=A,x=Math.max(x>>1,1),b=Math.max(b>>1,1)}return r},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var i=function(e){this.timeLoaded=0,this.manager=e||n.DefaultLoadingManager,this.materials=null,this.verbosity=0,this.attributeOptions={},this.drawMode=n.TrianglesDrawMode,this.nativeAttributeMap={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"}};i.prototype={constructor:i,load:function(e,t,r,a){var i=this,o=new n.FileLoader(i.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),o.load(e,(function(e){i.decodeDracoFile(e,t)}),r,a)},setPath:function(e){this.path=e},setCrossOrigin:function(e){this.crossOrigin=e},setVerbosity:function(e){this.verbosity=e},setDrawMode:function(e){this.drawMode=e},setSkipDequantization:function(e,t){var r=!0;void 0!==t&&(r=t),this.getAttributeOptions(e).skipDequantization=r},decodeDracoFile:function(e,t,r){var a=this;i.getDecoderModule().then((function(n){a.decodeDracoFileInternal(e,n.decoder,t,r||{})}))},decodeDracoFileInternal:function(e,t,r,a){var n=new t.DecoderBuffer;n.Init(new Int8Array(e),e.byteLength);var i=new t.Decoder,o=i.GetEncodedGeometryType(n);if(o==t.TRIANGULAR_MESH)this.verbosity>0&&console.log("Loaded a mesh.");else{if(o!=t.POINT_CLOUD){var s="THREE.DRACOLoader: Unknown geometry type.";throw console.error(s),new Error(s)}this.verbosity>0&&console.log("Loaded a point cloud.")}r(this.convertDracoGeometryTo3JS(t,i,o,n,a))},addAttributeToGeometry:function(e,t,r,a,i,o,s){if(0===i.ptr){var l="THREE.DRACOLoader: No attribute "+a;throw console.error(l),new Error(l)}var u=i.num_components(),c=new e.DracoFloat32Array;t.GetAttributeFloatForAllPoints(r,i,c);var d=r.num_points()*u;s[a]=new Float32Array(d);for(var f=0;f<d;f++)s[a][f]=c.GetValue(f);o.addAttribute(a,new n.Float32BufferAttribute(s[a],u)),e.destroy(c)},convertDracoGeometryTo3JS:function(e,t,r,a,i){var o,s;!0===this.getAttributeOptions("position").skipDequantization&&t.SkipAttributeTransform(e.POSITION);var l=performance.now();if(r===e.TRIANGULAR_MESH?(o=new e.Mesh,s=t.DecodeBufferToMesh(a,o)):(o=new e.PointCloud,s=t.DecodeBufferToPointCloud(a,o)),!s.ok()||0==o.ptr){var u="THREE.DRACOLoader: Decoding failed: ";throw u+=s.error_msg(),console.error(u),e.destroy(t),e.destroy(o),new Error(u)}var c,d=performance.now();e.destroy(a),r==e.TRIANGULAR_MESH?(c=o.num_faces(),this.verbosity>0&&console.log("Number of faces loaded: "+c.toString())):c=0;var f=o.num_points(),h=o.num_attributes();this.verbosity>0&&(console.log("Number of points loaded: "+f.toString()),console.log("Number of attributes loaded: "+h.toString()));var p=t.GetAttributeId(o,e.POSITION);if(-1==p){u="THREE.DRACOLoader: No position attribute found.";throw console.error(u),e.destroy(t),e.destroy(o),new Error(u)}var m=t.GetAttribute(o,p),v={},g=new n.BufferGeometry;for(var y in this.nativeAttributeMap)if(void 0===i[y]){var x=t.GetAttributeId(o,e[this.nativeAttributeMap[y]]);if(-1!==x){this.verbosity>0&&console.log("Loaded "+y+" attribute.");var b=t.GetAttribute(o,x);this.addAttributeToGeometry(e,t,o,y,b,g,v)}}for(var y in i){var w=i[y];b=t.GetAttributeByUniqueId(o,w);this.addAttributeToGeometry(e,t,o,y,b,g,v)}if(r==e.TRIANGULAR_MESH)if(this.drawMode===n.TriangleStripDrawMode){var A=new e.DracoInt32Array;t.GetTriangleStripsFromMesh(o,A);v.indices=new Uint32Array(A.size());for(var M=0;M<A.size();++M)v.indices[M]=A.GetValue(M);e.destroy(A)}else{var T=3*c;v.indices=new Uint32Array(T);var S=new e.DracoInt32Array;for(M=0;M<c;++M){t.GetFaceFromMesh(o,M,S);var E=3*M;v.indices[E]=S.GetValue(0),v.indices[E+1]=S.GetValue(1),v.indices[E+2]=S.GetValue(2)}e.destroy(S)}g.drawMode=this.drawMode,r==e.TRIANGULAR_MESH&&g.setIndex(new(v.indices.length>65535?n.Uint32BufferAttribute:n.Uint16BufferAttribute)(v.indices,1));var _=new e.AttributeQuantizationTransform;if(_.InitFromAttribute(m)){g.attributes.position.isQuantized=!0,g.attributes.position.maxRange=_.range(),g.attributes.position.numQuantizationBits=_.quantization_bits(),g.attributes.position.minValues=new Float32Array(3);for(M=0;M<3;++M)g.attributes.position.minValues[M]=_.min_value(M)}return e.destroy(_),e.destroy(t),e.destroy(o),this.decode_time=d-l,this.import_time=performance.now()-d,this.verbosity>0&&(console.log("Decode time: "+this.decode_time),console.log("Import time: "+this.import_time)),g},isVersionSupported:function(e,t){i.getDecoderModule().then((function(r){t(r.decoder.isVersionSupported(e))}))},getAttributeOptions:function(e){return void 0===this.attributeOptions[e]&&(this.attributeOptions[e]={}),this.attributeOptions[e]}},i.decoderPath="./",i.decoderConfig={},i.decoderModulePromise=null,i.setDecoderPath=function(e){i.decoderPath=e},i.setDecoderConfig=function(e){var t=i.decoderConfig.wasmBinary;i.decoderConfig=e||{},i.releaseDecoderModule(),t&&(i.decoderConfig.wasmBinary=t)},i.releaseDecoderModule=function(){i.decoderModulePromise=null},i.getDecoderModule=function(){var e=this,t=i.decoderPath,r=i.decoderConfig,n=i.decoderModulePromise;return n||("undefined"!=typeof DracoDecoderModule?n=Promise.resolve():"object"!==("undefined"==typeof WebAssembly?"undefined":a(WebAssembly))||"js"===r.type?n=i._loadScript(t+"draco_decoder.js"):(r.wasmBinaryFile=t+"draco_decoder.wasm",n=i._loadScript(t+"draco_wasm_wrapper.js").then((function(){return i._loadArrayBuffer(r.wasmBinaryFile)})).then((function(e){r.wasmBinary=e}))),n=n.then((function(){return new Promise((function(t){r.onModuleLoaded=function(r){e.timeLoaded=performance.now(),t({decoder:r})},DracoDecoderModule(r)}))})),i.decoderModulePromise=n,n)},i._loadScript=function(e){var t=document.getElementById("decoder_script");null!==t&&t.parentNode.removeChild(t);var r=document.getElementsByTagName("head")[0],a=document.createElement("script");return a.id="decoder_script",a.type="text/javascript",a.src=e,new Promise((function(e){a.onload=e,r.appendChild(a)}))},i._loadArrayBuffer=function(e){var t=new n.FileLoader;return t.setResponseType("arraybuffer"),new Promise((function(r,a){t.load(e,r,void 0,a)}))},t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){this.sourceTexture=e,this.resolution=t,this.views=[{t:[1,0,0],u:[0,-1,0]},{t:[-1,0,0],u:[0,-1,0]},{t:[0,1,0],u:[0,0,1]},{t:[0,-1,0],u:[0,0,-1]},{t:[0,0,1],u:[0,-1,0]},{t:[0,0,-1],u:[0,-1,0]}],this.camera=new a.PerspectiveCamera(90,1,.1,10),this.boxMesh=new a.Mesh(new a.BoxBufferGeometry(1,1,1),this.getShader()),this.boxMesh.material.side=a.BackSide,this.scene=new a.Scene,this.scene.add(this.boxMesh);var r={format:a.RGBAFormat,magFilter:this.sourceTexture.magFilter,minFilter:this.sourceTexture.minFilter,type:this.sourceTexture.type,generateMipmaps:this.sourceTexture.generateMipmaps,anisotropy:this.sourceTexture.anisotropy,encoding:this.sourceTexture.encoding};this.renderTarget=new a.WebGLRenderTargetCube(this.resolution,this.resolution,r)};n.prototype={constructor:n,update:function(e){for(var t=0;t<6;t++){this.renderTarget.activeCubeFace=t;var r=this.views[t];this.camera.position.set(0,0,0),this.camera.up.set(r.u[0],r.u[1],r.u[2]),this.camera.lookAt(r.t[0],r.t[1],r.t[2]),e.render(this.scene,this.camera,this.renderTarget,!0)}return this.renderTarget.texture},getShader:function(){var e=new a.ShaderMaterial({uniforms:{equirectangularMap:{value:this.sourceTexture}},vertexShader:"varying vec3 localPosition;\n\t\t\t\t\n\t\t\t\tvoid main() {\n\t\t\t\t\tlocalPosition = position;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\n\t\t\t\tvarying vec3 localPosition;\n\t\t\t\tuniform sampler2D equirectangularMap;\n\t\t\t\t\n\t\t\t\tvec2 EquiangularSampleUV(vec3 v) {\n\t\t\t vec2 uv = vec2(atan(v.z, v.x), asin(v.y));\n\t\t\t uv *= vec2(0.1591, 0.3183); // inverse atan\n\t\t\t uv += 0.5;\n\t\t\t return uv;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 uv = EquiangularSampleUV(normalize(localPosition));\n \t\t\tvec3 color = texture2D(equirectangularMap, uv).rgb;\n \t\t\t\n\t\t\t\t\tgl_FragColor = vec4( color, 1.0 );\n\t\t\t\t}",blending:a.CustomBlending,premultipliedAlpha:!1,blendSrc:a.OneFactor,blendDst:a.ZeroFactor,blendSrcAlpha:a.OneFactor,blendDstAlpha:a.ZeroFactor,blendEquation:a.AddEquation});return e.type="EquiangularToCubeGenerator",e},dispose:function(){this.boxMesh.geometry.dispose(),this.boxMesh.material.dispose(),this.renderTarget.dispose()}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};(n.prototype=Object.create(a.DataTextureLoader.prototype))._parser=function(e){var t=65536,r=t>>3,n=14,i=65537,o=1<<n,s=o-1,l=59,u=63,c=2+u-l,d=8,f=4,h=4,p=2,m=1;var v={l:0,c:0,lc:0};function g(e,t,r,a,n){for(;r<e;)t=t<<8|I(a,n),r+=8;r-=e,v.l=t>>r&(1<<e)-1,v.c=t,v.lc=r}var y=new Array(59);function x(e,t,r,a,n,o,s){for(var d=r,f=0,h=0;n<=o;n++){if(d.value-r.value>a)return!1;g(6,f,h,e,d);var p=v.l;if(f=v.c,h=v.lc,s[n]=p,p==u){if(d.value-r.value>a)throw"Something wrong with hufUnpackEncTable";g(8,f,h,e,d);var m=v.l+c;if(f=v.c,h=v.lc,n+m>o+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)s[n++]=0;n--}else if(p>=l){if(n+(m=p-l+2)>o+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)s[n++]=0;n--}}!function(e){for(var t=0;t<=58;++t)y[t]=0;for(t=0;t<i;++t)y[e[t]]+=1;var r=0;for(t=58;t>0;--t){var a=r+y[t]>>1;y[t]=r,r=a}for(t=0;t<i;++t){var n=e[t];n>0&&(e[t]=n|y[n]++<<6)}}(s)}function b(e){return 63&e}function w(e){return e>>6}var A={c:0,lc:0};function M(e,t,r,a){e=e<<8|I(r,a),t+=8,A.c=e,A.lc=t}var T={c:0,lc:0};function S(e,t,r,a,n,i,o,s,l,u){if(e==t){a<8&&(M(r,a,n,o),r=A.c,a=A.lc);var c=r>>(a-=8);if(out+c>oe)throw"Issue with getCode";for(var d=out[-1];c-- >0;)s[l.value++]=d}else{if(!(l.value<u))throw"Issue with getCode";s[l.value++]=e}T.c=r,T.lc=a}function E(e){var t=function(e){return 65535&e}(e);return t>32767?t-65536:t}var _={a:0,b:0};function F(e,t){var r=E(e),a=E(t),n=r+(1&a)+(a>>1),i=n,o=n-a;_.a=i,_.b=o}function P(e,t,r,a,n,i,o){for(var s,l=r>n?n:r,u=1;u<=l;)u<<=1;for(s=u>>=1,u>>=1;u>=1;){for(var c,d,f,h,p=0,m=p+i*(n-s),v=i*u,g=i*s,y=a*u,x=a*s;p<=m;p+=g){for(var b=p,w=p+a*(r-s);b<=w;b+=x){var A=b+y,M=(T=b+v)+y;F(t[b+e],t[T+e]),c=_.a,f=_.b,F(t[A+e],t[M+e]),d=_.a,h=_.b,F(c,d),t[b+e]=_.a,t[A+e]=_.b,F(f,h),t[T+e]=_.a,t[M+e]=_.b}if(r&u){var T=b+v;F(t[b+e],t[T+e]),c=_.a,t[T+e]=_.b,t[b+e]=c}}if(n&u)for(b=p,w=p+a*(r-s);b<=w;b+=x){A=b+y;F(t[b+e],t[A+e]),c=_.a,t[A+e]=_.b,t[b+e]=c}s=u,u>>=1}return p}function L(e,t,r,a,l,u,c){var d=r.value,f=R(t,r),h=R(t,r);r.value+=4;var p=R(t,r);if(r.value+=4,f<0||f>=i||h<0||h>=i)throw"Something wrong with HUF_ENCSIZE";var m=new Array(i),v=new Array(o);if(function(e){for(var t=0;t<o;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(v),x(e,0,r,a-(r.value-d),f,h,m),p>8*(a-(r.value-d)))throw"Something wrong with hufUncompress";!function(e,t,r,a){for(;t<=r;t++){var i=w(e[t]),o=b(e[t]);if(i>>o)throw"Invalid table entry";if(o>n){if((c=a[i>>o-n]).len)throw"Invalid table entry";if(c.lit++,c.p){var s=c.p;c.p=new Array(c.lit);for(var l=0;l<c.lit-1;++l)c.p[l]=s[l]}else c.p=new Array(1);c.p[c.lit-1]=t}else if(o){var u=0;for(l=1<<n-o;l>0;l--){var c;if((c=a[(i<<n-o)+u]).len||c.p)throw"Invalid table entry";c.len=o,c.lit=t,u++}}}}(m,f,h,v),function(e,t,r,a,i,o,l,u,c,d){for(var f=0,h=0,p=u,m=Math.trunc(i.value+(o+7)/8);i.value<m;)for(M(f,h,r,i),f=A.c,h=A.lc;h>=n;){if((x=t[f>>h-n&s]).len)h-=x.len,S(x.lit,l,f,h,r,0,i,c,d,p),f=T.c,h=T.lc;else{if(!x.p)throw"hufDecode issues";var v;for(v=0;v<x.lit;v++){for(var g=b(e[x.p[v]]);h<g&&i.value<m;)M(f,h,r,i),f=A.c,h=A.lc;if(h>=g&&w(e[x.p[v]])==(f>>h-g&(1<<g)-1)){h-=g,S(x.p[v],l,f,h,r,0,i,c,d,p),f=T.c,h=T.lc;break}}if(v==x.lit)throw"hufDecode issues"}}var y=8-o&7;for(f>>=y,h-=y;h>0;){var x;if(!(x=t[f<<n-h&s]).len)throw"hufDecode issues";h-=x.len,S(x.lit,l,f,h,r,0,i,c,d,p),f=T.c,h=T.lc}}(m,v,e,0,r,p,h,c,l,u)}function C(e,a,n,i,o,s,l,u,c,d){var f=new Uint8Array(r),h=B(i,o),p=B(i,o);if(p>=r)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(h<=p)for(var m=0;m<p-h+1;m++)f[m+h]=D(i,o);var v=new Uint16Array(t);!function(e,r){for(var a=0,n=0;n<t;++n)(0==n||e[n>>3]&1<<(7&n))&&(r[a++]=n);for(var i=a-1;a<t;)r[a++]=0}(f,v);L(n,i,o,R(i,o),e,a,s);var g=new Array(l),y=0;for(m=0;m<l;m++){u[m];g[m]={},g[m].start=y,g[m].end=g[m].start,g[m].nx=c,g[m].ny=d,g[m].size=1,y+=g[m].nx*g[m].ny*g[m].size}var x=0;for(m=0;m<l;m++)for(var b=0;b<g[m].size;++b)x+=P(b+x,e,g[m].nx,g[m].size,g[m].ny,g[m].nx*g[m].size);return function(e,t,r){for(var a=0;a<r;++a)t[a]=e[t[a]]}(v,e,y),!0}function O(e,t){for(var r=new Uint8Array(e),a=0;0!=r[t.value+a];)a+=1;var n=(new TextDecoder).decode(r.slice(t.value,t.value+a));return t.value=t.value+a+1,n}function N(e,t){var r=e.getUint32(0,!0);return t.value=t.value+d,r}function R(e,t){var r=e.getUint32(t.value,!0);return t.value=t.value+h,r}function I(e,t){var r=e[t.value];return t.value=t.value+m,r}function D(e,t){var r=e.getUint8(t.value);return t.value=t.value+m,r}function U(e,t){var r=e.getFloat32(t.value,!0);return t.value+=f,r}function k(e){var t=(31744&e)>>10,r=1023&e;return(e>>15?-1:1)*(t?31===t?r?NaN:1/0:Math.pow(2,t-15)*(1+r/1024):r/1024*6103515625e-14)}function B(e,t){var r=e.getUint16(t.value,!0);return t.value+=p,r}function j(e,t){return k(B(e,t))}function V(e,t,r,a,n){if("string"===a||"iccProfile"===a)return function(e,t,r){var a=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+r));return t.value=t.value+r,a}(t,r,n);if("chlist"===a)return function(e,t,r,a){for(var n=r.value,i=[];r.value<n+a-1;){var o=O(t,r),s=R(e,r),l=D(e,r);r.value+=3;var u=R(e,r),c=R(e,r);i.push({name:o,pixelType:s,pLinear:l,xSampling:u,ySampling:c})}return r.value+=1,i}(e,t,r,n);if("chromaticities"===a)return function(e,t){return{redX:U(e,t),redY:U(e,t),greenX:U(e,t),greenY:U(e,t),blueX:U(e,t),blueY:U(e,t),whiteX:U(e,t),whiteY:U(e,t)}}(e,r);if("compression"===a)return function(e,t){return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION"][D(e,t)]}(e,r);if("box2i"===a)return function(e,t){return{xMin:R(e,t),yMin:R(e,t),xMax:R(e,t),yMax:R(e,t)}}(e,r);if("lineOrder"===a)return function(e,t){return["INCREASING_Y"][D(e,t)]}(e,r);if("float"===a)return U(e,r);if("v2f"===a)return function(e,t){return[U(e,t),U(e,t)]}(e,r);if("int"===a)return R(e,r);throw"Cannot parse value for unsupported type: "+a}for(var G=new DataView(e),z=new Uint8Array(e),X={},H=(G.getUint32(0,!0),G.getUint8(4,!0),G.getUint8(5,!0),{value:8}),Y=!0;Y;){var W=O(e,H);if(0==W)Y=!1;else{var Q=V(G,e,H,O(e,H),R(G,H));X[W]=Q}}var q=X.dataWindow.yMax+1,K=1;"PIZ_COMPRESSION"===X.compression&&(K=32);for(var Z=q/K,J=0;J<Z;J++)N(G,H);var $=X.dataWindow.xMax-X.dataWindow.xMin+1,ee=X.dataWindow.yMax-X.dataWindow.yMin+1,te=X.channels.length,re=new Float32Array($*ee*te),ae={R:0,G:1,B:2,A:3};if("NO_COMPRESSION"===X.compression)for(var ne=0;ne<ee;ne++)for(var ie=R(G,H),se=(R(G,H),0);se<X.channels.length;se++){var le=ae[X.channels[se].name];if(1!==X.channels[se].pixelType)throw"Only supported pixel format is HALF";for(var ue=0;ue<$;ue++){var ce=j(G,H);re[$*te*(ee-ie)+ue*te+le]=ce}}else{if("PIZ_COMPRESSION"!==X.compression)throw"Cannot decompress unsupported compression";for(var de=0;de<ee/K;de++){R(G,H),R(G,H);var fe=$*K*(2*X.channels.length),he=new Uint16Array(fe);C(he,{value:0},z,G,H,fe,te,X.channels,$,K);for(var pe=0;pe<K;pe++)for(se=0;se<X.channels.length;se++){le=ae[X.channels[se].name];if(1!==X.channels[se].pixelType)throw"Only supported pixel format is HALF";for(ue=0;ue<$;ue++){ce=k(he[se*(K*$)+pe*$+ue]);re[$*te*(ee-(pe+de*K))+ue*te+le]=ce}}}}return{header:X,width:$,height:ee,data:re,format:a.RGBFormat,type:a.FloatType}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(){var e=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager};function t(e){var t,r=e.Content,a=e.RelativeFilename||e.Filename,i=a.slice(a.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":if("function"!=typeof n.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===n.Loader.Handlers.get(".tga")&&n.Loader.Handlers.add(/\.tga$/i,new n.TGALoader),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"==typeof r)return"data:"+t+";base64,"+r;var o=new Uint8Array(r);return window.URL.createObjectURL(new Blob([o],{type:t}))}function r(e,t,r,a){var i=function(e,t,r,a){var i,o,s=t.path,l=a.get(e.id).children;void 0!==l&&l.length>0&&void 0!==r[l[0].ID]&&(0!==(i=r[l[0].ID]).indexOf("blob:")&&0!==i.indexOf("data:")||t.setPath(void 0));o="tga"===e.FileName.slice(-3).toLowerCase()?n.Loader.Handlers.get(".tga").load(i):t.load(i);return t.setPath(s),o}(e,t,r,a);i.ID=e.id,i.name=e.attrName;var o=e.WrapModeU,s=e.WrapModeV,l=void 0!==o?o.value:0,u=void 0!==s?s.value:0;if(i.wrapS=0===l?n.RepeatWrapping:n.ClampToEdgeWrapping,i.wrapT=0===u?n.RepeatWrapping:n.ClampToEdgeWrapping,"Scaling"in e){var c=e.Scaling.value;i.repeat.x=c[0],i.repeat.y=c[1]}return i}function i(e,t,r,i){var s=t.id,l=t.attrName,u=t.ShadingModel;if("object"===(void 0===u?"undefined":a(u))&&(u=u.value),!i.has(s))return null;var c,d=function(e,t,r,a,i){var s={};t.BumpFactor&&(s.bumpScale=t.BumpFactor.value);t.Diffuse?s.color=(new n.Color).fromArray(t.Diffuse.value):t.DiffuseColor&&"Color"===t.DiffuseColor.type&&(s.color=(new n.Color).fromArray(t.DiffuseColor.value));t.DisplacementFactor&&(s.displacementScale=t.DisplacementFactor.value);t.Emissive?s.emissive=(new n.Color).fromArray(t.Emissive.value):t.EmissiveColor&&"Color"===t.EmissiveColor.type&&(s.emissive=(new n.Color).fromArray(t.EmissiveColor.value));t.EmissiveFactor&&(s.emissiveIntensity=parseFloat(t.EmissiveFactor.value));t.Opacity&&(s.opacity=parseFloat(t.Opacity.value));s.opacity<1&&(s.transparent=!0);t.ReflectionFactor&&(s.reflectivity=t.ReflectionFactor.value);t.Shininess&&(s.shininess=t.Shininess.value);t.Specular?s.specular=(new n.Color).fromArray(t.Specular.value):t.SpecularColor&&"Color"===t.SpecularColor.type&&(s.specular=(new n.Color).fromArray(t.SpecularColor.value));return i.get(a).children.forEach((function(t){var a=t.relationship;switch(a){case"Bump":s.bumpMap=r.get(t.ID);break;case"DiffuseColor":s.map=o(e,r,t.ID,i);break;case"DisplacementColor":s.displacementMap=o(e,r,t.ID,i);break;case"EmissiveColor":s.emissiveMap=o(e,r,t.ID,i);break;case"NormalMap":s.normalMap=o(e,r,t.ID,i);break;case"ReflectionColor":s.envMap=o(e,r,t.ID,i),s.envMap.mapping=n.EquirectangularReflectionMapping;break;case"SpecularColor":s.specularMap=o(e,r,t.ID,i);break;case"TransparentColor":s.alphaMap=o(e,r,t.ID,i),s.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",a)}})),s}(e,t,r,s,i);switch(u.toLowerCase()){case"phong":c=new n.MeshPhongMaterial;break;case"lambert":c=new n.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',u),c=new n.MeshPhongMaterial({color:3342591})}return c.setValues(d),c.name=l,c}function o(e,t,r,a){return"LayeredTexture"in e.Objects&&r in e.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),r=a.get(r).children[0].ID),t.get(r)}function s(e,t){var r=[];return e.children.forEach((function(e){var a=t[e.ID];if("Cluster"===a.attrType){var i={ID:e.ID,indices:[],weights:[],transform:(new n.Matrix4).fromArray(a.Transform.a),transformLink:(new n.Matrix4).fromArray(a.TransformLink.a),linkMode:a.Mode};"Indexes"in a&&(i.indices=a.Indexes.a,i.weights=a.Weights.a),r.push(i)}})),{rawBones:r,bones:[]}}function l(e,t,r,a){for(var n=[],i=0;i<e.children.length;i++){if(8===i){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var o=e.children[i],s=r[o.ID],l={name:s.attrName,initialWeight:s.DeformPercent,id:s.id,fullWeights:s.FullWeights.a};if("BlendShapeChannel"!==s.attrType)return;a.get(parseInt(o.ID)).children.forEach((function(e){"DeformPercent"===e.relationship?l.weightCurveID=e.ID:l.geoID=e.ID})),n.push(l)}return n}function u(e,t,r,a){switch(r.attrType){case"Mesh":return function(e,t,r,a){var i=a.skeletons,o=a.morphTargets,s=t.parents.map((function(t){return e.Objects.Model[t.ID]}));if(0===s.length)return;var l=t.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null),u=t.children.reduce((function(e,t){return void 0!==o[t.ID]&&(e=o[t.ID]),e}),null),f=new n.Matrix4,h=s[0];if("GeometricRotation"in h){var p=h.GeometricRotation.value.map(n.Math.degToRad);p[3]="ZYX",f.makeRotationFromEuler((new n.Euler).fromArray(p))}"GeometricTranslation"in h&&f.setPosition((new n.Vector3).fromArray(h.GeometricTranslation.value));"GeometricScaling"in h&&f.scale((new n.Vector3).fromArray(h.GeometricScaling.value));return function(e,t,r,a,i){var o=new n.BufferGeometry;t.attrName&&(o.name=t.attrName);var s=function(e,t){var r={};r.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],r.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(r.color=function(e){var t=e.MappingInformationType,r=e.ReferenceInformationType,a=e.Colors.a,n=[];"IndexToDirect"===r&&(n=e.ColorIndex.a);return{dataSize:4,buffer:a,indices:n,mappingType:t,referenceType:r}}(e.LayerElementColor[0]));e.LayerElementMaterial&&(r.material=function(e){var t=e.MappingInformationType,r=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:r};for(var a=e.Materials.a,n=[],i=0;i<a.length;++i)n.push(i);return{dataSize:1,buffer:a,indices:n,mappingType:t,referenceType:r}}(e.LayerElementMaterial[0]));e.LayerElementNormal&&(r.normal=function(e){var t=e.MappingInformationType,r=e.ReferenceInformationType,a=e.Normals.a,n=[];"IndexToDirect"===r&&("NormalIndex"in e?n=e.NormalIndex.a:"NormalsIndex"in e&&(n=e.NormalsIndex.a));return{dataSize:3,buffer:a,indices:n,mappingType:t,referenceType:r}}(e.LayerElementNormal[0]));if(e.LayerElementUV){r.uv=[];for(var a=0;e.LayerElementUV[a];)r.uv.push(d(e.LayerElementUV[a])),a++}r.weightTable={},null!==t&&(r.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(a,n){void 0===r.weightTable[a]&&(r.weightTable[a]=[]),r.weightTable[a].push({id:t,weight:e.weights[n]})}))})));return r}(t,r),l=c(s),u=new n.Float32BufferAttribute(l.vertex,3);i.applyToBufferAttribute(u),o.addAttribute("position",u),l.colors.length>0&&o.addAttribute("color",new n.Float32BufferAttribute(l.colors,3));r&&(o.addAttribute("skinIndex",new n.Uint16BufferAttribute(l.weightsIndices,4)),o.addAttribute("skinWeight",new n.Float32BufferAttribute(l.vertexWeights,4)),o.FBX_Deformer=r);if(l.normal.length>0){var f=new n.Float32BufferAttribute(l.normal,3);(new n.Matrix3).getNormalMatrix(i).applyToBufferAttribute(f),o.addAttribute("normal",f)}if(l.uvs.forEach((function(e,t){var r="uv"+(t+1).toString();0===t&&(r="uv"),o.addAttribute(r,new n.Float32BufferAttribute(l.uvs[t],2))})),s.material&&"AllSame"!==s.material.mappingType){var h=l.materialIndex[0],p=0;if(l.materialIndex.forEach((function(e,t){e!==h&&(o.addGroup(p,t-p,h),h=e,p=t)})),o.groups.length>0){var m=o.groups[o.groups.length-1],v=m.start+m.count;v!==l.materialIndex.length&&o.addGroup(v,l.materialIndex.length-v,h)}0===o.groups.length&&o.addGroup(0,l.materialIndex.length,l.materialIndex[0])}return function(e,t,r,a,i){if(null===a)return;t.morphAttributes.position=[],t.morphAttributes.normal=[],a.rawTargets.forEach((function(a){var o=e.Objects.Geometry[a.geoID];void 0!==o&&function(e,t,r,a){var i=new n.BufferGeometry;r.attrName&&(i.name=r.attrName);for(var o=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],s=void 0!==t.Vertices?t.Vertices.a.slice():[],l=void 0!==r.Vertices?r.Vertices.a:[],u=void 0!==r.Indexes?r.Indexes.a:[],d=0;d<u.length;d++){var f=3*u[d];s[f]+=l[3*d],s[f+1]+=l[3*d+1],s[f+2]+=l[3*d+2]}var h=c({vertexIndices:o,vertexPositions:s}),p=new n.Float32BufferAttribute(h.vertex,3);p.name=r.attrName,a.applyToBufferAttribute(p),e.morphAttributes.position.push(p)}(t,r,o,i)}))}(e,o,t,a,i),o}(e,r,l,u,f)}(e,t,r,a);case"NurbsCurve":return function(e){if(void 0===n.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new n.BufferGeometry;var t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new n.BufferGeometry;for(var r,a,i=t-1,o=e.KnotVector.a,s=[],l=e.Points.a,u=0,c=l.length;u<c;u+=4)s.push((new n.Vector4).fromArray(l,u));if("Closed"===e.Form)s.push(s[0]);else if("Periodic"===e.Form){r=i,a=o.length-1-r;for(u=0;u<i;++u)s.push(s[u])}var d=new n.NURBSCurve(i,o,s,r,a).getPoints(7*s.length),f=new Float32Array(3*d.length);d.forEach((function(e,t){e.toArray(f,3*t)}));var h=new n.BufferGeometry;return h.addAttribute("position",new n.BufferAttribute(f,3)),h}(r)}}function c(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},r=0,a=0,n=!1,i=[],o=[],s=[],l=[],u=[],c=[];return e.vertexIndices.forEach((function(d,f){var p=!1;d<0&&(d^=-1,p=!0);var m=[],v=[];if(i.push(3*d,3*d+1,3*d+2),e.color){var g=h(f,r,d,e.color);s.push(g[0],g[1],g[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),m.push(e.id)})),v.length>4){n||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),n=!0);var y=[0,0,0,0],x=[0,0,0,0];v.forEach((function(e,t){var r=e,a=m[t];x.forEach((function(e,t,n){if(r>e){n[t]=r,r=e;var i=y[t];y[t]=a,a=i}}))})),m=y,v=x}for(;v.length<4;)v.push(0),m.push(0);for(var b=0;b<4;++b)u.push(v[b]),c.push(m[b])}if(e.normal){g=h(f,r,d,e.normal);o.push(g[0],g[1],g[2])}if(e.material&&"AllSame"!==e.material.mappingType)var w=h(f,r,d,e.material)[0];e.uv&&e.uv.forEach((function(e,t){var a=h(f,r,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(a[0]),l[t].push(a[1])})),a++,p&&(!function(e,t,r,a,n,i,o,s,l,u){for(var c=2;c<u;c++)e.vertex.push(t.vertexPositions[r[0]]),e.vertex.push(t.vertexPositions[r[1]]),e.vertex.push(t.vertexPositions[r[2]]),e.vertex.push(t.vertexPositions[r[3*(c-1)]]),e.vertex.push(t.vertexPositions[r[3*(c-1)+1]]),e.vertex.push(t.vertexPositions[r[3*(c-1)+2]]),e.vertex.push(t.vertexPositions[r[3*c]]),e.vertex.push(t.vertexPositions[r[3*c+1]]),e.vertex.push(t.vertexPositions[r[3*c+2]]),t.skeleton&&(e.vertexWeights.push(s[0]),e.vertexWeights.push(s[1]),e.vertexWeights.push(s[2]),e.vertexWeights.push(s[3]),e.vertexWeights.push(s[4*(c-1)]),e.vertexWeights.push(s[4*(c-1)+1]),e.vertexWeights.push(s[4*(c-1)+2]),e.vertexWeights.push(s[4*(c-1)+3]),e.vertexWeights.push(s[4*c]),e.vertexWeights.push(s[4*c+1]),e.vertexWeights.push(s[4*c+2]),e.vertexWeights.push(s[4*c+3]),e.weightsIndices.push(l[0]),e.weightsIndices.push(l[1]),e.weightsIndices.push(l[2]),e.weightsIndices.push(l[3]),e.weightsIndices.push(l[4*(c-1)]),e.weightsIndices.push(l[4*(c-1)+1]),e.weightsIndices.push(l[4*(c-1)+2]),e.weightsIndices.push(l[4*(c-1)+3]),e.weightsIndices.push(l[4*c]),e.weightsIndices.push(l[4*c+1]),e.weightsIndices.push(l[4*c+2]),e.weightsIndices.push(l[4*c+3])),t.color&&(e.colors.push(i[0]),e.colors.push(i[1]),e.colors.push(i[2]),e.colors.push(i[3*(c-1)]),e.colors.push(i[3*(c-1)+1]),e.colors.push(i[3*(c-1)+2]),e.colors.push(i[3*c]),e.colors.push(i[3*c+1]),e.colors.push(i[3*c+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(a),e.materialIndex.push(a),e.materialIndex.push(a)),t.normal&&(e.normal.push(n[0]),e.normal.push(n[1]),e.normal.push(n[2]),e.normal.push(n[3*(c-1)]),e.normal.push(n[3*(c-1)+1]),e.normal.push(n[3*(c-1)+2]),e.normal.push(n[3*c]),e.normal.push(n[3*c+1]),e.normal.push(n[3*c+2])),t.uv&&t.uv.forEach((function(t,r){void 0===e.uvs[r]&&(e.uvs[r]=[]),e.uvs[r].push(o[r][0]),e.uvs[r].push(o[r][1]),e.uvs[r].push(o[r][2*(c-1)]),e.uvs[r].push(o[r][2*(c-1)+1]),e.uvs[r].push(o[r][2*c]),e.uvs[r].push(o[r][2*c+1])}))}(t,e,i,w,o,s,l,u,c,a),r++,a=0,i=[],o=[],s=[],l=[],u=[],c=[])})),t}function d(e){var t=e.MappingInformationType,r=e.ReferenceInformationType,a=e.UV.a,n=[];return"IndexToDirect"===r&&(n=e.UVIndex.a),{dataSize:2,buffer:a,indices:n,mappingType:t,referenceType:r}}Object.assign(e.prototype,{load:function(e,t,r,a){var i=this,o=n.LoaderUtils.extractUrlBase(e),s=new n.FileLoader(this.manager);s.setResponseType("arraybuffer"),s.load(e,(function(r){try{var n=i.parse(r,o);t(n)}catch(t){window.setTimeout((function(){a&&a(t),i.manager.itemError(e)}),0)}}),r,a)},parse:function(e,a){var o,c,d;if(d="Kaydara FBX Binary \0",(c=e).byteLength>=d.length&&d===O(c,0,d.length))o=(new E).parse(e);else{var f=O(e);if(!function(e){var t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],r=0;for(var a=0;a<t.length;++a){if((i=void 0,i=e[(n=1)-1],e=e.slice(r+n),r++,i)===t[a])return!1}var n,i;return!0}(f))throw new Error("THREE.FBXLoader: Unknown format.");if(P(f)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+P(f));o=(new S).parse(f)}var h=function(e){var t=new Map;if("Connections"in e){e.Connections.connections.forEach((function(e){var r=e[0],a=e[1],n=e[2];t.has(r)||t.set(r,{parents:[],children:[]});var i={ID:a,relationship:n};t.get(r).parents.push(i),t.has(a)||t.set(a,{parents:[],children:[]});var o={ID:r,relationship:n};t.get(a).children.push(o)}))}return t}(o),w=function(e){var r={},a={};if("Video"in e.Objects){var n=e.Objects.Video;for(var i in n){var o=n[i],s=parseInt(i);if(r[s]=o.RelativeFilename||o.Filename,"Content"in o){var l=o.Content instanceof ArrayBuffer&&o.Content.byteLength>0,u="string"==typeof o.Content&&""!==o.Content;if(l||u){var c=t(n[i]);a[o.RelativeFilename||o.Filename]=c}}}}for(var s in r){var d=r[s];void 0!==a[d]?r[s]=a[d]:r[s]=r[s].split("\\").pop()}return r}(o),A=function(e,t,r){var a=new Map;if("Material"in e.Objects){var n=e.Objects.Material;for(var o in n){var s=i(e,n[o],t,r);null!==s&&a.set(parseInt(o),s)}}return a}(o,function(e,t,a,n){var i=new Map;if("Texture"in e.Objects){var o=e.Objects.Texture;for(var s in o){var l=r(o[s],t,a,n);i.set(parseInt(s),l)}}return i}(o,new n.TextureLoader(this.manager).setPath(a),w,h),h),M=function(e,t){var r={},a={};if("Deformer"in e.Objects){var n=e.Objects.Deformer;for(var i in n){var o=n[i],u=t.get(parseInt(i));if("Skin"===o.attrType){var c=s(u,n);c.ID=i,u.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),c.geometryID=u.parents[0].ID,r[i]=c}else if("BlendShape"===o.attrType){var d={id:i};d.rawTargets=l(u,o,n,t),d.id=i,u.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),d.parentGeoID=u.parents[0].ID,a[i]=d}}}return{skeletons:r,morphTargets:a}}(o,h),T=function(e,t,r){var a=new Map;if("Geometry"in e.Objects){var n=e.Objects.Geometry;for(var i in n){var o=t.get(parseInt(i)),s=u(e,o,n[i],r);a.set(parseInt(i),s)}}return a}(o,h,M);return function(e,t,r,a,i){var o=new n.Group,s=function(e,t,r,a,i){var o=new Map,s=e.Objects.Model;for(var l in s){var u=parseInt(l),c=s[l],d=i.get(u),f=p(d,t,u,c.attrName);if(!f){switch(c.attrType){case"Camera":f=m(e,d);break;case"Light":f=v(e,d);break;case"Mesh":f=g(e,d,r,a);break;case"NurbsCurve":f=y(d,r);break;case"LimbNode":case"Null":default:f=new n.Group}f.name=n.PropertyBinding.sanitizeNodeName(c.attrName),f.ID=u}x(e,f,c),o.set(u,f)}return o}(e,r,a,i,t),l=e.Objects.Model;return s.forEach((function(r){var a=l[r.ID];!function(e,t,r,a,i){if("LookAtProperty"in r){a.get(t.ID).children.forEach((function(r){if("LookAtProperty"===r.relationship){var a=e.Objects.Model[r.ID];if("Lcl_Translation"in a){var o=a.Lcl_Translation.value;void 0!==t.target?(t.target.position.fromArray(o),i.add(t.target)):t.lookAt((new n.Vector3).fromArray(o))}}}))}}(e,r,a,t,o),t.get(r.ID).parents.forEach((function(e){var t=s.get(e.ID);void 0!==t&&t.add(r)})),null===r.parent&&o.add(r)})),function(e,t,r,a,i){var o=function(e){var t={};if("Pose"in e.Objects){var r=e.Objects.Pose;for(var a in r)if("BindPose"===r[a].attrType){var i=r[a].PoseNode;Array.isArray(i)?i.forEach((function(e){t[e.Node]=(new n.Matrix4).fromArray(e.Matrix.a)})):t[i.Node]=(new n.Matrix4).fromArray(i.Matrix.a)}}return t}(e);for(var s in t){var l=t[s];i.get(parseInt(l.ID)).parents.forEach((function(e){if(r.has(e.ID)){var t=e.ID;i.get(t).parents.forEach((function(e){a.has(e.ID)&&a.get(e.ID).bind(new n.Skeleton(l.bones),o[e.ID])}))}}))}}(e,r,a,s,t),function(e,t,r){r.animations=[];var a=function(e,t){if(void 0===e.Objects.AnimationCurve)return;var r=function(e){var t=e.Objects.AnimationCurveNode,r=new Map;for(var a in t){var n=t[a];if(null!==n.attrName.match(/S|R|T/)){var i={id:n.id,attr:n.attrName,curves:{}};r.set(i.id,i)}}return r}(e);!function(e,t,r){var a=e.Objects.AnimationCurve;for(var n in a){var i={id:a[n].id,times:a[n].KeyTime.a.map(L),values:a[n].KeyValueFloat.a},o=t.get(i.id);if(void 0!==o){var s=o.parents[0].ID,l=o.parents[0].relationship;l.match(/X/)?r.get(s).curves.x=i:l.match(/Y/)?r.get(s).curves.y=i:l.match(/Z/)&&(r.get(s).curves.z=i)}}}(e,t,r);var a=function(e,t,r){var a=e.Objects.AnimationLayer,i=new Map;for(var o in a){var s=[],l=t.get(parseInt(o));if(void 0!==l)l.children.forEach((function(a,i){if(r.has(a.ID)){var o=r.get(a.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===s[i]){var l;t.get(a.ID).parents.forEach((function(e){void 0!==e.relationship&&(l=e.ID)}));var u=e.Objects.Model[l.toString()],c={modelName:n.PropertyBinding.sanitizeNodeName(u.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1]};"Lcl_Translation"in u&&(c.initialPosition=u.Lcl_Translation.value),"Lcl_Rotation"in u&&(c.initialRotation=u.Lcl_Rotation.value),"Lcl_Scaling"in u&&(c.initialScale=u.Lcl_Scaling.value),"PreRotation"in u&&(c.preRotations=u.PreRotation.value),s[i]=c}s[i][o.attr]=o}}})),i.set(parseInt(o),s)}return i}(e,t,r);return function(e,t,r){var a=e.Objects.AnimationStack,n={};for(var i in a){var o=t.get(parseInt(i)).children;o.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=r.get(o[0].ID);n[i]={name:a[i].attrName,layer:s}}return n}(e,t,a)}(e,t);if(void 0===a)return;for(var i in a){var o=b(a[i]);r.animations.push(o)}}(e,t,o),function(e,t){if("GlobalSettings"in e&&"AmbientColor"in e.GlobalSettings){var r=e.GlobalSettings.AmbientColor.value,a=r[0],i=r[1],o=r[2];if(0!==a||0!==i||0!==o){var s=new n.Color(a,i,o);t.add(new n.AmbientLight(s,1))}}}(e,o),o}(o,h,M.skeletons,T,A)}});var f=[];function h(e,t,r,a){var n;switch(a.mappingType){case"ByPolygonVertex":n=e;break;case"ByPolygon":n=t;break;case"ByVertice":n=r;break;case"AllSame":n=a.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+a.mappingType)}"IndexToDirect"===a.referenceType&&(n=a.indices[n]);var i=n*a.dataSize,o=i+a.dataSize;return function(e,t,r,a){for(var n=r,i=0;n<a;n++,i++)e[i]=t[n];return e}(f,a.buffer,i,o)}function p(e,t,r,a){var i=null;return e.parents.forEach((function(e){for(var o in t){var s=t[o];s.rawBones.forEach((function(t,o){if(t.ID===e.ID){var l=i;(i=new n.Bone).matrixWorld.copy(t.transformLink),i.name=n.PropertyBinding.sanitizeNodeName(a),i.ID=r,s.bones[o]=i,null!==l&&i.add(l)}}))}})),i}function m(e,t){var r,a;if(t.children.forEach((function(t){var r=e.Objects.NodeAttribute[t.ID];void 0!==r&&(a=r)})),void 0===a)r=new n.Object3D;else{var i=0;void 0!==a.CameraProjectionType&&1===a.CameraProjectionType.value&&(i=1);var o=1;void 0!==a.NearPlane&&(o=a.NearPlane.value/1e3);var s=1e3;void 0!==a.FarPlane&&(s=a.FarPlane.value/1e3);var l=window.innerWidth,u=window.innerHeight;void 0!==a.AspectWidth&&void 0!==a.AspectHeight&&(l=a.AspectWidth.value,u=a.AspectHeight.value);var c=l/u,d=45;void 0!==a.FieldOfView&&(d=a.FieldOfView.value);var f=a.FocalLength?a.FocalLength.value:null;switch(i){case 0:r=new n.PerspectiveCamera(d,c,o,s),null!==f&&r.setFocalLength(f);break;case 1:r=new n.OrthographicCamera(-l/2,l/2,u/2,-u/2,o,s);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),r=new n.Object3D}}return r}function v(e,t){var r,a;if(t.children.forEach((function(t){var r=e.Objects.NodeAttribute[t.ID];void 0!==r&&(a=r)})),void 0===a)r=new n.Object3D;else{var i;i=void 0===a.LightType?0:a.LightType.value;var o=16777215;void 0!==a.Color&&(o=(new n.Color).fromArray(a.Color.value));var s=void 0===a.Intensity?1:a.Intensity.value/100;void 0!==a.CastLightOnObject&&0===a.CastLightOnObject.value&&(s=0);var l=0;void 0!==a.FarAttenuationEnd&&(l=void 0!==a.EnableFarAttenuation&&0===a.EnableFarAttenuation.value?0:a.FarAttenuationEnd.value);switch(i){case 0:r=new n.PointLight(o,s,l,1);break;case 1:r=new n.DirectionalLight(o,s);break;case 2:var u=Math.PI/3;void 0!==a.InnerAngle&&(u=n.Math.degToRad(a.InnerAngle.value));var c=0;void 0!==a.OuterAngle&&(c=n.Math.degToRad(a.OuterAngle.value),c=Math.max(c,1)),r=new n.SpotLight(o,s,l,u,c,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+a.LightType.value+", defaulting to a THREE.PointLight."),r=new n.PointLight(o,s)}void 0!==a.CastShadows&&1===a.CastShadows.value&&(r.castShadow=!0)}return r}function g(e,t,r,a){var i,o=null,s=null,l=[];return t.children.forEach((function(e){r.has(e.ID)&&(o=r.get(e.ID)),a.has(e.ID)&&l.push(a.get(e.ID))})),l.length>1?s=l:l.length>0?s=l[0]:(s=new n.MeshPhongMaterial({color:13421772}),l.push(s)),"color"in o.attributes&&l.forEach((function(e){e.vertexColors=n.VertexColors})),o.FBX_Deformer?(l.forEach((function(e){e.skinning=!0})),i=new n.SkinnedMesh(o,s)):i=new n.Mesh(o,s),i}function y(e,t){var r=e.children.reduce((function(e,r){return t.has(r.ID)&&(e=t.get(r.ID)),e}),null),a=new n.LineBasicMaterial({color:3342591,linewidth:1});return new n.Line(r,a)}function x(e,t,r){if("RotationOrder"in r){var a=parseInt(r.RotationOrder.value,10);a>0&&a<6?console.warn("THREE.FBXLoader: unsupported Euler Order: %s. Currently only XYZ order is supported. Animations and rotations may be incorrect.",["XYZ","XZY","YZX","ZXY","YXZ","ZYX","SphericXYZ"][a]):6===a&&console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.")}if("Lcl_Translation"in r&&t.position.fromArray(r.Lcl_Translation.value),"Lcl_Rotation"in r){var i=r.Lcl_Rotation.value.map(n.Math.degToRad);i.push("ZYX"),t.quaternion.setFromEuler((new n.Euler).fromArray(i))}if("Lcl_Scaling"in r&&t.scale.fromArray(r.Lcl_Scaling.value),"PreRotation"in r){var o=r.PreRotation.value.map(n.Math.degToRad);o[3]="ZYX";var s=(new n.Euler).fromArray(o);s=(new n.Quaternion).setFromEuler(s),t.quaternion.premultiply(s)}}function b(e){var t=[];return e.layer.forEach((function(e){t=t.concat(function(e){var t=[];if(void 0!==e.T&&Object.keys(e.T.curves).length>0){var r=w(e.modelName,e.T.curves,e.initialPosition,"position");void 0!==r&&t.push(r)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var a=function(e,t,r,a){void 0!==t.x&&(T(t.x),t.x.values=t.x.values.map(n.Math.degToRad));void 0!==t.y&&(T(t.y),t.y.values=t.y.values.map(n.Math.degToRad));void 0!==t.z&&(T(t.z),t.z.values=t.z.values.map(n.Math.degToRad));var i=M(t),o=A(i,t,r);void 0!==a&&((a=a.map(n.Math.degToRad)).push("ZYX"),a=(new n.Euler).fromArray(a),a=(new n.Quaternion).setFromEuler(a));for(var s=new n.Quaternion,l=new n.Euler,u=[],c=0;c<o.length;c+=3)l.set(o[c],o[c+1],o[c+2],"ZYX"),s.setFromEuler(l),void 0!==a&&s.premultiply(a),s.toArray(u,c/3*4);return new n.QuaternionKeyframeTrack(e+".quaternion",i,u)}(e.modelName,e.R.curves,e.initialRotation,e.preRotations);void 0!==a&&t.push(a)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var i=w(e.modelName,e.S.curves,e.initialScale,"scale");void 0!==i&&t.push(i)}return t}(e))})),new n.AnimationClip(e.name,-1,t)}function w(e,t,r,a){var i=M(t),o=A(i,t,r);return new n.VectorKeyframeTrack(e+"."+a,i,o)}function A(e,t,r){var a=r,n=[],i=-1,o=-1,s=-1;return e.forEach((function(e){if(t.x&&(i=t.x.times.indexOf(e)),t.y&&(o=t.y.times.indexOf(e)),t.z&&(s=t.z.times.indexOf(e)),-1!==i){var r=t.x.values[i];n.push(r),a[0]=r}else n.push(a[0]);if(-1!==o){var l=t.y.values[o];n.push(l),a[1]=l}else n.push(a[1]);if(-1!==s){var u=t.z.values[s];n.push(u),a[2]=u}else n.push(a[2])})),n}function M(e){var t=[];return void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})).filter((function(e,t,r){return r.indexOf(e)==t}))}function T(e){for(var t=1;t<e.values.length;t++){var r=e.values[t-1],a=e.values[t]-r,n=Math.abs(a);if(n>=180){for(var i=n/180,o=a/i,s=r+o,l=e.times[t-1],u=(e.times[t]-l)/i,c=l+u,d=[],f=[];c<e.times[t];)d.push(c),c+=u,f.push(s),s+=o;e.times=N(e.times,t,d),e.values=N(e.values,t,f)}}}function S(){}function E(){}function _(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}function F(){}function P(e){var t=e.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function L(e){return e/46186158e3}function C(e){return e.split(",").map((function(e){return parseFloat(e)}))}function O(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=e.byteLength),n.LoaderUtils.decodeText(new Uint8Array(e,t,r))}function N(e,t,r){return e.slice(0,t).concat(r).concat(e.slice(t))}return Object.assign(S.prototype,{getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(e){this.nodeStack.push(e),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(e,t){this.currentProp=e,this.currentPropName=t},parse:function(e){this.currentIndent=0,this.allNodes=new F,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var t=this,r=e.split("\n");return r.forEach((function(e,a){var n=e.match(/^[\s\t]*;/),i=e.match(/^[\s\t]*$/);if(!n&&!i){var o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),s=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):s?t.parseNodeProperty(e,s,r[++a]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)}})),this.allNodes},parseNodeBegin:function(e,t){var r=t[1].trim().replace(/^"/,"").replace(/"$/,""),a=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),n={name:r},i=this.parseNodeAttr(a),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(r,n):r in o?("PoseNode"===r?o.PoseNode.push(n):void 0!==o[r].id&&(o[r]={},o[r][o[r].id]=o[r]),""!==i.id&&(o[r][i.id]=n)):"number"==typeof i.id?(o[r]={},o[r][i.id]=n):"Properties70"!==r&&(o[r]="PoseNode"===r?[n]:n),"number"==typeof i.id&&(n.id=i.id),""!==i.name&&(n.attrName=i.name),""!==i.type&&(n.attrType=i.type),this.pushStack(n)},parseNodeAttr:function(e){var t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));var r="",a="";return e.length>1&&(r=e[1].replace(/^(\w+)::/,""),a=e[2]),{id:t,name:r,type:a}},parseNodeProperty:function(e,t,r){var a=t[1].replace(/^"/,"").replace(/"$/,"").trim(),n=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===a&&","===n&&(n=r.replace(/"/g,"").replace(/,$/,"").trim());var i=this.getCurrentNode();if("Properties70"!==i.name){if("C"===a){var o=n.split(",").slice(1),s=parseInt(o[0]),l=parseInt(o[1]),u=n.split(",").slice(3);a="connections",function(e,t){for(var r=0,a=e.length,n=t.length;r<n;r++,a++)e[a]=t[r]}(n=[s,l],u=u.map((function(e){return e.trim().replace(/^"/,"")}))),void 0===i[a]&&(i[a]=[])}"Node"===a&&(i.id=n),a in i&&Array.isArray(i[a])?i[a].push(n):"a"!==a?i[a]=n:i.a=n,this.setCurrentProp(i,a),"a"===a&&","!==n.slice(-1)&&(i.a=C(n))}else this.parseNodeSpecialProperty(e,a,n)},parseNodePropertyContinued:function(e){var t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=C(t.a))},parseNodeSpecialProperty:function(e,t,r){var a=r.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),n=a[0],i=a[1],o=a[2],s=a[3],l=a[4];switch(i){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=C(l)}this.getPrevNode()[n]={type:i,type2:o,flag:s,value:l},this.setCurrentProp(this.getPrevNode(),n)}}),Object.assign(E.prototype,{parse:function(e){var t=new _(e);t.skip(23);var r=t.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+r);for(var a=new F;!this.endOfContent(t);){var n=this.parseNode(t,r);null!==n&&a.add(n.name,n)}return a},endOfContent:function(e){return e.size()%16==0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var r={},a=t>=7500?e.getUint64():e.getUint32(),n=t>=7500?e.getUint64():e.getUint32(),i=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),o=e.getString(i);if(0===a)return null;for(var s=[],l=0;l<n;l++)s.push(this.parseProperty(e));var u=s.length>0?s[0]:"",c=s.length>1?s[1]:"",d=s.length>2?s[2]:"";for(r.singleProperty=1===n&&e.getOffset()===a;a>e.getOffset();){var f=this.parseNode(e,t);null!==f&&this.parseSubNode(o,r,f)}return r.propertyList=s,"number"==typeof u&&(r.id=u),""!==c&&(r.attrName=c),""!==d&&(r.attrType=d),""!==o&&(r.name=o),r},parseSubNode:function(e,t,r){if(!0===r.singleProperty){var a=r.propertyList[0];Array.isArray(a)?(t[r.name]=r,r.a=a):t[r.name]=a}else if("Connections"===e&&"C"===r.name){var n=[];r.propertyList.forEach((function(e,t){0!==t&&n.push(e)})),void 0===t.connections&&(t.connections=[]),t.connections.push(n)}else if("Properties70"===r.name){Object.keys(r).forEach((function(e){t[e]=r[e]}))}else if("Properties70"===e&&"P"===r.name){var i,o=r.propertyList[0],s=r.propertyList[1],l=r.propertyList[2],u=r.propertyList[3];0===o.indexOf("Lcl ")&&(o=o.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),i="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[r.propertyList[4],r.propertyList[5],r.propertyList[6]]:r.propertyList[4],t[o]={type:s,type2:l,flag:u,value:i}}else void 0===t[r.name]?"number"==typeof r.id?(t[r.name]={},t[r.name][r.id]=r):t[r.name]=r:"PoseNode"===r.name?(Array.isArray(t[r.name])||(t[r.name]=[t[r.name]]),t[r.name].push(r)):void 0===t[r.name][r.id]&&(t[r.name][r.id]=r)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":var r=e.getUint32();return e.getArrayBuffer(r);case"S":r=e.getUint32();return e.getString(r);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var a=e.getUint32(),n=e.getUint32(),i=e.getUint32();if(0===n)switch(t){case"b":case"c":return e.getBooleanArray(a);case"d":return e.getFloat64Array(a);case"f":return e.getFloat32Array(a);case"i":return e.getInt32Array(a);case"l":return e.getInt64Array(a)}void 0===window.Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var o=new _(new Zlib.Inflate(new Uint8Array(e.getArrayBuffer(i))).decompress().buffer);switch(t){case"b":case"c":return o.getBooleanArray(a);case"d":return o.getFloat64Array(a);case"f":return o.getFloat32Array(a);case"i":return o.getInt32Array(a);case"l":return o.getInt64Array(a)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}),Object.assign(_.prototype,{getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1==(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getBoolean());return t},getUint8:function(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e},getInt16:function(){var e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},getInt32:function(){var e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},getInt32Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getInt32());return t},getUint32:function(){var e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},getInt64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,4294967295===(e=4294967295&~e)&&(t=t+1&4294967295),-(4294967296*t+(e=e+1&4294967295))):4294967296*t+e},getInt64Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getInt64());return t},getUint64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e},getFloat32:function(){var e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},getFloat32Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getFloat32());return t},getFloat64:function(){var e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},getFloat64Array:function(e){for(var t=[],r=0;r<e;r++)t.push(this.getFloat64());return t},getArrayBuffer:function(e){var t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},getString:function(e){for(var t=new Uint8Array(e),r=0;r<e;r++)t[r]=this.getUint8();var a=t.indexOf(0);return a>=0&&(t=t.slice(0,a)),n.LoaderUtils.decodeText(t)}}),Object.assign(F.prototype,{add:function(e,t){this[e]=t}}),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.splitLayer=!1};n.prototype.load=function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(e))}),r,n)},n.prototype.parse=function(e){var t={x:0,y:0,z:0,e:0,f:0,extruding:!1,relative:!1},r=[],n=void 0,i=new a.LineBasicMaterial({color:16711680});i.name="path";var o=new a.LineBasicMaterial({color:65280});function s(e){n={vertex:[],pathVertex:[],z:e.z},r.push(n)}function l(e,r){return t.relative?r:r-e}function u(e,r){return t.relative?e+r:r}o.name="extruded";for(var c,d,f=e.replace(/;.+/g,"").split("\n"),h=0;h<f.length;h++){var p=f[h].split(" "),m=p[0].toUpperCase(),v={};if(p.splice(1).forEach((function(e){if(void 0!==e[0]){var t=e[0].toLowerCase(),r=parseFloat(e.substring(1));v[t]=r}})),"G0"===m||"G1"===m){var g={x:void 0!==v.x?u(t.x,v.x):t.x,y:void 0!==v.y?u(t.y,v.y):t.y,z:void 0!==v.z?u(t.z,v.z):t.z,e:void 0!==v.e?u(t.e,v.e):t.e,f:void 0!==v.f?u(t.f,v.f):t.f};l(t.e,g.e)>0&&(g.extruding=l(t.e,g.e)>0,null!=n&&g.z==n.z||s(g)),c=t,d=g,void 0===n&&s(c),g.extruding?(n.vertex.push(c.x,c.y,c.z),n.vertex.push(d.x,d.y,d.z)):(n.pathVertex.push(c.x,c.y,c.z),n.pathVertex.push(d.x,d.y,d.z)),t=g}else if("G2"===m||"G3"===m)console.warn("THREE.GCodeLoader: Arc command not supported");else if("G90"===m)t.relative=!1;else if("G91"===m)t.relative=!0;else if("G92"===m){(g=t).x=void 0!==v.x?v.x:g.x,g.y=void 0!==v.y?v.y:g.y,g.z=void 0!==v.z?v.z:g.z,g.e=void 0!==v.e?v.e:g.e,t=g}else console.warn("THREE.GCodeLoader: Command not supported:"+m)}function y(e,t){var r=new a.BufferGeometry;r.addAttribute("position",new a.Float32BufferAttribute(e,3));var n=new a.LineSegments(r,t?o:i);n.name="layer"+h,x.add(n)}var x=new a.Group;if(x.name="gcode",this.splitLayer)for(h=0;h<r.length;h++){y((A=r[h]).vertex,!0),y(A.pathVertex,!1)}else{var b=[],w=[];for(h=0;h<r.length;h++){var A=r[h];b=b.concat(A.vertex),w=w.concat(A.pathVertex)}y(b,!0),y(w,!1)}return x.quaternion.setFromEuler(new a.Euler(-Math.PI/2,0,0)),x},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(6),o=(a=i)&&a.__esModule?a:{default:a};var s=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager,this.hdrLoader=new o.default};s.prototype.load=function(e,t,r,a,i){var o=function(e,t,r,a){var n=e[t+3],i=Math.pow(2,n-128)/255;r[a+0]=e[t+0]*i,r[a+1]=e[t+1]*i,r[a+2]=e[t+2]*i},s=function(){var e=new Float32Array(1),t=new Int32Array(e.buffer);function r(r){e[0]=r;var a=t[0],n=a>>16&32768,i=a>>12&2047,o=a>>23&255;return o<103?n:o>142?(n|=31744,n|=(255==o?0:1)&&8388607&a):o<113?n|=((i|=2048)>>114-o)+(i>>113-o&1):(n|=o-112<<10|i>>1,n+=1&i)}return function(e,t,a,n){var i=e[t+3],o=Math.pow(2,i-128)/255;a[n+0]=r(e[t+0]*o),a[n+1]=r(e[t+1]*o),a[n+2]=r(e[t+2]*o)}}(),l=new n.CubeTexture;l.type=e,l.encoding=e===n.UnsignedByteType?n.RGBEEncoding:n.LinearEncoding,l.format=e===n.UnsignedByteType?n.RGBAFormat:n.RGBFormat,l.minFilter=l.encoding===n.RGBEEncoding?n.NearestFilter:n.LinearFilter,l.magFilter=l.encoding===n.RGBEEncoding?n.NearestFilter:n.LinearFilter,l.generateMipmaps=l.encoding!==n.RGBEEncoding,l.anisotropy=0;var u=this.hdrLoader,c=0;function d(r,a,i,d){var f=new n.FileLoader(this.manager);f.setResponseType("arraybuffer"),f.load(t[r],(function(t){c++;var i=u._parser(t);if(i){if(e===n.FloatType){for(var d=i.data.length/4*3,f=new Float32Array(d),h=0;h<d;h++)o(i.data,4*h,f,3*h);i.data=f}else if(e===n.HalfFloatType){d=i.data.length/4*3;var p=new Uint16Array(d);for(h=0;h<d;h++)s(i.data,4*h,p,3*h);i.data=p}if(void 0!==i.image)l[r].images=i.image;else if(void 0!==i.data){var m=new n.DataTexture(i.data,i.width,i.height);m.format=l.format,m.type=l.type,m.encoding=l.encoding,m.minFilter=l.minFilter,m.magFilter=l.magFilter,m.generateMipmaps=l.generateMipmaps,l.images[r]=m}6===c&&(l.needsUpdate=!0,a&&a(l))}}),i,d)}for(var f=0;f<t.length;f++)d(f,r,a,i);return l},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){var t=new JSZip(e);function r(e){var r=decodeURI(e.init_from);r=r.replace("../","");var a=new RegExp(r+"$"),n=t.file(a);if(n.length){var i=n[0],o=new Blob([i.asArrayBuffer()],{type:"application/octet-binary"});e.build.src=URL.createObjectURL(o)}}var n=t.file(/dae$/i);if(n.length){var i=n[0],o=(new a.ColladaLoader).parse(i.asText()),s=o.library.images;for(var l in s)r(s[l]);return o}return console.error("KMZLoader: Couldn't find .dae file."),{scene:new a.Group}}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function e(){this._parser=e.parse};(n.prototype=Object.create(a.CompressedTextureLoader.prototype)).constructor=n,n.parse=function(e,t){var r=new i(e,1);return{mipmaps:r.mipmaps(t),width:r.pixelWidth,height:r.pixelHeight,format:r.glInternalFormat,isCubemap:6===r.numberOfFaces,mipmapCount:r.numberOfMipmapLevels}};var i=function(){function e(t,r,a,n){this.arrayBuffer=t;var i=new Uint8Array(this.arrayBuffer,0,12);if(171===i[0]&&75===i[1]&&84===i[2]&&88===i[3]&&32===i[4]&&49===i[5]&&49===i[6]&&187===i[7]&&13===i[8]&&10===i[9]&&26===i[10]&&10===i[11]){var o=new Int32Array(this.arrayBuffer,12,13),s=16909060===o[0];this.glType=s?this.switchEndainness(o[1]):o[1],this.glTypeSize=s?this.switchEndainness(o[2]):o[2],this.glFormat=s?this.switchEndainness(o[3]):o[3],this.glInternalFormat=s?this.switchEndainness(o[4]):o[4],this.glBaseInternalFormat=s?this.switchEndainness(o[5]):o[5],this.pixelWidth=s?this.switchEndainness(o[6]):o[6],this.pixelHeight=s?this.switchEndainness(o[7]):o[7],this.pixelDepth=s?this.switchEndainness(o[8]):o[8],this.numberOfArrayElements=s?this.switchEndainness(o[9]):o[9],this.numberOfFaces=s?this.switchEndainness(o[10]):o[10],this.numberOfMipmapLevels=s?this.switchEndainness(o[11]):o[11],this.bytesOfKeyValueData=s?this.switchEndainness(o[12]):o[12],0===this.glType?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0!==this.pixelHeight&&0===this.pixelDepth?0===this.numberOfArrayElements?this.numberOfFaces===r?this.loadType=e.COMPRESSED_2D:console.warn("number of faces expected"+r+", but found "+this.numberOfFaces):console.warn("texture arrays not currently supported"):console.warn("only 2D textures currently supported")):console.warn("only compressed formats currently supported")}else console.error("texture missing KTX identifier")}return e.prototype.switchEndainness=function(e){return(255&e)<<24|(65280&e)<<8|e>>8&65280|e>>24&255},e.prototype.mipmaps=function(t){for(var r=[],a=e.HEADER_LEN+this.bytesOfKeyValueData,n=this.pixelWidth,i=this.pixelHeight,o=t?this.numberOfMipmapLevels:1,s=0;s<o;s++){for(var l=new Int32Array(this.arrayBuffer,a,1)[0],u=0;u<this.numberOfFaces;u++){var c=new Uint8Array(this.arrayBuffer,a+4,l);r.push({data:c,width:n,height:i}),a+=l+4,a+=3-(l+3)%4}n=Math.max(1,.5*n),i=Math.max(1,.5*i)}return r},e.HEADER_LEN=64,e.COMPRESSED_2D=0,e.COMPRESSED_3D=1,e.TEX_2D=2,e.TEX_3D=3,e}();t.default=n},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n,i=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};i.prototype={constructor:i,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:(n=[[-.525731,0,.850651],[-.442863,.238856,.864188],[-.295242,0,.955423],[-.309017,.5,.809017],[-.16246,.262866,.951056],[0,0,1],[0,.850651,.525731],[-.147621,.716567,.681718],[.147621,.716567,.681718],[0,.525731,.850651],[.309017,.5,.809017],[.525731,0,.850651],[.295242,0,.955423],[.442863,.238856,.864188],[.16246,.262866,.951056],[-.681718,.147621,.716567],[-.809017,.309017,.5],[-.587785,.425325,.688191],[-.850651,.525731,0],[-.864188,.442863,.238856],[-.716567,.681718,.147621],[-.688191,.587785,.425325],[-.5,.809017,.309017],[-.238856,.864188,.442863],[-.425325,.688191,.587785],[-.716567,.681718,-.147621],[-.5,.809017,-.309017],[-.525731,.850651,0],[0,.850651,-.525731],[-.238856,.864188,-.442863],[0,.955423,-.295242],[-.262866,.951056,-.16246],[0,1,0],[0,.955423,.295242],[-.262866,.951056,.16246],[.238856,.864188,.442863],[.262866,.951056,.16246],[.5,.809017,.309017],[.238856,.864188,-.442863],[.262866,.951056,-.16246],[.5,.809017,-.309017],[.850651,.525731,0],[.716567,.681718,.147621],[.716567,.681718,-.147621],[.525731,.850651,0],[.425325,.688191,.587785],[.864188,.442863,.238856],[.688191,.587785,.425325],[.809017,.309017,.5],[.681718,.147621,.716567],[.587785,.425325,.688191],[.955423,.295242,0],[1,0,0],[.951056,.16246,.262866],[.850651,-.525731,0],[.955423,-.295242,0],[.864188,-.442863,.238856],[.951056,-.16246,.262866],[.809017,-.309017,.5],[.681718,-.147621,.716567],[.850651,0,.525731],[.864188,.442863,-.238856],[.809017,.309017,-.5],[.951056,.16246,-.262866],[.525731,0,-.850651],[.681718,.147621,-.716567],[.681718,-.147621,-.716567],[.850651,0,-.525731],[.809017,-.309017,-.5],[.864188,-.442863,-.238856],[.951056,-.16246,-.262866],[.147621,.716567,-.681718],[.309017,.5,-.809017],[.425325,.688191,-.587785],[.442863,.238856,-.864188],[.587785,.425325,-.688191],[.688191,.587785,-.425325],[-.147621,.716567,-.681718],[-.309017,.5,-.809017],[0,.525731,-.850651],[-.525731,0,-.850651],[-.442863,.238856,-.864188],[-.295242,0,-.955423],[-.16246,.262866,-.951056],[0,0,-1],[.295242,0,-.955423],[.16246,.262866,-.951056],[-.442863,-.238856,-.864188],[-.309017,-.5,-.809017],[-.16246,-.262866,-.951056],[0,-.850651,-.525731],[-.147621,-.716567,-.681718],[.147621,-.716567,-.681718],[0,-.525731,-.850651],[.309017,-.5,-.809017],[.442863,-.238856,-.864188],[.16246,-.262866,-.951056],[.238856,-.864188,-.442863],[.5,-.809017,-.309017],[.425325,-.688191,-.587785],[.716567,-.681718,-.147621],[.688191,-.587785,-.425325],[.587785,-.425325,-.688191],[0,-.955423,-.295242],[0,-1,0],[.262866,-.951056,-.16246],[0,-.850651,.525731],[0,-.955423,.295242],[.238856,-.864188,.442863],[.262866,-.951056,.16246],[.5,-.809017,.309017],[.716567,-.681718,.147621],[.525731,-.850651,0],[-.238856,-.864188,-.442863],[-.5,-.809017,-.309017],[-.262866,-.951056,-.16246],[-.850651,-.525731,0],[-.716567,-.681718,-.147621],[-.716567,-.681718,.147621],[-.525731,-.850651,0],[-.5,-.809017,.309017],[-.238856,-.864188,.442863],[-.262866,-.951056,.16246],[-.864188,-.442863,.238856],[-.809017,-.309017,.5],[-.688191,-.587785,.425325],[-.681718,-.147621,.716567],[-.442863,-.238856,.864188],[-.587785,-.425325,.688191],[-.309017,-.5,.809017],[-.147621,-.716567,.681718],[-.425325,-.688191,.587785],[-.16246,-.262866,.951056],[.442863,-.238856,.864188],[.16246,-.262866,.951056],[.309017,-.5,.809017],[.147621,-.716567,.681718],[0,-.525731,.850651],[.425325,-.688191,.587785],[.587785,-.425325,.688191],[.688191,-.587785,.425325],[-.955423,.295242,0],[-.951056,.16246,.262866],[-1,0,0],[-.850651,0,.525731],[-.955423,-.295242,0],[-.951056,-.16246,.262866],[-.864188,.442863,-.238856],[-.951056,.16246,-.262866],[-.809017,.309017,-.5],[-.864188,-.442863,-.238856],[-.951056,-.16246,-.262866],[-.809017,-.309017,-.5],[-.681718,.147621,-.716567],[-.681718,-.147621,-.716567],[-.850651,0,-.525731],[-.688191,.587785,-.425325],[-.587785,.425325,-.688191],[-.425325,.688191,-.587785],[-.425325,-.688191,-.587785],[-.587785,-.425325,-.688191],[-.688191,-.587785,-.425325]],function(e){console.time("MD2Loader");for(var t=new DataView(e),r={},i=["ident","version","skinwidth","skinheight","framesize","num_skins","num_vertices","num_st","num_tris","num_glcmds","num_frames","offset_skins","offset_st","offset_tris","offset_frames","offset_glcmds","offset_end"],o=0;o<i.length;o++)r[i[o]]=t.getInt32(4*o,!0);if(844121161===r.ident&&8===r.version){if(r.offset_end===t.byteLength){for(var s=new a.Geometry,l=[],u=r.offset_st,c=(o=0,r.num_st);o<c;o++){var d=t.getInt16(u+0,!0),f=t.getInt16(u+2,!0);l.push(new a.Vector2(d/r.skinwidth,1-f/r.skinheight)),u+=4}for(u=r.offset_tris,o=0,c=r.num_tris;o<c;o++){var h=t.getUint16(u+0,!0),p=t.getUint16(u+2,!0),m=t.getUint16(u+4,!0);s.faces.push(new a.Face3(h,p,m)),s.faceVertexUvs[0].push([l[t.getUint16(u+6,!0)],l[t.getUint16(u+8,!0)],l[t.getUint16(u+10,!0)]]),u+=12}var v=new a.Vector3,g=new a.Vector3,y=[];for(u=r.offset_frames,o=0,c=r.num_frames;o<c;o++){g.set(t.getFloat32(u+0,!0),t.getFloat32(u+4,!0),t.getFloat32(u+8,!0)),v.set(t.getFloat32(u+12,!0),t.getFloat32(u+16,!0),t.getFloat32(u+20,!0)),u+=24;for(var x=0;x<16;x++){var b=t.getUint8(u+x,!0);if(0===b)break;y[x]=b}var w={name:String.fromCharCode.apply(null,y),vertices:[],normals:[]};for(u+=16,x=0;x<r.num_vertices;x++){var A=t.getUint8(u++,!0),M=t.getUint8(u++,!0),T=t.getUint8(u++,!0),S=n[t.getUint8(u++,!0)],E=new a.Vector3(A*g.x+v.x,T*g.z+v.z,M*g.y+v.y),_=new a.Vector3(S[0],S[2],S[1]);w.vertices.push(E),w.normals.push(_)}s.morphTargets.push(w)}s.vertices=s.morphTargets[0].vertices;for(var F=s.morphTargets[0],P=(x=0,s.faces.length);x<P;x++)(C=s.faces[x]).vertexNormals=[F.normals[C.a],F.normals[C.b],F.normals[C.c]];for(o=0,c=s.morphTargets.length;o<c;o++){F=s.morphTargets[o];var L=[];for(x=0,P=s.faces.length;x<P;x++){var C=s.faces[x];L.push({a:F.normals[C.a],b:F.normals[C.b],c:F.normals[C.c]})}s.morphNormals.push({vertexNormals:L})}return s.animations=a.AnimationClip.CreateClipsFromMorphTargetSequences(s.morphTargets,10),console.timeEnd("MD2Loader"),s}console.error("Corrupted MD2 file")}else console.error("Not a valid MD2 file")})},t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(0)),n=i(r(4));function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var o,s=function(e){a.Loader.call(this),this.manager=void 0!==e?e:a.DefaultLoadingManager,this.parser=new n.Parser,this.textureCrossOrigin=null};(s.prototype=Object.create(a.Loader.prototype)).constructor=s,s.prototype.defaultToonTextures=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/bWiiMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh8aBHZBl14e8wAAAABJRU5ErkJggg==","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOUlEQVRYR+3WMREAMAwDsYY/yoDI7MLwIiP40+RJklfcCCBAgAABAgTqArfb/QMCCBAgQIAAgbbAB3z/e0F3js2cAAAAAElFTkSuQmCC","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/B5ilMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh81dWyx0gFwKAAAAABJRU5ErkJggg==","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOklEQVRYR+3WoREAMAwDsWb/UQtCy9wxTOQJ/oQ8SXKKGwEECBAgQIBAXeDt7f4BAQQIECBAgEBb4AOz8Hzx7WLY4wAAAABJRU5ErkJggg==","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+1XwW7CMAy1+f9fZOMysSEOEweEOPRNdm3HbdOyIhAcklPrOs/PLy9RygBALxzcCDQFmgJNgaZAU6Ap0BR4PwX8gsRMVLssMRH5HcpzJEaWL7EVg9F1IHRlyqQohgVr4FGUlUcMJSjcUlDw0zvjeun70cLWmneoyf7NgBTQSniBTQQSuJAZsOnnaczjIMb5hCiuHKxokCrJfVnrctyZL0PkJAJe1HMil4nxeyi3Ypfn1kX51jpPvo/JeCNC4PhVdHdJw2XjBR8brF8PEIhNVn12AgP7uHsTBguBn53MUZCqv7Lp07Pn5k1Ro+uWmUNn7D+M57rtk7aG0Vo73xyF/fbFf0bPJjDXngnGocDTdFhygZjwUQrMNrDcmZlQT50VJ/g/UwNyHpu778+yW+/ksOz/BFo54P4AsUXMfRq7XWsAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACMElEQVRYR+2Xv4pTQRTGf2dubhLdICiii2KnYKHVolhauKWPoGAnNr6BD6CvIVaihYuI2i1ia0BY0MZGRHQXjZj/mSPnnskfNWiWZUlzJ5k7M2cm833nO5Mziej2DWWJRUoCpQKlAntSQCqgw39/iUWAGmh37jrRnVsKlgpiqmkoGVABA7E57fvY+pJDdgKqF6HzFCSADkDq+F6AHABtQ+UMVE5D7zXod7fFNhTEckTbj5XQgHzNN+5tQvc5NG7C6BNkp6D3EmpXHDR+dQAjFLchW3VS9rlw3JBh+B7ys5Cf9z0GW1C/7P32AyBAOAz1q4jGliIH3YPuBnSfQX4OGreTIgEYQb/pBDtPnEQ4CivXYPAWBk13oHrB54yA9QuSn2H4AcKRpEILDt0BUzj+RLR1V5EqjD66NPRBVpLcQwjHoHYJOhsQv6U4mnzmrIXJCFr4LDwm/xBUoboG9XX4cc9VKdYoSA2yk5NQLJaKDUjTBoveG3Z2TElTxwjNK4M3LEZgUdDdruvcXzKBpStgp2NPiWi3ks9ZXxIoFVi+AvHLdc9TqtjL3/aYjpPlrzOcEnK62Szhimdd7xX232zFDTgtxezOu3WNMRLjiKgjtOhHVMd1loynVHvOgjuIIJMaELEqhJAV/RCSLbWTcfPFakFgFlALTRRvx+ok6Hlp/Q+v3fmx90bMyUzaEAhmM3KvHlXTL5DxnbGf/1M8RNNACLL5MNtPxP/mypJAqcDSFfgFhpYqWUzhTEAAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII="],s.prototype.setTextureCrossOrigin=function(e){this.textureCrossOrigin=e},s.prototype.load=function(e,t,r,a,n){var i=this;this.loadModel(e,(function(e){i.loadVmds(t,(function(t){i.pourVmdIntoModel(e,t),r(e)}),a,n)}),a,n)},s.prototype.loadModel=function(e,t,r,n){var i=this,o=a.LoaderUtils.extractUrlBase(e),s=this.extractExtension(e);this.loadFileAsBuffer(e,(function(e){t(i.createModel(e,s,o,r,n))}),r,n)},s.prototype.createModel=function(e,t,r,a,n){return this.createMesh(this.parseModel(e,t),r,a,n)},s.prototype.loadVmd=function(e,t,r,a){var n=this;this.loadFileAsBuffer(e,(function(e){t(n.parseVmd(e))}),r,a)},s.prototype.loadVmds=function(e,t,r,a){var n=this,i=[];e=e.slice(),function o(){var s=e.shift();n.loadVmd(s,(function(r){i.push(r),e.length>0?o():t(n.mergeVmds(i))}),r,a)}()},s.prototype.loadAudio=function(e,t,r,n){var i=new a.AudioListener,o=new a.Audio(i);new a.AudioLoader(this.manager).load(e,(function(e){o.setBuffer(e),t(o,i)}),r,n)},s.prototype.loadVpd=function(e,t,r,a,n){var i=this;(n&&"unicode"===n.charcode?this.loadFileAsText:this.loadFileAsShiftJISText).bind(this)(e,(function(e){t(i.parseVpd(e))}),r,a)},s.prototype.parseModel=function(e,t){switch(t.toLowerCase()){case"pmd":return this.parsePmd(e);case"pmx":return this.parsePmx(e);default:throw"extension "+t+" is not supported."}},s.prototype.parsePmd=function(e){return this.parser.parsePmd(e,!0)},s.prototype.parsePmx=function(e){return this.parser.parsePmx(e,!0)},s.prototype.parseVmd=function(e){return this.parser.parseVmd(e,!0)},s.prototype.parseVpd=function(e){return this.parser.parseVpd(e,!0)},s.prototype.mergeVmds=function(e){return this.parser.mergeVmds(e)},s.prototype.pourVmdIntoModel=function(e,t,r){this.createAnimation(e,t,r)},s.prototype.pourVmdIntoCamera=function(e,t,r){var n=new s.DataCreationHelper;!function(){for(var i,o,l=n.createOrderedMotionArray(t.cameras),u=[],c=[],d=[],f=[],h=[],p=[],m=[],v=[],g=[],y=new a.Quaternion,x=new a.Euler,b=new a.Vector3,w=new a.Vector3,A=function(e,t){e.push(t.x),e.push(t.y),e.push(t.z)},M=function(e,t,r){e.push(t[4*r+0]/127),e.push(t[4*r+1]/127),e.push(t[4*r+2]/127),e.push(t[4*r+3]/127)},T=function(e,t,r,n,i){if(r.length>2){r=r.slice(),n=n.slice(),i=i.slice();for(var o=n.length/r.length,l=3===o?12:4,u=1,c=2,d=r.length;c<d;c++){for(var f=0;f<o;f++)if(n[u*o+f]!==n[(u-1)*o+f]||n[u*o+f]!==n[c*o+f]){u++;break}if(c>u){r[u]=r[c];for(f=0;f<o;f++)n[u*o+f]=n[c*o+f];for(f=0;f<l;f++)i[u*l+f]=i[c*l+f]}}r.length=u+1,n.length=(u+1)*o,i.length=(u+1)*l}var h=new a[t](e,r,n);return h.createInterpolant=function(e){return new s.CubicBezierInterpolation(this.times,this.values,this.getValueSize(),e,new Float32Array(i))},h},S=0;S<l.length;S++){var E=l[S],_=E.frameNum/30,F=E.position,P=E.rotation,L=E.distance,C=E.fov,O=E.interpolation;b.set(0,0,-L),w.set(F[0],F[1],F[2]),x.set(-P[0],-P[1],-P[2]),y.setFromEuler(x),b.add(w),b.applyQuaternion(y),u.push(_),A(c,w),(i=d).push((o=y).x),i.push(o.y),i.push(o.z),i.push(o.w),A(f,b),h.push(C);for(var N=0;N<3;N++)M(p,O,N);M(m,O,3);for(N=0;N<3;N++)M(v,O,4);M(g,O,5)}if(0!==u.length){var R=[];R.push(T(".center","VectorKeyframeTrack",u,c,p)),R.push(T(".quaternion","QuaternionKeyframeTrack",u,d,m)),R.push(T(".position","VectorKeyframeTrack",u,f,v)),R.push(T(".fov","NumberKeyframeTrack",u,h,g));var I=new a.AnimationClip(void 0===r?a.Math.generateUUID():r,-1,R);void 0===e.center&&(e.center=new a.Vector3(0,0,0)),void 0===e.animations&&(e.animations=[]),e.animations.push(I)}}()},s.prototype.extractExtension=function(e){var t=e.lastIndexOf(".");return t<0?null:e.slice(t+1)},s.prototype.loadFile=function(e,t,r,n,i,o){var s=new a.FileLoader(this.manager);return void 0!==o&&s.setMimeType(o),s.setResponseType(i),s.load(e,(function(e){t(e)}),r,n)},s.prototype.loadFileAsBuffer=function(e,t,r,a){this.loadFile(e,t,r,a,"arraybuffer")},s.prototype.loadFileAsText=function(e,t,r,a){this.loadFile(e,t,r,a,"text")},s.prototype.loadFileAsShiftJISText=function(e,t,r,a){this.loadFile(e,t,r,a,"text","text/plain; charset=shift_jis")},s.prototype.createMesh=function(e,t,r,n){var i=this,o=new a.BufferGeometry,s=[],l={vertices:[],uvs:[],normals:[],skinIndices:[],skinWeights:[],indices:[]};return function(){for(var t=0;t<e.metadata.vertexCount;t++){for(var r=e.vertices[t],a=0,n=r.position.length;a<n;a++)l.vertices.push(r.position[a]);for(a=0,n=r.normal.length;a<n;a++)l.normals.push(r.normal[a]);for(a=0,n=r.uv.length;a<n;a++)l.uvs.push(r.uv[a]);for(a=0;a<4;a++)l.skinIndices.push(r.skinIndices.length-1>=a?r.skinIndices[a]:0);for(a=0;a<4;a++)l.skinWeights.push(r.skinWeights.length-1>=a?r.skinWeights[a]:0)}}(),function(){for(var t=0;t<e.metadata.faceCount;t++)for(var r=e.faces[t],a=0,n=r.indices.length;a<n;a++)l.indices.push(r.indices[a])}(),function(){for(var t=[],r=e.rigidBodies,a={},n=0,i=r.length;n<i;n++){var s=r[n],l=a[s.boneIndex];l=void 0===l?s.type:Math.max(s.type,l),a[s.boneIndex]=l}for(n=0;n<e.metadata.boneCount;n++){var u={},c=e.bones[n];u.parent=c.parentIndex,u.name=c.name,u.pos=[c.position[0],c.position[1],c.position[2]],u.rotq=[0,0,0,1],u.scl=[1,1,1],-1!==u.parent&&(u.pos[0]-=e.bones[u.parent].position[0],u.pos[1]-=e.bones[u.parent].position[1],u.pos[2]-=e.bones[u.parent].position[2]),u.rigidBodyType=void 0!==a[n]?a[n]:-1,t.push(u)}o.bones=t}(),function(){var t=[];if("pmd"===e.metadata.format)for(var r=0;r<e.metadata.ikCount;r++){var n=e.iks[r];(s={}).target=n.target,s.effector=n.effector,s.iteration=n.iteration,s.maxAngle=4*n.maxAngle,s.links=[];for(var i=0;i<n.links.length;i++){(l={}).index=n.links[i].index,e.bones[l.index].name.indexOf("ひざ")>=0&&(l.limitation=new a.Vector3(1,0,0)),s.links.push(l)}t.push(s)}else for(r=0;r<e.metadata.boneCount;r++){if(void 0!==(n=e.bones[r].ik)){var s;(s={}).target=r,s.effector=n.effector,s.iteration=n.iteration,s.maxAngle=n.maxAngle,s.links=[];for(i=0;i<n.links.length;i++){var l;(l={}).index=n.links[i].index,l.enabled=!0,1===n.links[i].angleLimitation&&(l.limitation=new a.Vector3(1,0,0)),s.links.push(l)}t.push(s)}}o.iks=t}(),function(){if("pmd"!==e.metadata.format){for(var t=[],r=0;r<e.metadata.boneCount;r++){var a=e.bones[r],n=a.grant;if(void 0!==n){var i={};i.index=r,i.parentIndex=n.parentIndex,i.ratio=n.ratio,i.isLocal=n.isLocal,i.affectRotation=n.affectRotation,i.affectPosition=n.affectPosition,i.transformationClass=a.transformationClass,t.push(i)}}t.sort((function(e,t){return e.transformationClass-t.transformationClass})),o.grants=t}}(),function(){function t(e,t,r,a){e.array[3*t+0]+=r.position[0]*a,e.array[3*t+1]+=r.position[1]*a,e.array[3*t+2]+=r.position[2]*a}function r(r,a,n){for(var i=0;i<a.elementCount;i++){var o=a.elements[i];t(r,"pmd"===e.metadata.format?e.morphs[0].elements[o.index].index:o.index,o,n)}}for(var n=[],i=[],s=0;s<e.metadata.morphCount;s++){var u=e.morphs[s],c={name:u.name},d=new a.Float32BufferAttribute(3*e.metadata.vertexCount,3);d.name=u.name;for(var f=0;f<3*e.metadata.vertexCount;f++)d.array[f]=l.vertices[f];if("pmd"===e.metadata.format)0!==s&&r(d,u,1);else if(0===u.type)for(f=0;f<u.elementCount;f++){var h=e.morphs[u.elements[f].index],p=u.elements[f].ratio;1===h.type&&r(d,h,p)}else 1===u.type?r(d,u,1):2===u.type||3===u.type||4===u.type||5===u.type||6===u.type||7===u.type||u.type;n.push(c),i.push(d)}o.morphTargets=n,o.morphAttributes.position=i}(),function(){var l={},u=new a.TextureLoader(i.manager),c=new a.TGALoader(i.manager),d=document.createElement("canvas"),f=d.getContext("2d"),h=0,p=[];function m(e,o){var s;if(void 0===o&&(o={}),!0===o.defaultTexturePath)try{s=i.defaultToonTextures[parseInt(e.match("toon([0-9]{2}).bmp$")[1])]}catch(t){console.warn("THREE.MMDLoader: "+e+" seems like not right default texture path. Using toon00.bmp instead."),s=i.defaultToonTextures[0]}else s=t+e;if(void 0!==l[s])return s;var h=a.Loader.Handlers.get(s);null===h&&(h=e.indexOf(".tga")>=0?c:u);var p=h.load(s,(function(e){if(!0===o.isToonTexture){var t=e.image,r=t.width,n=t.height;d.width=r,d.height=n,f.clearRect(0,0,r,n),f.translate(r/2,n/2),f.rotate(.5*Math.PI),f.translate(-r/2,-n/2),f.drawImage(t,0,0),e.image=f.getImageData(0,0,r,n)}e.flipY=!1,e.wrapS=a.RepeatWrapping,e.wrapT=a.RepeatWrapping;for(var i=0;i<p.readyCallbacks.length;i++)p.readyCallbacks[i](p);delete p.readyCallbacks}),r,n);return!0===o.sphericalReflectionMapping&&(p.mapping=a.SphericalReflectionMapping),p.readyCallbacks=[],l[s]=p,s}function v(e,t){return void 0===t[e]&&console.warn("THREE.MMDLoader: Undefined texture",e),t[e]}null!==i.textureCrossOrigin&&u.setCrossOrigin(i.textureCrossOrigin);for(var g=0;g<e.metadata.materialCount;g++){var y=e.materials[g],x={};if(x.faceOffset=h,x.faceNum=y.faceCount,h+=y.faceCount,x.name=y.name,x.color=new a.Color(y.diffuse[0],y.diffuse[1],y.diffuse[2]),x.opacity=y.diffuse[3],x.specular=new a.Color(y.specular[0],y.specular[1],y.specular[2]),x.shininess=y.shininess,1===x.opacity?(x.side=a.FrontSide,x.transparent=!1):(x.side=a.DoubleSide,x.transparent=!0),"pmd"===e.metadata.format){if(y.fileName){var b=y.fileName,w=[],A=b.lastIndexOf("*");A>=0?(w.push(b.slice(0,A)),w.push(b.slice(A+1))):w.push(b);for(var M=0;M<w.length;M++){(T=w[M]).indexOf(".sph")>=0||T.indexOf(".spa")>=0?(x.envMap=m(T,{sphericalReflectionMapping:!0}),T.indexOf(".sph")>=0?x.envMapType=a.MultiplyOperation:x.envMapType=a.AddOperation):x.map=m(T)}}}else{if(-1!==y.textureIndex){var T=e.textures[y.textureIndex];x.map=m(T)}if(-1!==y.envTextureIndex&&(1===y.envFlag||2==y.envFlag)){T=e.textures[y.envTextureIndex];x.envMap=m(T,{sphericalReflectionMapping:!0}),1===y.envFlag?x.envMapType=a.MultiplyOperation:x.envMapType=a.AddOperation}}var S=void 0===x.map?1:.2;x.emissive=new a.Color(y.ambient[0]*S,y.ambient[1]*S,y.ambient[2]*S),p.push(x)}for(g=0;g<p.length;g++){var E=p[g],_=e.materials[g];y=new a.MeshToonMaterial;if(o.addGroup(3*E.faceOffset,3*E.faceNum,g),void 0!==E.name&&(y.name=E.name),y.skinning=o.bones.length>0,y.morphTargets=o.morphTargets.length>0,y.lights=!0,y.side="pmx"===e.metadata.format&&1==(1&_.flag)?a.DoubleSide:E.side,y.transparent=E.transparent,y.fog=!0,y.blending=a.CustomBlending,y.blendSrc=a.SrcAlphaFactor,y.blendDst=a.OneMinusSrcAlphaFactor,y.blendSrcAlpha=a.SrcAlphaFactor,y.blendDstAlpha=a.DstAlphaFactor,void 0!==E.map){y.faceOffset=E.faceOffset,y.faceNum=E.faceNum,y.map=v(E.map,l),function(e){e.map.readyCallbacks.push((function(t){function r(e,t){var r=e.width,a=e.height,n=Math.round(t.x*r)%r,i=Math.round(t.y*a)%a;n<0&&(n+=r),i<0&&(i+=a);var o=i*r+n;return e.data[4*o+3]}var a=void 0!==t.image.data?t.image:function(e){var t=document.createElement("canvas");t.width=e.width,t.height=e.height;var r=t.getContext("2d");return r.drawImage(e,0,0),r.getImageData(0,0,t.width,t.height)}(t.image),n=o.index.array.slice(3*e.faceOffset,3*e.faceOffset+3*e.faceNum);(function(e,t,a){var n=e.width,i=e.height;if(e.data.length/(n*i)!=4)return!1;for(var o=0;o<a.length;o+=3){for(var s={x:0,y:0},l=0;l<3;l++){var u=a[3*o+l],c={x:t[2*u+0],y:t[2*u+1]};if(r(e,c)<253)return!0;s.x+=c.x,s.y+=c.y}if(s.x/=3,s.y/=3,r(e,s)<253)return!0}return!1})(a,o.attributes.uv.array,n)&&(e.transparent=!0),delete e.faceOffset,delete e.faceNum}))}(y)}if(void 0!==E.envMap&&(y.envMap=v(E.envMap,l),y.combine=E.envMapType),y.opacity=E.opacity,y.color=E.color,void 0!==E.emissive&&(y.emissive=E.emissive),y.specular=E.specular,y.shininess=Math.max(E.shininess,1e-4),"pmd"===e.metadata.format){y.outlineParameters={thickness:1===_.edgeFlag?.003:0,color:new a.Color(0,0,0),alpha:1},0===y.outlineParameters.thickness&&(y.outlineParameters.visible=!1);var F=m(P=-1===_.toonIndex?"toon00.bmp":e.toonTextures[_.toonIndex].fileName,{isToonTexture:!0,defaultTexturePath:function(e){return 10===e.length&&null!==e.match(/toon(10|0[0-9]).bmp/)}(P)});y.gradientMap=v(F,l)}else{var P,L;if(y.outlineParameters={thickness:_.edgeSize/300,color:new a.Color(_.edgeColor[0],_.edgeColor[1],_.edgeColor[2]),alpha:_.edgeColor[3]},0!=(16&_.flag)&&0!==y.outlineParameters.thickness||(y.outlineParameters.visible=!1),-1===_.toonIndex||0!==_.toonFlag){var C=_.toonIndex+1;P="toon"+(C<10?"0"+C:C)+".bmp",L=!0}else P=e.textures[_.toonIndex],L=!1;F=m(P,{isToonTexture:!0,defaultTexturePath:L});y.gradientMap=v(F,l)}s.push(y)}if("pmx"===e.metadata.format){var O=function(e,t){if(8===e.type)for(var r=0;r<t.length;r++){var a=t[r];if(-1!==a.index){var n=s[a.index];n.opacity!==a.diffuse[3]&&(n.transparent=!0)}}};for(g=0;g<e.morphs.length;g++){var N=e.morphs[g],R=N.elements;if(0===N.type)for(M=0;M<R.length;M++){var I=e.morphs[R[M].index];O(I,I.elements)}else O(N,R)}}}(),function(){for(var t=[],r=[],a=0;a<e.metadata.rigidBodyCount;a++){for(var n=e.rigidBodies[a],i=Object.keys(n),s={},l=0;l<i.length;l++){s[d=i[l]]=n[d]}if("pmx"===e.metadata.format&&-1!==s.boneIndex){var u=e.bones[s.boneIndex];s.position[0]-=u.position[0],s.position[1]-=u.position[1],s.position[2]-=u.position[2]}t.push(s)}for(a=0;a<e.metadata.constraintCount;a++){var c=e.constraints[a];for(i=Object.keys(c),s={},l=0;l<i.length;l++){var d;s[d=i[l]]=c[d]}var f=t[s.rigidBodyIndex1],h=t[s.rigidBodyIndex2];0!==f.type&&2===h.type&&-1!==f.boneIndex&&-1!==h.boneIndex&&e.bones[h.boneIndex].parentIndex===f.boneIndex&&(h.type=1),r.push(s)}o.rigidBodies=t,o.constraints=r}(),o.setIndex(l.indices),o.addAttribute("position",new a.Float32BufferAttribute(l.vertices,3)),o.addAttribute("normal",new a.Float32BufferAttribute(l.normals,3)),o.addAttribute("uv",new a.Float32BufferAttribute(l.uvs,2)),o.addAttribute("skinIndex",new a.Uint16BufferAttribute(l.skinIndices,4)),o.addAttribute("skinWeight",new a.Float32BufferAttribute(l.skinWeights,4)),o.computeBoundingSphere(),o.mmdFormat=e.metadata.format,new a.SkinnedMesh(o,s)},s.prototype.createAnimation=function(e,t,r){var n=new s.DataCreationHelper;!function(){if(0!==t.metadata.motionCount){for(var i=e.geometry.bones,o=n.createOrderedMotionArrays(i,t.motions,"boneName"),l=[],u=function(e,t,r){e.push(t[r+0]/127),e.push(t[r+8]/127),e.push(t[r+4]/127),e.push(t[r+12]/127)},c=function(e,t,r,n,i){var o=new a[t](e,r,n);return o.createInterpolant=function(e){return new s.CubicBezierInterpolation(this.times,this.values,this.getValueSize(),e,new Float32Array(i))},o},d=0;d<o.length;d++){for(var f=[],h=[],p=[],m=[],v=[],g=i[d],y=o[d],x=0;x<y.length;x++){var b=y[x].frameNum/30,w=y[x].position,A=y[x].rotation,M=y[x].interpolation;f.push(b);for(var T=0;T<3;T++)h.push(g.pos[T]+w[T]);for(T=0;T<4;T++)p.push(A[T]);for(T=0;T<3;T++)u(m,M,T);u(v,M,3)}if(0!==f.length){var S=".bones["+g.name+"]";l.push(c(S+".position","VectorKeyframeTrack",f,h,m)),l.push(c(S+".quaternion","QuaternionKeyframeTrack",f,p,v))}}var E=new a.AnimationClip(void 0===r?a.Math.generateUUID():r,-1,l);void 0===e.geometry.animations&&(e.geometry.animations=[]),e.geometry.animations.push(E)}}(),function(){if(0!==t.metadata.morphCount){for(var i=n.createOrderedMotionArrays(e.geometry.morphTargets,t.morphs,"morphName"),o=[],s=0;s<i.length;s++){for(var l=[],u=[],c=i[s],d=0;d<c.length;d++)l.push(c[d].frameNum/30),u.push(c[d].weight);0!==l.length&&o.push(new a.NumberKeyframeTrack(".morphTargetInfluences["+s+"]",l,u))}var f=new a.AnimationClip(void 0===r?a.Math.generateUUID():r+"Morph",-1,o);void 0===e.geometry.animations&&(e.geometry.animations=[]),e.geometry.animations.push(f)}}()},(s.DataCreationHelper=function(){}).prototype={constructor:s.DataCreationHelper,toCharcodeStrings:function(e){for(var t="",r=0;r<e.length;r++)t+="0x"+("0000"+e[r].charCodeAt().toString(16)).substr(-4);return t},createDictionary:function(e){for(var t={},r=0;r<e.length;r++)t[e[r].name]=r;return t},initializeMotionArrays:function(e){for(var t=[],r=0;r<e.length;r++)t[r]=[];return t},sortMotionArray:function(e){e.sort((function(e,t){return e.frameNum-t.frameNum}))},sortMotionArrays:function(e){for(var t=0;t<e.length;t++)this.sortMotionArray(e[t])},createMotionArray:function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t},createMotionArrays:function(e,t,r,a){for(var n=0;n<e.length;n++){var i=e[n],o=r[i[a]];void 0!==o&&t[o].push(i)}},createOrderedMotionArray:function(e){var t=this.createMotionArray(e);return this.sortMotionArray(t),t},createOrderedMotionArrays:function(e,t,r){var a=this.createDictionary(e),n=this.initializeMotionArrays(e);return this.createMotionArrays(t,n,a,r),this.sortMotionArrays(n),n}},(s.CubicBezierInterpolation=function(e,t,r,n,i){a.Interpolant.call(this,e,t,r,n),this.params=i}).prototype=Object.create(a.LinearInterpolant.prototype),s.CubicBezierInterpolation.prototype.constructor=s.CubicBezierInterpolation,s.CubicBezierInterpolation.prototype.interpolate_=function(e,t,r,n){var i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=l-s,c=n-t<.05?0:(r-t)/(n-t);if(4===s){var d=this.params[4*e+0],f=this.params[4*e+1],h=this.params[4*e+2],p=this.params[4*e+3],m=this._calculate(d,f,h,p,c);a.Quaternion.slerpFlat(i,0,o,u,o,l,m)}else if(3===s)for(var v=0;v!==s;++v){d=this.params[12*e+4*v+0],f=this.params[12*e+4*v+1],h=this.params[12*e+4*v+2],p=this.params[12*e+4*v+3],m=this._calculate(d,f,h,p,c);i[v]=o[u+v]*(1-m)+o[l+v]*m}else{d=this.params[4*e+0],f=this.params[4*e+1],h=this.params[4*e+2],p=this.params[4*e+3],m=this._calculate(d,f,h,p,c);i[0]=o[u]*(1-m)+o[l]*m}return i},s.CubicBezierInterpolation.prototype._calculate=function(e,t,r,a,n){for(var i,o,s,l=.5,u=l,c=1-u,d=Math,f=0;f<15;f++){var h=(i=3*c*c*u)*e+(o=3*c*u*u)*t+(s=u*u*u)-n;if(d.abs(h)<1e-5)break;l/=2,c=1-(u+=h<0?l:-l)}return i*r+o*a+s},a.MMDAudioManager=function(e,t,r){var a=null==r?{}:r;this.audio=e,this.listener=t,this.elapsedTime=0,this.currentTime=0,this.delayTime=void 0!==a.delayTime?a.delayTime:0,this.audioDuration=this.audio.buffer.duration,this.duration=this.audioDuration+this.delayTime},a.MMDAudioManager.prototype={constructor:a.MMDAudioManager,control:function(e){this.elapsed+=e,this.currentTime+=e,this.checkIfStopAudio()&&this.audio.stop(),this.checkIfStartAudio()&&this.audio.play()},checkIfStartAudio:function(){if(this.audio.isPlaying)return!1;for(;this.currentTime>=this.duration;)this.currentTime-=this.duration;return!(this.currentTime<this.delayTime)&&(this.audio.startTime=this.currentTime-this.delayTime,!0)},checkIfStopAudio:function(){return!!this.audio.isPlaying&&this.currentTime>=this.duration}},a.MMDGrantSolver=function(e){this.mesh=e},a.MMDGrantSolver.prototype={constructor:a.MMDGrantSolver,update:(o=new a.Quaternion,function(){for(var e=0;e<this.mesh.geometry.grants.length;e++){var t=this.mesh.geometry.grants[e],r=this.mesh.skeleton.bones[t.index],a=this.mesh.skeleton.bones[t.parentIndex];t.isLocal?(t.affectPosition,t.affectRotation):(t.affectPosition,t.affectRotation&&(o.set(0,0,0,1),o.slerp(a.quaternion,t.ratio),r.quaternion.multiply(o)))}})},a.MMDHelper=function(){this.meshes=[],this.doAnimation=!0,this.doIk=!0,this.doGrant=!0,this.doPhysics=!0,this.doCameraAnimation=!0,this.sharedPhysics=!1,this.masterPhysics=null,this.audioManager=null,this.camera=null},a.MMDHelper.prototype={constructor:a.MMDHelper,add:function(e){if(!(e instanceof a.SkinnedMesh))throw new Error("THREE.MMDHelper.add() accepts only THREE.SkinnedMesh instance.");void 0===e.mixer&&(e.mixer=null),void 0===e.ikSolver&&(e.ikSolver=null),void 0===e.grantSolver&&(e.grantSolver=null),void 0===e.physics&&(e.physics=null),void 0===e.looped&&(e.looped=!1),this.meshes.push(e),this.initBackupBones(e)},setAudio:function(e,t,r){this.audioManager=new a.MMDAudioManager(e,t,r)},setCamera:function(e){e.mixer=null,this.camera=e},setPhysicses:function(e){for(var t=0;t<this.meshes.length;t++)this.setPhysics(this.meshes[t],e)},setPhysics:function(e,t){if(void 0===(t=void 0===t?{}:Object.assign({},t)).world&&this.sharedPhysics){var r=this.getMasterPhysics();null!==r&&(t.world=r.world)}var n=void 0!==t.warmup?t.warmup:60,i=new a.MMDPhysics(e,t);null!==e.mixer&&void 0!==e.mixer&&!0!==t.preventAnimationWarmup&&(this.animateOneMesh(0,e),i.reset()),i.warmup(n),this.updateIKParametersDependingOnPhysicsEnabled(e,!0),e.physics=i},getMasterPhysics:function(){if(null!==this.masterPhysics)return this.masterPhysics;for(var e=0,t=this.meshes.length;e<t;e++){var r=this.meshes[e].physics;if(null!=r)return this.masterPhysics=r,this.masterPhysics}return null},enablePhysics:function(e){this.doPhysics=!0===e;for(var t=0,r=this.meshes.length;t<r;t++)this.updateIKParametersDependingOnPhysicsEnabled(this.meshes[t],e)},updateIKParametersDependingOnPhysicsEnabled:function(e,t){for(var r=e.geometry.iks,a=e.geometry.bones,n=0,i=r.length;n<i;n++)for(var o=r[n].links,s=0,l=o.length;s<l;s++){var u=o[s];u.enabled=!0!==t||!(a[u.index].rigidBodyType>0)}},setAnimations:function(){for(var e=0;e<this.meshes.length;e++)this.setAnimation(this.meshes[e])},setAnimation:function(e){if(void 0!==e.geometry.animations){e.mixer=new a.AnimationMixer(e),e.mixer.addEventListener("loop",(function(e){e.action._clip.tracks.length>0&&0!==e.action._clip.tracks[0].name.indexOf(".bones")||(e.target._root.looped=!0)}));for(var t=!1,r=!1,n=0;n<e.geometry.animations.length;n++){var i=e.geometry.animations[n],o=e.mixer.clipAction(i);i.tracks.length>0&&0===i.tracks[0].name.indexOf(".morphTargetInfluences")?r||(o.play(),r=!0):t||(o.play(),t=!0)}t&&(e.ikSolver=new a.CCDIKSolver(e),void 0!==e.geometry.grants&&(e.grantSolver=new a.MMDGrantSolver(e)))}},setCameraAnimation:function(e){void 0!==e.animations&&(e.mixer=new a.AnimationMixer(e),e.mixer.clipAction(e.animations[0]).play())},unifyAnimationDuration:function(e){e=void 0===e?{}:e;for(var t=0,r=this.camera,a=this.audioManager,n=0;n<this.meshes.length;n++){if(null!==(s=this.meshes[n].mixer))for(var i=0;i<s._actions.length;i++){var o=s._actions[i];t=Math.max(t,o._clip.duration)}}if(null!==r&&null!==r.mixer){var s=r.mixer;for(n=0;n<s._actions.length;n++){o=s._actions[n];t=Math.max(t,o._clip.duration)}}null!==a&&(t=Math.max(t,a.duration)),void 0!==e.afterglow&&(t+=e.afterglow);for(n=0;n<this.meshes.length;n++){if(null!==(s=this.meshes[n].mixer))for(i=0;i<s._actions.length;i++){(o=s._actions[i])._clip.duration=t}}if(null!==r&&null!==r.mixer)for(s=r.mixer,n=0;n<s._actions.length;n++){(o=s._actions[n])._clip.duration=t}null!==a&&(a.duration=t)},controlAudio:function(e){null!==this.audioManager&&this.audioManager.control(e)},animate:function(e){this.controlAudio(e);for(var t=0;t<this.meshes.length;t++)this.animateOneMesh(e,this.meshes[t]);this.sharedPhysics&&this.updateSharedPhysics(e),this.animateCamera(e)},animateOneMesh:function(e,t){var r=t.mixer,a=t.ikSolver,n=t.grantSolver,i=t.physics;null!==r&&!0===this.doAnimation&&(this.restoreBones(t),r.update(e),this.backupBones(t)),null!==a&&!0===this.doIk&&a.update(),null!==n&&!0===this.doGrant&&n.update(),!0===t.looped&&(null!==i&&i.reset(),t.looped=!1),null!==i&&this.doPhysics&&!this.sharedPhysics&&i.update(e)},updateSharedPhysics:function(e){if(0!==this.meshes.length&&this.doPhysics&&this.sharedPhysics){var t=this.getMasterPhysics();if(null!==t){for(var r=0,a=this.meshes.length;r<a;r++){null!=(n=this.meshes[r].physics)&&n.updateRigidBodies()}t.stepSimulation(e);for(r=0,a=this.meshes.length;r<a;r++){var n;null!=(n=this.meshes[r].physics)&&n.updateBones()}}}},animateCamera:function(e){if(null!==this.camera){var t=this.camera.mixer;null!==t&&void 0!==this.camera.center&&!0===this.doCameraAnimation&&(t.update(e),this.camera.updateProjectionMatrix(),this.camera.up.set(0,1,0),this.camera.up.applyQuaternion(this.camera.quaternion),this.camera.lookAt(this.camera.center))}},poseAsVpd:function(e,t,r){void 0===r&&(r={}),!0!==r.preventResetPose&&e.pose();for(var n=e.skeleton.bones,i=t.bones,o={},s=0;s<n.length;s++)o[n[s].name]=s;var l=new a.Vector3,u=new a.Quaternion;for(s=0;s<i.length;s++){var c=i[s],d=o[c.name];if(void 0!==d){var f=n[d],h=c.translation,p=c.quaternion;l.set(h[0],h[1],h[2]),u.set(p[0],p[1],p[2],p[3]),f.position.add(l),f.quaternion.multiply(u)}}(e.updateMatrixWorld(!0),!0!==r.preventIk)&&new a.CCDIKSolver(e).update(r.saveOriginalBonesBeforeIK);!0!==r.preventGrant&&void 0!==e.geometry.grants&&new a.MMDGrantSolver(e).update()},initBackupBones:function(e){e.skeleton.backupBones=[];for(var t=0;t<e.skeleton.bones.length;t++)e.skeleton.backupBones.push(e.skeleton.bones[t].clone())},backupBones:function(e){e.skeleton.backupBoneIsSaved=!0;for(var t=0;t<e.skeleton.bones.length;t++){var r=e.skeleton.backupBones[t],a=e.skeleton.bones[t];r.position.copy(a.position),r.quaternion.copy(a.quaternion)}},restoreBones:function(e){if(!0===e.skeleton.backupBoneIsSaved){e.skeleton.backupBoneIsSaved=!1;for(var t=0;t<e.skeleton.bones.length;t++){var r=e.skeleton.bones[t],a=e.skeleton.backupBones[t];r.position.copy(a.position),r.quaternion.copy(a.quaternion)}}}},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});"function"==typeof Symbol&&Symbol.iterator;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.nodes={},this.materials={},this.passes={},this.names={},this.library=t||{}};Object.assign(n.prototype,{load:function(e,t,r,n){var i=this;return new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(JSON.parse(e)))}),r,n),this},getObjectByName:function(e){return this.names[e]},getObjectById:function(e){return this.library[e]||this.nodes[e]||this.names[e]},getNode:function(e){var t=this.getObjectById(e);return t||console.warn('Node "'+e+'" not found.'),t},parse:function(e){var t,r,n,i,o;for(t in e.nodes)r=e.nodes[t],n=new a[r.type],r.name?(n.name=r.name,this.names[n.name]=n):n.readonly=!0,void 0!==r.readonly&&(n.readonly=r.readonly),this.nodes[t]=n;for(t in e.materials)r=e.materials[t],n=new a[r.type],r.name&&(n.name=r.name,this.names[n.name]=n),this.materials[t]=n;for(t in e.passes)r=e.passes[t],n=new a[r.type],r.name&&(n.name=r.name,this.names[n.name]=n),this.passes[t]=n;for(t in e.material&&(this.material=this.materials[t]),e.pass&&(this.pass=this.passes[t]),e.nodes)switch(r=e.nodes[t],n=this.nodes[t],r.type){case"FloatNode":n.number=r.number;break;case"ColorNode":n.value.copy(r);break;case"Vector2Node":n.x=r.x,n.y=r.y;break;case"Vector3Node":n.x=r.x,n.y=r.y,n.z=r.z;break;case"Vector4Node":n.x=r.x,n.y=r.y,n.z=r.z,n.w=r.w;break;case"Matrix3Node":case"Matrix4Node":n.value.fromArray(r.elements);break;case"OperatorNode":n.a=this.getNode(r.a),n.b=this.getNode(r.b),n.op=r.op;break;case"Math1Node":n.a=this.getNode(r.a),n.method=r.method;break;case"Math2Node":n.a=this.getNode(r.a),n.b=this.getNode(r.b),n.method=r.method;break;case"Math3Node":n.a=this.getNode(r.a),n.b=this.getNode(r.b),n.c=this.getNode(r.c),n.method=r.method;break;case"UVNode":case"ColorsNode":n.index=r.index;break;case"LuminanceNode":n.rgb=this.getNode(r.rgb);break;case"PositionNode":case"NormalNode":case"ReflectNode":case"LightNode":n.scope=r.scope;break;case"SwitchNode":n.node=this.getNode(r.node),n.components=r.components;break;case"JoinNode":for(i in r.inputs)n[i]=this.getNode(r.inputs[i]);break;case"CameraNode":switch(n.setScope(r.scope),r.camera&&n.setCamera(this.getNode(r.camera)),r.scope){case a.CameraNode.DEPTH:n.near.number=r.near,n.far.number=r.far}break;case"ColorAdjustmentNode":n.rgb=this.getNode(r.rgb),n.adjustment=this.getNode(r.adjustment),n.method=r.method;break;case"UVTransformNode":n.uv=this.getNode(r.uv),n.transform=this.getNode(r.transform);break;case"BumpNode":n.value=this.getNode(r.value),n.coord=this.getNode(r.coord),n.scale=this.getNode(r.scale);break;case"BlurNode":n.value=this.getNode(r.value),n.coord=this.getNode(r.coord),n.scale=this.getNode(r.scale),n.value=this.getNode(r.value),n.coord=this.getNode(r.coord),n.radius=this.getNode(r.radius),void 0!==r.size&&(n.size=new a.Vector2(r.size.x,r.size.y)),n.blurX=r.blurX,n.blurY=r.blurY;break;case"ResolutionNode":n.renderer=this.getNode(r.renderer);break;case"ScreenUVNode":n.resolution=this.getNode(r.resolution);break;case"VelocityNode":r.target&&n.setTarget(this.getNode(r.target)),n.setParams(r.params);break;case"TimerNode":n.scope=r.scope,n.scale=r.scale;break;case"ConstNode":n.name=r.name,n.type=r.out,n.value=r.value,n.useDefine=!0===r.useDefine;break;case"AttributeNode":case"VarNode":n.type=r.out;break;case"ReflectorNode":n.setMirror(this.getNode(r.mirror)),r.offset&&(n.offset=this.getNode(r.offset));break;case"NoiseNode":n.coord=this.getNode(r.coord);break;case"FunctionNode":for(i in n.isMethod=r.isMethod,n.useKeywords=r.useKeywords,n.extensions=r.extensions,n.keywords={},r.keywords)n.keywords[i]=this.getNode(r.keywords[i]);if(r.includes)for(o=0;o<r.includes.length;o++)n.includes.push(this.getNode(r.includes[o]));n.eval(r.src,n.includes,n.extensions,n.keywords),n.isMethod||(n.type=r.out);break;case"FunctionCallNode":for(i in r.inputs)n.inputs[i]=this.getNode(r.inputs[i]);n.value=this.getNode(r.value);break;case"TextureNode":case"CubeTextureNode":case"ScreenNode":r.value&&(n.value=this.getNode(r.value)),n.coord=this.getNode(r.coord),r.bias&&(n.bias=this.getNode(r.bias)),void 0!==n.project&&(n.project=r.project);break;case"RoughnessToBlinnExponentNode":break;case"RawNode":n.value=this.getNode(r.value);break;case"StandardNode":case"PhongNode":case"SpriteNode":n.color=this.getNode(r.color),r.alpha&&(n.alpha=this.getNode(r.alpha)),r.specular&&(n.specular=this.getNode(r.specular)),r.shininess&&(n.shininess=this.getNode(r.shininess)),r.roughness&&(n.roughness=this.getNode(r.roughness)),r.metalness&&(n.metalness=this.getNode(r.metalness)),r.reflectivity&&(n.reflectivity=this.getNode(r.reflectivity)),r.clearCoat&&(n.clearCoat=this.getNode(r.clearCoat)),r.clearCoatRoughness&&(n.clearCoatRoughness=this.getNode(r.clearCoatRoughness)),r.normal&&(n.normal=this.getNode(r.normal)),r.normalScale&&(n.normalScale=this.getNode(r.normalScale)),r.emissive&&(n.emissive=this.getNode(r.emissive)),r.ambient&&(n.ambient=this.getNode(r.ambient)),r.shadow&&(n.shadow=this.getNode(r.shadow)),r.light&&(n.light=this.getNode(r.light)),r.ao&&(n.ao=this.getNode(r.ao)),r.environment&&(n.environment=this.getNode(r.environment)),r.environmentAlpha&&(n.environmentAlpha=this.getNode(r.environmentAlpha)),r.transform&&(n.transform=this.getNode(r.transform)),!1===r.spherical&&(n.spherical=!1);break;default:console.warn(r.type,"not supported.")}for(t in e.materials)r=e.materials[t],n=this.materials[t],void 0!==r.name&&(n.name=r.name),void 0!==r.blending&&(n.blending=r.blending),void 0!==r.flatShading&&(n.flatShading=r.flatShading),void 0!==r.side&&(n.side=r.side),n.depthFunc=r.depthFunc,n.depthTest=r.depthTest,n.depthWrite=r.depthWrite,void 0!==r.wireframe&&(n.wireframe=r.wireframe),void 0!==r.wireframeLinewidth&&(n.wireframeLinewidth=r.wireframeLinewidth),void 0!==r.wireframeLinecap&&(n.wireframeLinecap=r.wireframeLinecap),void 0!==r.wireframeLinejoin&&(n.wireframeLinejoin=r.wireframeLinejoin),void 0!==r.skinning&&(n.skinning=r.skinning),void 0!==r.morphTargets&&(n.morphTargets=r.morphTargets),void 0!==r.visible&&(n.visible=r.visible),void 0!==r.userData&&(n.userData=r.userData),n.vertex=this.getNode(r.vertex),n.fragment=this.getNode(r.fragment),n.vertex===n.fragment&&(n.node=n.vertex),n.build(),void 0!==r.fog&&(n.fog=r.fog),void 0!==r.lights&&(n.lights=r.lights),void 0!==r.transparent&&(n.transparent=r.transparent);for(t in e.passes)r=e.passes[t],(n=this.passes[t]).value=this.getNode(r.value),n.build();return this.material||this.pass||this}}),t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(10),o=(a=i)&&a.__esModule?a:{default:a};var s=function(e){this.manager=void 0!==e?e:n.DefaultLoadingManager};s.prototype={constructor:s,load:function(e,t,r,a){var i=this,o=new n.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,a)},parse:function(e){var t=e,r=0,a=new Int8Array(new Int16Array([1]).buffer)[0]>0,i=!0,s={};var l=function(e,n){null==n&&(n=1);var o=1,s=Uint8Array;switch(e){case"uchar":break;case"schar":s=Int8Array;break;case"ushort":s=Uint16Array,o=2;break;case"sshort":s=Int16Array,o=2;break;case"uint":s=Uint32Array,o=4;break;case"sint":s=Int32Array,o=4;break;case"float":s=Float32Array,o=4;break;case"complex":case"double":s=Float64Array,o=8}var l=new s(t.slice(r,r+=n*o));return a!=i&&(l=function(e,t){for(var r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=0;a<e.byteLength;a+=t)for(var n=a+t-1,i=a;n>i;n--,i++){var o=r[i];r[i]=r[n],r[n]=o}return e}(l,o)),1==n?l[0]:l}("uchar",e.byteLength),u=l.length,c=null,d=0;for(p=1;p<u;p++)if(10==l[p-1]&&10==l[p]){c=this.parseChars(l,0,p-2),d=p+1;break}!function(e){var t,r,a,i,o,l,u,c,d;for(c=0,d=(l=e.split(/\r?\n/)).length;c<d;c++)(o=l[c]).match(/NRRD\d+/)?s.isNrrd=!0:o.match(/^#/)||(u=o.match(/(.*):(.*)/))&&(r=u[1].trim(),t=u[2].trim(),(a=n.NRRDLoader.prototype.fieldFunctions[r])?a.call(s,t):s[r]=t);if(!s.isNrrd)throw new Error("Not an NRRD file");if("bz2"===s.encoding||"bzip2"===s.encoding)throw new Error("Bzip is not supported");if(!s.vectors&&(s.vectors=[new n.Vector3(1,0,0),new n.Vector3(0,1,0),new n.Vector3(0,0,1)],s.spacings))for(i=0;i<=2;i++)isNaN(s.spacings[i])||s.vectors[i].multiplyScalar(s.spacings[i])}(c);t=l.subarray(d);if("gzip"===s.encoding||"gz"===s.encoding){var f=new Zlib.Gunzip(new Uint8Array(t));t=f.decompress()}else if("ascii"===s.encoding||"text"===s.encoding||"txt"===s.encoding||"hex"===s.encoding)t=function(e,t,r){var a,n="";t=t||0,r=r||e.length;var i=s.sizes.reduce((function(e,t){return e*t}),1),o=10;"hex"===s.encoding&&(o=16);var l=new s.__array(i),u=0,c=parseInt;s.__array!==Float32Array&&s.__array!==Float64Array||(c=parseFloat);for(var d=t;d<r;d++)((a=e[d])<9||a>13)&&32!==a?n+=String.fromCharCode(a):(""!==n&&(l[u]=c(n,o),u++),n="");return""!==n&&(l[u]=c(n,o),u++),l}(t);else if("raw"===s.encoding){for(var h=new Uint8Array(t.length),p=0;p<t.length;p++)h[p]=t[p];t=h}t=t.buffer;var m=new o.default;m.header=s,m.data=new s.__array(t);var v=m.computeMinMax(),g=v[0],y=v[1];m.windowLow=g,m.windowHigh=y,m.dimensions=[s.sizes[0],s.sizes[1],s.sizes[2]],m.xLength=m.dimensions[0],m.yLength=m.dimensions[1],m.zLength=m.dimensions[2];var x=new n.Vector3(s.vectors[0][0],s.vectors[0][1],s.vectors[0][2]).length(),b=new n.Vector3(s.vectors[1][0],s.vectors[1][1],s.vectors[1][2]).length(),w=new n.Vector3(s.vectors[2][0],s.vectors[2][1],s.vectors[2][2]).length();m.spacing=[x,b,w],m.matrix=new n.Matrix4;var A=1,M=1;if("left-posterior-superior"==s.space?(A=-1,M=-1):"left-anterior-superior"===s.space&&(A=-1),s.vectors){var T=s.vectors;m.matrix.set(A*T[0][0],A*T[1][0],A*T[2][0],0,M*T[0][1],M*T[1][1],M*T[2][1],0,1*T[0][2],1*T[1][2],1*T[2][2],0,0,0,0,1)}else m.matrix.set(A,0,0,0,0,M,0,0,0,0,1,0,0,0,0,1);return m.inverseMatrix=new n.Matrix4,m.inverseMatrix.getInverse(m.matrix),m.RASDimensions=new n.Vector3(m.xLength,m.yLength,m.zLength).applyMatrix4(m.matrix).round().toArray().map(Math.abs),m.lowerThreshold===-1/0&&(m.lowerThreshold=g),m.upperThreshold===1/0&&(m.upperThreshold=y),m},parseChars:function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length);var a="",n=0;for(n=t;n<r;++n)a+=String.fromCharCode(e[n]);return a},fieldFunctions:{type:function(e){switch(e){case"uchar":case"unsigned char":case"uint8":case"uint8_t":this.__array=Uint8Array;break;case"signed char":case"int8":case"int8_t":this.__array=Int8Array;break;case"short":case"short int":case"signed short":case"signed short int":case"int16":case"int16_t":this.__array=Int16Array;break;case"ushort":case"unsigned short":case"unsigned short int":case"uint16":case"uint16_t":this.__array=Uint16Array;break;case"int":case"signed int":case"int32":case"int32_t":this.__array=Int32Array;break;case"uint":case"unsigned int":case"uint32":case"uint32_t":this.__array=Uint32Array;break;case"float":this.__array=Float32Array;break;case"double":this.__array=Float64Array;break;default:throw new Error("Unsupported NRRD data type: "+e)}return this.type=e},endian:function(e){return this.endian=e},encoding:function(e){return this.encoding=e},dimension:function(e){return this.dim=parseInt(e,10)},sizes:function(e){var t;return this.sizes=function(){var r,a,n,i;for(i=[],r=0,a=(n=e.split(/\s+/)).length;r<a;r++)t=n[r],i.push(parseInt(t,10));return i}()},space:function(e){return this.space=e},"space origin":function(e){return this.space_origin=e.split("(")[1].split(")")[0].split(",")},"space directions":function(e){var t,r,a;return r=e.match(/\(.*?\)/g),this.vectors=function(){var e,n,i;for(i=[],e=0,n=r.length;e<n;e++)a=r[e],i.push(function(){var e,r,n,i;for(i=[],e=0,r=(n=a.slice(1,-1).split(/,/)).length;e<r;e++)t=n[e],i.push(parseFloat(t));return i}());return i}()},spacings:function(e){var t,r;return r=e.split(/\s+/),this.spacings=function(){var e,a,n=[];for(e=0,a=r.length;e<a;e++)t=r[e],n.push(parseFloat(t));return n}()}}},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(){var e=/^[og]\s*(.+)?/,t=/^mtllib /,r=/^usemtl /;function n(){var e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);var r=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[]},materials:[],smooth:!0,startMaterial:function(e,t){var r=this._finalize(!1);r&&(r.inherited||r.groupCount<=0)&&this.materials.splice(r.index,1);var a={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==r?r.smooth:this.smooth,groupStart:void 0!==r?r.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){var t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var r=this.materials.length-1;r>=0;r--)this.materials[r].groupCount<=0&&this.materials.splice(r,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},r&&r.name&&"function"==typeof r.clone){var a=r.clone(0);a.inherited=!0,this.object.materials.push(a)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)},parseNormalIndex:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)},parseUVIndex:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)},addVertex:function(e,t,r){var a=this.vertices,n=this.object.geometry.vertices;n.push(a[e+0],a[e+1],a[e+2]),n.push(a[t+0],a[t+1],a[t+2]),n.push(a[r+0],a[r+1],a[r+2])},addVertexPoint:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,r){var a=this.normals,n=this.object.geometry.normals;n.push(a[e+0],a[e+1],a[e+2]),n.push(a[t+0],a[t+1],a[t+2]),n.push(a[r+0],a[r+1],a[r+2])},addColor:function(e,t,r){var a=this.colors,n=this.object.geometry.colors;n.push(a[e+0],a[e+1],a[e+2]),n.push(a[t+0],a[t+1],a[t+2]),n.push(a[r+0],a[r+1],a[r+2])},addUV:function(e,t,r){var a=this.uvs,n=this.object.geometry.uvs;n.push(a[e+0],a[e+1]),n.push(a[t+0],a[t+1]),n.push(a[r+0],a[r+1])},addUVLine:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,r,a,n,i,o,s,l){var u=this.vertices.length,c=this.parseVertexIndex(e,u),d=this.parseVertexIndex(t,u),f=this.parseVertexIndex(r,u);if(this.addVertex(c,d,f),void 0!==a&&""!==a){var h=this.uvs.length;c=this.parseUVIndex(a,h),d=this.parseUVIndex(n,h),f=this.parseUVIndex(i,h),this.addUV(c,d,f)}if(void 0!==o&&""!==o){var p=this.normals.length;c=this.parseNormalIndex(o,p),d=o===s?c:this.parseNormalIndex(s,p),f=o===l?c:this.parseNormalIndex(l,p),this.addNormal(c,d,f)}this.colors.length>0&&this.addColor(c,d,f)},addPointGeometry:function(e){this.object.geometry.type="Points";for(var t=this.vertices.length,r=0,a=e.length;r<a;r++)this.addVertexPoint(this.parseVertexIndex(e[r],t))},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var r=this.vertices.length,a=this.uvs.length,n=0,i=e.length;n<i;n++)this.addVertexLine(this.parseVertexIndex(e[n],r));var o=0;for(i=t.length;o<i;o++)this.addUVLine(this.parseUVIndex(t[o],a))}};return e.startObject("",!1),e}function i(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.materials=null}return i.prototype={constructor:i,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setPath(this.path),o.load(e,(function(e){t(i.parse(e))}),r,n)},setPath:function(e){return this.path=e,this},setMaterials:function(e){return this.materials=e,this},parse:function(i){console.time("OBJLoader");var o=new n;-1!==i.indexOf("\r\n")&&(i=i.replace(/\r\n/g,"\n")),-1!==i.indexOf("\\\n")&&(i=i.replace(/\\\n/g,""));for(var s=i.split("\n"),l="",u="",c=[],d="function"==typeof"".trimLeft,f=0,h=s.length;f<h;f++)if(l=s[f],0!==(l=d?l.trimLeft():l.trim()).length&&"#"!==(u=l.charAt(0)))if("v"===u){var p=l.split(/\s+/);switch(p[0]){case"v":o.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),8===p.length&&o.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6]));break;case"vn":o.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":o.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===u){for(var m=l.substr(1).trim().split(/\s+/),v=[],g=0,y=m.length;g<y;g++){var x=m[g];if(x.length>0){var b=x.split("/");v.push(b)}}var w=v[0];for(g=1,y=v.length-1;g<y;g++){var A=v[g],M=v[g+1];o.addFace(w[0],A[0],M[0],w[1],A[1],M[1],w[2],A[2],M[2])}}else if("l"===u){var T=l.substring(1).trim().split(" "),S=[],E=[];if(-1===l.indexOf("/"))S=T;else for(var _=0,F=T.length;_<F;_++){var P=T[_].split("/");""!==P[0]&&S.push(P[0]),""!==P[1]&&E.push(P[1])}o.addLineGeometry(S,E)}else if("p"===u){var L=l.substr(1).trim().split(" ");o.addPointGeometry(L)}else if(null!==(c=e.exec(l))){var C=(" "+c[0].substr(1).trim()).substr(1);o.startObject(C)}else if(r.test(l))o.object.startMaterial(l.substring(7).trim(),o.materialLibraries);else if(t.test(l))o.materialLibraries.push(l.substring(7).trim());else{if("s"!==u){if("\0"===l)continue;throw new Error('THREE.OBJLoader: Unexpected line: "'+l+'"')}if((c=l.split(" ")).length>1){var O=c[1].trim().toLowerCase();o.object.smooth="0"!==O&&"off"!==O}else o.object.smooth=!0;(Y=o.object.currentMaterial())&&(Y.smooth=o.object.smooth)}o.finalize();var N=new a.Group;N.materialLibraries=[].concat(o.materialLibraries);for(f=0,h=o.objects.length;f<h;f++){var R=o.objects[f],I=R.geometry,D=R.materials,U="Line"===I.type,k="Points"===I.type,B=!1;if(0!==I.vertices.length){var j=new a.BufferGeometry;j.addAttribute("position",new a.Float32BufferAttribute(I.vertices,3)),I.normals.length>0?j.addAttribute("normal",new a.Float32BufferAttribute(I.normals,3)):j.computeVertexNormals(),I.colors.length>0&&(B=!0,j.addAttribute("color",new a.Float32BufferAttribute(I.colors,3))),I.uvs.length>0&&j.addAttribute("uv",new a.Float32BufferAttribute(I.uvs,2));for(var V,G=[],z=0,X=D.length;z<X;z++){var H=D[z],Y=void 0;if(null!==this.materials)if(Y=this.materials.create(H.name),!U||!Y||Y instanceof a.LineBasicMaterial){if(k&&Y&&!(Y instanceof a.PointsMaterial)){var W=new a.PointsMaterial({size:10,sizeAttenuation:!1});Q.copy(Y),Y=W}}else{var Q=new a.LineBasicMaterial;Q.copy(Y),Q.lights=!1,Y=Q}Y||((Y=U?new a.LineBasicMaterial:k?new a.PointsMaterial({size:1,sizeAttenuation:!1}):new a.MeshPhongMaterial).name=H.name),Y.flatShading=!H.smooth,Y.vertexColors=B?a.VertexColors:a.NoColors,G.push(Y)}if(G.length>1){for(z=0,X=D.length;z<X;z++){H=D[z];j.addGroup(H.groupStart,H.groupCount,z)}V=U?new a.LineSegments(j,G):k?new a.Points(j,G):new a.Mesh(j,G)}else V=U?new a.LineSegments(j,G[0]):k?new a.Points(j,G[0]):new a.Mesh(j,G[0]);V.name=R.name,N.add(V)}}return console.timeEnd("OBJLoader"),N}},i}();t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(7)),i=o(r(9));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(){var e="2.4.0",t=n.default.Validator;function r(r){console.info("Using THREE.OBJLoader2 version: "+e),this.manager=t.verifyInput(r,a.DefaultLoadingManager),this.logging={enabled:!0,debug:!1},this.modelName="",this.instanceNo=0,this.path="",this.useIndices=!1,this.disregardNormals=!1,this.materialPerSmoothingGroup=!1,this.loaderRootNode=new a.Group,this.meshBuilder=new n.default.MeshBuilder,this.callbacks=new n.default.Callbacks,this.workerSupport=new n.default.WorkerSupport,this.terminateWorkerOnLoad=!0}r.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t,this.meshBuilder.setLogging(this.logging.enabled,this.logging.debug)},r.prototype.setModelName=function(e){this.modelName=t.verifyInput(e,this.modelName)},r.prototype.setPath=function(e){this.path=t.verifyInput(e,this.path)},r.prototype.setStreamMeshesTo=function(e){this.loaderRootNode=t.verifyInput(e,this.loaderRootNode)},r.prototype.setMaterials=function(e){this.meshBuilder.setMaterials(e)},r.prototype.setUseIndices=function(e){this.useIndices=!0===e},r.prototype.setDisregardNormals=function(e){this.disregardNormals=!0===e},r.prototype.setMaterialPerSmoothingGroup=function(e){this.materialPerSmoothingGroup=!0===e},r.prototype._setCallbacks=function(e){t.isValid(e.onProgress)&&this.callbacks.setCallbackOnProgress(e.onProgress),t.isValid(e.onMeshAlter)&&this.callbacks.setCallbackOnMeshAlter(e.onMeshAlter),t.isValid(e.onLoad)&&this.callbacks.setCallbackOnLoad(e.onLoad),t.isValid(e.onLoadMaterials)&&this.callbacks.setCallbackOnLoadMaterials(e.onLoadMaterials),this.meshBuilder._setCallbacks(this.callbacks)},r.prototype.onProgress=function(e,r,a){var n=t.isValid(r)?r:"",i={detail:{type:e,modelName:this.modelName,instanceNo:this.instanceNo,text:n,numericalValue:a}};t.isValid(this.callbacks.onProgress)&&this.callbacks.onProgress(i),this.logging.enabled&&this.logging.debug&&console.debug(n)},r.prototype._onError=function(e){var t="Error occurred while downloading!";throw e.currentTarget&&null!==e.currentTarget.statusText&&(t+="\nurl: "+e.currentTarget.responseURL+"\nstatus: "+e.currentTarget.statusText),this.onProgress("error",t,-1),t},r.prototype.load=function(e,t,r,a,i,o){var s=new n.default.ResourceDescriptor(e,"OBJ");this._loadObj(s,t,r,a,i,o)},r.prototype._loadObj=function(e,r,i,o,s,l){t.isValid(o)||(o=this._onError),t.isValid(e)||o("An invalid ResourceDescriptor was provided. Unable to continue!");var u=this,c=function(t){if(e.content=t,l)u.parseAsync(t,r);else{var a=new n.default.Callbacks;a.setCallbackOnMeshAlter(s),u._setCallbacks(a),r({detail:{loaderRootNode:u.parse(t),modelName:u.modelName,instanceNo:u.instanceNo}})}};if(!t.isValid(e.url)||t.isValid(e.content))c(t.isValid(e.content)?e.content:null);else{if(!t.isValid(i)){var d=0,f=0;i=function(t){if(t.lengthComputable&&(f=t.loaded/t.total)>d){d=f;var r='Download of "'+e.url+'": '+(100*f).toFixed(2)+"%";u.onProgress("progressLoad",r,f)}}}var h=new a.FileLoader(this.manager);h.setPath(this.path),h.setResponseType("arraybuffer"),h.load(e.url,c,i,o)}},r.prototype.run=function(e,r){this._applyPrepData(e);var a=e.checkResourceDescriptorFiles(e.resources,[{ext:"obj",type:"ArrayBuffer",ignore:!1},{ext:"mtl",type:"String",ignore:!1},{ext:"zip",type:"String",ignore:!0}]);t.isValid(r)&&(this.terminateWorkerOnLoad=!1,this.workerSupport=r,this.logging.enabled=this.workerSupport.logging.enabled,this.logging.debug=this.workerSupport.logging.debug);var n=this;this._loadMtl(a.mtl,(function(t){null!==t&&n.meshBuilder.setMaterials(t),n._loadObj(a.obj,n.callbacks.onLoad,null,null,n.callbacks.onMeshAlter,e.useAsync)}),e.crossOrigin,e.materialOptions)},r.prototype._applyPrepData=function(e){t.isValid(e)&&(this.setLogging(e.logging.enabled,e.logging.debug),this.setModelName(e.modelName),this.setStreamMeshesTo(e.streamMeshesTo),this.meshBuilder.setMaterials(e.materials),this.setUseIndices(e.useIndices),this.setDisregardNormals(e.disregardNormals),this.setMaterialPerSmoothingGroup(e.materialPerSmoothingGroup),this._setCallbacks(e.getCallbacks()))},r.prototype.parse=function(e){if(!t.isValid(e))return console.warn("Provided content is not a valid ArrayBuffer or String."),this.loaderRootNode;this.logging.enabled&&console.time("OBJLoader2 parse: "+this.modelName),this.meshBuilder.init();var r=new o;r.setLogging(this.logging.enabled,this.logging.debug),r.setMaterialPerSmoothingGroup(this.materialPerSmoothingGroup),r.setUseIndices(this.useIndices),r.setDisregardNormals(this.disregardNormals),r.setMaterials(this.meshBuilder.getMaterials());var a=this;r.setCallbackMeshBuilder((function(e){var t,r=a.meshBuilder.processPayload(e);for(var n in r)t=r[n],a.loaderRootNode.add(t)}));if(r.setCallbackProgress((function(e,t){a.onProgress("progressParse",e,t)})),e instanceof ArrayBuffer||e instanceof Uint8Array)this.logging.enabled&&console.info("Parsing arrayBuffer..."),r.parse(e);else{if(!("string"==typeof e||e instanceof String))throw"Provided content was neither of type String nor Uint8Array! Aborting...";this.logging.enabled&&console.info("Parsing text..."),r.parseText(e)}return this.logging.enabled&&console.timeEnd("OBJLoader2 parse: "+this.modelName),this.loaderRootNode},r.prototype.parseAsync=function(e,r){var a=this,n=!1,i=function(){r({detail:{loaderRootNode:a.loaderRootNode,modelName:a.modelName,instanceNo:a.instanceNo}}),n&&a.logging.enabled&&console.timeEnd("OBJLoader2 parseAsync: "+a.modelName)};t.isValid(e)?n=!0:(console.warn("Provided content is not a valid ArrayBuffer."),i()),n&&this.logging.enabled&&console.time("OBJLoader2 parseAsync: "+this.modelName),this.meshBuilder.init();this.workerSupport.validate((function(e,r){var a="";return a+="/**\n",a+=" * This code was constructed by OBJLoader2 buildCode.\n",a+=" */\n\n",a+="THREE = { LoaderSupport: {} };\n\n",a+=e("LoaderSupport.Validator",t),a+=r("Parser",o)}),"Parser"),this.workerSupport.setCallbacks((function(e){var t,r=a.meshBuilder.processPayload(e);for(var n in r)t=r[n],a.loaderRootNode.add(t)}),i),a.terminateWorkerOnLoad&&this.workerSupport.setTerminateRequested(!0);var s={},l=this.meshBuilder.getMaterials();for(var u in l)s[u]=u;this.workerSupport.run({params:{useAsync:!0,materialPerSmoothingGroup:this.materialPerSmoothingGroup,useIndices:this.useIndices,disregardNormals:this.disregardNormals},logging:{enabled:this.logging.enabled,debug:this.logging.debug},materials:{materials:s},data:{input:e,options:null}})};var o=function(){function e(){this.callbackProgress=null,this.callbackMeshBuilder=null,this.contentRef=null,this.legacyMode=!1,this.materials={},this.useAsync=!1,this.materialPerSmoothingGroup=!1,this.useIndices=!1,this.disregardNormals=!1,this.vertices=[],this.colors=[],this.normals=[],this.uvs=[],this.rawMesh={objectName:"",groupName:"",activeMtlName:"",mtllibName:"",faceType:-1,subGroups:[],subGroupInUse:null,smoothingGroup:{splitMaterials:!1,normalized:-1,real:-1},counts:{doubleIndicesCount:0,faceCount:0,mtlCount:0,smoothingGroupCount:0}},this.inputObjectCount=1,this.outputObjectCount=1,this.globalCounts={vertices:0,faces:0,doubleIndicesCount:0,lineByte:0,currentByte:0,totalBytes:0},this.logging={enabled:!0,debug:!1}}return e.prototype.resetRawMesh=function(){this.rawMesh.subGroups=[],this.rawMesh.subGroupInUse=null,this.rawMesh.smoothingGroup.normalized=-1,this.rawMesh.smoothingGroup.real=-1,this.pushSmoothingGroup(1),this.rawMesh.counts.doubleIndicesCount=0,this.rawMesh.counts.faceCount=0,this.rawMesh.counts.mtlCount=0,this.rawMesh.counts.smoothingGroupCount=0},e.prototype.setUseAsync=function(e){this.useAsync=e},e.prototype.setMaterialPerSmoothingGroup=function(e){this.materialPerSmoothingGroup=e},e.prototype.setUseIndices=function(e){this.useIndices=e},e.prototype.setDisregardNormals=function(e){this.disregardNormals=e},e.prototype.setMaterials=function(e){this.materials=n.default.Validator.verifyInput(e,this.materials),this.materials=n.default.Validator.verifyInput(this.materials,{})},e.prototype.setCallbackMeshBuilder=function(e){if(!n.default.Validator.isValid(e))throw'Unable to run as no "MeshBuilder" callback is set.';this.callbackMeshBuilder=e},e.prototype.setCallbackProgress=function(e){this.callbackProgress=e},e.prototype.setLogging=function(e,t){this.logging.enabled=!0===e,this.logging.debug=!0===t},e.prototype.configure=function(){if(this.pushSmoothingGroup(1),this.logging.enabled){var e=Object.keys(this.materials),t="OBJLoader2.Parser configuration:"+(e.length>0?"\n\tmaterialNames:\n\t\t- "+e.join("\n\t\t- "):"\n\tmaterialNames: None")+"\n\tuseAsync: "+this.useAsync+"\n\tmaterialPerSmoothingGroup: "+this.materialPerSmoothingGroup+"\n\tuseIndices: "+this.useIndices+"\n\tdisregardNormals: "+this.disregardNormals+"\n\tcallbackMeshBuilderName: "+this.callbackMeshBuilder.name+"\n\tcallbackProgressName: "+this.callbackProgress.name;console.info(t)}},e.prototype.parse=function(e){this.logging.enabled&&console.time("OBJLoader2.Parser.parse"),this.configure();var t=new Uint8Array(e);this.contentRef=t;var r=t.byteLength;this.globalCounts.totalBytes=r;for(var a,n=new Array(128),i="",o=0,s=0,l=0;l<r;l++)switch(a=t[l]){case 32:i.length>0&&(n[o++]=i),i="";break;case 47:i.length>0&&(n[o++]=i),s++,i="";break;case 10:i.length>0&&(n[o++]=i),i="",this.globalCounts.lineByte=this.globalCounts.currentByte,this.globalCounts.currentByte=l,this.processLine(n,o,s),o=0,s=0;break;case 13:break;default:i+=String.fromCharCode(a)}this.finalizeParsing(),this.logging.enabled&&console.timeEnd("OBJLoader2.Parser.parse")},e.prototype.parseText=function(e){this.logging.enabled&&console.time("OBJLoader2.Parser.parseText"),this.configure(),this.legacyMode=!0,this.contentRef=e;var t=e.length;this.globalCounts.totalBytes=t;for(var r,a=new Array(128),n="",i=0,o=0,s=0;s<t;s++)switch(r=e[s]){case" ":n.length>0&&(a[i++]=n),n="";break;case"/":n.length>0&&(a[i++]=n),o++,n="";break;case"\n":n.length>0&&(a[i++]=n),n="",this.globalCounts.lineByte=this.globalCounts.currentByte,this.globalCounts.currentByte=s,this.processLine(a,i,o),i=0,o=0;break;case"\r":break;default:n+=r}this.finalizeParsing(),this.logging.enabled&&console.timeEnd("OBJLoader2.Parser.parseText")},e.prototype.processLine=function(e,t,r){if(!(t<1)){var a,n,i,o,s=function(e,t,r,a){var n="";if(a>r){var i;if(t)for(i=r;i<a;i++)n+=e[i];else for(i=r;i<a;i++)n+=String.fromCharCode(e[i]);n=n.trim()}return n};switch(o=e[0]){case"v":this.vertices.push(parseFloat(e[1])),this.vertices.push(parseFloat(e[2])),this.vertices.push(parseFloat(e[3])),t>4&&(this.colors.push(parseFloat(e[4])),this.colors.push(parseFloat(e[5])),this.colors.push(parseFloat(e[6])));break;case"vt":this.uvs.push(parseFloat(e[1])),this.uvs.push(parseFloat(e[2]));break;case"vn":this.normals.push(parseFloat(e[1])),this.normals.push(parseFloat(e[2])),this.normals.push(parseFloat(e[3]));break;case"f":if(a=t-1,0===r)for(this.checkFaceType(0),i=2,n=a;i<n;i++)this.buildFace(e[1]),this.buildFace(e[i]),this.buildFace(e[i+1]);else if(a===2*r)for(this.checkFaceType(1),i=3,n=a-2;i<n;i+=2)this.buildFace(e[1],e[2]),this.buildFace(e[i],e[i+1]),this.buildFace(e[i+2],e[i+3]);else if(2*a==3*r)for(this.checkFaceType(2),i=4,n=a-3;i<n;i+=3)this.buildFace(e[1],e[2],e[3]),this.buildFace(e[i],e[i+1],e[i+2]),this.buildFace(e[i+3],e[i+4],e[i+5]);else for(this.checkFaceType(3),i=3,n=a-2;i<n;i+=2)this.buildFace(e[1],void 0,e[2]),this.buildFace(e[i],void 0,e[i+1]),this.buildFace(e[i+2],void 0,e[i+3]);break;case"l":case"p":if((a=t-1)===2*r)for(this.checkFaceType(4),i=1,n=a+1;i<n;i+=2)this.buildFace(e[i],e[i+1]);else for(this.checkFaceType("l"===o?5:6),i=1,n=a+1;i<n;i++)this.buildFace(e[i]);break;case"s":this.pushSmoothingGroup(e[1]);break;case"g":this.processCompletedMesh(),this.rawMesh.groupName=s(this.contentRef,this.legacyMode,this.globalCounts.lineByte+2,this.globalCounts.currentByte);break;case"o":this.rawMesh.objectName=s(this.contentRef,this.legacyMode,this.globalCounts.lineByte+2,this.globalCounts.currentByte);break;case"mtllib":this.rawMesh.mtllibName=s(this.contentRef,this.legacyMode,this.globalCounts.lineByte+7,this.globalCounts.currentByte);break;case"usemtl":var l=s(this.contentRef,this.legacyMode,this.globalCounts.lineByte+7,this.globalCounts.currentByte);""!==l&&this.rawMesh.activeMtlName!==l&&(this.rawMesh.activeMtlName=l,this.rawMesh.counts.mtlCount++,this.checkSubGroup())}}},e.prototype.pushSmoothingGroup=function(e){var t=parseInt(e);isNaN(t)&&(t="off"===e?0:1);var r=this.rawMesh.smoothingGroup.normalized;this.rawMesh.smoothingGroup.normalized=this.rawMesh.smoothingGroup.splitMaterials?t:0===t?0:1,this.rawMesh.smoothingGroup.real=t,r!==t&&(this.rawMesh.counts.smoothingGroupCount++,this.checkSubGroup())},e.prototype.checkFaceType=function(e){this.rawMesh.faceType!==e&&(this.processCompletedMesh(),this.rawMesh.faceType=e,this.checkSubGroup())},e.prototype.checkSubGroup=function(){var e=this.rawMesh.activeMtlName+"|"+this.rawMesh.smoothingGroup.normalized;this.rawMesh.subGroupInUse=this.rawMesh.subGroups[e],n.default.Validator.isValid(this.rawMesh.subGroupInUse)||(this.rawMesh.subGroupInUse={index:e,objectName:this.rawMesh.objectName,groupName:this.rawMesh.groupName,materialName:this.rawMesh.activeMtlName,smoothingGroup:this.rawMesh.smoothingGroup.normalized,vertices:[],indexMappingsCount:0,indexMappings:[],indices:[],colors:[],uvs:[],normals:[]},this.rawMesh.subGroups[e]=this.rawMesh.subGroupInUse)},e.prototype.buildFace=function(e,t,r){this.disregardNormals&&(r=void 0);var a=this,i=function(){var n=parseInt(e),i=3*(n>0?n-1:n+a.vertices.length/3),o=a.rawMesh.subGroupInUse.vertices;o.push(a.vertices[i++]),o.push(a.vertices[i++]),o.push(a.vertices[i]);var s=a.colors.length>0?i:null;if(null!==s){var l=a.rawMesh.subGroupInUse.colors;l.push(a.colors[s++]),l.push(a.colors[s++]),l.push(a.colors[s])}if(t){var u=parseInt(t),c=2*(u>0?u-1:u+a.uvs.length/2),d=a.rawMesh.subGroupInUse.uvs;d.push(a.uvs[c++]),d.push(a.uvs[c])}if(r){var f=parseInt(r),h=3*(f>0?f-1:f+a.normals.length/3),p=a.rawMesh.subGroupInUse.normals;p.push(a.normals[h++]),p.push(a.normals[h++]),p.push(a.normals[h])}};if(this.useIndices){var o=e+(t?"_"+t:"_n")+(r?"_"+r:"_n"),s=this.rawMesh.subGroupInUse.indexMappings[o];n.default.Validator.isValid(s)?this.rawMesh.counts.doubleIndicesCount++:(s=this.rawMesh.subGroupInUse.vertices.length/3,i(),this.rawMesh.subGroupInUse.indexMappings[o]=s,this.rawMesh.subGroupInUse.indexMappingsCount++),this.rawMesh.subGroupInUse.indices.push(s)}else i();this.rawMesh.counts.faceCount++},e.prototype.createRawMeshReport=function(e){return"Input Object number: "+e+"\n\tObject name: "+this.rawMesh.objectName+"\n\tGroup name: "+this.rawMesh.groupName+"\n\tMtllib name: "+this.rawMesh.mtllibName+"\n\tVertex count: "+this.vertices.length/3+"\n\tNormal count: "+this.normals.length/3+"\n\tUV count: "+this.uvs.length/2+"\n\tSmoothingGroup count: "+this.rawMesh.counts.smoothingGroupCount+"\n\tMaterial count: "+this.rawMesh.counts.mtlCount+"\n\tReal MeshOutputGroup count: "+this.rawMesh.subGroups.length},e.prototype.finalizeRawMesh=function(){var e,t,r=[],a=0,n=0,i=0,o=0,s=0,l=0;for(var u in this.rawMesh.subGroups)if((e=this.rawMesh.subGroups[u]).vertices.length>0){if((t=e.indices).length>0&&n>0)for(var c in t)t[c]=t[c]+n;r.push(e),a+=e.vertices.length,n+=e.indexMappingsCount,i+=e.indices.length,o+=e.colors.length,l+=e.uvs.length,s+=e.normals.length}var d=null;return r.length>0&&(d={name:""!==this.rawMesh.groupName?this.rawMesh.groupName:this.rawMesh.objectName,subGroups:r,absoluteVertexCount:a,absoluteIndexCount:i,absoluteColorCount:o,absoluteNormalCount:s,absoluteUvCount:l,faceCount:this.rawMesh.counts.faceCount,doubleIndicesCount:this.rawMesh.counts.doubleIndicesCount}),d},e.prototype.processCompletedMesh=function(){var e=this.finalizeRawMesh();if(n.default.Validator.isValid(e)){if(this.colors.length>0&&this.colors.length!==this.vertices.length)throw"Vertex Colors were detected, but vertex count and color count do not match!";this.logging.enabled&&this.logging.debug&&console.debug(this.createRawMeshReport(this.inputObjectCount)),this.inputObjectCount++,this.buildMesh(e);var t=this.globalCounts.currentByte/this.globalCounts.totalBytes;return this.callbackProgress("Completed [o: "+this.rawMesh.objectName+" g:"+this.rawMesh.groupName+"] Total progress: "+(100*t).toFixed(2)+"%",t),this.resetRawMesh(),!0}return!1},e.prototype.buildMesh=function(e){var t=e.subGroups,r=new Float32Array(e.absoluteVertexCount);this.globalCounts.vertices+=e.absoluteVertexCount/3,this.globalCounts.faces+=e.faceCount,this.globalCounts.doubleIndicesCount+=e.doubleIndicesCount;var a,i,o,s,l,u,c,d=e.absoluteIndexCount>0?new Uint32Array(e.absoluteIndexCount):null,f=e.absoluteColorCount>0?new Float32Array(e.absoluteColorCount):null,h=e.absoluteNormalCount>0?new Float32Array(e.absoluteNormalCount):null,p=e.absoluteUvCount>0?new Float32Array(e.absoluteUvCount):null,m=n.default.Validator.isValid(f),v=[],g=t.length>1,y=0,x=[],b=[],w=0,A=0,M=0,T=0,S=0,E=0,_=0;for(var F in t)if(t.hasOwnProperty(F)){if(c=(a=t[F]).materialName,u=this.rawMesh.faceType<4?c+(m?"_vertexColor":"")+(0===a.smoothingGroup?"_flat":""):6===this.rawMesh.faceType?"defaultPointMaterial":"defaultLineMaterial",s=this.materials[c],l=this.materials[u],!n.default.Validator.isValid(s)&&!n.default.Validator.isValid(l)){var P=m?"defaultVertexColorMaterial":"defaultMaterial";s=this.materials[P],this.logging.enabled&&console.warn('object_group "'+a.objectName+"_"+a.groupName+'" was defined with unresolvable material "'+c+'"! Assigning "'+P+'".'),(c=P)===u&&(l=s,u=P)}if(!n.default.Validator.isValid(l)){var L={materialNameOrg:c,materialName:u,materialProperties:{vertexColors:m?2:0,flatShading:0===a.smoothingGroup}},C={cmd:"materialData",materials:{materialCloneInstructions:L}};this.callbackMeshBuilder(C),this.useAsync&&(this.materials[u]=L)}if(g?((i=x[u])||(i=y,x[u]=y,v.push(u),y++),o={start:E,count:_=this.useIndices?a.indices.length:a.vertices.length/3,index:i},b.push(o),E+=_):v.push(u),r.set(a.vertices,w),w+=a.vertices.length,d&&(d.set(a.indices,A),A+=a.indices.length),f&&(f.set(a.colors,M),M+=a.colors.length),h&&(h.set(a.normals,T),T+=a.normals.length),p&&(p.set(a.uvs,S),S+=a.uvs.length),this.logging.enabled&&this.logging.debug){var O=n.default.Validator.isValid(i)?"\n\t\tmaterialIndex: "+i:"",N="\tOutput Object no.: "+this.outputObjectCount+"\n\t\tgroupName: "+a.groupName+"\n\t\tIndex: "+a.index+"\n\t\tfaceType: "+this.rawMesh.faceType+"\n\t\tmaterialName: "+a.materialName+"\n\t\tsmoothingGroup: "+a.smoothingGroup+O+"\n\t\tobjectName: "+a.objectName+"\n\t\t#vertices: "+a.vertices.length/3+"\n\t\t#indices: "+a.indices.length+"\n\t\t#colors: "+a.colors.length/3+"\n\t\t#uvs: "+a.uvs.length/2+"\n\t\t#normals: "+a.normals.length/3;console.debug(N)}}this.outputObjectCount++,this.callbackMeshBuilder({cmd:"meshData",progress:{numericalValue:this.globalCounts.currentByte/this.globalCounts.totalBytes},params:{meshName:e.name},materials:{multiMaterial:g,materialNames:v,materialGroups:b},buffers:{vertices:r,indices:d,colors:f,normals:h,uvs:p},geometryType:this.rawMesh.faceType<4?0:6===this.rawMesh.faceType?2:1},[r.buffer],n.default.Validator.isValid(d)?[d.buffer]:null,n.default.Validator.isValid(f)?[f.buffer]:null,n.default.Validator.isValid(h)?[h.buffer]:null,n.default.Validator.isValid(p)?[p.buffer]:null)},e.prototype.finalizeParsing=function(){if(this.logging.enabled&&console.info("Global output object count: "+this.outputObjectCount),this.processCompletedMesh()&&this.logging.enabled){var e="Overall counts: \n\tVertices: "+this.globalCounts.vertices+"\n\tFaces: "+this.globalCounts.faces+"\n\tMultiple definitions: "+this.globalCounts.doubleIndicesCount;console.info(e)}},e}();return r.prototype.loadMtl=function(e,t,r,a,i){var o=new n.default.ResourceDescriptor(e,"MTL");o.setContent(t),this._loadMtl(o,r,a,i)},r.prototype._loadMtl=function(e,r,n,o){void 0===i.default&&console.error('"THREE.MTLLoader" is not available. "THREE.OBJLoader2" requires it for loading MTL files.'),t.isValid(e)&&this.logging.enabled&&console.time("Loading MTL: "+e.name);var s=[],l=this,u=function(a){var n=[];if(t.isValid(a))for(var i in a.preload(),n=a.materials)n.hasOwnProperty(i)&&(s[i]=n[i]);t.isValid(e)&&l.logging.enabled&&console.timeEnd("Loading MTL: "+e.name),r(s,a)};if(t.isValid(e)&&(t.isValid(e.content)||t.isValid(e.url))){var c=new i.default(this.manager);if(n=t.verifyInput(n,"anonymous"),c.setCrossOrigin(n),c.setPath(e.path),t.isValid(o)&&c.setMaterialOptions(o),t.isValid(e.content))u(t.isValid(e.content)?c.parse(e.content):null);else if(t.isValid(e.url)){new a.FileLoader(this.manager).load(e.url,(function(t){e.content=t,u(c.parse(t))}),this._onProgress,this._onError)}}else u()},r}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.littleEndian=!0};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(r){t(i.parse(r,e))}),r,n)},parse:function(e,t){var r=a.LoaderUtils.decodeText(e),n=function(e){var t={},r=e.search(/[\r\n]DATA\s(\S*)\s/i),a=/[\r\n]DATA\s(\S*)\s/i.exec(e.substr(r-1));if(t.data=a[1],t.headerLen=a[0].length+r,t.str=e.substr(0,t.headerLen),t.str=t.str.replace(/\#.*/gi,""),t.version=/VERSION (.*)/i.exec(t.str),t.fields=/FIELDS (.*)/i.exec(t.str),t.size=/SIZE (.*)/i.exec(t.str),t.type=/TYPE (.*)/i.exec(t.str),t.count=/COUNT (.*)/i.exec(t.str),t.width=/WIDTH (.*)/i.exec(t.str),t.height=/HEIGHT (.*)/i.exec(t.str),t.viewpoint=/VIEWPOINT (.*)/i.exec(t.str),t.points=/POINTS (.*)/i.exec(t.str),null!==t.version&&(t.version=parseFloat(t.version[1])),null!==t.fields&&(t.fields=t.fields[1].split(" ")),null!==t.type&&(t.type=t.type[1].split(" ")),null!==t.width&&(t.width=parseInt(t.width[1])),null!==t.height&&(t.height=parseInt(t.height[1])),null!==t.viewpoint&&(t.viewpoint=t.viewpoint[1]),null!==t.points&&(t.points=parseInt(t.points[1],10)),null===t.points&&(t.points=t.width*t.height),null!==t.size&&(t.size=t.size[1].split(" ").map((function(e){return parseInt(e,10)}))),null!==t.count)t.count=t.count[1].split(" ").map((function(e){return parseInt(e,10)}));else{t.count=[];for(var n=0,i=t.fields.length;n<i;n++)t.count.push(1)}t.offset={};var o=0;for(n=0,i=t.fields.length;n<i;n++)"ascii"===t.data?t.offset[t.fields[n]]=n:(t.offset[t.fields[n]]=o,o+=t.size[n]);return t.rowSize=o,t}(r),i=[],o=[],s=[];if("ascii"===n.data)for(var l=n.offset,u=r.substr(n.headerLen).split("\n"),c=0,d=u.length;c<d;c++)if(""!==u[c]){var f=u[c].split(" ");if(void 0!==l.x&&(i.push(parseFloat(f[l.x])),i.push(parseFloat(f[l.y])),i.push(parseFloat(f[l.z]))),void 0!==l.rgb){var h=new Float32Array([parseFloat(f[l.rgb])]),p=new DataView(h.buffer,0);s.push(p.getUint8(0)/255),s.push(p.getUint8(1)/255),s.push(p.getUint8(2)/255)}void 0!==l.normal_x&&(o.push(parseFloat(f[l.normal_x])),o.push(parseFloat(f[l.normal_y])),o.push(parseFloat(f[l.normal_z])))}if("binary_compressed"!==n.data){if("binary"===n.data){p=new DataView(e,n.headerLen),l=n.offset,c=0;for(var m=0;c<n.points;c++,m+=n.rowSize)void 0!==l.x&&(i.push(p.getFloat32(m+l.x,this.littleEndian)),i.push(p.getFloat32(m+l.y,this.littleEndian)),i.push(p.getFloat32(m+l.z,this.littleEndian))),void 0!==l.rgb&&(s.push(p.getUint8(m+l.rgb+0)/255),s.push(p.getUint8(m+l.rgb+1)/255),s.push(p.getUint8(m+l.rgb+2)/255)),void 0!==l.normal_x&&(o.push(p.getFloat32(m+l.normal_x,this.littleEndian)),o.push(p.getFloat32(m+l.normal_y,this.littleEndian)),o.push(p.getFloat32(m+l.normal_z,this.littleEndian)))}var v=new a.BufferGeometry;i.length>0&&v.addAttribute("position",new a.Float32BufferAttribute(i,3)),o.length>0&&v.addAttribute("normal",new a.Float32BufferAttribute(o,3)),s.length>0&&v.addAttribute("color",new a.Float32BufferAttribute(s,3)),v.computeBoundingSphere();var g=new a.PointsMaterial({size:.005});s.length>0?g.vertexColors=!0:g.color.setHex(16777215*Math.random());var y=new a.Points(v,g),x=t.split("").reverse().join("");return x=(x=/([^\/]*)/.exec(x))[1].split("").reverse().join(""),y.name=x,y}console.error("THREE.PCDLoader: binary_compressed files are not supported")}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function r(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}function n(e,t){var r=parseInt(m[v].substr(e,t));if(r){var a=function(e,t){return"s"+Math.min(e,t)+"e"+Math.max(e,t)}(y,r);void 0===p[a]&&(f.push([y-1,r-1,1]),p[a]=f.length-1)}}for(var i,o,s,l,u,c={h:[255,255,255],he:[217,255,255],li:[204,128,255],be:[194,255,0],b:[255,181,181],c:[144,144,144],n:[48,80,248],o:[255,13,13],f:[144,224,80],ne:[179,227,245],na:[171,92,242],mg:[138,255,0],al:[191,166,166],si:[240,200,160],p:[255,128,0],s:[255,255,48],cl:[31,240,31],ar:[128,209,227],k:[143,64,212],ca:[61,255,0],sc:[230,230,230],ti:[191,194,199],v:[166,166,171],cr:[138,153,199],mn:[156,122,199],fe:[224,102,51],co:[240,144,160],ni:[80,208,80],cu:[200,128,51],zn:[125,128,176],ga:[194,143,143],ge:[102,143,143],as:[189,128,227],se:[255,161,0],br:[166,41,41],kr:[92,184,209],rb:[112,46,176],sr:[0,255,0],y:[148,255,255],zr:[148,224,224],nb:[115,194,201],mo:[84,181,181],tc:[59,158,158],ru:[36,143,143],rh:[10,125,140],pd:[0,105,133],ag:[192,192,192],cd:[255,217,143],in:[166,117,115],sn:[102,128,128],sb:[158,99,181],te:[212,122,0],i:[148,0,148],xe:[66,158,176],cs:[87,23,143],ba:[0,201,0],la:[112,212,255],ce:[255,255,199],pr:[217,255,199],nd:[199,255,199],pm:[163,255,199],sm:[143,255,199],eu:[97,255,199],gd:[69,255,199],tb:[48,255,199],dy:[31,255,199],ho:[0,255,156],er:[0,230,117],tm:[0,212,82],yb:[0,191,56],lu:[0,171,36],hf:[77,194,255],ta:[77,166,255],w:[33,148,214],re:[38,125,171],os:[38,102,150],ir:[23,84,135],pt:[208,208,224],au:[255,209,35],hg:[184,184,208],tl:[166,84,77],pb:[87,89,97],bi:[158,79,181],po:[171,92,0],at:[117,79,69],rn:[66,130,150],fr:[66,0,102],ra:[0,125,0],ac:[112,171,250],th:[0,186,255],pa:[0,161,255],u:[0,143,255],np:[0,128,255],pu:[0,107,255],am:[84,92,242],cm:[120,92,227],bk:[138,79,227],cf:[161,54,212],es:[179,31,212],fm:[179,31,186],md:[179,13,166],no:[189,13,135],lr:[199,0,102],rf:[204,0,89],db:[209,0,79],sg:[217,0,69],bh:[224,0,56],hs:[230,0,46],mt:[235,0,38],ds:[235,0,38],rg:[235,0,38],cn:[235,0,38],uut:[235,0,38],uuq:[235,0,38],uup:[235,0,38],uuh:[235,0,38],uus:[235,0,38],uuo:[235,0,38]},d=[],f=[],h={},p={},m=e.split("\n"),v=0,g=m.length;v<g;v++)if("ATOM"===m[v].substr(0,4)||"HETATM"===m[v].substr(0,6))i=parseFloat(m[v].substr(30,7)),o=parseFloat(m[v].substr(38,7)),s=parseFloat(m[v].substr(46,7)),l=parseInt(m[v].substr(6,5))-1,""===(u=t(m[v].substr(76,2)).toLowerCase())&&(u=t(m[v].substr(12,2)).toLowerCase()),d[l]=[i,o,s,c[u],r(u)],void 0===h[u]?h[u]=1:h[u]+=1;else if("CONECT"===m[v].substr(0,6)){var y=parseInt(m[v].substr(6,5));n(11,5),n(16,5),n(21,5),n(26,5)}return function(){var e,t,r={geometryAtoms:new a.BufferGeometry,geometryBonds:new a.BufferGeometry,json:{atoms:d,bonds:f}},n=r.geometryAtoms,i=r.geometryBonds,o=[],s=[],l=[];for(e=0,t=d.length;e<t;e++){var u=d[e],c=u[0],h=u[1],p=u[2];o.push(c,h,p);var m=u[3][0]/255,v=u[3][1]/255,g=u[3][2]/255;s.push(m,v,g)}for(e=0,t=f.length;e<t;e++){var y=f[e],x=y[0],b=y[1];l.push(o[3*x+0]),l.push(o[3*x+1]),l.push(o[3*x+2]),l.push(o[3*b+0]),l.push(o[3*b+1]),l.push(o[3*b+2])}return n.addAttribute("position",new a.Float32BufferAttribute(o,3)),n.addAttribute("color",new a.Float32BufferAttribute(s,3)),i.addAttribute("position",new a.Float32BufferAttribute(l,3)),r}()}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(JSON.parse(e)))}),r,n)},parse:function(e){function t(e){var t={};for(var r in e){var n,i=e[r],o=i.type,s=i.components;switch(o){case"float32":n=new a.Float32BufferAttribute(i.data,s);break;case"uint8":n=new a.Uint8BufferAttribute(i.data,s);break;case"uint16":n=new a.Uint16BufferAttribute(i.data,s);break;default:console.log('THREE.PlayCanvasLoader: Array type "%s" not yet supported.',o)}t[r]=n}e._attributes=t}function r(e){var t=new a.BufferGeometry;t.setIndex(e.indices);var r=l.vertices[e.vertices]._attributes;for(var n in r){var i=r[n];"texCoord0"===n&&(n="uv"),t.addAttribute(n,i)}e._geometry=t}function n(e){var t=new a.Group,r=e._geometries;if(void 0!==r)for(var n=new a.MeshPhongMaterial,i=0,o=r.length;i<o;i++){var s=r[i];t.add(new a.Mesh(s,n))}for(i=0,o=e.rotation.length;i<o;i++)e.rotation[i]*=Math.PI/180;t.name=e.name,t.position.fromArray(e.position),t.quaternion.setFromEuler((new a.Euler).fromArray(e.rotation)),t.scale.fromArray(e.scale),e._object=t}for(var i,o,s,l=e.model,u=0,c=l.vertices.length;u<c;u++)t(l.vertices[u]);for(u=0,c=l.meshes.length;u<c;u++)r(l.meshes[u]);for(u=0,c=l.meshInstances.length;u<c;u++)i=l.meshInstances[u],o=void 0,s=void 0,o=l.nodes[i.node],s=l.meshes[i.mesh],void 0===o._geometries&&(o._geometries=[]),o._geometries.push(s._geometry);for(u=0,c=l.nodes.length;u<c;u++)n(l.nodes[u]);for(u=0,c=l.parents.length;u<c;u++){var d=l.parents[u];-1!==d&&l.nodes[d]._object.add(l.nodes[u]._object)}return l.nodes[0]._object}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.propertyNameMapping={}};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},setPropertyNameMapping:function(e){this.propertyNameMapping=e},parse:function(e){function t(e){var t="",r=0,a=/ply([\s\S]*)end_header\s/.exec(e);null!==a&&(t=a[1],r=a[0].length);var n,i,o,s,l,u,c={comments:[],elements:[],headerLength:r},f=t.split("\n");for(var h=0;h<f.length;h++){var p=f[h];if(""!==(p=p.trim()))switch(i=(o=p.split(/\s+/)).shift(),p=o.join(" "),i){case"format":c.format=o[0],c.version=o[1];break;case"comment":c.comments.push(p);break;case"element":void 0!==n&&c.elements.push(n),(n={}).name=o[0],n.count=parseInt(o[1]),n.properties=[];break;case"property":n.properties.push((s=o,l=d.propertyNameMapping,u=void 0,"list"===(u={type:s[0]}).type?(u.name=s[3],u.countType=s[1],u.itemType=s[2]):u.name=s[1],u.name in l&&(u.name=l[u.name]),u));break;default:console.log("unhandled",i,o)}}return void 0!==n&&c.elements.push(n),c}function r(e,t){switch(t){case"char":case"uchar":case"short":case"ushort":case"int":case"uint":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":return parseInt(e);case"float":case"double":case"float32":case"float64":return parseFloat(e)}}function n(e,t){for(var a=t.split(/\s+/),n={},i=0;i<e.length;i++)if("list"===e[i].type){for(var o=[],s=r(a.shift(),e[i].countType),l=0;l<s;l++)o.push(r(a.shift(),e[i].itemType));n[e[i].name]=o}else n[e[i].name]=r(a.shift(),e[i].type);return n}function i(e,t){var r,a={indices:[],vertices:[],normals:[],uvs:[],colors:[]},i="";null!==(r=/end_header\s([\s\S]*)$/.exec(e))&&(i=r[1]);for(var l=i.split("\n"),u=0,c=0,d=0;d<l.length;d++){var f=l[d];if(""!==(f=f.trim())){c>=t.elements[u].count&&(u++,c=0);var h=n(t.elements[u].properties,f);s(a,t.elements[u].name,h),c++}}return o(a)}function o(e){var t=new a.BufferGeometry;return e.indices.length>0&&t.setIndex(e.indices),t.addAttribute("position",new a.Float32BufferAttribute(e.vertices,3)),e.normals.length>0&&t.addAttribute("normal",new a.Float32BufferAttribute(e.normals,3)),e.uvs.length>0&&t.addAttribute("uv",new a.Float32BufferAttribute(e.uvs,2)),e.colors.length>0&&t.addAttribute("color",new a.Float32BufferAttribute(e.colors,3)),t.computeBoundingSphere(),t}function s(e,t,r){if("vertex"===t)e.vertices.push(r.x,r.y,r.z),"nx"in r&&"ny"in r&&"nz"in r&&e.normals.push(r.nx,r.ny,r.nz),"s"in r&&"t"in r&&e.uvs.push(r.s,r.t),"red"in r&&"green"in r&&"blue"in r&&e.colors.push(r.red/255,r.green/255,r.blue/255);else if("face"===t){var a=r.vertex_indices||r.vertex_index;3===a.length?e.indices.push(a[0],a[1],a[2]):4===a.length&&(e.indices.push(a[0],a[1],a[3]),e.indices.push(a[1],a[2],a[3]))}}function l(e,t,r,a){switch(r){case"int8":case"char":return[e.getInt8(t),1];case"uint8":case"uchar":return[e.getUint8(t),1];case"int16":case"short":return[e.getInt16(t,a),2];case"uint16":case"ushort":return[e.getUint16(t,a),2];case"int32":case"int":return[e.getInt32(t,a),4];case"uint32":case"uint":return[e.getUint32(t,a),4];case"float32":case"float":return[e.getFloat32(t,a),4];case"float64":case"double":return[e.getFloat64(t,a),8]}}function u(e,t,r,a){for(var n,i={},o=0,s=0;s<r.length;s++)if("list"===r[s].type){var u=[],c=(n=l(e,t+o,r[s].countType,a))[0];o+=n[1];for(var d=0;d<c;d++)n=l(e,t+o,r[s].itemType,a),u.push(n[0]),o+=n[1];i[r[s].name]=u}else n=l(e,t+o,r[s].type,a),i[r[s].name]=n[0],o+=n[1];return[i,o]}var c,d=this;if(e instanceof ArrayBuffer){var f=a.LoaderUtils.decodeText(new Uint8Array(e)),h=t(f);c="ascii"===h.format?i(f,h):function(e,t){for(var r,a={indices:[],vertices:[],normals:[],uvs:[],colors:[]},n="binary_little_endian"===t.format,i=new DataView(e,t.headerLength),l=0,c=0;c<t.elements.length;c++)for(var d=0;d<t.elements[c].count;d++){l+=(r=u(i,l,t.elements[c].properties,n))[1];var f=r[0];s(a,t.elements[c].name,f)}return o(a)}(e,h)}else c=i(e,t(e));return c}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));t.default=function(){var e=null;function t(){if(null===e){var t=new ArrayBuffer(2),r=new Uint8Array(t),a=new Uint16Array(t);r[0]=170,r[1]=187,e=43707===a[0]}return e}var r=[null,Float32Array,null,Int8Array,Int16Array,null,Int32Array,Uint8Array,Uint16Array,null,Uint32Array],n={Uint16Array:"getUint16",Uint32Array:"getUint32",Int16Array:"getInt16",Int32Array:"getInt32",Float32Array:"getFloat32",Float64Array:"getFloat64"};function i(e,r,a,i,o){var s,l=r.BYTES_PER_ELEMENT;if(o===t()||1===l)s=new r(e,a,i);else{var u=new DataView(e,a,i*l),c=n[r.name],d=!o,f=0;for(s=new r(i);f<i;f++)s[f]=u[c](f*l,d)}return s}var o=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};return o.prototype={constructor:o,load:function(e,r,n,i){var o=this,s=new a.FileLoader(o.manager);s.setResponseType("arraybuffer"),e=e.replace(/\*/g,t()?"be":"le"),s.load(e,(function(e){r(o.parse(e))}),n,i)},parse:function(e){console.time("PRWMLoader");var t,n,o=function(e){var t=new Uint8Array(e),a=t[0],n=t[1],o=!!(n>>7&1),s=n>>6&1,l=1==(n>>5&1),u=31&n,c=0,d=0;if(l?(c=(t[2]<<16)+(t[3]<<8)+t[4],d=(t[5]<<16)+(t[6]<<8)+t[7]):(c=t[2]+(t[3]<<8)+(t[4]<<16),d=t[5]+(t[6]<<8)+(t[7]<<16)),0===a)throw new Error("PRWM decoder: Invalid format version: 0");if(1!==a)throw new Error("PRWM decoder: Unsupported format version: "+a);if(!o){if(0!==s)throw new Error("PRWM decoder: Indices type must be set to 0 for non-indexed geometries");if(0!==d)throw new Error("PRWM decoder: Number of indices must be set to 0 for non-indexed geometries")}var f,h,p,m,v,g,y,x,b=8,w={};for(x=0;x<u;x++){for(f="";b<t.length&&(h=t[b],b++,0!==h);)f+=String.fromCharCode(h);p=(n=t[b])>>7&1,m=1+(n>>4&3),b++,g=i(e,v=r[15&n],b=4*Math.ceil(b/4),m*c,l),b+=v.BYTES_PER_ELEMENT*m*c,w[f]={type:p,cardinality:m,values:g}}return b=4*Math.ceil(b/4),y=null,o&&(y=i(e,1===s?Uint32Array:Uint16Array,b,d,l)),{version:a,attributes:w,indices:y}}(e),s=Object.keys(o.attributes),l=new a.BufferGeometry;for(n=0;n<s.length;n++)t=o.attributes[s[n]],l.addAttribute(s[n],new a.BufferAttribute(t.values,t.cardinality,t.normalized));return null!==o.indices&&l.setIndex(new a.BufferAttribute(o.indices,1)),console.timeEnd("PRWMLoader"),l}},o.isBigEndianPlatform=function(){return t()},o}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function e(t){this.manager=void 0!==t?t:a.DefaultLoadingManager,this._parser=e.parse};(n.prototype=Object.create(a.CompressedTextureLoader.prototype)).constructor=n,n.parse=function(e,t){var r=new Uint32Array(e,0,13),a={buffer:e,header:r,loadMipmaps:t};return 55727696===r[0]?n._parseV3(a):559044176===r[11]?n._parseV2(a):void console.error("THREE.PVRLoader: Unknown PVR format.")},n._parseV3=function(e){var t,r,i=e.header,o=i[12],s=i[2],l=i[6],u=i[7],c=i[10],d=i[11];switch(s){case 0:t=2,r=a.RGB_PVRTC_2BPPV1_Format;break;case 1:t=2,r=a.RGBA_PVRTC_2BPPV1_Format;break;case 2:t=4,r=a.RGB_PVRTC_4BPPV1_Format;break;case 3:t=4,r=a.RGBA_PVRTC_4BPPV1_Format;break;default:console.error("THREE.PVRLoader: Unsupported PVR format:",s)}return e.dataPtr=52+o,e.bpp=t,e.format=r,e.width=u,e.height=l,e.numSurfaces=c,e.numMipmaps=d,e.isCubemap=6===c,n._extract(e)},n._parseV2=function(e){var t,r,i=e.header,o=i[0],s=i[1],l=i[2],u=i[3],c=i[4],d=i[10],f=i[12],h=255&c,p=d>0;return 25===h?(r=p?a.RGBA_PVRTC_4BPPV1_Format:a.RGB_PVRTC_4BPPV1_Format,t=4):24===h?(r=p?a.RGBA_PVRTC_2BPPV1_Format:a.RGB_PVRTC_2BPPV1_Format,t=2):console.error("THREE.PVRLoader: Unknown PVR format:",h),e.dataPtr=o,e.bpp=t,e.format=r,e.width=l,e.height=s,e.numSurfaces=f,e.numMipmaps=u+1,e.isCubemap=6===f,n._extract(e)},n._extract=function(e){var t,r={mipmaps:[],width:e.width,height:e.height,format:e.format,mipmapCount:e.numMipmaps,isCubemap:e.isCubemap},a=e.buffer,n=e.dataPtr,i=e.bpp,o=e.numSurfaces,s=0,l=0,u=0,c=0,d=0;2===i?(l=8,u=4):(l=4,u=4),t=l*u*i/8,r.mipmaps.length=e.numMipmaps*o;for(var f=0;f<e.numMipmaps;){var h=e.width>>f,p=e.height>>f;(c=h/l)<2&&(c=2),(d=p/u)<2&&(d=2),s=c*d*t;for(var m=0;m<o;m++){var v={data:new Uint8Array(a,n,s),width:h,height:p};r.mipmaps[m*e.numMipmaps+f]=v,n+=s}f++}return r},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){try{t(i.parse(e))}catch(e){n&&n(e)}}),r,n)},parse:function(e){var t,r=function(e){if("string"==typeof e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=255&e.charCodeAt(r);return t.buffer||t}return e}(e);return function(e){var t;if(50,84+50*(t=new DataView(e)).getUint32(80,!0)===t.byteLength)return!0;for(var r=[115,111,108,105,100],a=0;a<5;a++)if(r[a]!=t.getUint8(a,!1))return!0;return!1}(r)?function(e){for(var t,r,n,i,o,s,l,u,c=new DataView(e),d=c.getUint32(80,!0),f=!1,h=0;h<70;h++)1129270351==c.getUint32(h,!1)&&82==c.getUint8(h+4)&&61==c.getUint8(h+5)&&(f=!0,i=[],o=c.getUint8(h+6)/255,s=c.getUint8(h+7)/255,l=c.getUint8(h+8)/255,u=c.getUint8(h+9)/255);for(var p=new a.BufferGeometry,m=[],v=[],g=0;g<d;g++){var y=84+50*g,x=c.getFloat32(y,!0),b=c.getFloat32(y+4,!0),w=c.getFloat32(y+8,!0);if(f){var A=c.getUint16(y+48,!0);0==(32768&A)?(t=(31&A)/31,r=(A>>5&31)/31,n=(A>>10&31)/31):(t=o,r=s,n=l)}for(var M=1;M<=3;M++){var T=y+12*M;m.push(c.getFloat32(T,!0)),m.push(c.getFloat32(T+4,!0)),m.push(c.getFloat32(T+8,!0)),v.push(x,b,w),f&&i.push(t,r,n)}}return p.addAttribute("position",new a.BufferAttribute(new Float32Array(m),3)),p.addAttribute("normal",new a.BufferAttribute(new Float32Array(v),3)),f&&(p.addAttribute("color",new a.BufferAttribute(new Float32Array(i),3)),p.hasColors=!0,p.alpha=u),p}(r):function(e){for(var t,r=new a.BufferGeometry,n=/facet([\s\S]*?)endfacet/g,i=0,o=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,s=new RegExp("vertex"+o+o+o,"g"),l=new RegExp("normal"+o+o+o,"g"),u=[],c=[],d=new a.Vector3;null!==(t=n.exec(e));){for(var f=0,h=0,p=t[0];null!==(t=l.exec(p));)d.x=parseFloat(t[1]),d.y=parseFloat(t[2]),d.z=parseFloat(t[3]),h++;for(;null!==(t=s.exec(p));)u.push(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3])),c.push(d.x,d.y,d.z),f++;1!==h&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+i),3!==f&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+i),i++}return r.addAttribute("position",new a.Float32BufferAttribute(u,3)),r.addAttribute("normal",new a.Float32BufferAttribute(c,3)),r}("string"!=typeof(t=e)?a.LoaderUtils.decodeText(new Uint8Array(t)):t)}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this;new a.FileLoader(i.manager).load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e,t,a,n,i,o,s,l){n=n*Math.PI/180,t=Math.abs(t),a=Math.abs(a);var u=(s.x-l.x)/2,c=(s.y-l.y)/2,d=Math.cos(n)*u+Math.sin(n)*c,f=-Math.sin(n)*u+Math.cos(n)*c,h=t*t,p=a*a,m=d*d,v=f*f,g=m/h+v/p;if(g>1){var y=Math.sqrt(g);h=(t*=y)*t,p=(a*=y)*a}var x=h*v+p*m,b=(h*p-x)/x,w=Math.sqrt(Math.max(0,b));i===o&&(w=-w);var A=w*t*f/a,M=-w*a*d/t,T=Math.cos(n)*A-Math.sin(n)*M+(s.x+l.x)/2,S=Math.sin(n)*A+Math.cos(n)*M+(s.y+l.y)/2,E=r(1,0,(d-A)/t,(f-M)/a),_=r((d-A)/t,(f-M)/a,(-d-A)/t,(-f-M)/a)%(2*Math.PI);e.currentPath.absellipse(T,S,t,a,E,E+_,0===o,n)}function r(e,t,r,a){var n=e*r+t*a,i=Math.sqrt(e*e+t*t)*Math.sqrt(r*r+a*a),o=Math.acos(Math.max(-1,Math.min(1,n/i)));return e*a-t*r<0&&(o=-o),o}function n(e,t){return t=Object.assign({},t),e.hasAttribute("fill")&&(t.fill=e.getAttribute("fill")),""!==e.style.fill&&(t.fill=e.style.fill),t}function i(e){return"none"!==e.fill&&"transparent"!==e.fill}function o(e,t){return 2*e-(t-e)}function s(e){for(var t=e.split(/[\s,]+|(?=\s?[+\-])/),r=0;r<t.length;r++)t[r]=parseFloat(t[r]);return t}console.log("THREE.SVGLoader");var l=[];console.time("THREE.SVGLoader: DOMParser");var u=(new DOMParser).parseFromString(e,"image/svg+xml");return console.timeEnd("THREE.SVGLoader: DOMParser"),console.time("THREE.SVGLoader: Parse"),function e(r,u){if(1===r.nodeType){switch(r.nodeName){case"svg":break;case"g":u=n(r,u);break;case"path":u=n(r,u),r.hasAttribute("d")&&i(u)&&l.push(function(e,r){var n=new a.ShapePath;n.color.setStyle(r.fill);for(var i=new a.Vector2,l=new a.Vector2,u=e.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi),c=0,d=u.length;c<d;c++){var f=u[c],h=f.charAt(0),p=f.substr(1).trim();switch(h){case"M":for(var m=s(p),v=0,g=m.length;v<g;v+=2)i.x=m[v+0],i.y=m[v+1],l.x=i.x,l.y=i.y,n.moveTo(i.x,i.y);break;case"H":for(m=s(p),v=0,g=m.length;v<g;v++)i.x=m[v],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"V":for(m=s(p),v=0,g=m.length;v<g;v++)i.y=m[v],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"L":for(m=s(p),v=0,g=m.length;v<g;v+=2)i.x=m[v+0],i.y=m[v+1],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"C":for(m=s(p),v=0,g=m.length;v<g;v+=6)n.bezierCurveTo(m[v+0],m[v+1],m[v+2],m[v+3],m[v+4],m[v+5]),l.x=m[v+2],l.y=m[v+3],i.x=m[v+4],i.y=m[v+5];break;case"S":m=s(p);n.bezierCurveTo(o(i.x,l.x),o(i.y,l.y),m[0],m[1],m[2],m[3]),l.x=m[0],l.y=m[1],i.x=m[2],i.y=m[3];break;case"Q":m=s(p);n.quadraticCurveTo(m[0],m[1],m[2],m[3]),l.x=m[0],l.y=m[1],i.x=m[2],i.y=m[3];break;case"T":m=s(p);var y=o(i.x,l.x),x=o(i.y,l.y);n.quadraticCurveTo(y,x,m[0],m[1]),l.x=y,l.y=x,i.x=m[0],i.y=m[1];break;case"A":for(m=s(p),v=0,g=m.length;v<g;v+=7){var b=i.clone();i.x=m[v+5],i.y=m[v+6],l.x=i.x,l.y=i.y,t(n,m[v],m[v+1],m[v+2],m[v+3],m[v+4],b,i)}break;case"m":for(m=s(p),v=0,g=m.length;v<g;v+=2)i.x+=m[v+0],i.y+=m[v+1],l.x=i.x,l.y=i.y,n.moveTo(i.x,i.y);break;case"h":for(m=s(p),v=0,g=m.length;v<g;v++)i.x+=m[v],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"v":for(m=s(p),v=0,g=m.length;v<g;v++)i.y+=m[v],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"l":for(m=s(p),v=0,g=m.length;v<g;v+=2)i.x+=m[v+0],i.y+=m[v+1],l.x=i.x,l.y=i.y,n.lineTo(i.x,i.y);break;case"c":for(m=s(p),v=0,g=m.length;v<g;v+=6)n.bezierCurveTo(i.x+m[v+0],i.y+m[v+1],i.x+m[v+2],i.y+m[v+3],i.x+m[v+4],i.y+m[v+5]),i.x+=m[v+4],i.y+=m[v+5];break;case"s":m=s(p);n.bezierCurveTo(o(i.x,l.x),o(i.y,l.y),i.x+m[0],i.y+m[1],i.x+m[2],i.y+m[3]),l.x=i.x+m[0],l.y=i.y+m[1],i.x+=m[2],i.y+=m[3];break;case"q":m=s(p);n.quadraticCurveTo(i.x+m[0],i.y+m[1],i.x+m[2],i.y+m[3]),l.x=i.x+m[0],l.y=i.y+m[1],i.x+=m[2],i.y+=m[3];break;case"t":m=s(p),y=o(i.x,l.x),x=o(i.y,l.y);n.quadraticCurveTo(y,x,i.x+m[0],i.y+m[1]),l.x=y,l.y=x,i.x=i.x+m[0],i.y=i.y+m[1];break;case"a":for(m=s(p),v=0,g=m.length;v<g;v+=7){b=i.clone();i.x+=m[v+5],i.y+=m[v+6],l.x=i.x,l.y=i.y,t(n,m[v],m[v+1],m[v+2],m[v+3],m[v+4],b,i)}break;case"Z":case"z":n.currentPath.autoClose=!0;break;default:console.warn(f)}}return n}(r,u));break;case"rect":i(u=n(r,u))&&l.push(function(e,t){var r=parseFloat(e.getAttribute("x")||0),n=parseFloat(e.getAttribute("y")||0),i=parseFloat(e.getAttribute("rx")||0),o=parseFloat(e.getAttribute("ry")||0),s=parseFloat(e.getAttribute("width")),l=parseFloat(e.getAttribute("height")),u=new a.ShapePath;u.color.setStyle(t.fill),u.moveTo(r+2*i,n),u.lineTo(r+s-2*i,n),(0!==i||0!==o)&&u.bezierCurveTo(r+s,n,r+s,n,r+s,n+2*o);u.lineTo(r+s,n+l-2*o),(0!==i||0!==o)&&u.bezierCurveTo(r+s,n+l,r+s,n+l,r+s-2*i,n+l);u.lineTo(r+2*i,n+l),(0!==i||0!==o)&&(u.bezierCurveTo(r,n+l,r,n+l,r,n+l-2*o),u.lineTo(r,n+2*o),u.bezierCurveTo(r,n,r,n,r+2*i,n));return u}(r,u));break;case"polygon":i(u=n(r,u))&&l.push(function(e,t){var r=new a.ShapePath;r.color.setStyle(t.fill);var n=0;return e.getAttribute("points").replace(/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,(function(e,t,a){var i=parseFloat(t),o=parseFloat(a);0===n?r.moveTo(i,o):r.lineTo(i,o);n++})),r.currentPath.autoClose=!0,r}(r,u));break;case"polyline":i(u=n(r,u))&&l.push(function(e,t){var r=new a.ShapePath;r.color.setStyle(t.fill);var n=0;return e.getAttribute("points").replace(/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,(function(e,t,a){var i=parseFloat(t),o=parseFloat(a);0===n?r.moveTo(i,o):r.lineTo(i,o);n++})),r.currentPath.autoClose=!1,r}(r,u));break;case"circle":i(u=n(r,u))&&l.push(function(e,t){var r=parseFloat(e.getAttribute("cx")),n=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("r")),o=new a.Path;o.absarc(r,n,i,0,2*Math.PI);var s=new a.ShapePath;return s.color.setStyle(t.fill),s.subPaths.push(o),s}(r,u));break;case"ellipse":i(u=n(r,u))&&l.push(function(e,t){var r=parseFloat(e.getAttribute("cx")),n=parseFloat(e.getAttribute("cy")),i=parseFloat(e.getAttribute("rx")),o=parseFloat(e.getAttribute("ry")),s=new a.Path;s.absellipse(r,n,i,o,0,2*Math.PI);var l=new a.ShapePath;return l.color.setStyle(t.fill),l.subPaths.push(s),l}(r,u));break;case"line":i(u=n(r,u))&&l.push(function(e,t){var r=parseFloat(e.getAttribute("x1")),n=parseFloat(e.getAttribute("y1")),i=parseFloat(e.getAttribute("x2")),o=parseFloat(e.getAttribute("y2")),s=new a.ShapePath;return s.moveTo(r,n),s.lineTo(i,o),s.currentPath.autoClose=!1,s}(r));break;default:console.log(r)}for(var c=r.childNodes,d=0;d<c.length;d++)e(c[d],u)}}(u.documentElement,{fill:"#000"}),console.timeEnd("THREE.SVGLoader: Parse"),l}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.debug=!1,this.group=null,this.position=0,this.materials=[],this.meshes=[]};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=void 0!==this.path?this.path:a.LoaderUtils.extractUrlBase(e),s=new a.FileLoader(this.manager);s.setResponseType("arraybuffer"),s.load(e,(function(e){t(i.parse(e,o))}),r,n)},parse:function(e,t){this.group=new a.Group,this.position=0,this.materials=[],this.meshes=[],this.readFile(e,t);for(var r=0;r<this.meshes.length;r++)this.group.add(this.meshes[r]);return this.group},readFile:function(e,t){var r=new DataView(e),a=this.readChunk(r);if(a.id===o||a.id===s||a.id===i)for(var n=this.nextChunk(r,a);0!==n;){if(n===l){var u=this.readDWord(r);this.debugMessage("3DS file version: "+u)}else n===h?(this.resetPosition(r),this.readMeshData(r,t)):this.debugMessage("Unknown main chunk: "+n.toString(16));n=this.nextChunk(r,a)}this.debugMessage("Parsed "+this.meshes.length+" meshes")},readMeshData:function(e,t){for(var r=this.readChunk(e),a=this.nextChunk(e,r);0!==a;){if(a===p){var n=+this.readDWord(e);this.debugMessage("Mesh Version: "+n)}else if(a===m){var i=this.readFloat(e);this.debugMessage("Master scale: "+i),this.group.scale.set(i,i,i)}else a===I?(this.debugMessage("Named Object"),this.resetPosition(e),this.readNamedObject(e)):a===v?(this.debugMessage("Material"),this.resetPosition(e),this.readMaterialEntry(e,t)):this.debugMessage("Unknown MDATA chunk: "+a.toString(16));a=this.nextChunk(e,r)}},readNamedObject:function(e){var t=this.readChunk(e),r=this.readString(e,64);t.cur=this.position;for(var a=this.nextChunk(e,t);0!==a;){if(a===D){this.resetPosition(e);var n=this.readMesh(e);n.name=r,this.meshes.push(n)}else this.debugMessage("Unknown named object chunk: "+a.toString(16));a=this.nextChunk(e,t)}this.endChunk(t)},readMaterialEntry:function(e,t){for(var r=this.readChunk(e),n=this.nextChunk(e,r),i=new a.MeshPhongMaterial;0!==n;){if(n===g)i.name=this.readString(e,64),this.debugMessage(" Name: "+i.name);else if(n===T)this.debugMessage(" Wireframe"),i.wireframe=!0;else if(n===S){var o=this.readByte(e);i.wireframeLinewidth=o,this.debugMessage(" Wireframe Thickness: "+o)}else if(n===A)i.side=a.DoubleSide,this.debugMessage(" DoubleSided");else if(n===M)this.debugMessage(" Additive Blending"),i.blending=a.AdditiveBlending;else if(n===x)this.debugMessage(" Diffuse Color"),i.color=this.readColor(e);else if(n===b)this.debugMessage(" Specular Color"),i.specular=this.readColor(e);else if(n===y)this.debugMessage(" Ambient color"),i.color=this.readColor(e);else if(n===w){var s=this.readWord(e);i.shininess=s,this.debugMessage(" Shininess : "+s)}else n===E?(this.debugMessage(" ColorMap"),this.resetPosition(e),i.map=this.readMap(e,t)):n===F?(this.debugMessage(" BumpMap"),this.resetPosition(e),i.bumpMap=this.readMap(e,t)):n===_?(this.debugMessage(" OpacityMap"),this.resetPosition(e),i.alphaMap=this.readMap(e,t)):n===P?(this.debugMessage(" SpecularMap"),this.resetPosition(e),i.specularMap=this.readMap(e,t)):this.debugMessage(" Unknown material chunk: "+n.toString(16));n=this.nextChunk(e,r)}this.endChunk(r),this.materials[i.name]=i},readMesh:function(e){var t=this.readChunk(e),r=this.nextChunk(e,t),n=null,i=[];n=new a.Geometry;var o=new a.MeshPhongMaterial,s=new a.Mesh(n,o);for(s.name="mesh";0!==r;){if(r===U){var l=this.readWord(e);this.debugMessage(" Vertex: "+l);for(var u=0;u<l;u++)n.vertices.push(new a.Vector3(this.readFloat(e),this.readFloat(e),this.readFloat(e)))}else if(r===k)this.resetPosition(e),this.readFaceArray(e,s);else if(r===j){var c=this.readWord(e);this.debugMessage(" UV: "+c),i=[];for(u=0;u<c;u++)i.push(new a.Vector2(this.readFloat(e),this.readFloat(e)))}else if(r===V){this.debugMessage(" Tranformation Matrix (TODO)");var d=[];for(u=0;u<12;u++)d[u]=this.readFloat(e);var f=new a.Matrix4;f.elements[0]=d[0],f.elements[1]=d[6],f.elements[2]=d[3],f.elements[3]=d[9],f.elements[4]=d[2],f.elements[5]=d[8],f.elements[6]=d[5],f.elements[7]=d[11],f.elements[8]=d[1],f.elements[9]=d[7],f.elements[10]=d[4],f.elements[11]=d[10],f.elements[12]=0,f.elements[13]=0,f.elements[14]=0,f.elements[15]=1,f.transpose();var h=new a.Matrix4;h.getInverse(f,!0),n.applyMatrix(h),f.decompose(s.position,s.quaternion,s.scale)}else this.debugMessage(" Unknown mesh chunk: "+r.toString(16));r=this.nextChunk(e,t)}if(this.endChunk(t),i.length>0){var p=[];for(u=0;u<n.faces.length;u++)p.push([i[n.faces[u].a],i[n.faces[u].b],i[n.faces[u].c]]);n.faceVertexUvs[0]=p}return n.computeVertexNormals(),s},readFaceArray:function(e,t){var r=this.readChunk(e),n=this.readWord(e);this.debugMessage(" Faces: "+n);for(var i=0;i<n;++i){t.geometry.faces.push(new a.Face3(this.readWord(e),this.readWord(e),this.readWord(e)));this.readWord(e)}for(;this.position<r.end;){if((r=this.readChunk(e)).id===B){this.debugMessage(" Material Group"),this.resetPosition(e);var o=this.readMaterialGroup(e),s=this.materials[o.name];void 0!==s&&(t.material=s,""===s.name&&(s.name=t.name))}else this.debugMessage(" Unknown face array chunk: "+r.toString(16));this.endChunk(r)}this.endChunk(r)},readMap:function(e,t){var r=this.readChunk(e),n=this.nextChunk(e,r),i={},o=new a.TextureLoader(this.manager);for(o.setPath(t);0!==n;){if(n===L){var s=this.readString(e,128);i=o.load(s),this.debugMessage(" File: "+t+s)}else n===N?(i.offset.x=this.readFloat(e),this.debugMessage(" OffsetX: "+i.offset.x)):n===R?(i.offset.y=this.readFloat(e),this.debugMessage(" OffsetY: "+i.offset.y)):n===C?(i.repeat.x=this.readFloat(e),this.debugMessage(" RepeatX: "+i.repeat.x)):n===O?(i.repeat.y=this.readFloat(e),this.debugMessage(" RepeatY: "+i.repeat.y)):this.debugMessage(" Unknown map chunk: "+n.toString(16));n=this.nextChunk(e,r)}return this.endChunk(r),i},readMaterialGroup:function(e){this.readChunk(e);var t=this.readString(e,64),r=this.readWord(e);this.debugMessage(" Name: "+t),this.debugMessage(" Faces: "+r);for(var a=[],n=0;n<r;++n)a.push(this.readWord(e));return{name:t,index:a}},readColor:function(e){var t=this.readChunk(e),r=new a.Color;if(t.id===c||t.id===d){var n=this.readByte(e),i=this.readByte(e),o=this.readByte(e);r.setRGB(n/255,i/255,o/255),this.debugMessage(" Color: "+r.r+", "+r.g+", "+r.b)}else if(t.id===u||t.id===f){n=this.readFloat(e),i=this.readFloat(e),o=this.readFloat(e);r.setRGB(n,i,o),this.debugMessage(" Color: "+r.r+", "+r.g+", "+r.b)}else this.debugMessage(" Unknown color chunk: "+t.toString(16));return this.endChunk(t),r},readChunk:function(e){var t={};return t.cur=this.position,t.id=this.readWord(e),t.size=this.readDWord(e),t.end=t.cur+t.size,t.cur+=6,t},endChunk:function(e){this.position=e.end},nextChunk:function(e,t){if(t.cur>=t.end)return 0;this.position=t.cur;try{var r=this.readChunk(e);return t.cur+=r.size,r.id}catch(e){return this.debugMessage("Unable to read chunk at "+this.position),0}},resetPosition:function(){this.position-=6},readByte:function(e){var t=e.getUint8(this.position,!0);return this.position+=1,t},readFloat:function(e){try{var t=e.getFloat32(this.position,!0);return this.position+=4,t}catch(t){this.debugMessage(t+" "+this.position+" "+e.byteLength)}},readInt:function(e){var t=e.getInt32(this.position,!0);return this.position+=4,t},readShort:function(e){var t=e.getInt16(this.position,!0);return this.position+=2,t},readDWord:function(e){var t=e.getUint32(this.position,!0);return this.position+=4,t},readWord:function(e){var t=e.getUint16(this.position,!0);return this.position+=2,t},readString:function(e,t){for(var r="",a=0;a<t;a++){var n=this.readByte(e);if(!n)break;r+=String.fromCharCode(n)}return r},setPath:function(e){return this.path=e,this},debugMessage:function(e){this.debug&&console.log(e)}};var i=19789,o=15786,s=49725,l=2,u=16,c=17,d=18,f=19,h=15677,p=15678,m=256,v=45055,g=40960,y=40976,x=40992,b=41008,w=41024,A=41089,M=41091,T=41093,S=41095,E=41472,_=41488,F=41520,P=41476,L=41728,C=41812,O=41814,N=41816,R=41818,I=16384,D=16640,U=16656,k=16672,B=16688,j=16704,V=16736;t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.Texture,s=new a.FileLoader(this.manager);return s.setResponseType("arraybuffer"),s.load(e,(function(e){o.image=i.parse(e),o.needsUpdate=!0,void 0!==t&&t(o)}),r,n),o},parse:function(e){var t=0,r=1,a=2,n=3,i=9,o=10,s=11,l=48,u=4,c=0,d=1,f=2,h=3;e.length<19&&console.error("THREE.TGALoader: Not enough data to contain header.");var p=new Uint8Array(e),m=0,v={id_length:p[m++],colormap_type:p[m++],image_type:p[m++],colormap_index:p[m++]|p[m++]<<8,colormap_length:p[m++]|p[m++]<<8,colormap_size:p[m++],origin:[p[m++]|p[m++]<<8,p[m++]|p[m++]<<8],width:p[m++]|p[m++]<<8,height:p[m++]|p[m++]<<8,pixel_size:p[m++],flags:p[m++]};!function(e){switch(e.image_type){case r:case i:(e.colormap_length>256||24!==e.colormap_size||1!==e.colormap_type)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case a:case n:case o:case s:e.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case t:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',e.image_type)}(e.width<=0||e.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size&&console.error('THREE.TGALoader: Invalid pixel size "%s".',e.pixel_size)}(v),v.id_length+m>e.length&&console.error("THREE.TGALoader: No data."),m+=v.id_length;var g=!1,y=!1,x=!1;switch(v.image_type){case i:g=!0,y=!0;break;case r:y=!0;break;case o:g=!0;break;case a:break;case s:g=!0,x=!0;break;case n:x=!0}var b=document.createElement("canvas");b.width=v.width,b.height=v.height;var w=b.getContext("2d"),A=w.createImageData(v.width,v.height),M=function(e,t,r,a,n){var i,o,s,l;if(o=r.pixel_size>>3,s=r.width*r.height*o,t&&(l=n.subarray(a,a+=r.colormap_length*(r.colormap_size>>3))),e){var u,c,d;i=new Uint8Array(s);for(var f=0,h=new Uint8Array(o);f<s;)if(c=1+(127&(u=n[a++])),128&u){for(d=0;d<o;++d)h[d]=n[a++];for(d=0;d<c;++d)i.set(h,f+d*o);f+=o*c}else{for(c*=o,d=0;d<c;++d)i[f+d]=n[a++];f+=c}}else i=n.subarray(a,a+=t?r.width*r.height:s);return{pixel_data:i,palettes:l}}(g,y,v,m,p);!function(e,t,r,a,n){var i,o,s,p,m,g;switch((v.flags&l)>>u){default:case f:i=0,s=1,m=t,o=0,p=1,g=r;break;case c:i=0,s=1,m=t,o=r-1,p=-1,g=-1;break;case h:i=t-1,s=-1,m=-1,o=0,p=1,g=r;break;case d:i=t-1,s=-1,m=-1,o=r-1,p=-1,g=-1}if(x)switch(v.pixel_size){case 8:!function(e,t,r,a,n,i,o,s){var l,u,c,d=0,f=v.width;for(c=t;c!==a;c+=r)for(u=n;u!==o;u+=i,d++)l=s[d],e[4*(u+f*c)+0]=l,e[4*(u+f*c)+1]=l,e[4*(u+f*c)+2]=l,e[4*(u+f*c)+3]=255}(e,o,p,g,i,s,m,a);break;case 16:!function(e,t,r,a,n,i,o,s){var l,u,c=0,d=v.width;for(u=t;u!==a;u+=r)for(l=n;l!==o;l+=i,c+=2)e[4*(l+d*u)+0]=s[c+0],e[4*(l+d*u)+1]=s[c+0],e[4*(l+d*u)+2]=s[c+0],e[4*(l+d*u)+3]=s[c+1]}(e,o,p,g,i,s,m,a);break;default:console.error("THREE.TGALoader: Format not supported.")}else switch(v.pixel_size){case 8:!function(e,t,r,a,n,i,o,s,l){var u,c,d,f=l,h=0,p=v.width;for(d=t;d!==a;d+=r)for(c=n;c!==o;c+=i,h++)u=s[h],e[4*(c+p*d)+3]=255,e[4*(c+p*d)+2]=f[3*u+0],e[4*(c+p*d)+1]=f[3*u+1],e[4*(c+p*d)+0]=f[3*u+2]}(e,o,p,g,i,s,m,a,n);break;case 16:!function(e,t,r,a,n,i,o,s){var l,u,c,d=0,f=v.width;for(c=t;c!==a;c+=r)for(u=n;u!==o;u+=i,d+=2)l=s[d+0]+(s[d+1]<<8),e[4*(u+f*c)+0]=(31744&l)>>7,e[4*(u+f*c)+1]=(992&l)>>2,e[4*(u+f*c)+2]=(31&l)>>3,e[4*(u+f*c)+3]=32768&l?0:255}(e,o,p,g,i,s,m,a);break;case 24:!function(e,t,r,a,n,i,o,s){var l,u,c=0,d=v.width;for(u=t;u!==a;u+=r)for(l=n;l!==o;l+=i,c+=3)e[4*(l+d*u)+3]=255,e[4*(l+d*u)+2]=s[c+0],e[4*(l+d*u)+1]=s[c+1],e[4*(l+d*u)+0]=s[c+2]}(e,o,p,g,i,s,m,a);break;case 32:!function(e,t,r,a,n,i,o,s){var l,u,c=0,d=v.width;for(u=t;u!==a;u+=r)for(l=n;l!==o;l+=i,c+=4)e[4*(l+d*u)+2]=s[c+0],e[4*(l+d*u)+1]=s[c+1],e[4*(l+d*u)+0]=s[c+2],e[4*(l+d*u)+3]=s[c+3]}(e,o,p,g,i,s,m,a);break;default:console.error("THREE.TGALoader: Format not supported.")}}(A.data,v.width,v.height,M.pixel_data,M.palettes);return w.putImageData(A,0,0),b}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager,this.reversed=!1};n.prototype={constructor:n,load:function(e,t,r,n){var i=this,o=new a.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e){var t,r=[];e.forEach((function(e){"m"===e.type.toLowerCase()?(t=[e],r.push(t)):"z"!==e.type.toLowerCase()&&t.push(e)}));var a=[];return r.forEach((function(e){var t={type:"m",x:e[e.length-1].x,y:e[e.length-1].y};a.push(t);for(var r=e.length-1;r>0;r--){var n=e[r];t={type:n.type};void 0!==n.x2&&void 0!==n.y2?(t.x1=n.x2,t.y1=n.y2,t.x2=n.x1,t.y2=n.y1):void 0!==n.x1&&void 0!==n.y1&&(t.x1=n.x1,t.y1=n.y1),t.x=e[r-1].x,t.y=e[r-1].y,a.push(t)}})),a}return"undefined"==typeof opentype?(console.warn("THREE.TTFLoader: The loader requires opentype.js. Make sure it's included before using the loader."),null):function(e,r){for(var a=Math.round,n={},i=1e5/(72*(e.unitsPerEm||2048)),o=0;o<e.glyphs.length;o++){var s=e.glyphs.glyphs[o];if(void 0!==s.unicode){var l={ha:a(s.advanceWidth*i),x_min:a(s.xMin*i),x_max:a(s.xMax*i),o:""};r&&(s.path.commands=t(s.path.commands)),s.path.commands.forEach((function(e,t){"c"===e.type.toLowerCase()&&(e.type="b"),l.o+=e.type.toLowerCase()+" ",void 0!==e.x&&void 0!==e.y&&(l.o+=a(e.x*i)+" "+a(e.y*i)+" "),void 0!==e.x1&&void 0!==e.y1&&(l.o+=a(e.x1*i)+" "+a(e.y1*i)+" "),void 0!==e.x2&&void 0!==e.y2&&(l.o+=a(e.x2*i)+" "+a(e.y2*i)+" ")})),n[String.fromCharCode(s.unicode)]=l}}return{glyphs:n,familyName:e.familyName,ascender:a(e.ascender*i),descender:a(e.descender*i),underlinePosition:e.tables.post.underlinePosition,underlineThickness:e.tables.post.underlineThickness,boundingBox:{xMin:e.tables.head.xMin,xMax:e.tables.head.xMax,yMin:e.tables.head.yMin,yMax:e.tables.head.yMax},resolution:1e3,original_font_information:e.tables.name}}(opentype.parse(e),this.reversed)}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};n.prototype={constructor:n,isRecordingPoints:!1,isRecordingFaces:!1,points:[],indexes:[],isRecordingAngles:!1,isRecordingColors:!1,angles:[],colors:[],recordingFieldname:null,crossOrigin:"Anonymous",load:function(e,t,r,n){var i=this;new a.FileLoader(this.manager).load(e,(function(e){t(i.parse(e))}),r,n)},setCrossOrigin:function(e){this.crossOrigin=e},parse:function(e){var t=this.texturePath||"",r=new a.TextureLoader(this.manager);r.setCrossOrigin(this.crossOrigin);for(var n=new a.Scene,i=e.split("\n"),o=i.length-1;o>-1;o--){var s=i[o];if(/{.*[{\[]/.test(s))(l=s.split("{").join("{\n").split("\n")).unshift(1),l.unshift(o),i.splice.apply(i,l);else if(/\].*}/.test(s)){var l;(l=s.split("]").join("]\n").split("\n")).unshift(1),l.unshift(o),i.splice.apply(i,l)}if(/}.*}/.test(s))(l=s.split("}").join("}\n").split("\n")).unshift(1),l.unshift(o),i.splice.apply(i,l);/^\b[^\s]+\b$/.test(s.trim())?(i[o+1]=s+" "+i[o+1].trim(),i.splice(o,1)):s.indexOf("coord")>-1&&s.indexOf("[")<0&&s.indexOf("{")<0&&(i[o]+=" Coordinate {}")}var u=i.shift();return/V1.0/.exec(u)?console.warn("THREE.VRMLLoader: V1.0 not supported yet."):/V2.0/.exec(u)&&function(e,n){var i={},o=/(\b|\-|\+)([\d\.e]+)/,s=/([\d\.\+\-e]+)\s+([\d\.\+\-e]+)/g,l=/([\d\.\+\-e]+)\s+([\d\.\+\-e]+)\s+([\d\.\+\-e]+)/g;function u(e,t,r,n,i){for(var o=!0===i?1:-1,s=[],l={},u={},c=0;c<r.length;c++){var d={x:o*(Math.cos(r[c])*t),y:o*(Math.sin(r[c])*t)};s.push(d)}for(var f=e.index,h=e.attributes.position,p=new a.BufferAttribute(new Float32Array(3*e.attributes.position.count),3),m=new a.Vector3,v=new a.Color,g=0;g<f.count;g++){var y=f.getX(g);m.fromBufferAttribute(h,y);for(var x=0;x<n.length;x++)if(0===x?(l.x=0,l.y=!0===i?t:-1*t):(l.x=s[x-1].x,l.y=s[x-1].y),void 0!==(u=s[x]))if(!0===(!0===i?m.y<=l.y&&m.y>u.y:m.y>=l.y&&m.y<u.y)){var b=n[x],w=n[x+1],A=Math.abs(m.y-l.y)/(l.y-u.y);v.copy(b).lerp(w,A),p.setXYZ(y,v.r,v.g,v.b)}else{var M=n[!0===i?n.length-1:0];p.setXYZ(y,M.r,M.g,M.b)}}e.addAttribute("color",p)}var c=[];function d(e,t){for(var r,a,n,i=[],u={},d=/[^\s,\[\]]+/g;null!==(r=d.exec(t));)i.push(r[0]);switch(a=i[0]){case"skyAngle":case"groundAngle":this.recordingFieldname=a,this.isRecordingAngles=!0,this.angles=[];break;case"skyColor":case"groundColor":this.recordingFieldname=a,this.isRecordingColors=!0,this.colors=[];break;case"point":this.recordingFieldname=a,this.isRecordingPoints=!0,this.points=[];break;case"coordIndex":case"texCoordIndex":this.recordingFieldname=a,this.isRecordingFaces=!0,this.indexes=[]}if(this.isRecordingFaces){if(i.length>0)for(var f=0;f<i.length;f++)/(-?\d+)/.test(i[f])&&("-1"===i[f]?(c.length>0&&this.indexes.push(c),c=[]):c.push(parseInt(i[f])));/]/.exec(t)&&(c.length>0&&this.indexes.push(c),c=[],this.isRecordingFaces=!1,e[this.recordingFieldname]=this.indexes)}else if(this.isRecordingPoints){if("Coordinate"==e.nodeType)for(;null!==(i=l.exec(t));)n={x:parseFloat(i[1]),y:parseFloat(i[2]),z:parseFloat(i[3])},this.points.push(n);if("TextureCoordinate"==e.nodeType)for(;null!==(i=s.exec(t));)n={x:parseFloat(i[1]),y:parseFloat(i[2])},this.points.push(n);/]/.exec(t)&&(this.isRecordingPoints=!1,e.points=this.points)}else if(this.isRecordingAngles){if(i.length>0)for(f=0;f<i.length;f++)o.test(i[f])&&this.angles.push(parseFloat(i[f]));/]/.exec(t)&&(this.isRecordingAngles=!1,e[this.recordingFieldname]=this.angles)}else if(this.isRecordingColors){for(;null!==(i=l.exec(t));){var h={r:parseFloat(i[1]),g:parseFloat(i[2]),b:parseFloat(i[3])};this.colors.push(h)}/]/.exec(t)&&(this.isRecordingColors=!1,e[this.recordingFieldname]=this.colors)}else if("NULL"!==i[i.length-1]&&"children"!==a){switch(a){case"diffuseColor":case"emissiveColor":case"specularColor":case"color":if(4!==i.length){console.warn("THREE.VRMLLoader: Invalid color format detected for %s.",a);break}u={r:parseFloat(i[1]),g:parseFloat(i[2]),b:parseFloat(i[3])};break;case"location":case"direction":case"translation":case"scale":case"size":if(4!==i.length){console.warn("THREE.VRMLLoader: Invalid vector format detected for %s.",a);break}u={x:parseFloat(i[1]),y:parseFloat(i[2]),z:parseFloat(i[3])};break;case"intensity":case"cutOffAngle":case"radius":case"topRadius":case"bottomRadius":case"height":case"transparency":case"shininess":case"ambientIntensity":if(2!==i.length){console.warn("THREE.VRMLLoader: Invalid single float value specification detected for %s.",a);break}u=parseFloat(i[1]);break;case"rotation":if(5!==i.length){console.warn("THREE.VRMLLoader: Invalid quaternion format detected for %s.",a);break}u={x:parseFloat(i[1]),y:parseFloat(i[2]),z:parseFloat(i[3]),w:parseFloat(i[4])};break;case"on":case"ccw":case"solid":case"colorPerVertex":case"convex":if(2!==i.length){console.warn("THREE.VRMLLoader: Invalid format detected for %s.",a);break}u="TRUE"===i[1]}e[a]=u}return u}!function e(o,s){var l;if("string"!=typeof o){l=s,o.string.indexOf("AmbientLight")>-1&&"PointLight"===o.nodeType&&(o.nodeType="AmbientLight");var c=void 0===o.on||o.on,d=void 0!==o.intensity?o.intensity:1,f=new a.Color;if(o.color&&f.copy(o.color),"AmbientLight"===o.nodeType)(l=new a.AmbientLight(f,d)).visible=c,s.add(l);else if("PointLight"===o.nodeType){var h=0;void 0!==o.radius&&o.radius<1e3&&(h=o.radius),(l=new a.PointLight(f,d,h)).visible=c,s.add(l)}else if("SpotLight"===o.nodeType){d=1,h=0;var p=Math.PI/3;c=!0;void 0!==o.radius&&o.radius<1e3&&(h=o.radius),void 0!==o.cutOffAngle&&(p=o.cutOffAngle),(l=new a.SpotLight(f,d,h,p,0)).visible=c,s.add(l)}else if("Transform"===o.nodeType||"Group"===o.nodeType){if(l=new a.Object3D,/DEF/.exec(o.string)&&(l.name=/DEF\s+([^\s]+)/.exec(o.string)[1],i[l.name]=l),void 0!==o.translation){var m=o.translation;l.position.set(m.x,m.y,m.z)}if(void 0!==o.rotation){var v=o.rotation;l.quaternion.setFromAxisAngle(new a.Vector3(v.x,v.y,v.z),v.w)}if(void 0!==o.scale){var g=o.scale;l.scale.set(g.x,g.y,g.z)}s.add(l)}else if("Shape"===o.nodeType)l=new a.Mesh,/DEF/.exec(o.string)&&(l.name=/DEF\s+([^\s]+)/.exec(o.string)[1],i[l.name]=l),s.add(l);else if("Background"===o.nodeType){var y=2e4,x=new a.SphereBufferGeometry(y,20,20),b=new a.MeshBasicMaterial({fog:!1,side:a.BackSide});if(o.skyColor.length>1)u(x,y,o.skyAngle,o.skyColor,!0),b.vertexColors=a.VertexColors;else{var w=o.skyColor[0];b.color.setRGB(w.r,w.b,w.g)}if(n.add(new a.Mesh(x,b)),void 0!==o.groundColor){y=12e3;var A=new a.SphereBufferGeometry(y,20,20,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),M=new a.MeshBasicMaterial({fog:!1,side:a.BackSide,vertexColors:a.VertexColors});u(A,y,o.groundAngle,o.groundColor,!1),n.add(new a.Mesh(A,M))}}else{if(/geometry/.exec(o.string)){if("Box"===o.nodeType){g=o.size;s.geometry=new a.BoxBufferGeometry(g.x,g.y,g.z)}else if("Cylinder"===o.nodeType)s.geometry=new a.CylinderBufferGeometry(o.radius,o.radius,o.height);else if("Cone"===o.nodeType)s.geometry=new a.CylinderBufferGeometry(o.topRadius,o.bottomRadius,o.height);else if("Sphere"===o.nodeType)s.geometry=new a.SphereBufferGeometry(o.radius);else if("IndexedFaceSet"===o.nodeType){var T,S,E,_,F,P=new a.BufferGeometry,L=[],C=[];for(j=0,E=o.children.length;j<E;j++){if("TextureCoordinate"===(V=o.children[j]).nodeType&&V.points)for(_=0,F=V.points.length;_<F;_++)S=V.points[_],C.push(S.x,S.y);if("Coordinate"===V.nodeType){if(V.points)for(_=0,F=V.points.length;_<F;_++)T=V.points[_],L.push(T.x,T.y,T.z);if(V.string.indexOf("DEF")>-1){var O=/DEF\s+([^\s]+)/.exec(V.string)[1];i[O]=L.slice(0)}if(V.string.indexOf("USE")>-1){W=/USE\s+([^\s]+)/.exec(V.string)[1];L=i[W]}}}var N=0;if(o.coordIndex){var R=[],I=[];for(T=new a.Vector3,S=new a.Vector2,j=0,E=o.coordIndex.length;j<E;j++){var D=o.coordIndex[j];for(N=0;D.length>=3&&N<D.length-2;){void 0===o.ccw&&(o.ccw=!0);var U=D[0],k=D[N+(o.ccw?1:2)],B=D[N+(o.ccw?2:1)];T.fromArray(L,3*U),S.fromArray(C,2*U),R.push(T.x,T.y,T.z),I.push(S.x,S.y),T.fromArray(L,3*k),S.fromArray(C,2*k),R.push(T.x,T.y,T.z),I.push(S.x,S.y),T.fromArray(L,3*B),S.fromArray(C,2*B),R.push(T.x,T.y,T.z),I.push(S.x,S.y),N++}}L=R,C=I}else s.parent.remove(s);!1===o.solid&&(s.material.side=a.DoubleSide),P.solid=o.solid,P.addAttribute("position",new a.Float32BufferAttribute(L,3)),C.length>0&&P.addAttribute("uv",new a.Float32BufferAttribute(C,2)),P.computeVertexNormals(),P.computeBoundingSphere(),/DEF/.exec(o.string)&&(P.name=/DEF ([^\s]+)/.exec(o.string)[1],i[P.name]=P),s.geometry=P}return}if(/appearance/.exec(o.string)){for(var j=0;j<o.children.length;j++){var V;if("Material"===(V=o.children[j]).nodeType){var G=new a.MeshPhongMaterial;if(void 0!==V.diffuseColor){var z=V.diffuseColor;G.color.setRGB(z.r,z.g,z.b)}if(void 0!==V.emissiveColor){var X=V.emissiveColor;G.emissive.setRGB(X.r,X.g,X.b)}if(void 0!==V.specularColor){g=V.specularColor;G.specular.setRGB(g.r,g.g,g.b)}if(void 0!==V.transparency){m=V.transparency;G.opacity=Math.abs(1-m),G.transparent=!0}/DEF/.exec(o.string)&&(G.name=/DEF ([^\s]+)/.exec(o.string)[1],i[G.name]=G),s.material=G}if("ImageTexture"===V.nodeType){var H=/"([^"]+)"/.exec(V.children[0]);H&&(s.material.name=H[1],s.material.map=r.load(t+H[1]))}}return}}j=0;for(var Y=o.children.length;j<Y;j++)e(o.children[j],l)}else if(/USE/.exec(o)){var W=/USE\s+?([^\s]+)/.exec(o)[1];null==i[W]?console.warn("THREE.VRMLLoader: %s is not defined.",W):/appearance/.exec(o)&&W?s.material=i[W].clone():/geometry/.exec(o)&&W?(s.geometry=i[W].clone(),void 0!==i[W].solid&&!1===i[W].solid&&(s.geometry.solid=!1,s.material.side=a.DoubleSide)):W&&(l=i[W].clone(),s.add(l))}}(function(e){for(var t,r,a={string:"Scene",children:[]},n=a,i=0;i<e.length;i++){var o="",s=e[i];if(null===/^\s+?$/g.exec(s)&&""!==(s=s.trim())){if(/#/.exec(s)){var l=s.split("#");s=l[0],o=l[1]}if(t=/([^\s]*){1}(?:\s+)?{/.exec(s)){var u={nodeType:t[1],string:s,parent:n,children:[],comment:o};n.children.push(u),n=u,/}/.exec(s)&&(r=/{(.*)}/.exec(s)[1],u.children.push(r),d(n,r),n=n.parent)}else/}/.exec(s)?n=n.parent:""!==s&&(d(n,s),n.children.push(s))}}return a}(e),n)}(i,n),n}},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(5),o=(a=i)&&a.__esModule?a:{default:a};var s=function(){function e(e){if(void 0===o.default)throw new Error("VRMLoader: Import GLTFLoader.");this.manager=void 0!==e?e:n.DefaultLoadingManager,this.gltfLoader=new o.default(this.manager)}return e.prototype={constructor:e,crossOrigin:"Anonymous",load:function(e,t,r,a){this.gltfLoader.load(e,t,r,a)},setCrossOrigin:function(e){return this.glTFLoader.setCrossOrigin(e),this},setPath:function(e){return this.glTFLoader.setPath(e),this},setDRACOLoader:function(e){return this.glTFLoader.setDRACOLoader(e),this}},e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(){};n.prototype.load=function(e,t,r){this.downloadModelJson(e,t,r)},(n.BufferGeometryCreator=function(){}).prototype.create=function(e,t){var r,n,i=t.length/3,o=new a.BufferGeometry,s=new Float32Array(3*i*3),l=new Float32Array(3*i*3),u=new Float32Array(3*i*2),c=e.length;for(n=0,r=0;r<c;r+=8)s[n++]=e[r],s[n++]=e[r+1],s[n++]=e[r+2];for(n=0,r=3;r<c;r+=8)u[n++]=e[r],u[n++]=e[r+1];for(n=0,r=5;r<c;r+=8)l[n++]=e[r],l[n++]=e[r+1],l[n++]=e[r+2];return o.setIndex(new a.BufferAttribute(t,1)),o.addAttribute("position",new a.BufferAttribute(s,3)),o.addAttribute("normal",new a.BufferAttribute(l,3)),o.addAttribute("uv",new a.BufferAttribute(u,2)),o.computeBoundingSphere(),o};var i={decodeOffsets:[-4095,-4095,-4095,0,0,-511,-511,-511],decodeScales:[1/8191,1/8191,1/8191,1/1023,1/1023,1/1023,1/1023,1/1023]};function o(e,t,r){(new a.FileLoader).load(e,t,r)}n.prototype.decompressAttribsInner_=function(e,t,r,a,n,i,o,s){for(var l=0,u=t;u<r;u++){var c=e.charCodeAt(u);l+=c>>1^-(1&c),a[n]=s*(l+o),n+=i}},n.prototype.decompressIndices_=function(e,t,r,a,n){for(var i=0,o=0;o<r;o++){var s=e.charCodeAt(t++);a[n++]=i-s,0===s&&i++}},n.prototype.decompressAABBs_=function(e,t,r,a,n){for(var i=6*r,o=t+i,s=0,l=new Float32Array(i),u=t;u<o;u+=6){var c=e.charCodeAt(u+0)+a[0],d=e.charCodeAt(u+1)+a[1],f=e.charCodeAt(u+2)+a[2],h=e.charCodeAt(u+3)+1>>1,p=e.charCodeAt(u+4)+1>>1,m=e.charCodeAt(u+5)+1>>1;l[s++]=n[0]*(c+h),l[s++]=n[1]*(d+p),l[s++]=n[2]*(f+m),l[s++]=n[0]*h,l[s++]=n[1]*p,l[s++]=n[2]*m}return l},n.prototype.decompressMesh=function(e,t,r,a,n,i){for(var o=r.decodeScales.length,s=r.decodeOffsets,l=r.decodeScales,u=t.attribRange[0],c=t.attribRange[1],d=u,f=new Float32Array(o*c),h=0;h<o;h++){var p=d+c,m=l[h];m&&this.decompressAttribsInner_(e,d,p,f,h,o,s[h],m),d=p}var v=3*t.indexRange[1],g=new Uint16Array(v);this.decompressIndices_(e,d,v,g,0);var y=void 0,x=t.bboxes;x&&(y=this.decompressAABBs_(e,x,t.names.length,s,l)),i(a,n,f,g,y,t)},n.prototype.copyAttrib=function(e,t,r,a){for(var n=0;n<e;n++)r[n]=t[e*a+n]},n.prototype.decodeAttrib2=function(e,t,r,a,n,i,o,s,l,u){for(var c=0;c<5;c++){var d=e.charCodeAt(n+i*c+u),f=d>>1^-(1&d);l[c]+=f,s[t*u+c]=l[c],o[t*u+c]=a[c]*(l[c]+r[c])}},n.prototype.accumulateNormal=function(e,t,r,a,n){var i=a[8*e],o=a[8*e+1],s=a[8*e+2],l=a[8*t],u=a[8*t+1],c=a[8*t+2],d=a[8*r],f=a[8*r+1],h=a[8*r+2];l-=i,d-=i,i=(u-=o)*(h-=s)-(c-=s)*(f-=o),o=c*d-l*h,s=l*f-u*d,n[3*e]+=i,n[3*e+1]+=o,n[3*e+2]+=s,n[3*t]+=i,n[3*t+1]+=o,n[3*t+2]+=s,n[3*r]+=i,n[3*r+1]+=o,n[3*r+2]+=s},n.prototype.decompressMesh2=function(e,t,r,a,n,i){for(var o=r.decodeScales.length,s=r.decodeOffsets,l=r.decodeScales,u=t.attribRange[0],c=t.attribRange[1],d=t.codeRange[0],f=3*t.codeRange[2],h=new Uint16Array(f),p=new Int32Array(3*c),m=new Uint16Array(o),v=new Uint16Array(o*c),g=new Float32Array(o*c),y=0,x=0,b=0;b<f;b+=3){var w=e.charCodeAt(d++),A=Math.min(b,96);if(w<A){var M,T,S,E=w%3,_=b-(w-E);switch(E){case 0:M=h[_+2],T=h[_+1],S=h[_+0];break;case 1:M=h[_+0],T=h[_+2],S=h[_+1];break;case 2:M=h[_+1],T=h[_+0],S=h[_+2]}h[x++]=M,h[x++]=T;var F=y-(w=e.charCodeAt(d++));if(h[x++]=F,0===w){for(var P=0;P<5;P++){var L=e.charCodeAt(u+c*P+y),C=(L>>1^-(1&L))+v[o*M+P]+v[o*T+P]-v[o*S+P];m[P]=C,v[o*y+P]=C,g[o*y+P]=l[P]*(C+s[P])}y++}else this.copyAttrib(o,v,m,F);this.accumulateNormal(M,T,F,v,p)}else{var O=y-(w-A);h[x++]=O,w===A?this.decodeAttrib2(e,o,s,l,u,c,g,v,m,y++):this.copyAttrib(o,v,m,O);var N=y-(w=e.charCodeAt(d++));h[x++]=N,0===w?this.decodeAttrib2(e,o,s,l,u,c,g,v,m,y++):this.copyAttrib(o,v,m,N);var R=y-(w=e.charCodeAt(d++));if(h[x++]=R,0===w){for(P=0;P<5;P++)m[P]=(v[o*O+P]+v[o*N+P])/2;this.decodeAttrib2(e,o,s,l,u,c,g,v,m,y++)}else this.copyAttrib(o,v,m,R);this.accumulateNormal(O,N,R,v,p)}}for(b=0;b<c;b++){var I=p[3*b],D=p[3*b+1],U=p[3*b+2],k=511/Math.sqrt(I*I+D*D+U*U),B=e.charCodeAt(u+5*c+b),j=e.charCodeAt(u+6*c+b),V=e.charCodeAt(u+7*c+b);g[o*b+5]=k*I+(B>>1^-(1&B)),g[o*b+6]=k*D+(j>>1^-(1&j)),g[o*b+7]=k*U+(V>>1^-(1&V))}i(a,n,g,h,void 0,t)},n.prototype.downloadMesh=function(e,t,r,a,n){var i=this,s=0;o(e,(function(e){!function(e){for(;s<r.length;){var o=r[s],l=o.indexRange;if(l){var u=l[0]+3*l[1];if(e.length<u)break;i.decompressMesh(e,o,a,t,s,n)}else{var c=o.codeRange;u=c[0]+c[1];if(e.length<u)break;i.decompressMesh2(e,o,a,t,s,n)}++s}}(e)}))},n.prototype.downloadMeshes=function(e,t,r,a){for(var n in t){var i=t[n];this.downloadMesh(e+n,n,i,r,a)}},n.prototype.createMeshCallback=function(e,t,r){var i=0,o=0,s={},l={},u={},c=t.urls;for(var d in c)s[d]=c[d].length,l[d]=0,o++,u[d]=new a.Object3D;var f=new a.Object3D,h=new a.MTLLoader.MaterialCreator(e,t.options);h.setMaterials(t.materials),h.preload();var p=new n.BufferGeometryCreator;return function(e,t,n,c,d,m){var v=p.create(n,c),g=h.create(m.material),y=new a.Mesh(v,g);u[e].add(y),l[e]++,l[e]===s[e]&&(i++,f.add(u[e]),i===o&&r(f))}},n.prototype.downloadModel=function(e,t,r,a){var n=this.createMeshCallback(t,r,a);this.downloadMeshes(e,r.urls,r.decodeParams,n)},n.prototype.downloadModelJson=function(e,t,r){var a,n;a=e,n=function(a){a.decodeParams||(r&&r.decodeParams?a.decodeParams=r.decodeParams:a.decodeParams=i),a.options=r;var n=e.substr(0,e.lastIndexOf("/")+1),o=n;r&&r.geometryBase&&"/"!==(n=r.geometryBase).charAt(n.length-1)&&(n+="/"),r&&r.materialBase&&"/"!==(o=r.materialBase).charAt(o.length-1)&&(o+="/"),this.downloadModel(n,o,a,t)}.bind(this),o(a,(function(e){n(JSON.parse(e))}),(function(){}))},t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e){this.manager=void 0!==e?e:a.DefaultLoadingManager};Object.assign(n.prototype,a.EventDispatcher.prototype,{load:function(e,t,r,n){var i=this,o=new a.FileLoader(i.manager);o.setResponseType("arraybuffer"),o.load(e,(function(e){t(i.parse(e))}),r,n)},parse:function(e){function t(e,t){var r=e.length,a=new Int32Array(r+t.length);return a.set(e),a.set(t,r),a}function r(e){for(var t="",r=new Uint8Array(e),a=0,n=r.length;n--;)t+=String.fromCharCode(r[a++]);return t}var n=a.LoaderUtils.decodeText(new Uint8Array(e,0,250)).split("\n");return-1!==n[0].indexOf("xml")?function(e){function r(e){var t,r,a,n,i,o,s="undefined"!=typeof Uint8Array?Uint8Array:Array,l=[],u=[],c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=c.length;for(t=0;t<d;t++)l[t]=c[t];for(t=0;t<d;++t)u[c.charCodeAt(t)]=t;if(u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63,(d=e.length)%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=new s(3*d/4-(i="="===e[d-2]?2:"="===e[d-1]?1:0)),a=i>0?d-4:d;var f=0;for(t=0,r=0;t<a;t+=4,r+=3)n=u[e.charCodeAt(t)]<<18|u[e.charCodeAt(t+1)]<<12|u[e.charCodeAt(t+2)]<<6|u[e.charCodeAt(t+3)],o[f++]=(16711680&n)>>16,o[f++]=(65280&n)>>8,o[f++]=255&n;return 2===i?(n=u[e.charCodeAt(t)]<<2|u[e.charCodeAt(t+1)]>>4,o[f++]=255&n):1===i&&(n=u[e.charCodeAt(t)]<<10|u[e.charCodeAt(t+1)]<<4|u[e.charCodeAt(t+2)]>>2,o[f++]=n>>8&255,o[f++]=255&n),o}function n(e,a){var n,i,s,l,u=0;if("UInt64"===o.attributes.header_type?u=8:"UInt32"===o.attributes.header_type&&(u=4),"binary"===e.attributes.format&&a){var c,d,f,h,p,m;if("Float32"===e.attributes.type)var v=new Float32Array;else if("Int64"===e.attributes.type)v=new Int32Array;d=(c=r(e["#text"]))[0];for(var g=1;g<u-1;g++)d|=c[g]<<g*u;h=(d+3)*u,m=h+=h%3>0?3-h%3:0,(p=[]).push(m),f=3*u;for(g=0;g<d;g++){for(var y=c[g*u+f],x=1;x<u-1;x++)y|=c[g*u+f+x]<<8*x;m+=y,p.push(m)}for(g=0;g<p.length-1;g++){b=(b=new Zlib.Inflate(c.slice(p[g],p[g+1]),{resize:!0,verify:!0}).decompress()).buffer,"Float32"===e.attributes.type?(b=new Float32Array(b),i=b,s=void 0,l=void 0,s=(n=v).length,(l=new Float32Array(s+i.length)).set(n),l.set(i,s),v=l):"Int64"===e.attributes.type&&(v=t(v,b=new Int32Array(b)))}delete e["#text"],"Float32"===e.attributes.type?"binary"===e.attributes.format&&(a||(v=v.filter((function(e,t){if(0!==t)return!0})))):"Int64"===e.attributes.type&&"binary"===e.attributes.format&&(a||(v=v.filter((function(e,t){if(0!==t)return!0}))),v=v.filter((function(e,t){if(t%2!=1)return!0})))}else{if("binary"!==e.attributes.format||a)if(e["#text"])var b=e["#text"].split(/\s+/).filter((function(e){if(""!==e)return e}));else b=new Int32Array(0).buffer;else b=(b=r(e["#text"])).slice(u).buffer;if(delete e["#text"],"Float32"===e.attributes.type)v=new Float32Array(b);else if("Int32"===e.attributes.type)v=new Int32Array(b);else if("Int64"===e.attributes.type){v=new Int32Array(b);"binary"===e.attributes.format&&(v=v.filter((function(e,t){if(t%2!=1)return!0})))}}return v}var i=null;if(window.DOMParser)try{i=(new DOMParser).parseFromString(e,"text/xml")}catch(e){i=null}else{if(!window.ActiveXObject)throw new Error("Cannot parse xml string!");try{if((i=new ActiveXObject("Microsoft.XMLDOM")).async=!1,!i.loadXML())throw new Error(i.parseError.reason+i.parseError.srcText)}catch(e){i=null}}var o=function e(t){var r={};if(1===t.nodeType){if(t.attributes&&t.attributes.length>0){r.attributes={};for(var a=0;a<t.attributes.length;a++){var n=t.attributes.item(a);r.attributes[n.nodeName]=n.nodeValue.trim()}}}else 3===t.nodeType&&(r=t.nodeValue.trim());if(t.hasChildNodes())for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes.item(i),s=o.nodeName;if(void 0===r[s]){""!==(u=e(o))&&(r[s]=u)}else{if(void 0===r[s].push){var l=r[s];r[s]=[l]}var u;""!==(u=e(o))&&r[s].push(u)}}return r}(i.documentElement),s=[],l=[],u=[];if(o.PolyData){for(var c=o.PolyData.Piece,d=o.attributes.hasOwnProperty("compressor"),f=["PointData","Points","Strips","Polys"],h=0,p=f.length;h<p;){var m=c[f[h]];if(m&&m.DataArray){if("[object Array]"===Object.prototype.toString.call(m.DataArray))var v=m.DataArray;else v=[m.DataArray];for(var g=0,y=v.length;g<y;)"#text"in v[g]&&v[g]["#text"].length>0&&(v[g].text=n(v[g],d)),g++;switch(f[h]){case"PointData":var x=parseInt(c.attributes.NumberOfPoints),b=m.attributes.Normals;if(x>0)for(var w=0,A=v.length;w<A;w++)if(b===v[w].attributes.Name){var M=v[w].attributes.NumberOfComponents;(l=new Float32Array(x*M)).set(v[w].text,0)}break;case"Points":if((x=parseInt(c.attributes.NumberOfPoints))>0){M=m.DataArray.attributes.NumberOfComponents;(s=new Float32Array(x*M)).set(m.DataArray.text,0)}break;case"Strips":var T=parseInt(c.attributes.NumberOfStrips);if(T>0){var S=new Int32Array(m.DataArray[0].text.length),E=new Int32Array(m.DataArray[1].text.length);S.set(m.DataArray[0].text,0),E.set(m.DataArray[1].text,0);var _=T+S.length;u=new Uint32Array(3*_-9*T);var F=0;for(w=0,A=T;w<A;w++){for(var P=[],L=0,C=E[w],O=0;L<C-O;L++)P.push(S[L]),w>0&&(O=E[w-1]);var N=0;for(C=E[w],O=0;N<C-O-2;N++)N%2?(u[F++]=P[N],u[F++]=P[N+2],u[F++]=P[N+1]):(u[F++]=P[N],u[F++]=P[N+1],u[F++]=P[N+2]),w>0&&(O=E[w-1])}}break;case"Polys":var R=parseInt(c.attributes.NumberOfPolys);if(R>0){S=new Int32Array(m.DataArray[0].text.length),E=new Int32Array(m.DataArray[1].text.length);S.set(m.DataArray[0].text,0),E.set(m.DataArray[1].text,0);_=R+S.length;u=new Uint32Array(3*_-9*R);F=0;var I=0;for(w=0,A=R,O=0;w<A;){var D=[];for(L=0,C=E[w];L<C-O;)D.push(S[I++]),L++;for(N=1;N<C-O-1;)u[F++]=D[0],u[F++]=D[N],u[F++]=D[N+1],N++;O=E[++w-1]}}}}h++}var U=new a.BufferGeometry;return U.setIndex(new a.BufferAttribute(u,1)),U.addAttribute("position",new a.BufferAttribute(s,3)),l.length===s.length&&U.addAttribute("normal",new a.BufferAttribute(l,3)),U}}(r(e)):n[2].includes("ASCII")?function(e){var t,r,n=[],i=[],o=[],s=[],l=/(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)\s+(\-?\d+\.?[\d\-\+e]*)/g,u=/^(\d+)\s+([\s\d]*)/,c=/^POINTS /,d=/^POLYGONS /,f=/^TRIANGLE_STRIPS /,h=/^POINT_DATA[ ]+(\d+)/,p=/^CELL_DATA[ ]+(\d+)/,m=/^COLOR_SCALARS[ ]+(\w+)[ ]+3/,v=/^NORMALS[ ]+(\w+)[ ]+(\w+)/,g=!1,y=!1,x=!1,b=!1,w=!1,A=!1,M=!1,T=e.split("\n");for(var S in T){var E=T[S];if(g)for(;null!==(t=l.exec(E));){var _=parseFloat(t[1]),F=parseFloat(t[2]),P=parseFloat(t[3]);i.push(_,F,P)}else if(y){if(null!==(t=u.exec(E))){var L=parseInt(t[1]),C=t[2].split(/\s+/);if(L>=3)for(var O=parseInt(C[0]),N=1,R=0;R<L-2;++R)I=parseInt(C[N]),D=parseInt(C[N+1]),n.push(O,I,D),N++}}else if(x){if(null!==(t=u.exec(E))){L=parseInt(t[1]),C=t[2].split(/\s+/);if(L>=3){var I,D;for(R=0;R<L-2;R++)R%2==1?(O=parseInt(C[R]),I=parseInt(C[R+2]),D=parseInt(C[R+1]),n.push(O,I,D)):(O=parseInt(C[R]),I=parseInt(C[R+1]),D=parseInt(C[R+2]),n.push(O,I,D))}}}else if(b||w)if(A)for(;null!==(t=l.exec(E));){var U=parseFloat(t[1]),k=parseFloat(t[2]),B=parseFloat(t[3]);o.push(U,k,B)}else if(M)for(;null!==(t=l.exec(E));){var j=parseFloat(t[1]),V=parseFloat(t[2]),G=parseFloat(t[3]);s.push(j,V,G)}null!==d.exec(E)?(y=!0,g=!1,x=!1):null!==c.exec(E)?(y=!1,g=!0,x=!1):null!==f.exec(E)?(y=!1,g=!1,x=!0):null!==h.exec(E)?(b=!0,g=!1,y=!1,x=!1):null!==p.exec(E)?(w=!0,g=!1,y=!1,x=!1):null!==m.exec(E)?(A=!0,M=!1,g=!1,y=!1,x=!1):null!==v.exec(E)&&(M=!0,A=!1,g=!1,y=!1,x=!1)}var z="point";if(o.length===n.length&&(z="cell"),"point"===z)(r=new a.BufferGeometry).setIndex(new a.BufferAttribute(new Uint32Array(n),1)),r.addAttribute("position",new a.BufferAttribute(new Float32Array(i),3)),o.length===i.length&&r.addAttribute("color",new a.BufferAttribute(new Float32Array(o),3)),s.length===i.length&&r.addAttribute("normal",new a.BufferAttribute(new Float32Array(s),3));else{r=new a.Geometry;var X,H,Y,W,Q=n.length/3,q=i.length/3;for(R=0;R<q;++R)_=i[3*R+0],F=i[3*R+1],P=i[3*R+2],r.vertices.push(new a.Vector3(_,F,P));for(S=0;S<Q;++S)H=n[3*S+0],Y=n[3*S+1],W=n[3*S+2],r.faces.push(new a.Face3(H,Y,W));if(o.length===3*Q)for(S=0;S<Q;++S)X=r.faces[S],U=o[3*S+0],k=o[3*S+1],B=o[3*S+2],X.color=(new a.Color).setRGB(U,k,B)}return r}(r(e)):function(e){var t,r,n,i,o,s,l,u=new Uint8Array(e),c=new DataView(e),d=[],f=[],h=[],p=[],m=0;function v(e,t){for(var r=t,a=e[r],n=[];10!==a;)n.push(String.fromCharCode(a)),a=e[++r];return{start:t,end:r,next:r+1,parsedString:n.join("")}}for(;;){if(0===(l=(s=v(u,m)).parsedString).indexOf("POINTS")){for(p.push(l),t=4*(i=parseInt(l.split(" ")[1],10))*3,d=new Float32Array(3*i),r=s.next,n=0;n<i;n++)d[3*n]=c.getFloat32(r,!1),d[3*n+1]=c.getFloat32(r+4,!1),d[3*n+2]=c.getFloat32(r+8,!1),r+=12;s.next=s.next+t+1}else if(0===l.indexOf("TRIANGLE_STRIPS")){var g=parseInt(l.split(" ")[1],10);t=4*(A=parseInt(l.split(" ")[2],10)),h=new Uint32Array(3*A-9*g);var y=0;for(r=s.next,n=0;n<g;n++){var x=c.getInt32(r,!1),b=[];for(r+=4,o=0;o<x;o++)b.push(c.getInt32(r,!1)),r+=4;for(var w=0;w<x-2;w++)w%2?(h[y++]=b[w],h[y++]=b[w+2],h[y++]=b[w+1]):(h[y++]=b[w],h[y++]=b[w+1],h[y++]=b[w+2])}s.next=s.next+t+1}else if(0===l.indexOf("POLYGONS")){var A;g=parseInt(l.split(" ")[1],10);t=4*(A=parseInt(l.split(" ")[2],10)),h=new Uint32Array(3*A-9*g);y=0;for(r=s.next,n=0;n<g;n++){x=c.getInt32(r,!1),b=[];for(r+=4,o=0;o<x;o++)b.push(c.getInt32(r,!1)),r+=4;for(w=1;w<x-1;w++)h[y++]=b[0],h[y++]=b[w],h[y++]=b[w+1]}s.next=s.next+t+1}else if(0===l.indexOf("POINT_DATA")){for(i=parseInt(l.split(" ")[1],10),s=v(u,s.next),t=4*i*3,f=new Float32Array(3*i),r=s.next,n=0;n<i;n++)f[3*n]=c.getFloat32(r,!1),f[3*n+1]=c.getFloat32(r+4,!1),f[3*n+2]=c.getFloat32(r+8,!1),r+=12;s.next=s.next+t}if((m=s.next)>=u.byteLength)break}var M=new a.BufferGeometry;return M.setIndex(new a.BufferAttribute(h,1)),M.addAttribute("position",new a.BufferAttribute(d,3)),f.length===d.length&&M.addAttribute("normal",new a.BufferAttribute(f,3)),M}(e)}}),t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),o=function e(){n(this,e),this.boneName="",this.BoneIndex=0,this.Indeces=[],this.Weights=[],this.initMatrix=null,this.OffsetMatrix=null},s=function e(){n(this,e),this.animeName="",this.boneName="",this.targetBone=null,this.keyType=4,this.frameStartLv=0,this.keyFrames=[],this.InverseMx=null},l=function(){function e(t){n(this,e),this.fps=30,this.name="xanimation",this.length=0,this.hierarchy=[],this.putFlags=t,void 0===this.putFlags.putPos&&(this.putFlags.putPos=!0),void 0===this.putFlags.putRot&&(this.putFlags.putRot=!0),void 0===this.putFlags.putScl&&(this.putFlags.putScl=!0)}return i(e,[{key:"make",value:function(e){for(var t=0;t<e.length;t++)this.hierarchy.push(this.makeBonekeys(e[t]));this.length=this.hierarchy[0].keys[this.hierarchy[0].keys.length-1].time}},{key:"clone",value:function(){return Object.assign({},this)}},{key:"makeBonekeys",value:function(e){var t={};return t.name=e.boneName,t.parent="",t.keys=this.keyFrameRefactor(e),t.copy=function(){return Object.assign({},this)},t}},{key:"keyFrameRefactor",value:function(e){for(var t=[],r=0;r<e.keyFrames.length;r++){var n={};n.time=e.keyFrames[r].time*this.fps,e.keyFrames[r].pos&&this.putFlags.putPos&&(n.pos=e.keyFrames[r].pos),e.keyFrames[r].rot&&this.putFlags.putRot&&(n.rot=e.keyFrames[r].rot),e.keyFrames[r].scl&&this.putFlags.putScl&&(n.scl=e.keyFrames[r].scl),e.keyFrames[r].matrix&&(n.matrix=e.keyFrames[r].matrix,this.putFlags.putPos&&(n.pos=(new a.Vector3).setFromMatrixPosition(n.matrix)),this.putFlags.putRot&&(n.rot=(new a.Quaternion).setFromRotationMatrix(n.matrix)),this.putFlags.putScl&&(n.scl=(new a.Vector3).setFromMatrixScale(n.matrix))),t.push(n)}return t}}]),e}(),u=function e(){n(this,e),this.index=0,this.Frame=0,this.time=0,this.matrix=null},c=function(){function e(t,r){n(this,e),this.debug=!1,this.manager=void 0!==t?t:a.DefaultLoadingManager,this.texloader=void 0!==r?r:new a.TextureLoader,this.url="",this.baseDir="",this._putMatLength=0,this._nowMat=null,this._tmpUvArray=[],this._facesNormal=[],this._nowFrameName="",this.frameHierarchie=[],this.Hierarchies={},this.HieStack=[],this._currentObject={},this._currentFrame={},this._data=null,this.onLoad=null,this.IsUvYReverse=!0,this.Meshes=[],this.animations=[],this.animTicksPerSecond=30,this._currentGeo=null,this._currentAnime=null,this._currentAnimeFrames=null}return i(e,[{key:"_setArgOption",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e){for(var r=t;r<e.length;r++)switch(r){case 0:this.url=e[r];break;case 1:this.options=e[r]}void 0===this.options&&(this.options={})}}},{key:"load",value:function(e,t,r,n){var i=this;this._setArgOption(e);var o=new a.FileLoader(this.manager);o.setResponseType("arraybuffer"),o.load(this.url,(function(e){i._parse(e,t)}),r,n)}},{key:"fromResponsedData",value:function(e,t,r){this._setArgOption(t),this._parse(e,r)}},{key:"_readLine",value:function(e){for(var t=0;;){var r=-1;if(-1===(r=e.indexOf("//",t))&&(r=e.indexOf("#",t)),!(r>-1&&r<2))break;var a=-1;t=(a=e.indexOf("\r\n",t))>0?a+2:(a=e.indexOf("\r",t))>0?a+1:e.indexOf("\n",t)+1}return e.substr(t)}},{key:"_readLine",value:function(e){for(var t=0;;){var r=-1;if(-1===(r=e.indexOf("//",t))&&(r=e.indexOf("#",t)),!(r>-1&&r<2))break;var a=-1;t=(a=e.indexOf("\r\n",t))>0?a+2:(a=e.indexOf("\r",t))>0?a+1:e.indexOf("\n",t)+1}return e.substr(t)}},{key:"_isBinary",value:function(e){var t=new DataView(e);if(84+50*t.getUint32(80,!0)===t.byteLength)return!0;for(var r=t.byteLength,a=0;a<r;a++)if(t.getUint8(a,!1)>127)return!0;return!1}},{key:"ensureBinary",value:function(e){if("string"==typeof e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++)t[r]=255&e.charCodeAt(r);return t.buffer||t}return e}},{key:"ensureString",value:function(e){return"string"!=typeof e?a.LoaderUtils.decodeText(new Uint8Array(e)):e}},{key:"_parse",value:function(e,t){var r=this.ensureBinary(e);return this._data=this.ensureString(e),this.onLoad=t,this._isBinary(r)?this._parseBinary(r):this._parseASCII()}},{key:"_parseBinary",value:function(e){return this._parseASCII(a.LoaderUtils.decodeText(new Uint8Array(e)))}},{key:"_parseASCII",value:function(){this.url.lastIndexOf("/")>0&&(this.baseDir=this.url.substr(0,this.url.lastIndexOf("/")+1));this.Hierarchies.children=[],this._hierarchieParse(this.Hierarchies,16),this._changeRoot(),this._currentObject=this.Hierarchies.children.shift(),this.mainloop()}},{key:"_hierarchieParse",value:function(e,t){for(var r=t;;){var a=this._data.indexOf("{",r)+1,n=this._data.indexOf("}",r),i=this._data.indexOf("{",a)+1;if(!(a>0&&n>a)){r=-1===a?this._data.length:n+1;break}var o={children:[]},s=this._readLine(this._data.substr(r,a-r-1)).trim(),l=s.split(/ /g);if(l.length>0?(o.type=l[0],l.length>=2?o.name=l[1]:o.name=l[0]+this.Hierarchies.children.length):(o.name=s,o.type=""),"Animation"===o.type){o.data=this._data.substr(i,n-i).trim();var u=this._hierarchieParse(o,n+1);r=u.end,o.children=u.parent.children}else{var c=this._data.lastIndexOf(";",i>0?Math.min(i,n):n);if(o.data=this._data.substr(a,c-a).trim(),i<=0||n<i)r=n+1;else{var d=Math.max(c+1,a),f=this._hierarchieParse(o,d);r=f.end,o.children=f.parent.children}}o.parent=e,"template"!=o.type&&e.children.push(o)}return{parent:e,end:r}}},{key:"mainloop",value:function(){var e=this;this.mainProc(),this._currentObject.parent||this._currentObject.children.length>0||!this._currentObject.worked?setTimeout((function(){e.mainloop()}),1):setTimeout((function(){e.onLoad({models:e.Meshes,animations:e.animations})}),1)}},{key:"mainProc",value:function(){for(var e=!1;;){if(!this._currentObject.worked){switch(this._currentObject.type){case"template":break;case"AnimTicksPerSecond":this.animTicksPerSecond=parseInt(this._currentObject.data);break;case"Frame":this._setFrame();break;case"FrameTransformMatrix":this._setFrameTransformMatrix();break;case"Mesh":this._changeRoot(),this._currentGeo={},this._currentGeo.name=this._currentObject.name.trim(),this._currentGeo.parentName=this._getParentName(this._currentObject).trim(),this._currentGeo.VertexSetedBoneCount=[],this._currentGeo.Geometry=new a.Geometry,this._currentGeo.Materials=[],this._currentGeo.normalVectors=[],this._currentGeo.BoneInfs=[],this._currentGeo.baseFrame=this._currentFrame,this._makeBoneFrom_CurrentFrame(),this._readVertexDatas(),e=!0;break;case"MeshNormals":this._readVertexDatas();break;case"MeshTextureCoords":this._setMeshTextureCoords();break;case"VertexDuplicationIndices":break;case"MeshMaterialList":this._setMeshMaterialList();break;case"Material":this._setMaterial();break;case"SkinWeights":this._setSkinWeights();break;case"AnimationSet":this._changeRoot(),this._currentAnime={},this._currentAnime.name=this._currentObject.name.trim(),this._currentAnime.AnimeFrames=[];break;case"Animation":this._currentAnimeFrames&&this._currentAnime.AnimeFrames.push(this._currentAnimeFrames),this._currentAnimeFrames=new s,this._currentAnimeFrames.boneName=this._currentObject.data.trim();break;case"AnimationKey":this._readAnimationKey(),e=!0}this._currentObject.worked=!0}if(this._currentObject.children.length>0){if(this._currentObject=this._currentObject.children.shift(),this.debug&&console.log("processing "+this._currentObject.name),e)break}else if(this._currentObject.worked&&this._currentObject.parent&&!this._currentObject.parent.parent&&this._changeRoot(),this._currentObject.parent?this._currentObject=this._currentObject.parent:e=!0,e)break}}},{key:"_changeRoot",value:function(){null!=this._currentGeo&&this._currentGeo.name&&this._makeOutputGeometry(),this._currentGeo={},null!=this._currentAnime&&this._currentAnime.name&&(this._currentAnimeFrames&&(this._currentAnime.AnimeFrames.push(this._currentAnimeFrames),this._currentAnimeFrames=null),this._makeOutputAnimation()),this._currentAnime={}}},{key:"_getParentName",value:function(e){return e.parent?e.parent.name?e.parent.name:this._getParentName(e.parent):""}},{key:"_setFrame",value:function(){this._nowFrameName=this._currentObject.name.trim(),this._currentFrame={},this._currentFrame.name=this._nowFrameName,this._currentFrame.children=[],this._currentObject.parent&&this._currentObject.parent.name&&(this._currentFrame.parentName=this._currentObject.parent.name),this.frameHierarchie.push(this._nowFrameName),this.HieStack[this._nowFrameName]=this._currentFrame}},{key:"_setFrameTransformMatrix",value:function(){this._currentFrame.FrameTransformMatrix=new a.Matrix4;var e=this._currentObject.data.split(",");this._ParseMatrixData(this._currentFrame.FrameTransformMatrix,e),this._makeBoneFrom_CurrentFrame()}},{key:"_makeBoneFrom_CurrentFrame",value:function(){if(this._currentFrame.FrameTransformMatrix){var e=new a.Bone;if(e.name=this._currentFrame.name,e.applyMatrix(this._currentFrame.FrameTransformMatrix),e.matrixWorld=e.matrix,e.FrameTransformMatrix=this._currentFrame.FrameTransformMatrix,this._currentFrame.putBone=e,this._currentFrame.parentName)for(var t in this.HieStack)this.HieStack[t].name===this._currentFrame.parentName&&this.HieStack[t].putBone.add(this._currentFrame.putBone)}}},{key:"_readVertexDatas",value:function(){for(var e=0,t=0,r=0,a=0,n=0;;){var i=!1;if(0===r){e=this._readInt1(e).endRead,r=1,n=0,(a=this._currentObject.data.indexOf(";;",e)+1)<=0&&(a=this._currentObject.data.length)}else{var o=0;switch(t){case 0:o=this._currentObject.data.indexOf(",",e)+1;break;case 1:o=this._currentObject.data.indexOf(";,",e)+1}switch((0===o||o>a)&&(o=a,r=0,i=!0),this._currentObject.type){case"Mesh":switch(t){case 0:this._readVertex1(this._currentObject.data.substr(e,o-e));break;case 1:this._readFace1(this._currentObject.data.substr(e,o-e))}break;case"MeshNormals":switch(t){case 0:this._readNormalVector1(this._currentObject.data.substr(e,o-e));break;case 1:this._readNormalFace1(this._currentObject.data.substr(e,o-e),n)}}e=o+1,n++,i&&t++}if(e>=this._currentObject.data.length)break}}},{key:"_readInt1",value:function(e){var t=this._currentObject.data.indexOf(";",e);return{refI:parseInt(this._currentObject.data.substr(e,t-e)),endRead:t+1}}},{key:"_readVertex1",value:function(e){var t=this._readLine(e.trim()).substr(0,e.length-2).split(";");this._currentGeo.Geometry.vertices.push(new a.Vector3(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]))),this._currentGeo.Geometry.skinIndices.push(new a.Vector4(0,0,0,0)),this._currentGeo.Geometry.skinWeights.push(new a.Vector4(1,0,0,0)),this._currentGeo.VertexSetedBoneCount.push(0)}},{key:"_readFace1",value:function(e){var t=this._readLine(e.trim()).substr(2,e.length-4).split(",");this._currentGeo.Geometry.faces.push(new a.Face3(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),new a.Vector3(1,1,1).normalize()))}},{key:"_readNormalVector1",value:function(e){var t=this._readLine(e.trim()).substr(0,e.length-2).split(";");this._currentGeo.normalVectors.push(new a.Vector3(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2])))}},{key:"_readNormalFace1",value:function(e,t){var r=this._readLine(e.trim()).substr(2,e.length-4).split(","),a=parseInt(r[0],10),n=this._currentGeo.normalVectors[a];a=parseInt(r[1],10);var i=this._currentGeo.normalVectors[a];a=parseInt(r[2],10);var o=this._currentGeo.normalVectors[a];this._currentGeo.Geometry.faces[t].vertexNormals=[n,i,o]}},{key:"_setMeshNormals",value:function(){for(var e=0,t=0,r=0;;){switch(t){case 0:if(0===r){e=this._readInt1(0).endRead,r=1}else{var a=this._currentObject.data.indexOf(",",e)+1;-1===a&&(a=this._currentObject.data.indexOf(";;",e)+1,t=2,r=0);var n=this._currentObject.data.substr(e,a-e),i=this._readLine(n.trim()).split(";");this._currentGeo.normalVectors.push([parseFloat(i[0]),parseFloat(i[1]),parseFloat(i[2])]),e=a+1}}if(e>=this._currentObject.data.length)break}}},{key:"_setMeshTextureCoords",value:function(){this._tmpUvArray=[],this._currentGeo.Geometry.faceVertexUvs=[],this._currentGeo.Geometry.faceVertexUvs.push([]);for(var e=0,t=0,r=0;;){switch(t){case 0:if(0===r){e=this._readInt1(0).endRead,r=1}else{var n=this._currentObject.data.indexOf(",",e)+1;0===n&&(n=this._currentObject.data.length,t=2,r=0);var i=this._currentObject.data.substr(e,n-e),o=this._readLine(i.trim()).split(";");this.IsUvYReverse?this._tmpUvArray.push(new a.Vector2(parseFloat(o[0]),1-parseFloat(o[1]))):this._tmpUvArray.push(new a.Vector2(parseFloat(o[0]),parseFloat(o[1]))),e=n+1}}if(e>=this._currentObject.data.length)break}this._currentGeo.Geometry.faceVertexUvs[0]=[];for(var s=0;s<this._currentGeo.Geometry.faces.length;s++)this._currentGeo.Geometry.faceVertexUvs[0][s]=[],this._currentGeo.Geometry.faceVertexUvs[0][s].push(this._tmpUvArray[this._currentGeo.Geometry.faces[s].a]),this._currentGeo.Geometry.faceVertexUvs[0][s].push(this._tmpUvArray[this._currentGeo.Geometry.faces[s].b]),this._currentGeo.Geometry.faceVertexUvs[0][s].push(this._tmpUvArray[this._currentGeo.Geometry.faces[s].c]);this._currentGeo.Geometry.uvsNeedUpdate=!0}},{key:"_setMeshMaterialList",value:function(){for(var e=0,t=0,r=0;;){if(r<2){e=this._readInt1(e).endRead,r++}else{var a=this._currentObject.data.indexOf(";",e);-1===a&&(a=this._currentObject.data.length,t=3,r=0);for(var n=this._currentObject.data.substr(e,a-e),i=this._readLine(n.trim()).split(","),o=0;o<i.length;o++)this._currentGeo.Geometry.faces[o].materialIndex=parseInt(i[o]);e=this._currentObject.data.length}if(e>=this._currentObject.data.length||t>=3)break}}},{key:"_setMaterial",value:function(){var e=new a.MeshPhongMaterial({color:16777215*Math.random()});e.side=a.FrontSide,e.name=this._currentObject.name;var t=0,r=this._currentObject.data.indexOf(";;",t),n=this._currentObject.data.substr(t,r-t),i=this._readLine(n.trim()).split(";");e.color.r=parseFloat(i[0]),e.color.g=parseFloat(i[1]),e.color.b=parseFloat(i[2]),t=r+2,r=this._currentObject.data.indexOf(";",t),n=this._currentObject.data.substr(t,r-t),e.shininess=parseFloat(this._readLine(n)),t=r+1,r=this._currentObject.data.indexOf(";;",t),n=this._currentObject.data.substr(t,r-t);var o=this._readLine(n.trim()).split(";");e.specular.r=parseFloat(o[0]),e.specular.g=parseFloat(o[1]),e.specular.b=parseFloat(o[2]),t=r+2,-1===(r=this._currentObject.data.indexOf(";;",t))&&(r=this._currentObject.data.length),n=this._currentObject.data.substr(t,r-t);var s=this._readLine(n.trim()).split(";");e.emissive.r=parseFloat(s[0]),e.emissive.g=parseFloat(s[1]),e.emissive.b=parseFloat(s[2]);for(var l=null;this._currentObject.children.length>0;){l=this._currentObject.children.shift(),this.debug&&console.log("processing "+l.name);var u=l.data.substr(1,l.data.length-2);switch(l.type){case"TextureFilename":e.map=this.texloader.load(this.baseDir+u);break;case"BumpMapFilename":e.bumpMap=this.texloader.load(this.baseDir+u),e.bumpScale=.05;break;case"NormalMapFilename":e.normalMap=this.texloader.load(this.baseDir+u),e.normalScale=new a.Vector2(2,2);break;case"EmissiveMapFilename":e.emissiveMap=this.texloader.load(this.baseDir+u);break;case"LightMapFilename":e.lightMap=this.texloader.load(this.baseDir+u)}}this._currentGeo.Materials.push(e)}},{key:"_setSkinWeights",value:function(){var e=new o,t=0,r=this._currentObject.data.indexOf(";",t),n=this._currentObject.data.substr(t,r-t);t=r+1,e.boneName=n.substr(1,n.length-2),e.BoneIndex=this._currentGeo.BoneInfs.length,t=(r=this._currentObject.data.indexOf(";",t))+1,r=this._currentObject.data.indexOf(";",t),n=this._currentObject.data.substr(t,r-t);for(var i=this._readLine(n.trim()).split(","),s=0;s<i.length;s++)e.Indeces.push(parseInt(i[s]));t=r+1,r=this._currentObject.data.indexOf(";",t),n=this._currentObject.data.substr(t,r-t);for(var l=this._readLine(n.trim()).split(","),u=0;u<l.length;u++)e.Weights.push(parseFloat(l[u]));t=r+1,(r=this._currentObject.data.indexOf(";",t))<=0&&(r=this._currentObject.data.length),n=this._currentObject.data.substr(t,r-t);var c=this._readLine(n.trim()).split(",");e.OffsetMatrix=new a.Matrix4,this._ParseMatrixData(e.OffsetMatrix,c),this._currentGeo.BoneInfs.push(e)}},{key:"_makePutBoneList",value:function(e,t){var r=!1;for(var n in this.HieStack)if(this.HieStack[n].name===e||r){r=!0;var i=new a.Bone;if(i.name=this.HieStack[n].name,i.applyMatrix(this.HieStack[n].FrameTransformMatrix),i.matrixWorld=i.matrix,i.FrameTransformMatrix=this.HieStack[n].FrameTransformMatrix,i.pos=(new a.Vector3).setFromMatrixPosition(i.FrameTransformMatrix).toArray(),i.rotq=(new a.Quaternion).setFromRotationMatrix(i.FrameTransformMatrix).toArray(),i.scl=(new a.Vector3).setFromMatrixScale(i.FrameTransformMatrix).toArray(),this.HieStack[n].parentName&&this.HieStack[n].parentName.length>0)for(var o=0;o<t.length;o++)if(this.HieStack[n].parentName===t[o].name){t[o].add(i),i.parent=o;break}t.push(i)}}},{key:"_makeOutputGeometry",value:function(){this._currentGeo.Geometry.computeBoundingBox(),this._currentGeo.Geometry.computeBoundingSphere(),this._currentGeo.Geometry.verticesNeedUpdate=!0,this._currentGeo.Geometry.normalsNeedUpdate=!0,this._currentGeo.Geometry.colorsNeedUpdate=!0,this._currentGeo.Geometry.uvsNeedUpdate=!0,this._currentGeo.Geometry.groupsNeedUpdate=!0;var e=null;if(this._currentGeo.BoneInfs.length>0){var t=[];this._makePutBoneList(this._currentGeo.baseFrame.parentName,t);for(var r=0;r<this._currentGeo.BoneInfs.length;r++){for(var n=0,i=0;i<t.length;i++)if(t[i].name===this._currentGeo.BoneInfs[r].boneName){n=i,t[i].OffsetMatrix=new a.Matrix4,t[i].OffsetMatrix.copy(this._currentGeo.BoneInfs[r].OffsetMatrix);break}for(var o=0;o<this._currentGeo.BoneInfs[r].Indeces.length;o++){var s=this._currentGeo.BoneInfs[r].Indeces[o],l=this._currentGeo.BoneInfs[r].Weights[o];switch(this._currentGeo.VertexSetedBoneCount[s]){case 0:this._currentGeo.Geometry.skinIndices[s].x=n,this._currentGeo.Geometry.skinWeights[s].x=l;break;case 1:this._currentGeo.Geometry.skinIndices[s].y=n,this._currentGeo.Geometry.skinWeights[s].y=l;break;case 2:this._currentGeo.Geometry.skinIndices[s].z=n,this._currentGeo.Geometry.skinWeights[s].z=l;break;case 3:this._currentGeo.Geometry.skinIndices[s].w=n,this._currentGeo.Geometry.skinWeights[s].w=l}this._currentGeo.VertexSetedBoneCount[s]++,this._currentGeo.VertexSetedBoneCount[s]>4&&console.log("warn! over 4 bone weight! :"+s)}}for(var u=0;u<this._currentGeo.Materials.length;u++)this._currentGeo.Materials[u].skinning=!0;for(var c=[],d=0;d<t.length;d++)t[d].OffsetMatrix?c.push(t[d].OffsetMatrix):c.push(new a.Matrix4);var f=(new a.BufferGeometry).fromGeometry(this._currentGeo.Geometry);f.bones=t,(e=new a.SkinnedMesh(f,1===this._currentGeo.Materials.length?this._currentGeo.Materials[0]:this._currentGeo.Materials)).skeleton.boneInverses=c}else{var h=(new a.BufferGeometry).fromGeometry(this._currentGeo.Geometry);e=new a.Mesh(h,1===this._currentGeo.Materials.length?this._currentGeo.Materials[0]:this._currentGeo.Materials)}e.name=this._currentGeo.name;var p=new a.Matrix4,m=this._currentGeo.baseFrame.putBone;if(m&&m.parent){for(;m=m.parent;)p.multiply(m.FrameTransformMatrix);e.applyMatrix(p)}this.Meshes.push(e)}},{key:"_readAnimationKey",value:function(){var e=0,t=this._currentObject.data.indexOf(";",e),r=this._currentObject.data.substr(e,t-e);e=t+1;var n=parseInt(this._readLine(r));e=(t=this._currentObject.data.indexOf(";",e))+1,r=this._currentObject.data.substr(e);for(var i=this._readLine(r.trim()).split(";;,"),o=0;o<i.length;o++){var s=i[o].split(";"),l=new u;if(l.type=n,l.Frame=parseInt(s[0]),l.index=this._currentAnimeFrames.keyFrames.length,l.time=l.Frame,4!=n){for(var c=!1,d=0;d<this._currentAnimeFrames.keyFrames.length;d++)if(this._currentAnimeFrames.keyFrames[d].Frame===l.Frame){l=this._currentAnimeFrames.keyFrames[d],c=!0;break}var f=s[2].split(",");switch(n){case 0:l.rot=new a.Quaternion(parseFloat(f[1]),parseFloat(f[2]),parseFloat(f[3]),-1*parseFloat(f[0]));break;case 1:l.scl=new a.Vector3(parseFloat(f[0]),parseFloat(f[1]),parseFloat(f[2]));break;case 2:l.pos=new a.Vector3(parseFloat(f[0]),parseFloat(f[1]),parseFloat(f[2]))}c||this._currentAnimeFrames.keyFrames.push(l)}else l.matrix=new a.Matrix4,this._ParseMatrixData(l.matrix,s[2].split(",")),this._currentAnimeFrames.keyFrames.push(l)}}},{key:"_makeOutputAnimation",value:function(){var e=new l(this.options);e.fps=this.animTicksPerSecond,e.name=this._currentAnime.name,e.make(this._currentAnime.AnimeFrames),this.animations.push(e)}},{key:"assignAnimation",value:function(e,t,r){var n=e,i=t;if(n||(n=this.Meshes[0]),i||(i=this.animations[0]),!n||!i)return null;var o={};o.fps=i.fps,o.name=i.name,o.length=i.length,o.hierarchy=[];for(var s=0;s<n.skeleton.bones.length;s++){for(var l=!1,u=0;u<i.hierarchy.length;u++)if(n.skeleton.bones[s].name===i.hierarchy[u].name){l=!0;var c=i.hierarchy[u].copy();if(c.parent=-1,n.skeleton.bones[s].parent&&"Bone"===n.skeleton.bones[s].parent.type)for(var d=0;d<o.hierarchy.length;d++)o.hierarchy[d].name===n.skeleton.bones[s].parent.name&&(c.parent=d,c.parentName=n.skeleton.bones[s].parent.name);o.hierarchy.push(c);break}if(!l){var f=i.hierarchy[0].copy();f.name=n.skeleton.bones[s].name,f.parent=-1;for(var h=0;h<f.keys.length;h++)f.keys[h].pos&&f.keys[h].pos.set(0,0,0),f.keys[h].scl&&f.keys[h].scl.set(1,1,1),f.keys[h].rot&&f.keys[h].rot.set(0,0,0,1);o.hierarchy.push(f)}}return n.geometry.animations||(n.geometry.animations=[]),n.geometry.animations.push(a.AnimationClip.parseAnimation(o,n.skeleton.bones)),n.animationMixer||(n.animationMixer=new a.AnimationMixer(n)),o}},{key:"_ParseMatrixData",value:function(e,t){e.set(parseFloat(t[0]),parseFloat(t[4]),parseFloat(t[8]),parseFloat(t[12]),parseFloat(t[1]),parseFloat(t[5]),parseFloat(t[9]),parseFloat(t[13]),parseFloat(t[2]),parseFloat(t[6]),parseFloat(t[10]),parseFloat(t[14]),parseFloat(t[3]),parseFloat(t[7]),parseFloat(t[11]),parseFloat(t[15]))}}]),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnrealBloomPass=t.TexturePass=t.TAARenderPass=t.SSAOPass=t.SSAARenderPass=t.SMAAPass=t.ShaderPass=t.SavePass=t.SAOPass=t.RenderPass=t.Pass=t.OutlinePass=t.MaskPass=t.HalftonePass=t.GlitchPass=t.FilmPass=t.EffectComposer=t.DotScreenPass=t.CubeTexturePass=t.ClearPass=t.ClearMaskPass=t.BokehPass=t.BloomPass=t.AdaptiveToneMappingPass=void 0;var a=_(r(91)),n=_(r(92)),i=_(r(93)),o=_(r(94)),s=_(r(95)),l=_(r(96)),u=_(r(97)),c=_(r(98)),d=_(r(99)),f=_(r(100)),h=_(r(101)),p=_(r(102)),m=_(r(103)),v=_(r(1)),g=_(r(104)),y=_(r(105)),x=_(r(106)),b=_(r(3)),w=_(r(107)),A=_(r(24)),M=_(r(108)),T=_(r(109)),S=_(r(110)),E=_(r(111));function _(e){return e&&e.__esModule?e:{default:e}}t.AdaptiveToneMappingPass=a.default,t.BloomPass=n.default,t.BokehPass=i.default,t.ClearMaskPass=o.default,t.ClearPass=s.default,t.CubeTexturePass=l.default,t.DotScreenPass=u.default,t.EffectComposer=c.default,t.FilmPass=d.default,t.GlitchPass=f.default,t.HalftonePass=h.default,t.MaskPass=p.default,t.OutlinePass=m.default,t.Pass=v.default,t.RenderPass=g.default,t.SAOPass=y.default,t.SavePass=x.default,t.ShaderPass=b.default,t.SMAAPass=w.default,t.SSAARenderPass=A.default,t.SSAOPass=M.default,t.TAARenderPass=T.default,t.TexturePass=S.default,t.UnrealBloomPass=E.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=l(r(1)),i=l(r(2)),o=l(r(11)),s=l(r(12));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e,t){n.default.call(this),this.resolution=void 0!==t?t:256,this.needsInit=!0,this.adaptive=void 0===e||!!e,this.luminanceRT=null,this.previousLuminanceRT=null,this.currentLuminanceRT=null,void 0===i.default&&console.error("THREE.AdaptiveToneMappingPass relies on THREE.CopyShader");var r=i.default;this.copyUniforms=a.UniformsUtils.clone(r.uniforms),this.materialCopy=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,blending:a.NoBlending,depthTest:!1}),void 0===o.default&&console.error("THREE.AdaptiveToneMappingPass relies on THREE.LuminosityShader"),this.materialLuminance=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(o.default.uniforms),vertexShader:o.default.vertexShader,fragmentShader:o.default.fragmentShader,blending:a.NoBlending}),this.adaptLuminanceShader={defines:{MIP_LEVEL_1X1:(Math.log(this.resolution)/Math.log(2)).toFixed(1)},uniforms:{lastLum:{value:null},currentLum:{value:null},minLuminance:{value:.01},delta:{value:.016},tau:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["varying vec2 vUv;","uniform sampler2D lastLum;","uniform sampler2D currentLum;","uniform float minLuminance;","uniform float delta;","uniform float tau;","void main() {","vec4 lastLum = texture2D( lastLum, vUv, MIP_LEVEL_1X1 );","vec4 currentLum = texture2D( currentLum, vUv, MIP_LEVEL_1X1 );","float fLastLum = max( minLuminance, lastLum.r );","float fCurrentLum = max( minLuminance, currentLum.r );","fCurrentLum *= fCurrentLum;","float fAdaptedLum = fLastLum + (fCurrentLum - fLastLum) * (1.0 - exp(-delta * tau));","gl_FragColor.r = fAdaptedLum;","}"].join("\n")},this.materialAdaptiveLum=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(this.adaptLuminanceShader.uniforms),vertexShader:this.adaptLuminanceShader.vertexShader,fragmentShader:this.adaptLuminanceShader.fragmentShader,defines:Object.assign({},this.adaptLuminanceShader.defines),blending:a.NoBlending}),void 0===s.default&&console.error("THREE.AdaptiveToneMappingPass relies on THREE.ToneMapShader"),this.materialToneMap=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(s.default.uniforms),vertexShader:s.default.vertexShader,fragmentShader:s.default.fragmentShader,blending:a.NoBlending}),this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};u.prototype=Object.assign(Object.create(n.default.prototype),{constructor:u,render:function(e,t,r,a,n){this.needsInit&&(this.reset(e),this.luminanceRT.texture.type=r.texture.type,this.previousLuminanceRT.texture.type=r.texture.type,this.currentLuminanceRT.texture.type=r.texture.type,this.needsInit=!1),this.adaptive&&(this.quad.material=this.materialLuminance,this.materialLuminance.uniforms.tDiffuse.value=r.texture,e.render(this.scene,this.camera,this.currentLuminanceRT),this.quad.material=this.materialAdaptiveLum,this.materialAdaptiveLum.uniforms.delta.value=a,this.materialAdaptiveLum.uniforms.lastLum.value=this.previousLuminanceRT.texture,this.materialAdaptiveLum.uniforms.currentLum.value=this.currentLuminanceRT.texture,e.render(this.scene,this.camera,this.luminanceRT),this.quad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.luminanceRT.texture,e.render(this.scene,this.camera,this.previousLuminanceRT)),this.quad.material=this.materialToneMap,this.materialToneMap.uniforms.tDiffuse.value=r.texture,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)},reset:function(e){this.luminanceRT&&this.luminanceRT.dispose(),this.currentLuminanceRT&&this.currentLuminanceRT.dispose(),this.previousLuminanceRT&&this.previousLuminanceRT.dispose();var t={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat};this.luminanceRT=new a.WebGLRenderTarget(this.resolution,this.resolution,t),this.luminanceRT.texture.name="AdaptiveToneMappingPass.l",this.luminanceRT.texture.generateMipmaps=!1,this.previousLuminanceRT=new a.WebGLRenderTarget(this.resolution,this.resolution,t),this.previousLuminanceRT.texture.name="AdaptiveToneMappingPass.pl",this.previousLuminanceRT.texture.generateMipmaps=!1,t.minFilter=a.LinearMipMapLinearFilter,this.currentLuminanceRT=new a.WebGLRenderTarget(this.resolution,this.resolution,t),this.currentLuminanceRT.texture.name="AdaptiveToneMappingPass.cl",this.adaptive&&(this.materialToneMap.defines.ADAPTED_LUMINANCE="",this.materialToneMap.uniforms.luminanceMap.value=this.luminanceRT.texture),this.quad.material=new a.MeshBasicMaterial({color:7829367}),this.materialLuminance.needsUpdate=!0,this.materialAdaptiveLum.needsUpdate=!0,this.materialToneMap.needsUpdate=!0},setAdaptive:function(e){e?(this.adaptive=!0,this.materialToneMap.defines.ADAPTED_LUMINANCE="",this.materialToneMap.uniforms.luminanceMap.value=this.luminanceRT.texture):(this.adaptive=!1,delete this.materialToneMap.defines.ADAPTED_LUMINANCE,this.materialToneMap.uniforms.luminanceMap.value=null),this.materialToneMap.needsUpdate=!0},setAdaptionRate:function(e){e&&(this.materialAdaptiveLum.uniforms.tau.value=Math.abs(e))},setMinLuminance:function(e){e&&(this.materialToneMap.uniforms.minLuminance.value=e,this.materialAdaptiveLum.uniforms.minLuminance.value=e)},setMaxLuminance:function(e){e&&(this.materialToneMap.uniforms.maxLuminance.value=e)},setAverageLuminance:function(e){e&&(this.materialToneMap.uniforms.averageLuminance.value=e)},setMiddleGrey:function(e){e&&(this.materialToneMap.uniforms.middleGrey.value=e)},dispose:function(){this.luminanceRT&&this.luminanceRT.dispose(),this.previousLuminanceRT&&this.previousLuminanceRT.dispose(),this.currentLuminanceRT&&this.currentLuminanceRT.dispose(),this.materialLuminance&&this.materialLuminance.dispose(),this.materialAdaptiveLum&&this.materialAdaptiveLum.dispose(),this.materialCopy&&this.materialCopy.dispose(),this.materialToneMap&&this.materialToneMap.dispose()}}),t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=s(r(1)),i=s(r(2)),o=s(r(13));function s(e){return e&&e.__esModule?e:{default:e}}var l=function e(t,r,s,l){n.default.call(this),t=void 0!==t?t:1,r=void 0!==r?r:25,s=void 0!==s?s:4,l=void 0!==l?l:256;var u={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat};this.renderTargetX=new a.WebGLRenderTarget(l,l,u),this.renderTargetX.texture.name="BloomPass.x",this.renderTargetY=new a.WebGLRenderTarget(l,l,u),this.renderTargetY.texture.name="BloomPass.y",void 0===i.default&&console.error("THREE.BloomPass relies on THREE.CopyShader");var c=i.default;this.copyUniforms=a.UniformsUtils.clone(c.uniforms),this.copyUniforms.opacity.value=t,this.materialCopy=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,blending:a.AdditiveBlending,transparent:!0}),void 0===o.default&&console.error("THREE.BloomPass relies on THREE.ConvolutionShader");var d=o.default;this.convolutionUniforms=a.UniformsUtils.clone(d.uniforms),this.convolutionUniforms.uImageIncrement.value=e.blurX,this.convolutionUniforms.cKernel.value=o.default.buildKernel(s),this.materialConvolution=new a.ShaderMaterial({uniforms:this.convolutionUniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,defines:{KERNEL_SIZE_FLOAT:r.toFixed(1),KERNEL_SIZE_INT:r.toFixed(0)}}),this.needsSwap=!1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};l.prototype=Object.assign(Object.create(n.default.prototype),{constructor:l,render:function(e,t,r,a,n){n&&e.context.disable(e.context.STENCIL_TEST),this.quad.material=this.materialConvolution,this.convolutionUniforms.tDiffuse.value=r.texture,this.convolutionUniforms.uImageIncrement.value=l.blurX,e.render(this.scene,this.camera,this.renderTargetX,!0),this.convolutionUniforms.tDiffuse.value=this.renderTargetX.texture,this.convolutionUniforms.uImageIncrement.value=l.blurY,e.render(this.scene,this.camera,this.renderTargetY,!0),this.quad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetY.texture,n&&e.context.enable(e.context.STENCIL_TEST),e.render(this.scene,this.camera,r,this.clear)}}),l.blurX=new a.Vector2(.001953125,0),l.blurY=new a.Vector2(0,.001953125),t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=s(r(8)),i=s(r(1)),o=s(r(14));function s(e){return e&&e.__esModule?e:{default:e}}var l=n.default,u=function(e,t,r){i.default.call(this),this.scene=e,this.camera=t;var n=void 0!==r.focus?r.focus:1,s=void 0!==r.aspect?r.aspect:t.aspect,u=void 0!==r.aperture?r.aperture:.025,c=void 0!==r.maxblur?r.maxblur:1,d=r.width||l.innerWidth||1,f=r.height||l.innerHeight||1;this.renderTargetColor=new a.WebGLRenderTarget(d,f,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBFormat}),this.renderTargetColor.texture.name="BokehPass.color",this.renderTargetDepth=this.renderTargetColor.clone(),this.renderTargetDepth.texture.name="BokehPass.depth",this.materialDepth=new a.MeshDepthMaterial,this.materialDepth.depthPacking=a.RGBADepthPacking,this.materialDepth.blending=a.NoBlending,void 0===o.default&&console.error("THREE.BokehPass relies on THREE.BokehShader");var h=o.default,p=a.UniformsUtils.clone(h.uniforms);p.tDepth.value=this.renderTargetDepth.texture,p.focus.value=n,p.aspect.value=s,p.aperture.value=u,p.maxblur.value=c,p.nearClip.value=t.near,p.farClip.value=t.far,this.materialBokeh=new a.ShaderMaterial({defines:Object.assign({},h.defines),uniforms:p,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader}),this.uniforms=p,this.needsSwap=!1,this.camera2=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene2=new a.Scene,this.quad2=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad2.frustumCulled=!1,this.scene2.add(this.quad2),this.oldClearColor=new a.Color,this.oldClearAlpha=1};u.prototype=Object.assign(Object.create(i.default.prototype),{constructor:u,render:function(e,t,r,a,n){this.quad2.material=this.materialBokeh,this.scene.overrideMaterial=this.materialDepth,this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha();e.autoClear;e.autoClear=!1,e.setClearColor(16777215),e.setClearAlpha(1),e.render(this.scene,this.camera,this.renderTargetDepth,!0),this.uniforms.tColor.value=r.texture,this.uniforms.nearClip.value=this.camera.near,this.uniforms.farClip.value=this.camera.far,this.renderToScreen?e.render(this.scene2,this.camera2):e.render(this.scene2,this.camera2,t,this.clear),this.scene.overrideMaterial=null,e.setClearColor(this.oldClearColor),e.setClearAlpha(this.oldClearAlpha),e.autoClear=this.oldAutoClear}}),t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=r(1),i=(a=n)&&a.__esModule?a:{default:a};var o=function(){i.default.call(this),this.needsSwap=!1};o.prototype=Object.create(i.default.prototype),Object.assign(o.prototype,{render:function(e,t,r,a,n){e.state.buffers.stencil.setTest(!1)}}),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=r(1),i=(a=n)&&a.__esModule?a:{default:a};var o=function(e,t){i.default.call(this),this.needsSwap=!1,this.clearColor=void 0!==e?e:0,this.clearAlpha=void 0!==t?t:0};o.prototype=Object.assign(Object.create(i.default.prototype),{constructor:o,render:function(e,t,r,a,n){var i,o;this.clearColor&&(i=e.getClearColor().getHex(),o=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),e.setRenderTarget(this.renderToScreen?null:r),e.clear(),this.clearColor&&e.setClearColor(i,o)}}),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(1),o=(a=i)&&a.__esModule?a:{default:a};var s=function(e,t,r){o.default.call(this),this.camera=e,this.needsSwap=!1,this.cubeShader=n.ShaderLib.cube,this.cubeMesh=new n.Mesh(new n.BoxBufferGeometry(10,10,10),new n.ShaderMaterial({uniforms:this.cubeShader.uniforms,vertexShader:this.cubeShader.vertexShader,fragmentShader:this.cubeShader.fragmentShader,depthTest:!1,depthWrite:!1,side:n.BackSide})),this.envMap=t,this.opacity=void 0!==r?r:1,this.cubeScene=new n.Scene,this.cubeCamera=new n.PerspectiveCamera,this.cubeScene.add(this.cubeMesh)};s.prototype=Object.assign(Object.create(o.default.prototype),{constructor:s,render:function(e,t,r,a,n){var i=e.autoClear;e.autoClear=!1,this.cubeCamera.projectionMatrix.copy(this.camera.projectionMatrix),this.cubeCamera.quaternion.setFromRotationMatrix(this.camera.matrixWorld),this.cubeMesh.material.uniforms.tCube.value=this.envMap,this.cubeMesh.material.uniforms.opacity.value=this.opacity,this.cubeMesh.material.transparent=this.opacity<1,e.render(this.cubeScene,this.cubeCamera,this.renderToScreen?null:r,this.clear),e.autoClear=i}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(15));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r){n.default.call(this),void 0===i.default&&console.error("THREE.DotScreenPass relies on THREE.DotScreenShader");var o=i.default;this.uniforms=a.UniformsUtils.clone(o.uniforms),void 0!==e&&this.uniforms.center.value.copy(e),void 0!==t&&(this.uniforms.angle.value=t),void 0!==r&&(this.uniforms.scale.value=r),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader}),this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,a,n){this.uniforms.tDiffuse.value=r.texture,this.uniforms.tSize.value.set(r.width,r.height),this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(2)),i=o(r(3));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){if(this.renderer=e,void 0===t){var r={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat,stencilBuffer:!1},o=e.getDrawingBufferSize();(t=new a.WebGLRenderTarget(o.width,o.height,r)).texture.name="EffectComposer.rt1"}this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.passes=[],void 0===n.default&&console.error("THREE.EffectComposer relies on THREE.CopyShader"),void 0===i.default&&console.error("THREE.EffectComposer relies on THREE.ShaderPass"),this.copyPass=new i.default(n.default)};Object.assign(s.prototype,{swapBuffers:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e},addPass:function(e){this.passes.push(e);var t=this.renderer.getDrawingBufferSize();e.setSize(t.width,t.height)},insertPass:function(e,t){this.passes.splice(t,0,e)},render:function(e){var t,r,n=!1,i=this.passes.length;for(r=0;r<i;r++)if(!1!==(t=this.passes[r]).enabled){if(t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){var o=this.renderer.context;o.stencilFunc(o.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),o.stencilFunc(o.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==a.MaskPass&&(t instanceof a.MaskPass?n=!0:t instanceof a.ClearMaskPass&&(n=!1))}},reset:function(e){if(void 0===e){var t=this.renderer.getDrawingBufferSize();(e=this.renderTarget1.clone()).setSize(t.width,t.height)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2},setSize:function(e,t){this.renderTarget1.setSize(e,t),this.renderTarget2.setSize(e,t);for(var r=0;r<this.passes.length;r++)this.passes[r].setSize(e,t)}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(16));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r,o){n.default.call(this),void 0===i.default&&console.error("THREE.FilmPass relies on THREE.FilmShader");var s=i.default;this.uniforms=a.UniformsUtils.clone(s.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader}),void 0!==o&&(this.uniforms.grayscale.value=o),void 0!==e&&(this.uniforms.nIntensity.value=e),void 0!==t&&(this.uniforms.sIntensity.value=t),void 0!==r&&(this.uniforms.sCount.value=r),this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,a,n){this.uniforms.tDiffuse.value=r.texture,this.uniforms.time.value+=a,this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(17));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){n.default.call(this),void 0===i.default&&console.error("THREE.GlitchPass relies on THREE.DigitalGlitch");var t=i.default;this.uniforms=a.UniformsUtils.clone(t.uniforms),null==e&&(e=64),this.uniforms.tDisp.value=this.generateHeightmap(e),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader}),this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad),this.goWild=!1,this.curF=0,this.generateTrigger()};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,n,i){this.uniforms.tDiffuse.value=r.texture,this.uniforms.seed.value=Math.random(),this.uniforms.byp.value=0,this.curF%this.randX==0||1==this.goWild?(this.uniforms.amount.value=Math.random()/30,this.uniforms.angle.value=a.Math.randFloat(-Math.PI,Math.PI),this.uniforms.seed_x.value=a.Math.randFloat(-1,1),this.uniforms.seed_y.value=a.Math.randFloat(-1,1),this.uniforms.distortion_x.value=a.Math.randFloat(0,1),this.uniforms.distortion_y.value=a.Math.randFloat(0,1),this.curF=0,this.generateTrigger()):this.curF%this.randX<this.randX/5?(this.uniforms.amount.value=Math.random()/90,this.uniforms.angle.value=a.Math.randFloat(-Math.PI,Math.PI),this.uniforms.distortion_x.value=a.Math.randFloat(0,1),this.uniforms.distortion_y.value=a.Math.randFloat(0,1),this.uniforms.seed_x.value=a.Math.randFloat(-.3,.3),this.uniforms.seed_y.value=a.Math.randFloat(-.3,.3)):0==this.goWild&&(this.uniforms.byp.value=1),this.curF++,this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)},generateTrigger:function(){this.randX=a.Math.randInt(120,240)},generateHeightmap:function(e){for(var t=new Float32Array(e*e*3),r=e*e,n=0;n<r;n++){var i=a.Math.randFloat(0,1);t[3*n+0]=i,t[3*n+1]=i,t[3*n+2]=i}var o=new a.DataTexture(t,e,e,a.RGBFormat,a.FloatType);return o.needsUpdate=!0,o}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(18));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r){for(var o in n.default.call(this),void 0===i.default&&console.error("THREE.HalftonePass requires THREE.HalftoneShader"),this.uniforms=a.UniformsUtils.clone(i.default.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,fragmentShader:i.default.fragmentShader,vertexShader:i.default.vertexShader}),this.uniforms.width.value=e,this.uniforms.height.value=t,r)r.hasOwnProperty(o)&&this.uniforms.hasOwnProperty(o)&&(this.uniforms[o].value=r[o]);this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,a,n){this.material.uniforms.tDiffuse.value=r.texture,this.quad.material=this.material,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)},setSize:function(e,t){this.uniforms.width.value=e,this.uniforms.height.value=t}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=r(1),i=(a=n)&&a.__esModule?a:{default:a};var o=function(e,t){i.default.call(this),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1};o.prototype=Object.assign(Object.create(i.default.prototype),{constructor:o,render:function(e,t,r,a,n){var i,o,s=e.context,l=e.state;l.buffers.color.setMask(!1),l.buffers.depth.setMask(!1),l.buffers.color.setLocked(!0),l.buffers.depth.setLocked(!0),this.inverse?(i=0,o=1):(i=1,o=0),l.buffers.stencil.setTest(!0),l.buffers.stencil.setOp(s.REPLACE,s.REPLACE,s.REPLACE),l.buffers.stencil.setFunc(s.ALWAYS,i,4294967295),l.buffers.stencil.setClear(o),e.render(this.scene,this.camera,r,this.clear),e.render(this.scene,this.camera,t,this.clear),l.buffers.color.setLocked(!1),l.buffers.depth.setLocked(!1),l.buffers.stencil.setFunc(s.EQUAL,1,4294967295),l.buffers.stencil.setOp(s.KEEP,s.KEEP,s.KEEP)}}),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(2));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r,o){this.renderScene=t,this.renderCamera=r,this.selectedObjects=void 0!==o?o:[],this.visibleEdgeColor=new a.Color(1,1,1),this.hiddenEdgeColor=new a.Color(.1,.04,.02),this.edgeGlow=0,this.usePatternTexture=!1,this.edgeThickness=1,this.edgeStrength=3,this.downSampleRatio=2,this.pulsePeriod=0,n.default.call(this),this.resolution=void 0!==e?new a.Vector2(e.x,e.y):new a.Vector2(256,256);var s={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat},l=Math.round(this.resolution.x/this.downSampleRatio),u=Math.round(this.resolution.y/this.downSampleRatio);this.maskBufferMaterial=new a.MeshBasicMaterial({color:16777215}),this.maskBufferMaterial.side=a.DoubleSide,this.renderTargetMaskBuffer=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y,s),this.renderTargetMaskBuffer.texture.name="OutlinePass.mask",this.renderTargetMaskBuffer.texture.generateMipmaps=!1,this.depthMaterial=new a.MeshDepthMaterial,this.depthMaterial.side=a.DoubleSide,this.depthMaterial.depthPacking=a.RGBADepthPacking,this.depthMaterial.blending=a.NoBlending,this.prepareMaskMaterial=this.getPrepareMaskMaterial(),this.prepareMaskMaterial.side=a.DoubleSide,this.prepareMaskMaterial.fragmentShader=function(e,t){var r=t.isPerspectiveCamera?"perspective":"orthographic";return e.replace(/DEPTH_TO_VIEW_Z/g,r+"DepthToViewZ")}(this.prepareMaskMaterial.fragmentShader,this.renderCamera),this.renderTargetDepthBuffer=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y,s),this.renderTargetDepthBuffer.texture.name="OutlinePass.depth",this.renderTargetDepthBuffer.texture.generateMipmaps=!1,this.renderTargetMaskDownSampleBuffer=new a.WebGLRenderTarget(l,u,s),this.renderTargetMaskDownSampleBuffer.texture.name="OutlinePass.depthDownSample",this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps=!1,this.renderTargetBlurBuffer1=new a.WebGLRenderTarget(l,u,s),this.renderTargetBlurBuffer1.texture.name="OutlinePass.blur1",this.renderTargetBlurBuffer1.texture.generateMipmaps=!1,this.renderTargetBlurBuffer2=new a.WebGLRenderTarget(Math.round(l/2),Math.round(u/2),s),this.renderTargetBlurBuffer2.texture.name="OutlinePass.blur2",this.renderTargetBlurBuffer2.texture.generateMipmaps=!1,this.edgeDetectionMaterial=this.getEdgeDetectionMaterial(),this.renderTargetEdgeBuffer1=new a.WebGLRenderTarget(l,u,s),this.renderTargetEdgeBuffer1.texture.name="OutlinePass.edge1",this.renderTargetEdgeBuffer1.texture.generateMipmaps=!1,this.renderTargetEdgeBuffer2=new a.WebGLRenderTarget(Math.round(l/2),Math.round(u/2),s),this.renderTargetEdgeBuffer2.texture.name="OutlinePass.edge2",this.renderTargetEdgeBuffer2.texture.generateMipmaps=!1;this.separableBlurMaterial1=this.getSeperableBlurMaterial(4),this.separableBlurMaterial1.uniforms.texSize.value=new a.Vector2(l,u),this.separableBlurMaterial1.uniforms.kernelRadius.value=1,this.separableBlurMaterial2=this.getSeperableBlurMaterial(4),this.separableBlurMaterial2.uniforms.texSize.value=new a.Vector2(Math.round(l/2),Math.round(u/2)),this.separableBlurMaterial2.uniforms.kernelRadius.value=4,this.overlayMaterial=this.getOverlayMaterial(),void 0===i.default&&console.error("THREE.OutlinePass relies on THREE.CopyShader");var c=i.default;this.copyUniforms=a.UniformsUtils.clone(c.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,blending:a.NoBlending,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this.oldClearColor=new a.Color,this.oldClearAlpha=1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad),this.tempPulseColor1=new a.Color,this.tempPulseColor2=new a.Color,this.textureMatrix=new a.Matrix4};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,dispose:function(){this.renderTargetMaskBuffer.dispose(),this.renderTargetDepthBuffer.dispose(),this.renderTargetMaskDownSampleBuffer.dispose(),this.renderTargetBlurBuffer1.dispose(),this.renderTargetBlurBuffer2.dispose(),this.renderTargetEdgeBuffer1.dispose(),this.renderTargetEdgeBuffer2.dispose()},setSize:function(e,t){this.renderTargetMaskBuffer.setSize(e,t);var r=Math.round(e/this.downSampleRatio),n=Math.round(t/this.downSampleRatio);this.renderTargetMaskDownSampleBuffer.setSize(r,n),this.renderTargetBlurBuffer1.setSize(r,n),this.renderTargetEdgeBuffer1.setSize(r,n),this.separableBlurMaterial1.uniforms.texSize.value=new a.Vector2(r,n),r=Math.round(r/2),n=Math.round(n/2),this.renderTargetBlurBuffer2.setSize(r,n),this.renderTargetEdgeBuffer2.setSize(r,n),this.separableBlurMaterial2.uniforms.texSize.value=new a.Vector2(r,n)},changeVisibilityOfSelectedObjects:function(e){function t(t){t.isMesh&&(e?(t.visible=t.userData.oldVisible,delete t.userData.oldVisible):(t.userData.oldVisible=t.visible,t.visible=e))}for(var r=0;r<this.selectedObjects.length;r++){this.selectedObjects[r].traverse(t)}},changeVisibilityOfNonSelectedObjects:function(e){var t=[];function r(e){e.isMesh&&t.push(e)}for(var a=0;a<this.selectedObjects.length;a++){this.selectedObjects[a].traverse(r)}this.renderScene.traverse((function(r){if(r.isMesh||r.isLine||r.isSprite){for(var a=!1,n=0;n<t.length;n++){if(t[n].id===r.id){a=!0;break}}if(!a){var i=r.visible;e&&!r.bVisible||(r.visible=e),r.bVisible=i}}}))},updateTextureMatrix:function(){this.textureMatrix.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),this.textureMatrix.multiply(this.renderCamera.projectionMatrix),this.textureMatrix.multiply(this.renderCamera.matrixWorldInverse)},render:function(e,t,r,n,i){if(this.selectedObjects.length>0){this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha();var o=e.autoClear;e.autoClear=!1,i&&e.context.disable(e.context.STENCIL_TEST),e.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);var s=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,e.render(this.renderScene,this.renderCamera,this.renderTargetDepthBuffer,!0),this.changeVisibilityOfSelectedObjects(!0),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value=new a.Vector2(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,e.render(this.renderScene,this.renderCamera,this.renderTargetMaskBuffer,!0),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this.renderScene.background=s,this.quad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,e.render(this.scene,this.camera,this.renderTargetMaskDownSampleBuffer,!0),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){var l=.625+.75*Math.cos(.01*performance.now()/this.pulsePeriod)/2;this.tempPulseColor1.multiplyScalar(l),this.tempPulseColor2.multiplyScalar(l)}this.quad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value=new a.Vector2(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,e.render(this.scene,this.camera,this.renderTargetEdgeBuffer1,!0),this.quad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=a.OutlinePass.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,e.render(this.scene,this.camera,this.renderTargetBlurBuffer1,!0),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=a.OutlinePass.BlurDirectionY,e.render(this.scene,this.camera,this.renderTargetEdgeBuffer1,!0),this.quad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=a.OutlinePass.BlurDirectionX,e.render(this.scene,this.camera,this.renderTargetBlurBuffer2,!0),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=a.OutlinePass.BlurDirectionY,e.render(this.scene,this.camera,this.renderTargetEdgeBuffer2,!0),this.quad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,i&&e.context.enable(e.context.STENCIL_TEST),e.render(this.scene,this.camera,r,!1),e.setClearColor(this.oldClearColor,this.oldClearAlpha),e.autoClear=o}this.renderToScreen&&(this.quad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=r.texture,e.render(this.scene,this.camera))},getPrepareMaskMaterial:function(){return new a.ShaderMaterial({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new a.Vector2(.5,.5)},textureMatrix:{value:new a.Matrix4}},vertexShader:["varying vec4 projTexCoord;","varying vec4 vPosition;","uniform mat4 textureMatrix;","void main() {","\tvPosition = modelViewMatrix * vec4( position, 1.0 );","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tprojTexCoord = textureMatrix * worldPosition;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <packing>","varying vec4 vPosition;","varying vec4 projTexCoord;","uniform sampler2D depthTexture;","uniform vec2 cameraNearFar;","void main() {","\tfloat depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord ));","\tfloat viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y );","\tfloat depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0;","\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);","}"].join("\n")})},getEdgeDetectionMaterial:function(){return new a.ShaderMaterial({uniforms:{maskTexture:{value:null},texSize:{value:new a.Vector2(.5,.5)},visibleEdgeColor:{value:new a.Vector3(1,1,1)},hiddenEdgeColor:{value:new a.Vector3(1,1,1)}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\t\t\t\tuniform sampler2D maskTexture;\t\t\t\tuniform vec2 texSize;\t\t\t\tuniform vec3 visibleEdgeColor;\t\t\t\tuniform vec3 hiddenEdgeColor;\t\t\t\t\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\t\t\t\t\tvec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);\t\t\t\t\tvec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);\t\t\t\t\tvec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);\t\t\t\t\tvec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);\t\t\t\t\tvec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);\t\t\t\t\tfloat diff1 = (c1.r - c2.r)*0.5;\t\t\t\t\tfloat diff2 = (c3.r - c4.r)*0.5;\t\t\t\t\tfloat d = length( vec2(diff1, diff2) );\t\t\t\t\tfloat a1 = min(c1.g, c2.g);\t\t\t\t\tfloat a2 = min(c3.g, c4.g);\t\t\t\t\tfloat visibilityFactor = min(a1, a2);\t\t\t\t\tvec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;\t\t\t\t\tgl_FragColor = vec4(edgeColor, 1.0) * vec4(d);\t\t\t\t}"})},getSeperableBlurMaterial:function(e){return new a.ShaderMaterial({defines:{MAX_RADIUS:e},uniforms:{colorTexture:{value:null},texSize:{value:new a.Vector2(.5,.5)},direction:{value:new a.Vector2(.5,.5)},kernelRadius:{value:1}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\t\t\t\tvarying vec2 vUv;\t\t\t\tuniform sampler2D colorTexture;\t\t\t\tuniform vec2 texSize;\t\t\t\tuniform vec2 direction;\t\t\t\tuniform float kernelRadius;\t\t\t\t\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\t\t\t\t}\t\t\t\tvoid main() {\t\t\t\t\tvec2 invSize = 1.0 / texSize;\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, kernelRadius);\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\t\t\t\t\tvec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);\t\t\t\t\tvec2 uvOffset = delta;\t\t\t\t\tfor( int i = 1; i <= MAX_RADIUS; i ++ ) {\t\t\t\t\t\tfloat w = gaussianPdf(uvOffset.x, kernelRadius);\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\t\t\t\t\t\tdiffuseSum += ((sample1 + sample2) * w);\t\t\t\t\t\tweightSum += (2.0 * w);\t\t\t\t\t\tuvOffset += delta;\t\t\t\t\t}\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\t\t\t\t}"})},getOverlayMaterial:function(){return new a.ShaderMaterial({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\t\t\t\tuniform sampler2D maskTexture;\t\t\t\tuniform sampler2D edgeTexture1;\t\t\t\tuniform sampler2D edgeTexture2;\t\t\t\tuniform sampler2D patternTexture;\t\t\t\tuniform float edgeStrength;\t\t\t\tuniform float edgeGlow;\t\t\t\tuniform bool usePatternTexture;\t\t\t\t\t\t\t\tvoid main() {\t\t\t\t\tvec4 edgeValue1 = texture2D(edgeTexture1, vUv);\t\t\t\t\tvec4 edgeValue2 = texture2D(edgeTexture2, vUv);\t\t\t\t\tvec4 maskColor = texture2D(maskTexture, vUv);\t\t\t\t\tvec4 patternColor = texture2D(patternTexture, 6.0 * vUv);\t\t\t\t\tfloat visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5;\t\t\t\t\tvec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;\t\t\t\t\tvec4 finalColor = edgeStrength * maskColor.r * edgeValue;\t\t\t\t\tif(usePatternTexture)\t\t\t\t\t\tfinalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r);\t\t\t\t\tgl_FragColor = finalColor;\t\t\t\t}",blending:a.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0})}}),s.BlurDirectionX=new a.Vector2(1,0),s.BlurDirectionY=new a.Vector2(0,1),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=r(1),i=(a=n)&&a.__esModule?a:{default:a};var o=function(e,t,r,a,n){i.default.call(this),this.scene=e,this.camera=t,this.overrideMaterial=r,this.clearColor=a,this.clearAlpha=void 0!==n?n:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1};o.prototype=Object.assign(Object.create(i.default.prototype),{constructor:o,render:function(e,t,r,a,n){var i,o,s=e.autoClear;e.autoClear=!1,this.scene.overrideMaterial=this.overrideMaterial,this.clearColor&&(i=e.getClearColor().getHex(),o=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.render(this.scene,this.camera,this.renderToScreen?null:r,this.clear),this.clearColor&&e.setClearColor(i,o),this.scene.overrideMaterial=null,e.autoClear=s}}),t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=c(r(1)),i=c(r(19)),o=c(r(20)),s=c(r(2)),l=c(r(21)),u=c(r(22));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e,t,r,u,c){(n.default.call(this),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.supportsDepthTextureExtension=void 0!==r&&r,this.supportsNormalTexture=void 0!==u&&u,this.oldClearColor=new a.Color,this.oldClearAlpha=1,this.params={output:0,saoBias:.5,saoIntensity:.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},this.resolution=void 0!==c?new a.Vector2(c.x,c.y):new a.Vector2(256,256),this.saoRenderTarget=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat}),this.blurIntermediateRenderTarget=this.saoRenderTarget.clone(),this.beautyRenderTarget=this.saoRenderTarget.clone(),this.normalRenderTarget=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y,{minFilter:a.NearestFilter,magFilter:a.NearestFilter,format:a.RGBAFormat}),this.depthRenderTarget=this.normalRenderTarget.clone(),this.supportsDepthTextureExtension)&&((r=new a.DepthTexture).type=a.UnsignedShortType,r.minFilter=a.NearestFilter,r.maxFilter=a.NearestFilter,this.beautyRenderTarget.depthTexture=r,this.beautyRenderTarget.depthBuffer=!0);this.depthMaterial=new a.MeshDepthMaterial,this.depthMaterial.depthPacking=a.RGBADepthPacking,this.depthMaterial.blending=a.NoBlending,this.normalMaterial=new a.MeshNormalMaterial,this.normalMaterial.blending=a.NoBlending,void 0===i.default&&console.error("THREE.SAOPass relies on THREE.SAOShader"),this.saoMaterial=new a.ShaderMaterial({defines:Object.assign({},i.default.defines),fragmentShader:i.default.fragmentShader,vertexShader:i.default.vertexShader,uniforms:a.UniformsUtils.clone(i.default.uniforms)}),this.saoMaterial.extensions.derivatives=!0,this.saoMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.saoMaterial.defines.NORMAL_TEXTURE=this.supportsNormalTexture?1:0,this.saoMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.saoMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?r:this.depthRenderTarget.texture,this.saoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.saoMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.getInverse(this.camera.projectionMatrix),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.blending=a.NoBlending,void 0===o.default&&console.error("THREE.SAOPass relies on THREE.DepthLimitedBlurShader"),this.vBlurMaterial=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(o.default.uniforms),defines:Object.assign({},o.default.defines),vertexShader:o.default.vertexShader,fragmentShader:o.default.fragmentShader}),this.vBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.vBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.vBlurMaterial.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.vBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?r:this.depthRenderTarget.texture,this.vBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.vBlurMaterial.blending=a.NoBlending,this.hBlurMaterial=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(o.default.uniforms),defines:Object.assign({},o.default.defines),vertexShader:o.default.vertexShader,fragmentShader:o.default.fragmentShader}),this.hBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.hBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.hBlurMaterial.uniforms.tDiffuse.value=this.blurIntermediateRenderTarget.texture,this.hBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?r:this.depthRenderTarget.texture,this.hBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.hBlurMaterial.blending=a.NoBlending,void 0===s.default&&console.error("THREE.SAOPass relies on THREE.CopyShader"),this.materialCopy=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(s.default.uniforms),vertexShader:s.default.vertexShader,fragmentShader:s.default.fragmentShader,blending:a.NoBlending}),this.materialCopy.transparent=!0,this.materialCopy.depthTest=!1,this.materialCopy.depthWrite=!1,this.materialCopy.blending=a.CustomBlending,this.materialCopy.blendSrc=a.DstColorFactor,this.materialCopy.blendDst=a.ZeroFactor,this.materialCopy.blendEquation=a.AddEquation,this.materialCopy.blendSrcAlpha=a.DstAlphaFactor,this.materialCopy.blendDstAlpha=a.ZeroFactor,this.materialCopy.blendEquationAlpha=a.AddEquation,void 0===s.default&&console.error("THREE.SAOPass relies on THREE.UnpackDepthRGBAShader"),this.depthCopy=new a.ShaderMaterial({uniforms:a.UniformsUtils.clone(l.default.uniforms),vertexShader:l.default.vertexShader,fragmentShader:l.default.fragmentShader,blending:a.NoBlending}),this.quadCamera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.quadScene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quadScene.add(this.quad)};d.OUTPUT={Beauty:1,Default:0,SAO:2,Depth:3,Normal:4},d.prototype=Object.assign(Object.create(n.default.prototype),{constructor:d,render:function(e,t,r,n,i){if(this.renderToScreen&&(this.materialCopy.blending=a.NoBlending,this.materialCopy.uniforms.tDiffuse.value=r.texture,this.materialCopy.needsUpdate=!0,this.renderPass(e,this.materialCopy,null)),1!==this.params.output){this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha();var o=e.autoClear;e.autoClear=!1,e.clearTarget(this.depthRenderTarget),this.saoMaterial.uniforms.bias.value=this.params.saoBias,this.saoMaterial.uniforms.intensity.value=this.params.saoIntensity,this.saoMaterial.uniforms.scale.value=this.params.saoScale,this.saoMaterial.uniforms.kernelRadius.value=this.params.saoKernelRadius,this.saoMaterial.uniforms.minResolution.value=this.params.saoMinResolution,this.saoMaterial.uniforms.cameraNear.value=this.camera.near,this.saoMaterial.uniforms.cameraFar.value=this.camera.far;var s=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms.depthCutoff.value=s,this.hBlurMaterial.uniforms.depthCutoff.value=s,this.vBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.vBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.hBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.hBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius),this.prevStdDev===this.params.saoBlurStdDev&&this.prevNumSamples===this.params.saoBlurRadius||(u.default.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new a.Vector2(0,1)),u.default.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new a.Vector2(1,0)),this.prevStdDev=this.params.saoBlurStdDev,this.prevNumSamples=this.params.saoBlurRadius),e.setClearColor(0),e.render(this.scene,this.camera,this.beautyRenderTarget,!0),this.supportsDepthTextureExtension||this.renderOverride(e,this.depthMaterial,this.depthRenderTarget,0,1),this.supportsNormalTexture&&this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,7829503,1),this.renderPass(e,this.saoMaterial,this.saoRenderTarget,16777215,1),this.params.saoBlur&&(this.renderPass(e,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1),this.renderPass(e,this.hBlurMaterial,this.saoRenderTarget,16777215,1));var l=this.materialCopy;3===this.params.output?this.supportsDepthTextureExtension?(this.materialCopy.uniforms.tDiffuse.value=this.beautyRenderTarget.depthTexture,this.materialCopy.needsUpdate=!0):(this.depthCopy.uniforms.tDiffuse.value=this.depthRenderTarget.texture,this.depthCopy.needsUpdate=!0,l=this.depthCopy):4===this.params.output?(this.materialCopy.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.materialCopy.needsUpdate=!0):(this.materialCopy.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.materialCopy.needsUpdate=!0),0===this.params.output?l.blending=a.CustomBlending:l.blending=a.NoBlending,this.renderPass(e,l,this.renderToScreen?null:r),e.setClearColor(this.oldClearColor,this.oldClearAlpha),e.autoClear=o}},renderPass:function(e,t,r,a,n){var i=e.getClearColor(),o=e.getClearAlpha(),s=e.autoClear;e.autoClear=!1;var l=null!=a;l&&(e.setClearColor(a),e.setClearAlpha(n||0)),this.quad.material=t,e.render(this.quadScene,this.quadCamera,r,l),e.autoClear=s,e.setClearColor(i),e.setClearAlpha(o)},renderOverride:function(e,t,r,a,n){var i=e.getClearColor(),o=e.getClearAlpha(),s=e.autoClear;e.autoClear=!1,a=t.clearColor||a,n=t.clearAlpha||n;var l=null!=a;l&&(e.setClearColor(a),e.setClearAlpha(n||0)),this.scene.overrideMaterial=t,e.render(this.scene,this.camera,r,l),this.scene.overrideMaterial=null,e.autoClear=s,e.setClearColor(i),e.setClearAlpha(o)},setSize:function(e,t){this.beautyRenderTarget.setSize(e,t),this.saoRenderTarget.setSize(e,t),this.blurIntermediateRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.depthRenderTarget.setSize(e,t),this.saoMaterial.uniforms.size.value.set(e,t),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.getInverse(this.camera.projectionMatrix),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.needsUpdate=!0,this.vBlurMaterial.uniforms.size.value.set(e,t),this.vBlurMaterial.needsUpdate=!0,this.hBlurMaterial.uniforms.size.value.set(e,t),this.hBlurMaterial.needsUpdate=!0}}),t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(2));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e){n.default.call(this),void 0===i.default&&console.error("THREE.SavePass relies on THREE.CopyShader");var t=i.default;this.textureID="tDiffuse",this.uniforms=a.UniformsUtils.clone(t.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader}),this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new a.WebGLRenderTarget(window.innerWidth,window.innerHeight,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBFormat,stencilBuffer:!1}),this.renderTarget.texture.name="SavePass.rt"),this.needsSwap=!1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=r.texture),this.quad.material=this.material,e.render(this.scene,this.camera,this.renderTarget,this.clear)}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(23));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){n.default.call(this),this.edgesRT=new a.WebGLRenderTarget(e,t,{depthBuffer:!1,stencilBuffer:!1,generateMipmaps:!1,minFilter:a.LinearFilter,format:a.RGBFormat}),this.edgesRT.texture.name="SMAAPass.edges",this.weightsRT=new a.WebGLRenderTarget(e,t,{depthBuffer:!1,stencilBuffer:!1,generateMipmaps:!1,minFilter:a.LinearFilter,format:a.RGBAFormat}),this.weightsRT.texture.name="SMAAPass.weights";var r=new Image;r.src=this.getAreaTexture(),this.areaTexture=new a.Texture,this.areaTexture.name="SMAAPass.area",this.areaTexture.image=r,this.areaTexture.format=a.RGBFormat,this.areaTexture.minFilter=a.LinearFilter,this.areaTexture.generateMipmaps=!1,this.areaTexture.needsUpdate=!0,this.areaTexture.flipY=!1;var o=new Image;o.src=this.getSearchTexture(),this.searchTexture=new a.Texture,this.searchTexture.name="SMAAPass.search",this.searchTexture.image=o,this.searchTexture.magFilter=a.NearestFilter,this.searchTexture.minFilter=a.NearestFilter,this.searchTexture.generateMipmaps=!1,this.searchTexture.needsUpdate=!0,this.searchTexture.flipY=!1,void 0===i.default&&console.error("THREE.SMAAPass relies on THREE.SMAAShader"),this.uniformsEdges=a.UniformsUtils.clone(i.default[0].uniforms),this.uniformsEdges.resolution.value.set(1/e,1/t),this.materialEdges=new a.ShaderMaterial({defines:Object.assign({},i.default[0].defines),uniforms:this.uniformsEdges,vertexShader:i.default[0].vertexShader,fragmentShader:i.default[0].fragmentShader}),this.uniformsWeights=a.UniformsUtils.clone(i.default[1].uniforms),this.uniformsWeights.resolution.value.set(1/e,1/t),this.uniformsWeights.tDiffuse.value=this.edgesRT.texture,this.uniformsWeights.tArea.value=this.areaTexture,this.uniformsWeights.tSearch.value=this.searchTexture,this.materialWeights=new a.ShaderMaterial({defines:Object.assign({},i.default[1].defines),uniforms:this.uniformsWeights,vertexShader:i.default[1].vertexShader,fragmentShader:i.default[1].fragmentShader}),this.uniformsBlend=a.UniformsUtils.clone(i.default[2].uniforms),this.uniformsBlend.resolution.value.set(1/e,1/t),this.uniformsBlend.tDiffuse.value=this.weightsRT.texture,this.materialBlend=new a.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:i.default[2].vertexShader,fragmentShader:i.default[2].fragmentShader}),this.needsSwap=!1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,a,n){this.uniformsEdges.tDiffuse.value=r.texture,this.quad.material=this.materialEdges,e.render(this.scene,this.camera,this.edgesRT,this.clear),this.quad.material=this.materialWeights,e.render(this.scene,this.camera,this.weightsRT,this.clear),this.uniformsBlend.tColor.value=r.texture,this.quad.material=this.materialBlend,this.renderToScreen?e.render(this.scene,this.camera):e.render(this.scene,this.camera,t,this.clear)},setSize:function(e,t){this.edgesRT.setSize(e,t),this.weightsRT.setSize(e,t),this.materialEdges.uniforms.resolution.value.set(1/e,1/t),this.materialWeights.uniforms.resolution.value.set(1/e,1/t),this.materialBlend.uniforms.resolution.value.set(1/e,1/t)},getAreaTexture:function(){return"data:image/png;base64,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"},getSearchTexture:function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(3)),i=o(r(25));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t,r,o){if(void 0===i.default)return console.warn("THREE.SSAOPass depends on THREE.SSAOShader"),new n.default;n.default.call(this,i.default),this.width=void 0!==r?r:512,this.height=void 0!==o?o:256,this.renderToScreen=!1,this.camera2=t,this.scene2=e,this.depthMaterial=new a.MeshDepthMaterial,this.depthMaterial.depthPacking=a.RGBADepthPacking,this.depthMaterial.blending=a.NoBlending,this.depthRenderTarget=new a.WebGLRenderTarget(this.width,this.height,{minFilter:a.LinearFilter,magFilter:a.LinearFilter}),this.uniforms.tDepth.value=this.depthRenderTarget.texture,this.uniforms.size.value.set(this.width,this.height),this.uniforms.cameraNear.value=this.camera2.near,this.uniforms.cameraFar.value=this.camera2.far,this.uniforms.radius.value=4,this.uniforms.onlyAO.value=!1,this.uniforms.aoClamp.value=.25,this.uniforms.lumInfluence.value=.7;Object.defineProperties(this,{radius:{get:function(){return this.uniforms.radius.value},set:function(e){this.uniforms.radius.value=e}},onlyAO:{get:function(){return this.uniforms.onlyAO.value},set:function(e){this.uniforms.onlyAO.value=e}},aoClamp:{get:function(){return this.uniforms.aoClamp.value},set:function(e){this.uniforms.aoClamp.value=e}},lumInfluence:{get:function(){return this.uniforms.lumInfluence.value},set:function(e){this.uniforms.lumInfluence.value=e}}})};(s.prototype=Object.create(n.default.prototype)).render=function(e,t,r,a,i){this.scene2.overrideMaterial=this.depthMaterial,e.render(this.scene2,this.camera2,this.depthRenderTarget,!0),this.scene2.overrideMaterial=null,n.default.prototype.render.call(this,e,t,r,a,i)},s.prototype.setScene=function(e){this.scene2=e},s.prototype.setCamera=function(e){this.camera2=e,this.uniforms.cameraNear.value=this.camera2.near,this.uniforms.cameraFar.value=this.camera2.far},s.prototype.setSize=function(e,t){this.width=e,this.height=t,this.uniforms.size.value.set(this.width,this.height),this.depthRenderTarget.setSize(this.width,this.height)},t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(24),o=(a=i)&&a.__esModule?a:{default:a};var s=function(e,t,r){void 0===o.default&&console.error("THREE.TAARenderPass relies on THREE.SSAARenderPass"),o.default.call(this,e,t,r),this.sampleLevel=0,this.accumulate=!1};s.JitterVectors=o.default.JitterVectors,s.prototype=Object.assign(Object.create(o.default.prototype),{constructor:s,render:function(e,t,r,a){if(!this.accumulate)return o.default.prototype.render.call(this,e,t,r,a),void(this.accumulateIndex=-1);var i=s.JitterVectors[5];this.sampleRenderTarget||(this.sampleRenderTarget=new n.WebGLRenderTarget(r.width,r.height,this.params),this.sampleRenderTarget.texture.name="TAARenderPass.sample"),this.holdRenderTarget||(this.holdRenderTarget=new n.WebGLRenderTarget(r.width,r.height,this.params),this.holdRenderTarget.texture.name="TAARenderPass.hold"),this.accumulate&&-1===this.accumulateIndex&&(o.default.prototype.render.call(this,e,this.holdRenderTarget,r,a),this.accumulateIndex=0);var l=e.autoClear;e.autoClear=!1;var u=1/i.length;if(this.accumulateIndex>=0&&this.accumulateIndex<i.length){this.copyUniforms.opacity.value=u,this.copyUniforms.tDiffuse.value=t.texture;for(var c=Math.pow(2,this.sampleLevel),d=0;d<c;d++){var f=i[this.accumulateIndex];if(this.camera.setViewOffset&&this.camera.setViewOffset(r.width,r.height,.0625*f[0],.0625*f[1],r.width,r.height),e.render(this.scene,this.camera,t,!0),e.render(this.scene2,this.camera2,this.sampleRenderTarget,0===this.accumulateIndex),this.accumulateIndex++,this.accumulateIndex>=i.length)break}this.camera.clearViewOffset&&this.camera.clearViewOffset()}var h=this.accumulateIndex*u;h>0&&(this.copyUniforms.opacity.value=1,this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture,e.render(this.scene2,this.camera2,t,!0)),h<1&&(this.copyUniforms.opacity.value=1-h,this.copyUniforms.tDiffuse.value=this.holdRenderTarget.texture,e.render(this.scene2,this.camera2,t,0===h)),e.autoClear=l}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=o(r(1)),i=o(r(2));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){n.default.call(this),void 0===i.default&&console.error("THREE.TexturePass relies on THREE.CopyShader");var r=i.default;this.map=e,this.opacity=void 0!==t?t:1,this.uniforms=a.UniformsUtils.clone(r.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,depthTest:!1,depthWrite:!1}),this.needsSwap=!1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};s.prototype=Object.assign(Object.create(n.default.prototype),{constructor:s,render:function(e,t,r,a,n){var i=e.autoClear;e.autoClear=!1,this.quad.material=this.material,this.uniforms.opacity.value=this.opacity,this.uniforms.tDiffuse.value=this.map,this.material.transparent=this.opacity<1,e.render(this.scene,this.camera,this.renderToScreen?null:r,this.clear),e.autoClear=i}}),t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),n=s(r(1)),i=s(r(2)),o=s(r(26));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e,t,r,s){n.default.call(this),this.strength=void 0!==t?t:1,this.radius=r,this.threshold=s,this.resolution=void 0!==e?new a.Vector2(e.x,e.y):new a.Vector2(256,256);var l={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat};this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;var u=Math.round(this.resolution.x/2),c=Math.round(this.resolution.y/2);this.renderTargetBright=new a.WebGLRenderTarget(u,c,l),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(var d=0;d<this.nMips;d++){var f;(f=new a.WebGLRenderTarget(u,c,l)).texture.name="UnrealBloomPass.h"+d,f.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(f),(f=new a.WebGLRenderTarget(u,c,l)).texture.name="UnrealBloomPass.v"+d,f.texture.generateMipmaps=!1,this.renderTargetsVertical.push(f),u=Math.round(u/2),c=Math.round(c/2)}void 0===o.default&&console.error("THREE.UnrealBloomPass relies on THREE.LuminosityHighPassShader");var h=o.default;this.highPassUniforms=a.UniformsUtils.clone(h.uniforms),this.highPassUniforms.luminosityThreshold.value=s,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new a.ShaderMaterial({uniforms:this.highPassUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,defines:{}}),this.separableBlurMaterials=[];var p=[3,5,7,9,11];for(u=Math.round(this.resolution.x/2),c=Math.round(this.resolution.y/2),d=0;d<this.nMips;d++)this.separableBlurMaterials.push(this.getSeperableBlurMaterial(p[d])),this.separableBlurMaterials[d].uniforms.texSize.value=new a.Vector2(u,c),u=Math.round(u/2),c=Math.round(c/2);this.compositeMaterial=this.getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1,this.compositeMaterial.needsUpdate=!0;this.compositeMaterial.uniforms.bloomFactors.value=[1,.8,.6,.4,.2],this.bloomTintColors=[new a.Vector3(1,1,1),new a.Vector3(1,1,1),new a.Vector3(1,1,1),new a.Vector3(1,1,1),new a.Vector3(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,void 0===i.default&&console.error("THREE.BloomPass relies on THREE.CopyShader");var m=i.default;this.copyUniforms=a.UniformsUtils.clone(m.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:m.vertexShader,fragmentShader:m.fragmentShader,blending:a.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this.oldClearColor=new a.Color,this.oldClearAlpha=1,this.camera=new a.OrthographicCamera(-1,1,1,-1,0,1),this.scene=new a.Scene,this.basic=new a.MeshBasicMaterial,this.quad=new a.Mesh(new a.PlaneBufferGeometry(2,2),null),this.quad.frustumCulled=!1,this.scene.add(this.quad)};l.prototype=Object.assign(Object.create(n.default.prototype),{constructor:l,dispose:function(){for(var e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose()},setSize:function(e,t){var r=Math.round(e/2),n=Math.round(t/2);this.renderTargetBright.setSize(r,n);for(var i=0;i<this.nMips;i++)this.renderTargetsHorizontal[i].setSize(r,n),this.renderTargetsVertical[i].setSize(r,n),this.separableBlurMaterials[i].uniforms.texSize.value=new a.Vector2(r,n),r=Math.round(r/2),n=Math.round(n/2)},render:function(e,t,r,n,i){this.oldClearColor.copy(e.getClearColor()),this.oldClearAlpha=e.getClearAlpha();var o=e.autoClear;e.autoClear=!1,e.setClearColor(new a.Color(0,0,0),0),i&&e.context.disable(e.context.STENCIL_TEST),this.renderToScreen&&(this.quad.material=this.basic,this.basic.map=r.texture,e.render(this.scene,this.camera,void 0,!0)),this.highPassUniforms.tDiffuse.value=r.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this.quad.material=this.materialHighPassFilter,e.render(this.scene,this.camera,this.renderTargetBright,!0);for(var s=this.renderTargetBright,l=0;l<this.nMips;l++)this.quad.material=this.separableBlurMaterials[l],this.separableBlurMaterials[l].uniforms.colorTexture.value=s.texture,this.separableBlurMaterials[l].uniforms.direction.value=a.UnrealBloomPass.BlurDirectionX,e.render(this.scene,this.camera,this.renderTargetsHorizontal[l],!0),this.separableBlurMaterials[l].uniforms.colorTexture.value=this.renderTargetsHorizontal[l].texture,this.separableBlurMaterials[l].uniforms.direction.value=a.UnrealBloomPass.BlurDirectionY,e.render(this.scene,this.camera,this.renderTargetsVertical[l],!0),s=this.renderTargetsVertical[l];this.quad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.render(this.scene,this.camera,this.renderTargetsHorizontal[0],!0),this.quad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,i&&e.context.enable(e.context.STENCIL_TEST),this.renderToScreen?e.render(this.scene,this.camera,void 0,!1):e.render(this.scene,this.camera,r,!1),e.setClearColor(this.oldClearColor,this.oldClearAlpha),e.autoClear=o},getSeperableBlurMaterial:function(e){return new a.ShaderMaterial({defines:{KERNEL_RADIUS:e,SIGMA:e},uniforms:{colorTexture:{value:null},texSize:{value:new a.Vector2(.5,.5)},direction:{value:new a.Vector2(.5,.5)}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include <common>\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\t\t\t\tuniform vec2 direction;\t\t\t\t\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\t\t\t\t}\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\t\t\t\t\tfloat fSigma = float(SIGMA);\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\t\t\t\t\t\tfloat x = float(i);\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\t\t\t\t\t\tweightSum += 2.0 * w;\t\t\t\t\t}\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})},getCompositeMaterial:function(e){return new a.ShaderMaterial({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},dirtTexture:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\t\t\t\tuniform sampler2D blurTexture1;\t\t\t\tuniform sampler2D blurTexture2;\t\t\t\tuniform sampler2D blurTexture3;\t\t\t\tuniform sampler2D blurTexture4;\t\t\t\tuniform sampler2D blurTexture5;\t\t\t\tuniform sampler2D dirtTexture;\t\t\t\tuniform float bloomStrength;\t\t\t\tuniform float bloomRadius;\t\t\t\tuniform float bloomFactors[NUM_MIPS];\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\t\t\t\t\t\t\t\tfloat lerpBloomFactor(const in float factor) { \t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\t\t\t\t}\t\t\t\t\t\t\t\tvoid main() {\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) + \t\t\t\t\t\t\t\t\t\t\t\t\t lerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) + \t\t\t\t\t\t\t\t\t\t\t\t\t lerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) + \t\t\t\t\t\t\t\t\t\t\t\t\t lerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) + \t\t\t\t\t\t\t\t\t\t\t\t\t lerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\t\t\t\t}"})}}),l.BlurDirectionX=new a.Vector2(1,0),l.BlurDirectionY=new a.Vector2(0,1),t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WaterRefractionShader=t.VignetteShader=t.VerticalTiltShiftShader=t.VerticalBlurShader=t.UnpackDepthRGBAShader=t.TriangleBlurShader=t.ToneMapShader=t.TechnicolorShader=t.SSAOShader=t.SobelOperatorShader=t.SMAAShader=t.SepiaShader=t.SAOShader=t.RGBShiftShader=t.PixelShader=t.ParallaxShader=t.NormalMapShader=t.MirrorShader=t.LuminosityShader=t.LuminosityHighPassShader=t.KaleidoShader=t.HueSaturationShader=t.HorizontalTiltShiftShader=t.HorizontalBlurShader=t.HalftoneShader=t.GammaCorrectionShader=t.FXAAShader=t.FresnelShader=t.FreiChenShader=t.FocusShader=t.FilmShader=t.DotScreenShader=t.DOFMipMapShader=t.DigitalGlitch=t.DepthLimitedBlurShader=t.CopyShader=t.ConvolutionShader=t.ColorifyShader=t.ColorCorrectionShader=t.BrightnessContrastShader=t.BokehShader2=t.BokehShader=t.BlurShaderUtils=t.BlendShader=t.BleachBypassShader=t.BasicShader=void 0;var a=q(r(113)),n=q(r(114)),i=q(r(115)),o=q(r(22)),s=q(r(14)),l=q(r(116)),u=q(r(117)),c=q(r(118)),d=q(r(119)),f=q(r(13)),h=q(r(2)),p=q(r(20)),m=q(r(17)),v=q(r(120)),g=q(r(15)),y=q(r(16)),x=q(r(121)),b=q(r(122)),w=q(r(123)),A=q(r(124)),M=q(r(125)),T=q(r(18)),S=q(r(126)),E=q(r(127)),_=q(r(128)),F=q(r(129)),P=q(r(26)),L=q(r(11)),C=q(r(130)),O=q(r(131)),N=(q(r(132)),q(r(133))),R=q(r(134)),I=q(r(135)),D=q(r(19)),U=q(r(136)),k=q(r(23)),B=q(r(137)),j=q(r(25)),V=q(r(138)),G=q(r(12)),z=q(r(139)),X=q(r(21)),H=q(r(140)),Y=q(r(141)),W=q(r(142)),Q=q(r(143));function q(e){return e&&e.__esModule?e:{default:e}}t.BasicShader=a.default,t.BleachBypassShader=n.default,t.BlendShader=i.default,t.BlurShaderUtils=o.default,t.BokehShader=s.default,t.BokehShader2=l.default,t.BrightnessContrastShader=u.default,t.ColorCorrectionShader=c.default,t.ColorifyShader=d.default,t.ConvolutionShader=f.default,t.CopyShader=h.default,t.DepthLimitedBlurShader=p.default,t.DigitalGlitch=m.default,t.DOFMipMapShader=v.default,t.DotScreenShader=g.default,t.FilmShader=y.default,t.FocusShader=x.default,t.FreiChenShader=b.default,t.FresnelShader=w.default,t.FXAAShader=A.default,t.GammaCorrectionShader=M.default,t.HalftoneShader=T.default,t.HorizontalBlurShader=S.default,t.HorizontalTiltShiftShader=E.default,t.HueSaturationShader=_.default,t.KaleidoShader=F.default,t.LuminosityHighPassShader=P.default,t.LuminosityShader=L.default,t.MirrorShader=C.default,t.NormalMapShader=O.default,t.ParallaxShader=N.default,t.PixelShader=R.default,t.RGBShiftShader=I.default,t.SAOShader=D.default,t.SepiaShader=U.default,t.SMAAShader=k.default,t.SobelOperatorShader=B.default,t.SSAOShader=j.default,t.TechnicolorShader=V.default,t.ToneMapShader=G.default,t.TriangleBlurShader=z.default,t.UnpackDepthRGBAShader=X.default,t.VerticalBlurShader=H.default,t.VerticalTiltShiftShader=Y.default,t.VignetteShader=W.default,t.WaterRefractionShader=Q.default},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{},vertexShader:["void main() {","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["void main() {","gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 base = texture2D( tDiffuse, vUv );","vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );","float lum = dot( lumCoeff, base.rgb );","vec3 blend = vec3( lum );","float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );","vec3 result1 = 2.0 * base.rgb * blend;","vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );","vec3 newColor = mix( result1, result2, L );","float A2 = opacity * base.a;","vec3 mixRGB = A2 * newColor.rgb;","mixRGB += ( ( 1.0 - A2 ) * base.rgb );","gl_FragColor = vec4( mixRGB, base.a );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse1:{value:null},tDiffuse2:{value:null},mixRatio:{value:.5},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform float mixRatio;","uniform sampler2D tDiffuse1;","uniform sampler2D tDiffuse2;","varying vec2 vUv;","void main() {","vec4 texel1 = texture2D( tDiffuse1, vUv );","vec4 texel2 = texture2D( tDiffuse2, vUv );","gl_FragColor = opacity * mix( texel1, texel2, mixRatio );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{textureWidth:{value:1},textureHeight:{value:1},focalDepth:{value:1},focalLength:{value:24},fstop:{value:.9},tColor:{value:null},tDepth:{value:null},maxblur:{value:1},showFocus:{value:0},manualdof:{value:0},vignetting:{value:0},depthblur:{value:0},threshold:{value:.5},gain:{value:2},bias:{value:.5},fringe:{value:.7},znear:{value:.1},zfar:{value:100},noise:{value:1},dithering:{value:1e-4},pentagon:{value:0},shaderFocus:{value:1},focusCoords:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","#include <packing>","varying vec2 vUv;","uniform sampler2D tColor;","uniform sampler2D tDepth;","uniform float textureWidth;","uniform float textureHeight;","uniform float focalDepth; //focal distance value in meters, but you may use autofocus option below","uniform float focalLength; //focal length in mm","uniform float fstop; //f-stop value","uniform bool showFocus; //show debug focus point and focal range (red = focal point, green = focal range)","/*","make sure that these two values are the same for your camera, otherwise distances will be wrong.","*/","uniform float znear; // camera clipping start","uniform float zfar; // camera clipping end","//------------------------------------------","//user variables","const int samples = SAMPLES; //samples on the first ring","const int rings = RINGS; //ring count","const int maxringsamples = rings * samples;","uniform bool manualdof; // manual dof calculation","float ndofstart = 1.0; // near dof blur start","float ndofdist = 2.0; // near dof blur falloff distance","float fdofstart = 1.0; // far dof blur start","float fdofdist = 3.0; // far dof blur falloff distance","float CoC = 0.03; //circle of confusion size in mm (35mm film = 0.03mm)","uniform bool vignetting; // use optical lens vignetting","float vignout = 1.3; // vignetting outer border","float vignin = 0.0; // vignetting inner border","float vignfade = 22.0; // f-stops till vignete fades","uniform bool shaderFocus;","// disable if you use external focalDepth value","uniform vec2 focusCoords;","// autofocus point on screen (0.0,0.0 - left lower corner, 1.0,1.0 - upper right)","// if center of screen use vec2(0.5, 0.5);","uniform float maxblur;","//clamp value of max blur (0.0 = no blur, 1.0 default)","uniform float threshold; // highlight threshold;","uniform float gain; // highlight gain;","uniform float bias; // bokeh edge bias","uniform float fringe; // bokeh chromatic aberration / fringing","uniform bool noise; //use noise instead of pattern for sample dithering","uniform float dithering;","uniform bool depthblur; // blur the depth buffer","float dbsize = 1.25; // depth blur size","/*","next part is experimental","not looking good with small sample and ring count","looks okay starting from samples = 4, rings = 4","*/","uniform bool pentagon; //use pentagon as bokeh shape?","float feather = 0.4; //pentagon shape feather","//------------------------------------------","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float penta(vec2 coords) {","//pentagonal shape","float scale = float(rings) - 1.3;","vec4 HS0 = vec4( 1.0, 0.0, 0.0, 1.0);","vec4 HS1 = vec4( 0.309016994, 0.951056516, 0.0, 1.0);","vec4 HS2 = vec4(-0.809016994, 0.587785252, 0.0, 1.0);","vec4 HS3 = vec4(-0.809016994,-0.587785252, 0.0, 1.0);","vec4 HS4 = vec4( 0.309016994,-0.951056516, 0.0, 1.0);","vec4 HS5 = vec4( 0.0 ,0.0 , 1.0, 1.0);","vec4 one = vec4( 1.0 );","vec4 P = vec4((coords),vec2(scale, scale));","vec4 dist = vec4(0.0);","float inorout = -4.0;","dist.x = dot( P, HS0 );","dist.y = dot( P, HS1 );","dist.z = dot( P, HS2 );","dist.w = dot( P, HS3 );","dist = smoothstep( -feather, feather, dist );","inorout += dot( dist, one );","dist.x = dot( P, HS4 );","dist.y = HS5.w - abs( P.z );","dist = smoothstep( -feather, feather, dist );","inorout += dist.x;","return clamp( inorout, 0.0, 1.0 );","}","float bdepth(vec2 coords) {","// Depth buffer blur","float d = 0.0;","float kernel[9];","vec2 offset[9];","vec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;","offset[0] = vec2(-wh.x,-wh.y);","offset[1] = vec2( 0.0, -wh.y);","offset[2] = vec2( wh.x -wh.y);","offset[3] = vec2(-wh.x, 0.0);","offset[4] = vec2( 0.0, 0.0);","offset[5] = vec2( wh.x, 0.0);","offset[6] = vec2(-wh.x, wh.y);","offset[7] = vec2( 0.0, wh.y);","offset[8] = vec2( wh.x, wh.y);","kernel[0] = 1.0/16.0; kernel[1] = 2.0/16.0; kernel[2] = 1.0/16.0;","kernel[3] = 2.0/16.0; kernel[4] = 4.0/16.0; kernel[5] = 2.0/16.0;","kernel[6] = 1.0/16.0; kernel[7] = 2.0/16.0; kernel[8] = 1.0/16.0;","for( int i=0; i<9; i++ ) {","float tmp = getDepth( coords + offset[ i ] );","d += tmp * kernel[i];","}","return d;","}","vec3 color(vec2 coords,float blur) {","//processing the sample","vec3 col = vec3(0.0);","vec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);","col.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;","col.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;","col.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;","vec3 lumcoeff = vec3(0.299,0.587,0.114);","float lum = dot(col.rgb, lumcoeff);","float thresh = max((lum-threshold)*gain, 0.0);","return col+mix(vec3(0.0),col,thresh*blur);","}","vec3 debugFocus(vec3 col, float blur, float depth) {","float edge = 0.002*depth; //distance based edge smoothing","float m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);","float e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);","col = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);","col = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);","return col;","}","float linearize(float depth) {","return -zfar * znear / (depth * (zfar - znear) - zfar);","}","float vignette() {","float dist = distance(vUv.xy, vec2(0.5,0.5));","dist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);","return clamp(dist,0.0,1.0);","}","float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {","float rings2 = float(rings);","float step = PI*2.0 / float(ringsamples);","float pw = cos(j*step)*i;","float ph = sin(j*step)*i;","float p = 1.0;","if (pentagon) {","p = penta(vec2(pw,ph));","}","col += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;","return 1.0 * mix(1.0, i /rings2, bias) * p;","}","void main() {","//scene depth calculation","float depth = linearize( getDepth( vUv.xy ) );","// Blur depth?","if (depthblur) {","depth = linearize(bdepth(vUv.xy));","}","//focal plane calculation","float fDepth = focalDepth;","if (shaderFocus) {","fDepth = linearize( getDepth( focusCoords ) );","}","// dof blur factor calculation","float blur = 0.0;","if (manualdof) {","float a = depth-fDepth; // Focal plane","float b = (a-fdofstart)/fdofdist; // Far DoF","float c = (-a-ndofstart)/ndofdist; // Near Dof","blur = (a>0.0) ? b : c;","} else {","float f = focalLength; // focal length in mm","float d = fDepth*1000.0; // focal plane in mm","float o = depth*1000.0; // depth in mm","float a = (o*f)/(o-f);","float b = (d*f)/(d-f);","float c = (d-f)/(d*fstop*CoC);","blur = abs(a-b)*c;","}","blur = clamp(blur,0.0,1.0);","// calculation of pattern for dithering","vec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;","// getting blur x and y step factor","float w = (1.0/textureWidth)*blur*maxblur+noise.x;","float h = (1.0/textureHeight)*blur*maxblur+noise.y;","// calculation of final color","vec3 col = vec3(0.0);","if(blur < 0.05) {","//some optimization thingy","col = texture2D(tColor, vUv.xy).rgb;","} else {","col = texture2D(tColor, vUv.xy).rgb;","float s = 1.0;","int ringsamples;","for (int i = 1; i <= rings; i++) {","/*unboxstart*/","ringsamples = i * samples;","for (int j = 0 ; j < maxringsamples ; j++) {","if (j >= ringsamples) break;","s += gather(float(i), float(j), ringsamples, col, w, h, blur);","}","/*unboxend*/","}","col /= s; //divide by sample count","}","if (showFocus) {","col = debugFocus(col, blur, depth);","}","if (vignetting) {","col *= vignette();","}","gl_FragColor.rgb = col;","gl_FragColor.a = 1.0;","} "].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},brightness:{value:0},contrast:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float brightness;","uniform float contrast;","varying vec2 vUv;","void main() {","gl_FragColor = texture2D( tDiffuse, vUv );","gl_FragColor.rgb += brightness;","if (contrast > 0.0) {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;","} else {","gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;","}","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={uniforms:{tDiffuse:{value:null},powRGB:{value:new a.Vector3(2,2,2)},mulRGB:{value:new a.Vector3(1,1,1)},addRGB:{value:new a.Vector3(0,0,0)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec3 powRGB;","uniform vec3 mulRGB;","uniform vec3 addRGB;","varying vec2 vUv;","void main() {","gl_FragColor = texture2D( tDiffuse, vUv );","gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );","}"].join("\n")};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},color:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Color)(16777215)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","vec3 luma = vec3( 0.299, 0.587, 0.114 );","float v = dot( texel.xyz, luma );","gl_FragColor = vec4( v * color, texel.w );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},maxblur:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float focus;","uniform float maxblur;","uniform sampler2D tColor;","uniform sampler2D tDepth;","varying vec2 vUv;","void main() {","vec4 depth = texture2D( tDepth, vUv );","float factor = depth.x - focus;","vec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );","gl_FragColor = col;","gl_FragColor.a = 1.0;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},screenWidth:{value:1024},screenHeight:{value:1024},sampleDistance:{value:.94},waveFactor:{value:.00125}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float screenWidth;","uniform float screenHeight;","uniform float sampleDistance;","uniform float waveFactor;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 color, org, tmp, add;","float sample_dist, f;","vec2 vin;","vec2 uv = vUv;","add = color = org = texture2D( tDiffuse, uv );","vin = ( uv - vec2( 0.5 ) ) * vec2( 1.4 );","sample_dist = dot( vin, vin ) * 2.0;","f = ( waveFactor * 100.0 + sample_dist ) * sampleDistance * 4.0;","vec2 sampleSize = vec2( 1.0 / screenWidth, 1.0 / screenHeight ) * vec2( f );","add += tmp = texture2D( tDiffuse, uv + vec2( 0.111964, 0.993712 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( 0.846724, 0.532032 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( 0.943883, -0.330279 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( 0.330279, -0.943883 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( -0.532032, -0.846724 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( -0.993712, -0.111964 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","add += tmp = texture2D( tDiffuse, uv + vec2( -0.707107, 0.707107 ) * sampleSize );","if( tmp.b < color.b ) color = tmp;","color = color * vec4( 2.0 ) - ( add / vec4( 8.0 ) );","color = color + ( add / vec4( 8.0 ) - color ) * ( vec4( 1.0 ) - vec4( sample_dist * 0.5 ) );","gl_FragColor = vec4( color.rgb * color.rgb * vec3( 0.95 ) + color.rgb, 1.0 );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},aspect:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)(512,512)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","uniform vec2 aspect;","vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);","mat3 G[9];","const mat3 g0 = mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );","const mat3 g1 = mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );","const mat3 g2 = mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );","const mat3 g3 = mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );","const mat3 g4 = mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );","const mat3 g5 = mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );","const mat3 g6 = mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );","const mat3 g7 = mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );","const mat3 g8 = mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );","void main(void)","{","G[0] = g0,","G[1] = g1,","G[2] = g2,","G[3] = g3,","G[4] = g4,","G[5] = g5,","G[6] = g6,","G[7] = g7,","G[8] = g8;","mat3 I;","float cnv[9];","vec3 sample;","for (float i=0.0; i<3.0; i++) {","for (float j=0.0; j<3.0; j++) {","sample = texture2D(tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;","I[int(i)][int(j)] = length(sample);","}","}","for (int i=0; i<9; i++) {","float dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);","cnv[i] = dp3 * dp3;","}","float M = (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);","float S = (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);","gl_FragColor = vec4(vec3(sqrt(M/S)), 1.0);","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{mRefractionRatio:{value:1.02},mFresnelBias:{value:.1},mFresnelPower:{value:2},mFresnelScale:{value:1},tCube:{value:null}},vertexShader:["uniform float mRefractionRatio;","uniform float mFresnelBias;","uniform float mFresnelScale;","uniform float mFresnelPower;","varying vec3 vReflect;","varying vec3 vRefract[3];","varying float vReflectionFactor;","void main() {","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","vec4 worldPosition = modelMatrix * vec4( position, 1.0 );","vec3 worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );","vec3 I = worldPosition.xyz - cameraPosition;","vReflect = reflect( I, worldNormal );","vRefract[0] = refract( normalize( I ), worldNormal, mRefractionRatio );","vRefract[1] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.99 );","vRefract[2] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.98 );","vReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), worldNormal ), mFresnelPower );","gl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform samplerCube tCube;","varying vec3 vReflect;","varying vec3 vRefract[3];","varying float vReflectionFactor;","void main() {","vec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );","vec4 refractedColor = vec4( 1.0 );","refractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;","refractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;","refractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;","gl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},resolution:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)(1/1024,1/512)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["precision highp float;","","uniform sampler2D tDiffuse;","","uniform vec2 resolution;","","varying vec2 vUv;","","// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)","","//----------------------------------------------------------------------------------","// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag","// SDK Version: v3.00","// Email: gameworks@nvidia.com","// Site: http://developer.nvidia.com/","//","// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.","//","// Redistribution and use in source and binary forms, with or without","// modification, are permitted provided that the following conditions","// are met:","// * Redistributions of source code must retain the above copyright","// notice, this list of conditions and the following disclaimer.","// * Redistributions in binary form must reproduce the above copyright","// notice, this list of conditions and the following disclaimer in the","// documentation and/or other materials provided with the distribution.","// * Neither the name of NVIDIA CORPORATION nor the names of its","// contributors may be used to endorse or promote products derived","// from this software without specific prior written permission.","//","// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY","// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE","// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR","// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR","// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,","// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,","// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR","// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY","// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT","// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE","// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","//","//----------------------------------------------------------------------------------","","#define FXAA_PC 1","#define FXAA_GLSL_100 1","#define FXAA_QUALITY_PRESET 12","","#define FXAA_GREEN_AS_LUMA 1","","/*--------------------------------------------------------------------------*/","#ifndef FXAA_PC_CONSOLE"," //"," // The console algorithm for PC is included"," // for developers targeting really low spec machines."," // Likely better to just run FXAA_PC, and use a really low preset."," //"," #define FXAA_PC_CONSOLE 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GLSL_120"," #define FXAA_GLSL_120 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GLSL_130"," #define FXAA_GLSL_130 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_3"," #define FXAA_HLSL_3 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_4"," #define FXAA_HLSL_4 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_5"," #define FXAA_HLSL_5 0","#endif","/*==========================================================================*/","#ifndef FXAA_GREEN_AS_LUMA"," //"," // For those using non-linear color,"," // and either not able to get luma in alpha, or not wanting to,"," // this enables FXAA to run using green as a proxy for luma."," // So with this enabled, no need to pack luma in alpha."," //"," // This will turn off AA on anything which lacks some amount of green."," // Pure red and blue or combination of only R and B, will get no AA."," //"," // Might want to lower the settings for both,"," // fxaaConsoleEdgeThresholdMin"," // fxaaQualityEdgeThresholdMin"," // In order to insure AA does not get turned off on colors"," // which contain a minor amount of green."," //"," // 1 = On."," // 0 = Off."," //"," #define FXAA_GREEN_AS_LUMA 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_EARLY_EXIT"," //"," // Controls algorithm's early exit path."," // On PS3 turning this ON adds 2 cycles to the shader."," // On 360 turning this OFF adds 10ths of a millisecond to the shader."," // Turning this off on console will result in a more blurry image."," // So this defaults to on."," //"," // 1 = On."," // 0 = Off."," //"," #define FXAA_EARLY_EXIT 1","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_DISCARD"," //"," // Only valid for PC OpenGL currently."," // Probably will not work when FXAA_GREEN_AS_LUMA = 1."," //"," // 1 = Use discard on pixels which don't need AA."," // For APIs which enable concurrent TEX+ROP from same surface."," // 0 = Return unchanged color on pixels which don't need AA."," //"," #define FXAA_DISCARD 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_FAST_PIXEL_OFFSET"," //"," // Used for GLSL 120 only."," //"," // 1 = GL API supports fast pixel offsets"," // 0 = do not use fast pixel offsets"," //"," #ifdef GL_EXT_gpu_shader4"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifdef GL_NV_gpu_shader5"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifdef GL_ARB_gpu_shader5"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifndef FXAA_FAST_PIXEL_OFFSET"," #define FXAA_FAST_PIXEL_OFFSET 0"," #endif","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GATHER4_ALPHA"," //"," // 1 = API supports gather4 on alpha channel."," // 0 = API does not support gather4 on alpha channel."," //"," #if (FXAA_HLSL_5 == 1)"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifdef GL_ARB_gpu_shader5"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifdef GL_NV_gpu_shader5"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifndef FXAA_GATHER4_ALPHA"," #define FXAA_GATHER4_ALPHA 0"," #endif","#endif","","","/*============================================================================"," FXAA QUALITY - TUNING KNOBS","------------------------------------------------------------------------------","NOTE the other tuning knobs are now in the shader function inputs!","============================================================================*/","#ifndef FXAA_QUALITY_PRESET"," //"," // Choose the quality preset."," // This needs to be compiled into the shader as it effects code."," // Best option to include multiple presets is to"," // in each shader define the preset, then include this file."," //"," // OPTIONS"," // -----------------------------------------------------------------------"," // 10 to 15 - default medium dither (10=fastest, 15=highest quality)"," // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)"," // 39 - no dither, very expensive"," //"," // NOTES"," // -----------------------------------------------------------------------"," // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)"," // 13 = about same speed as FXAA 3.9 and better than 12"," // 23 = closest to FXAA 3.9 visually and performance wise"," // _ = the lowest digit is directly related to performance"," // _ = the highest digit is directly related to style"," //"," #define FXAA_QUALITY_PRESET 12","#endif","","","/*============================================================================",""," FXAA QUALITY - PRESETS","","============================================================================*/","","/*============================================================================"," FXAA QUALITY - MEDIUM DITHER PRESETS","============================================================================*/","#if (FXAA_QUALITY_PRESET == 10)"," #define FXAA_QUALITY_PS 3"," #define FXAA_QUALITY_P0 1.5"," #define FXAA_QUALITY_P1 3.0"," #define FXAA_QUALITY_P2 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 11)"," #define FXAA_QUALITY_PS 4"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 3.0"," #define FXAA_QUALITY_P3 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 12)"," #define FXAA_QUALITY_PS 5"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 4.0"," #define FXAA_QUALITY_P4 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 13)"," #define FXAA_QUALITY_PS 6"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 4.0"," #define FXAA_QUALITY_P5 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 14)"," #define FXAA_QUALITY_PS 7"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 4.0"," #define FXAA_QUALITY_P6 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 15)"," #define FXAA_QUALITY_PS 8"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 4.0"," #define FXAA_QUALITY_P7 12.0","#endif","","/*============================================================================"," FXAA QUALITY - LOW DITHER PRESETS","============================================================================*/","#if (FXAA_QUALITY_PRESET == 20)"," #define FXAA_QUALITY_PS 3"," #define FXAA_QUALITY_P0 1.5"," #define FXAA_QUALITY_P1 2.0"," #define FXAA_QUALITY_P2 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 21)"," #define FXAA_QUALITY_PS 4"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 22)"," #define FXAA_QUALITY_PS 5"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 23)"," #define FXAA_QUALITY_PS 6"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 24)"," #define FXAA_QUALITY_PS 7"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 3.0"," #define FXAA_QUALITY_P6 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 25)"," #define FXAA_QUALITY_PS 8"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 4.0"," #define FXAA_QUALITY_P7 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 26)"," #define FXAA_QUALITY_PS 9"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 4.0"," #define FXAA_QUALITY_P8 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 27)"," #define FXAA_QUALITY_PS 10"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 4.0"," #define FXAA_QUALITY_P9 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 28)"," #define FXAA_QUALITY_PS 11"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 4.0"," #define FXAA_QUALITY_P10 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 29)"," #define FXAA_QUALITY_PS 12"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 2.0"," #define FXAA_QUALITY_P10 4.0"," #define FXAA_QUALITY_P11 8.0","#endif","","/*============================================================================"," FXAA QUALITY - EXTREME QUALITY","============================================================================*/","#if (FXAA_QUALITY_PRESET == 39)"," #define FXAA_QUALITY_PS 12"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.0"," #define FXAA_QUALITY_P2 1.0"," #define FXAA_QUALITY_P3 1.0"," #define FXAA_QUALITY_P4 1.0"," #define FXAA_QUALITY_P5 1.5"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 2.0"," #define FXAA_QUALITY_P10 4.0"," #define FXAA_QUALITY_P11 8.0","#endif","","","","/*============================================================================",""," API PORTING","","============================================================================*/","#if (FXAA_GLSL_100 == 1) || (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)"," #define FxaaBool bool"," #define FxaaDiscard discard"," #define FxaaFloat float"," #define FxaaFloat2 vec2"," #define FxaaFloat3 vec3"," #define FxaaFloat4 vec4"," #define FxaaHalf float"," #define FxaaHalf2 vec2"," #define FxaaHalf3 vec3"," #define FxaaHalf4 vec4"," #define FxaaInt2 ivec2"," #define FxaaSat(x) clamp(x, 0.0, 1.0)"," #define FxaaTex sampler2D","#else"," #define FxaaBool bool"," #define FxaaDiscard clip(-1)"," #define FxaaFloat float"," #define FxaaFloat2 float2"," #define FxaaFloat3 float3"," #define FxaaFloat4 float4"," #define FxaaHalf half"," #define FxaaHalf2 half2"," #define FxaaHalf3 half3"," #define FxaaHalf4 half4"," #define FxaaSat(x) saturate(x)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_100 == 1)"," #define FxaaTexTop(t, p) texture2D(t, p, 0.0)"," #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), 0.0)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_120 == 1)"," // Requires,"," // #version 120"," // And at least,"," // #extension GL_EXT_gpu_shader4 : enable"," // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)"," #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)"," #if (FXAA_FAST_PIXEL_OFFSET == 1)"," #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)"," #else"," #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)"," #endif"," #if (FXAA_GATHER4_ALPHA == 1)"," // use #extension GL_ARB_gpu_shader5 : enable"," #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)"," #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)"," #define FxaaTexGreen4(t, p) textureGather(t, p, 1)"," #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)"," #endif","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_130 == 1)",' // Requires "#version 130" or better'," #define FxaaTexTop(t, p) textureLod(t, p, 0.0)"," #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)"," #if (FXAA_GATHER4_ALPHA == 1)"," // use #extension GL_ARB_gpu_shader5 : enable"," #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)"," #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)"," #define FxaaTexGreen4(t, p) textureGather(t, p, 1)"," #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)"," #endif","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_3 == 1)"," #define FxaaInt2 float2"," #define FxaaTex sampler2D"," #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))"," #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_4 == 1)"," #define FxaaInt2 int2"," struct FxaaTex { SamplerState smpl; Texture2D tex; };"," #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)"," #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_5 == 1)"," #define FxaaInt2 int2"," struct FxaaTex { SamplerState smpl; Texture2D tex; };"," #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)"," #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)"," #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)"," #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)"," #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)"," #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)","#endif","","","/*============================================================================"," GREEN AS LUMA OPTION SUPPORT FUNCTION","============================================================================*/","#if (FXAA_GREEN_AS_LUMA == 0)"," FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }","#else"," FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }","#endif","","","","","/*============================================================================",""," FXAA3 QUALITY - PC","","============================================================================*/","#if (FXAA_PC == 1)","/*--------------------------------------------------------------------------*/","FxaaFloat4 FxaaPixelShader("," //"," // Use noperspective interpolation here (turn off perspective interpolation)."," // {xy} = center of pixel"," FxaaFloat2 pos,"," //"," // Used only for FXAA Console, and not used on the 360 version."," // Use noperspective interpolation here (turn off perspective interpolation)."," // {xy_} = upper left of pixel"," // {_zw} = lower right of pixel"," FxaaFloat4 fxaaConsolePosPos,"," //"," // Input color texture."," // {rgb_} = color in linear or perceptual color space"," // if (FXAA_GREEN_AS_LUMA == 0)"," // {__a} = luma in perceptual color space (not linear)"," FxaaTex tex,"," //"," // Only used on the optimized 360 version of FXAA Console.",' // For everything but 360, just use the same input here as for "tex".'," // For 360, same texture, just alias with a 2nd sampler."," // This sampler needs to have an exponent bias of -1."," FxaaTex fxaaConsole360TexExpBiasNegOne,"," //"," // Only used on the optimized 360 version of FXAA Console.",' // For everything but 360, just use the same input here as for "tex".'," // For 360, same texture, just alias with a 3nd sampler."," // This sampler needs to have an exponent bias of -2."," FxaaTex fxaaConsole360TexExpBiasNegTwo,"," //"," // Only used on FXAA Quality."," // This must be from a constant/uniform."," // {x_} = 1.0/screenWidthInPixels"," // {_y} = 1.0/screenHeightInPixels"," FxaaFloat2 fxaaQualityRcpFrame,"," //"," // Only used on FXAA Console."," // This must be from a constant/uniform."," // This effects sub-pixel AA quality and inversely sharpness."," // Where N ranges between,"," // N = 0.50 (default)"," // N = 0.33 (sharper)"," // {x__} = -N/screenWidthInPixels"," // {_y_} = -N/screenHeightInPixels"," // {_z_} = N/screenWidthInPixels"," // {__w} = N/screenHeightInPixels"," FxaaFloat4 fxaaConsoleRcpFrameOpt,"," //"," // Only used on FXAA Console."," // Not used on 360, but used on PS3 and PC."," // This must be from a constant/uniform."," // {x__} = -2.0/screenWidthInPixels"," // {_y_} = -2.0/screenHeightInPixels"," // {_z_} = 2.0/screenWidthInPixels"," // {__w} = 2.0/screenHeightInPixels"," FxaaFloat4 fxaaConsoleRcpFrameOpt2,"," //"," // Only used on FXAA Console."," // Only used on 360 in place of fxaaConsoleRcpFrameOpt2."," // This must be from a constant/uniform."," // {x__} = 8.0/screenWidthInPixels"," // {_y_} = 8.0/screenHeightInPixels"," // {_z_} = -4.0/screenWidthInPixels"," // {__w} = -4.0/screenHeightInPixels"," FxaaFloat4 fxaaConsole360RcpFrameOpt2,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_SUBPIX define."," // It is here now to allow easier tuning."," // Choose the amount of sub-pixel aliasing removal."," // This can effect sharpness."," // 1.00 - upper limit (softer)"," // 0.75 - default amount of filtering"," // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)"," // 0.25 - almost off"," // 0.00 - completely off"," FxaaFloat fxaaQualitySubpix,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define."," // It is here now to allow easier tuning."," // The minimum amount of local contrast required to apply algorithm."," // 0.333 - too little (faster)"," // 0.250 - low quality"," // 0.166 - default"," // 0.125 - high quality"," // 0.063 - overkill (slower)"," FxaaFloat fxaaQualityEdgeThreshold,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define."," // It is here now to allow easier tuning."," // Trims the algorithm from processing darks."," // 0.0833 - upper limit (default, the start of visible unfiltered edges)"," // 0.0625 - high quality (faster)"," // 0.0312 - visible limit (slower)"," // Special notes when using FXAA_GREEN_AS_LUMA,"," // Likely want to set this to zero."," // As colors that are mostly not-green"," // will appear very dark in the green channel!"," // Tune by looking at mostly non-green content,"," // then start at zero and increase until aliasing is a problem."," FxaaFloat fxaaQualityEdgeThresholdMin,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_SHARPNESS define."," // It is here now to allow easier tuning."," // This does not effect PS3, as this needs to be compiled in."," // Use FXAA_CONSOLE_PS3_EDGE_SHARPNESS for PS3."," // Due to the PS3 being ALU bound,"," // there are only three safe values here: 2 and 4 and 8."," // These options use the shaders ability to a free *|/ by 2|4|8."," // For all other platforms can be a non-power of two."," // 8.0 is sharper (default!!!)"," // 4.0 is softer"," // 2.0 is really soft (good only for vector graphics inputs)"," FxaaFloat fxaaConsoleEdgeSharpness,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD define."," // It is here now to allow easier tuning."," // This does not effect PS3, as this needs to be compiled in."," // Use FXAA_CONSOLE_PS3_EDGE_THRESHOLD for PS3."," // Due to the PS3 being ALU bound,"," // there are only two safe values here: 1/4 and 1/8."," // These options use the shaders ability to a free *|/ by 2|4|8."," // The console setting has a different mapping than the quality setting."," // Other platforms can use other values."," // 0.125 leaves less aliasing, but is softer (default!!!)"," // 0.25 leaves more aliasing, and is sharper"," FxaaFloat fxaaConsoleEdgeThreshold,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD_MIN define."," // It is here now to allow easier tuning."," // Trims the algorithm from processing darks."," // The console setting has a different mapping than the quality setting."," // This only applies when FXAA_EARLY_EXIT is 1."," // This does not apply to PS3,"," // PS3 was simplified to avoid more shader instructions."," // 0.06 - faster but more aliasing in darks"," // 0.05 - default"," // 0.04 - slower and less aliasing in darks"," // Special notes when using FXAA_GREEN_AS_LUMA,"," // Likely want to set this to zero."," // As colors that are mostly not-green"," // will appear very dark in the green channel!"," // Tune by looking at mostly non-green content,"," // then start at zero and increase until aliasing is a problem."," FxaaFloat fxaaConsoleEdgeThresholdMin,"," //"," // Extra constants for 360 FXAA Console only."," // Use zeros or anything else for other platforms."," // These must be in physical constant registers and NOT immedates."," // Immedates will result in compiler un-optimizing."," // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)"," FxaaFloat4 fxaaConsole360ConstDir",") {","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posM;"," posM.x = pos.x;"," posM.y = pos.y;"," #if (FXAA_GATHER4_ALPHA == 1)"," #if (FXAA_DISCARD == 0)"," FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);"," #if (FXAA_GREEN_AS_LUMA == 0)"," #define lumaM rgbyM.w"," #else"," #define lumaM rgbyM.y"," #endif"," #endif"," #if (FXAA_GREEN_AS_LUMA == 0)"," FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);"," FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));"," #else"," FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);"," FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));"," #endif"," #if (FXAA_DISCARD == 1)"," #define lumaM luma4A.w"," #endif"," #define lumaE luma4A.z"," #define lumaS luma4A.x"," #define lumaSE luma4A.y"," #define lumaNW luma4B.w"," #define lumaN luma4B.z"," #define lumaW luma4B.x"," #else"," FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);"," #if (FXAA_GREEN_AS_LUMA == 0)"," #define lumaM rgbyM.w"," #else"," #define lumaM rgbyM.y"," #endif"," #if (FXAA_GLSL_100 == 1)"," FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0, 1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 0.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 0.0), fxaaQualityRcpFrame.xy));"," #else"," FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));"," #endif"," #endif","/*--------------------------------------------------------------------------*/"," FxaaFloat maxSM = max(lumaS, lumaM);"," FxaaFloat minSM = min(lumaS, lumaM);"," FxaaFloat maxESM = max(lumaE, maxSM);"," FxaaFloat minESM = min(lumaE, minSM);"," FxaaFloat maxWN = max(lumaN, lumaW);"," FxaaFloat minWN = min(lumaN, lumaW);"," FxaaFloat rangeMax = max(maxWN, maxESM);"," FxaaFloat rangeMin = min(minWN, minESM);"," FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;"," FxaaFloat range = rangeMax - rangeMin;"," FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);"," FxaaBool earlyExit = range < rangeMaxClamped;","/*--------------------------------------------------------------------------*/"," if(earlyExit)"," #if (FXAA_DISCARD == 1)"," FxaaDiscard;"," #else"," return rgbyM;"," #endif","/*--------------------------------------------------------------------------*/"," #if (FXAA_GATHER4_ALPHA == 0)"," #if (FXAA_GLSL_100 == 1)"," FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 1.0), fxaaQualityRcpFrame.xy));"," #else"," FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));"," #endif"," #else"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));"," #endif","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNS = lumaN + lumaS;"," FxaaFloat lumaWE = lumaW + lumaE;"," FxaaFloat subpixRcpRange = 1.0/range;"," FxaaFloat subpixNSWE = lumaNS + lumaWE;"," FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;"," FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNESE = lumaNE + lumaSE;"," FxaaFloat lumaNWNE = lumaNW + lumaNE;"," FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;"," FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNWSW = lumaNW + lumaSW;"," FxaaFloat lumaSWSE = lumaSW + lumaSE;"," FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);"," FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);"," FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;"," FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;"," FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;"," FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;","/*--------------------------------------------------------------------------*/"," FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;"," FxaaFloat lengthSign = fxaaQualityRcpFrame.x;"," FxaaBool horzSpan = edgeHorz >= edgeVert;"," FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;","/*--------------------------------------------------------------------------*/"," if(!horzSpan) lumaN = lumaW;"," if(!horzSpan) lumaS = lumaE;"," if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;"," FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;","/*--------------------------------------------------------------------------*/"," FxaaFloat gradientN = lumaN - lumaM;"," FxaaFloat gradientS = lumaS - lumaM;"," FxaaFloat lumaNN = lumaN + lumaM;"," FxaaFloat lumaSS = lumaS + lumaM;"," FxaaBool pairN = abs(gradientN) >= abs(gradientS);"," FxaaFloat gradient = max(abs(gradientN), abs(gradientS));"," if(pairN) lengthSign = -lengthSign;"," FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posB;"," posB.x = posM.x;"," posB.y = posM.y;"," FxaaFloat2 offNP;"," offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;"," offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;"," if(!horzSpan) posB.x += lengthSign * 0.5;"," if( horzSpan) posB.y += lengthSign * 0.5;","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posN;"," posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;"," posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;"," FxaaFloat2 posP;"," posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;"," posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;"," FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;"," FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));"," FxaaFloat subpixE = subpixC * subpixC;"," FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));","/*--------------------------------------------------------------------------*/"," if(!pairN) lumaNN = lumaSS;"," FxaaFloat gradientScaled = gradient * 1.0/4.0;"," FxaaFloat lumaMM = lumaM - lumaNN * 0.5;"," FxaaFloat subpixF = subpixD * subpixE;"," FxaaBool lumaMLTZero = lumaMM < 0.0;","/*--------------------------------------------------------------------------*/"," lumaEndN -= lumaNN * 0.5;"," lumaEndP -= lumaNN * 0.5;"," FxaaBool doneN = abs(lumaEndN) >= gradientScaled;"," FxaaBool doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;"," FxaaBool doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;","/*--------------------------------------------------------------------------*/"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 3)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 4)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 5)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 6)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 7)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 8)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 9)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 10)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 11)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 12)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }","/*--------------------------------------------------------------------------*/"," FxaaFloat dstN = posM.x - posN.x;"," FxaaFloat dstP = posP.x - posM.x;"," if(!horzSpan) dstN = posM.y - posN.y;"," if(!horzSpan) dstP = posP.y - posM.y;","/*--------------------------------------------------------------------------*/"," FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;"," FxaaFloat spanLength = (dstP + dstN);"," FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;"," FxaaFloat spanLengthRcp = 1.0/spanLength;","/*--------------------------------------------------------------------------*/"," FxaaBool directionN = dstN < dstP;"," FxaaFloat dst = min(dstN, dstP);"," FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;"," FxaaFloat subpixG = subpixF * subpixF;"," FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;"," FxaaFloat subpixH = subpixG * fxaaQualitySubpix;","/*--------------------------------------------------------------------------*/"," FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;"," FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);"," if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;"," if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;"," #if (FXAA_DISCARD == 1)"," return FxaaTexTop(tex, posM);"," #else"," return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);"," #endif","}","/*==========================================================================*/","#endif","","void main() {"," gl_FragColor = FxaaPixelShader("," vUv,"," vec4(0.0),"," tDiffuse,"," tDiffuse,"," tDiffuse,"," resolution,"," vec4(0.0),"," vec4(0.0),"," vec4(0.0),"," 0.75,"," 0.166,"," 0.0833,"," 0.0,"," 0.0,"," 0.0,"," vec4(0.0)"," );",""," // TODO avoid querying texture twice for same texel"," gl_FragColor.a = texture2D(tDiffuse, vUv).a;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );","gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},h:{value:1/512},r:{value:.35}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","uniform float r;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","float hh = h * abs( r - vUv.y );","sum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},hue:{value:0},saturation:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float hue;","uniform float saturation;","varying vec2 vUv;","void main() {","gl_FragColor = texture2D( tDiffuse, vUv );","float angle = hue * 3.14159265;","float s = sin(angle), c = cos(angle);","vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;","float len = length(gl_FragColor.rgb);","gl_FragColor.rgb = vec3(","dot(gl_FragColor.rgb, weights.xyz),","dot(gl_FragColor.rgb, weights.zxy),","dot(gl_FragColor.rgb, weights.yzx)",");","float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;","if (saturation > 0.0) {","gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));","} else {","gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);","}","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},sides:{value:6},angle:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float sides;","uniform float angle;","varying vec2 vUv;","void main() {","vec2 p = vUv - 0.5;","float r = length(p);","float a = atan(p.y, p.x) + angle;","float tau = 2. * 3.1416 ;","a = mod(a, tau/sides);","a = abs(a - tau/sides/2.) ;","p = r * vec2(cos(a), sin(a));","vec4 color = texture2D(tDiffuse, p + 0.5);","gl_FragColor = color;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},side:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform int side;","varying vec2 vUv;","void main() {","vec2 p = vUv;","if (side == 0){","if (p.x > 0.5) p.x = 1.0 - p.x;","}else if (side == 1){","if (p.x < 0.5) p.x = 1.0 - p.x;","}else if (side == 2){","if (p.y < 0.5) p.y = 1.0 - p.y;","}else if (side == 3){","if (p.y > 0.5) p.y = 1.0 - p.y;","} ","vec4 color = texture2D(tDiffuse, p);","gl_FragColor = color;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));var n={uniforms:{heightMap:{value:null},resolution:{value:new a.Vector2(512,512)},scale:{value:new a.Vector2(1,1)},height:{value:.05}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float height;","uniform vec2 resolution;","uniform sampler2D heightMap;","varying vec2 vUv;","void main() {","float val = texture2D( heightMap, vUv ).x;","float valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;","float valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;","gl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );","}"].join("\n")};t.default=n},function(e,t,r){"use strict";var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0));a.ShaderLib.ocean_sim_vertex={vertexShader:["varying vec2 vUV;","void main (void) {","vUV = position.xy * 0.5 + 0.5;","gl_Position = vec4(position, 1.0 );","}"].join("\n")},a.ShaderLib.ocean_subtransform={uniforms:{u_input:{value:null},u_transformSize:{value:512},u_subtransformSize:{value:250}},fragmentShader:["precision highp float;","#include <common>","uniform sampler2D u_input;","uniform float u_transformSize;","uniform float u_subtransformSize;","varying vec2 vUV;","vec2 multiplyComplex (vec2 a, vec2 b) {","return vec2(a[0] * b[0] - a[1] * b[1], a[1] * b[0] + a[0] * b[1]);","}","void main (void) {","#ifdef HORIZONTAL","float index = vUV.x * u_transformSize - 0.5;","#else","float index = vUV.y * u_transformSize - 0.5;","#endif","float evenIndex = floor(index / u_subtransformSize) * (u_subtransformSize * 0.5) + mod(index, u_subtransformSize * 0.5);","#ifdef HORIZONTAL","vec4 even = texture2D(u_input, vec2(evenIndex + 0.5, gl_FragCoord.y) / u_transformSize).rgba;","vec4 odd = texture2D(u_input, vec2(evenIndex + u_transformSize * 0.5 + 0.5, gl_FragCoord.y) / u_transformSize).rgba;","#else","vec4 even = texture2D(u_input, vec2(gl_FragCoord.x, evenIndex + 0.5) / u_transformSize).rgba;","vec4 odd = texture2D(u_input, vec2(gl_FragCoord.x, evenIndex + u_transformSize * 0.5 + 0.5) / u_transformSize).rgba;","#endif","float twiddleArgument = -2.0 * PI * (index / u_subtransformSize);","vec2 twiddle = vec2(cos(twiddleArgument), sin(twiddleArgument));","vec2 outputA = even.xy + multiplyComplex(twiddle, odd.xy);","vec2 outputB = even.zw + multiplyComplex(twiddle, odd.zw);","gl_FragColor = vec4(outputA, outputB);","}"].join("\n")},a.ShaderLib.ocean_initial_spectrum={uniforms:{u_wind:{value:new a.Vector2(10,10)},u_resolution:{value:512},u_size:{value:250}},fragmentShader:["precision highp float;","#include <common>","const float G = 9.81;","const float KM = 370.0;","const float CM = 0.23;","uniform vec2 u_wind;","uniform float u_resolution;","uniform float u_size;","float omega (float k) {","return sqrt(G * k * (1.0 + pow2(k / KM)));","}","float tanh (float x) {","return (1.0 - exp(-2.0 * x)) / (1.0 + exp(-2.0 * x));","}","void main (void) {","vec2 coordinates = gl_FragCoord.xy - 0.5;","float n = (coordinates.x < u_resolution * 0.5) ? coordinates.x : coordinates.x - u_resolution;","float m = (coordinates.y < u_resolution * 0.5) ? coordinates.y : coordinates.y - u_resolution;","vec2 K = (2.0 * PI * vec2(n, m)) / u_size;","float k = length(K);","float l_wind = length(u_wind);","float Omega = 0.84;","float kp = G * pow2(Omega / l_wind);","float c = omega(k) / k;","float cp = omega(kp) / kp;","float Lpm = exp(-1.25 * pow2(kp / k));","float gamma = 1.7;","float sigma = 0.08 * (1.0 + 4.0 * pow(Omega, -3.0));","float Gamma = exp(-pow2(sqrt(k / kp) - 1.0) / 2.0 * pow2(sigma));","float Jp = pow(gamma, Gamma);","float Fp = Lpm * Jp * exp(-Omega / sqrt(10.0) * (sqrt(k / kp) - 1.0));","float alphap = 0.006 * sqrt(Omega);","float Bl = 0.5 * alphap * cp / c * Fp;","float z0 = 0.000037 * pow2(l_wind) / G * pow(l_wind / cp, 0.9);","float uStar = 0.41 * l_wind / log(10.0 / z0);","float alpham = 0.01 * ((uStar < CM) ? (1.0 + log(uStar / CM)) : (1.0 + 3.0 * log(uStar / CM)));","float Fm = exp(-0.25 * pow2(k / KM - 1.0));","float Bh = 0.5 * alpham * CM / c * Fm * Lpm;","float a0 = log(2.0) / 4.0;","float am = 0.13 * uStar / CM;","float Delta = tanh(a0 + 4.0 * pow(c / cp, 2.5) + am * pow(CM / c, 2.5));","float cosPhi = dot(normalize(u_wind), normalize(K));","float S = (1.0 / (2.0 * PI)) * pow(k, -4.0) * (Bl + Bh) * (1.0 + Delta * (2.0 * cosPhi * cosPhi - 1.0));","float dk = 2.0 * PI / u_size;","float h = sqrt(S / 2.0) * dk;","if (K.x == 0.0 && K.y == 0.0) {","h = 0.0;","}","gl_FragColor = vec4(h, 0.0, 0.0, 0.0);","}"].join("\n")},a.ShaderLib.ocean_phase={uniforms:{u_phases:{value:null},u_deltaTime:{value:null},u_resolution:{value:null},u_size:{value:null}},fragmentShader:["precision highp float;","#include <common>","const float G = 9.81;","const float KM = 370.0;","varying vec2 vUV;","uniform sampler2D u_phases;","uniform float u_deltaTime;","uniform float u_resolution;","uniform float u_size;","float omega (float k) {","return sqrt(G * k * (1.0 + k * k / KM * KM));","}","void main (void) {","float deltaTime = 1.0 / 60.0;","vec2 coordinates = gl_FragCoord.xy - 0.5;","float n = (coordinates.x < u_resolution * 0.5) ? coordinates.x : coordinates.x - u_resolution;","float m = (coordinates.y < u_resolution * 0.5) ? coordinates.y : coordinates.y - u_resolution;","vec2 waveVector = (2.0 * PI * vec2(n, m)) / u_size;","float phase = texture2D(u_phases, vUV).r;","float deltaPhase = omega(length(waveVector)) * u_deltaTime;","phase = mod(phase + deltaPhase, 2.0 * PI);","gl_FragColor = vec4(phase, 0.0, 0.0, 0.0);","}"].join("\n")},a.ShaderLib.ocean_spectrum={uniforms:{u_size:{value:null},u_resolution:{value:null},u_choppiness:{value:null},u_phases:{value:null},u_initialSpectrum:{value:null}},fragmentShader:["precision highp float;","#include <common>","const float G = 9.81;","const float KM = 370.0;","varying vec2 vUV;","uniform float u_size;","uniform float u_resolution;","uniform float u_choppiness;","uniform sampler2D u_phases;","uniform sampler2D u_initialSpectrum;","vec2 multiplyComplex (vec2 a, vec2 b) {","return vec2(a[0] * b[0] - a[1] * b[1], a[1] * b[0] + a[0] * b[1]);","}","vec2 multiplyByI (vec2 z) {","return vec2(-z[1], z[0]);","}","float omega (float k) {","return sqrt(G * k * (1.0 + k * k / KM * KM));","}","void main (void) {","vec2 coordinates = gl_FragCoord.xy - 0.5;","float n = (coordinates.x < u_resolution * 0.5) ? coordinates.x : coordinates.x - u_resolution;","float m = (coordinates.y < u_resolution * 0.5) ? coordinates.y : coordinates.y - u_resolution;","vec2 waveVector = (2.0 * PI * vec2(n, m)) / u_size;","float phase = texture2D(u_phases, vUV).r;","vec2 phaseVector = vec2(cos(phase), sin(phase));","vec2 h0 = texture2D(u_initialSpectrum, vUV).rg;","vec2 h0Star = texture2D(u_initialSpectrum, vec2(1.0 - vUV + 1.0 / u_resolution)).rg;","h0Star.y *= -1.0;","vec2 h = multiplyComplex(h0, phaseVector) + multiplyComplex(h0Star, vec2(phaseVector.x, -phaseVector.y));","vec2 hX = -multiplyByI(h * (waveVector.x / length(waveVector))) * u_choppiness;","vec2 hZ = -multiplyByI(h * (waveVector.y / length(waveVector))) * u_choppiness;","if (waveVector.x == 0.0 && waveVector.y == 0.0) {","h = vec2(0.0);","hX = vec2(0.0);","hZ = vec2(0.0);","}","gl_FragColor = vec4(hX + multiplyByI(h), hZ);","}"].join("\n")},a.ShaderLib.ocean_normals={uniforms:{u_displacementMap:{value:null},u_resolution:{value:null},u_size:{value:null}},fragmentShader:["precision highp float;","varying vec2 vUV;","uniform sampler2D u_displacementMap;","uniform float u_resolution;","uniform float u_size;","void main (void) {","float texel = 1.0 / u_resolution;","float texelSize = u_size / u_resolution;","vec3 center = texture2D(u_displacementMap, vUV).rgb;","vec3 right = vec3(texelSize, 0.0, 0.0) + texture2D(u_displacementMap, vUV + vec2(texel, 0.0)).rgb - center;","vec3 left = vec3(-texelSize, 0.0, 0.0) + texture2D(u_displacementMap, vUV + vec2(-texel, 0.0)).rgb - center;","vec3 top = vec3(0.0, 0.0, -texelSize) + texture2D(u_displacementMap, vUV + vec2(0.0, -texel)).rgb - center;","vec3 bottom = vec3(0.0, 0.0, texelSize) + texture2D(u_displacementMap, vUV + vec2(0.0, texel)).rgb - center;","vec3 topRight = cross(right, top);","vec3 topLeft = cross(top, left);","vec3 bottomLeft = cross(left, bottom);","vec3 bottomRight = cross(bottom, right);","gl_FragColor = vec4(normalize(topRight + topLeft + bottomLeft + bottomRight), 1.0);","}"].join("\n")},a.ShaderLib.ocean_main={uniforms:{u_displacementMap:{value:null},u_normalMap:{value:null},u_geometrySize:{value:null},u_size:{value:null},u_projectionMatrix:{value:null},u_viewMatrix:{value:null},u_cameraPosition:{value:null},u_skyColor:{value:null},u_oceanColor:{value:null},u_sunDirection:{value:null},u_exposure:{value:null}},vertexShader:["precision highp float;","varying vec3 vPos;","varying vec2 vUV;","uniform mat4 u_projectionMatrix;","uniform mat4 u_viewMatrix;","uniform float u_size;","uniform float u_geometrySize;","uniform sampler2D u_displacementMap;","void main (void) {","vec3 newPos = position + texture2D(u_displacementMap, uv).rgb * (u_geometrySize / u_size);","vPos = newPos;","vUV = uv;","gl_Position = u_projectionMatrix * u_viewMatrix * vec4(newPos, 1.0);","}"].join("\n"),fragmentShader:["precision highp float;","varying vec3 vPos;","varying vec2 vUV;","uniform sampler2D u_displacementMap;","uniform sampler2D u_normalMap;","uniform vec3 u_cameraPosition;","uniform vec3 u_oceanColor;","uniform vec3 u_skyColor;","uniform vec3 u_sunDirection;","uniform float u_exposure;","vec3 hdr (vec3 color, float exposure) {","return 1.0 - exp(-color * exposure);","}","void main (void) {","vec3 normal = texture2D(u_normalMap, vUV).rgb;","vec3 view = normalize(u_cameraPosition - vPos);","float fresnel = 0.02 + 0.98 * pow(1.0 - dot(normal, view), 5.0);","vec3 sky = fresnel * u_skyColor;","float diffuse = clamp(dot(normal, normalize(u_sunDirection)), 0.0, 1.0);","vec3 water = (1.0 - fresnel) * u_oceanColor * u_skyColor * diffuse;","vec3 color = sky + water;","gl_FragColor = vec4(hdr(color, u_exposure), 1.0);","}"].join("\n")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={modes:{none:"NO_PARALLAX",basic:"USE_BASIC_PARALLAX",steep:"USE_STEEP_PARALLAX",occlusion:"USE_OCLUSION_PARALLAX",relief:"USE_RELIEF_PARALLAX"},uniforms:{bumpMap:{value:null},map:{value:null},parallaxScale:{value:null},parallaxMinLayers:{value:null},parallaxMaxLayers:{value:null}},vertexShader:["varying vec2 vUv;","varying vec3 vViewPosition;","varying vec3 vNormal;","void main() {","vUv = uv;","vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","vViewPosition = -mvPosition.xyz;","vNormal = normalize( normalMatrix * normal );","gl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform sampler2D bumpMap;","uniform sampler2D map;","uniform float parallaxScale;","uniform float parallaxMinLayers;","uniform float parallaxMaxLayers;","varying vec2 vUv;","varying vec3 vViewPosition;","varying vec3 vNormal;","#ifdef USE_BASIC_PARALLAX","vec2 parallaxMap( in vec3 V ) {","float initialHeight = texture2D( bumpMap, vUv ).r;","vec2 texCoordOffset = parallaxScale * V.xy * initialHeight;","return vUv - texCoordOffset;","}","#else","vec2 parallaxMap( in vec3 V ) {","float numLayers = mix( parallaxMaxLayers, parallaxMinLayers, abs( dot( vec3( 0.0, 0.0, 1.0 ), V ) ) );","float layerHeight = 1.0 / numLayers;","float currentLayerHeight = 0.0;","vec2 dtex = parallaxScale * V.xy / V.z / numLayers;","vec2 currentTextureCoords = vUv;","float heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","for ( int i = 0; i < 30; i += 1 ) {","if ( heightFromTexture <= currentLayerHeight ) {","break;","}","currentLayerHeight += layerHeight;","currentTextureCoords -= dtex;","heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","}","#ifdef USE_STEEP_PARALLAX","return currentTextureCoords;","#elif defined( USE_RELIEF_PARALLAX )","vec2 deltaTexCoord = dtex / 2.0;","float deltaHeight = layerHeight / 2.0;","currentTextureCoords += deltaTexCoord;","currentLayerHeight -= deltaHeight;","const int numSearches = 5;","for ( int i = 0; i < numSearches; i += 1 ) {","deltaTexCoord /= 2.0;","deltaHeight /= 2.0;","heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","if( heightFromTexture > currentLayerHeight ) {","currentTextureCoords -= deltaTexCoord;","currentLayerHeight += deltaHeight;","} else {","currentTextureCoords += deltaTexCoord;","currentLayerHeight -= deltaHeight;","}","}","return currentTextureCoords;","#elif defined( USE_OCLUSION_PARALLAX )","vec2 prevTCoords = currentTextureCoords + dtex;","float nextH = heightFromTexture - currentLayerHeight;","float prevH = texture2D( bumpMap, prevTCoords ).r - currentLayerHeight + layerHeight;","float weight = nextH / ( nextH - prevH );","return prevTCoords * weight + currentTextureCoords * ( 1.0 - weight );","#else","return vUv;","#endif","}","#endif","vec2 perturbUv( vec3 surfPosition, vec3 surfNormal, vec3 viewPosition ) {","vec2 texDx = dFdx( vUv );","vec2 texDy = dFdy( vUv );","vec3 vSigmaX = dFdx( surfPosition );","vec3 vSigmaY = dFdy( surfPosition );","vec3 vR1 = cross( vSigmaY, surfNormal );","vec3 vR2 = cross( surfNormal, vSigmaX );","float fDet = dot( vSigmaX, vR1 );","vec2 vProjVscr = ( 1.0 / fDet ) * vec2( dot( vR1, viewPosition ), dot( vR2, viewPosition ) );","vec3 vProjVtex;","vProjVtex.xy = texDx * vProjVscr.x + texDy * vProjVscr.y;","vProjVtex.z = dot( surfNormal, viewPosition );","return parallaxMap( vProjVtex );","}","void main() {","vec2 mapUv = perturbUv( -vViewPosition, normalize( vNormal ), normalize( vViewPosition ) );","gl_FragColor = texture2D( map, mapUv );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},resolution:{value:null},pixelSize:{value:1}},vertexShader:["varying highp vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float pixelSize;","uniform vec2 resolution;","varying highp vec2 vUv;","void main(){","vec2 dxy = pixelSize / resolution;","vec2 coord = dxy * floor( vUv / dxy );","gl_FragColor = texture2D(tDiffuse, coord);","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},amount:{value:.005},angle:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float amount;","uniform float angle;","varying vec2 vUv;","void main() {","vec2 offset = amount * vec2( cos(angle), sin(angle));","vec4 cr = texture2D(tDiffuse, vUv + offset);","vec4 cga = texture2D(tDiffuse, vUv);","vec4 cb = texture2D(tDiffuse, vUv - offset);","gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},amount:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float amount;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 color = texture2D( tDiffuse, vUv );","vec3 c = color.rgb;","color.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );","color.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );","color.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );","gl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},resolution:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec2 resolution;","varying vec2 vUv;","void main() {","vec2 texel = vec2( 1.0 / resolution.x, 1.0 / resolution.y );","const mat3 Gx = mat3( -1, -2, -1, 0, 0, 0, 1, 2, 1 );","const mat3 Gy = mat3( -1, 0, 1, -2, 0, 2, -1, 0, 1 );","float tx0y0 = texture2D( tDiffuse, vUv + texel * vec2( -1, -1 ) ).r;","float tx0y1 = texture2D( tDiffuse, vUv + texel * vec2( -1, 0 ) ).r;","float tx0y2 = texture2D( tDiffuse, vUv + texel * vec2( -1, 1 ) ).r;","float tx1y0 = texture2D( tDiffuse, vUv + texel * vec2( 0, -1 ) ).r;","float tx1y1 = texture2D( tDiffuse, vUv + texel * vec2( 0, 0 ) ).r;","float tx1y2 = texture2D( tDiffuse, vUv + texel * vec2( 0, 1 ) ).r;","float tx2y0 = texture2D( tDiffuse, vUv + texel * vec2( 1, -1 ) ).r;","float tx2y1 = texture2D( tDiffuse, vUv + texel * vec2( 1, 0 ) ).r;","float tx2y2 = texture2D( tDiffuse, vUv + texel * vec2( 1, 1 ) ).r;","float valueGx = Gx[0][0] * tx0y0 + Gx[1][0] * tx1y0 + Gx[2][0] * tx2y0 + ","Gx[0][1] * tx0y1 + Gx[1][1] * tx1y1 + Gx[2][1] * tx2y1 + ","Gx[0][2] * tx0y2 + Gx[1][2] * tx1y2 + Gx[2][2] * tx2y2; ","float valueGy = Gy[0][0] * tx0y0 + Gy[1][0] * tx1y0 + Gy[2][0] * tx2y0 + ","Gy[0][1] * tx0y1 + Gy[1][1] * tx1y1 + Gy[2][1] * tx2y1 + ","Gy[0][2] * tx0y2 + Gy[1][2] * tx1y2 + Gy[2][2] * tx2y2; ","float G = sqrt( ( valueGx * valueGx ) + ( valueGy * valueGy ) );","gl_FragColor = vec4( vec3( G ), 1 );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );","vec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);","gl_FragColor = newTex;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{texture:{value:null},delta:{value:new(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)).Vector2)(1,1)}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include <common>","#define ITERATIONS 10.0","uniform sampler2D texture;","uniform vec2 delta;","varying vec2 vUv;","void main() {","vec4 color = vec4( 0.0 );","float total = 0.0;","float offset = rand( vUv );","for ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {","float percent = ( t + offset - 0.5 ) / ITERATIONS;","float weight = 1.0 - abs( percent );","color += texture2D( texture, vUv + delta * percent ) * weight;","total += weight;","}","gl_FragColor = color / total;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},v:{value:1/512},r:{value:.35}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","uniform float r;","varying vec2 vUv;","void main() {","vec4 sum = vec4( 0.0 );","float vv = v * abs( r - vUv.y );","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;","sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;","gl_FragColor = sum;","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{tDiffuse:{value:null},offset:{value:1},darkness:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float offset;","uniform float darkness;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","vec4 texel = texture2D( tDiffuse, vUv );","vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );","gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={uniforms:{color:{type:"c",value:null},time:{type:"f",value:0},tDiffuse:{type:"t",value:null},tDudv:{type:"t",value:null},textureMatrix:{type:"m4",value:null}},vertexShader:["uniform mat4 textureMatrix;","varying vec2 vUv;","varying vec4 vUvRefraction;","void main() {","\tvUv = uv;","\tvUvRefraction = textureMatrix * vec4( position, 1.0 );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform float time;","uniform sampler2D tDiffuse;","uniform sampler2D tDudv;","varying vec2 vUv;","varying vec4 vUvRefraction;","float blendOverlay( float base, float blend ) {","\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );","}","vec3 blendOverlay( vec3 base, vec3 blend ) {","\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ),blendOverlay( base.b, blend.b ) );","}","void main() {"," float waveStrength = 0.1;"," float waveSpeed = 0.03;","\tvec2 distortedUv = texture2D( tDudv, vec2( vUv.x + time * waveSpeed, vUv.y ) ).rg * waveStrength;","\tdistortedUv = vUv.xy + vec2( distortedUv.x, distortedUv.y + time * waveSpeed );","\tvec2 distortion = ( texture2D( tDudv, distortedUv ).rg * 2.0 - 1.0 ) * waveStrength;"," vec4 uv = vec4( vUvRefraction );"," uv.xy += distortion;","\tvec4 base = texture2DProj( tDiffuse, uv );","\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );","}"].join("\n")};t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Volume=void 0;var a,n=r(10),i=(a=n)&&a.__esModule?a:{default:a};t.Volume=i.default}]))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r(5);Object.defineProperty(t,"CopyShader",{enumerable:!0,get:function(){return h(a).default}});var n=r(2);Object.defineProperty(t,"Pass",{enumerable:!0,get:function(){return h(n).default}});var i=r(6);Object.defineProperty(t,"ShaderPass",{enumerable:!0,get:function(){return h(i).default}});var o=r(16);Object.defineProperty(t,"RenderingPass",{enumerable:!0,get:function(){return h(o).default}});var s=r(17);Object.defineProperty(t,"TexturePass",{enumerable:!0,get:function(){return h(s).default}});var l=r(18);Object.defineProperty(t,"RenderPass",{enumerable:!0,get:function(){return h(l).default}});var u=r(7);Object.defineProperty(t,"MaskPass",{enumerable:!0,get:function(){return h(u).default}});var c=r(8);Object.defineProperty(t,"ClearMaskPass",{enumerable:!0,get:function(){return h(c).default}});var d=r(19);Object.defineProperty(t,"ClearPass",{enumerable:!0,get:function(){return h(d).default}});var f=r(20);function h(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"default",{enumerable:!0,get:function(){return h(f).default}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tgl_FragColor = opacity * texel;","}"].join("\n")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),o=r(2),s=(a=o)&&a.__esModule?a:{default:a};var l=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.textureID=void 0!==r?r:"tDiffuse",e instanceof i.ShaderMaterial?(a.uniforms=e.uniforms,a.material=e):e&&(a.uniforms=i.UniformsUtils.clone(e.uniforms),a.material=new i.ShaderMaterial({defines:Object.assign({},e.defines),uniforms:a.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),a.fsQuad=new s.default.FullScreenQuad(a.material),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"render",value:function(e,t,r){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=r.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}]),t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),i=r(2);var o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.scene=e,a.camera=r,a.clear=!0,a.needsSwap=!1,a.inverse=!1,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"render",value:function(e,t,r){var a=e.context,n=e.state;n.buffers.color.setMask(!1),n.buffers.depth.setMask(!1),n.buffers.color.setLocked(!0),n.buffers.depth.setLocked(!0);var i=void 0,o=void 0;this.inverse?(i=0,o=1):(i=1,o=0),n.buffers.stencil.setTest(!0),n.buffers.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),n.buffers.stencil.setFunc(a.ALWAYS,i,4294967295),n.buffers.stencil.setClear(o),e.setRenderTarget(r),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),n.buffers.color.setLocked(!1),n.buffers.depth.setLocked(!1),n.buffers.stencil.setFunc(a.EQUAL,1,4294967295),n.buffers.stencil.setOp(a.KEEP,a.KEEP,a.KEEP)}}]),t}(((a=i)&&a.__esModule?a:{default:a}).default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),i=r(2);var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.needsSwap=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"render",value:function(e){e.state.buffers.stencil.setTest(!1)}}]),t}(((a=i)&&a.__esModule?a:{default:a}).default);t.default=o},function(e,t,r){e.exports=function(){"use strict";function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{tolerance:0};if(!e)throw new Error("You should specify the element you want to test");"string"==typeof e&&(e=document.querySelector(e));var r=e.getBoundingClientRect();return(r.bottom-t.tolerance>0&&r.right-t.tolerance>0&&r.left+t.tolerance<(window.innerWidth||document.documentElement.clientWidth)&&r.top+t.tolerance<(window.innerHeight||document.documentElement.clientHeight))}function t(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{tolerance:0,container:""};if(!e)throw new Error("You should specify the element you want to test");if("string"==typeof e&&(e=document.querySelector(e)),"string"==typeof t&&(t={tolerance:0,container:document.querySelector(t)}),"string"==typeof t.container&&(t.container=document.querySelector(t.container)),t instanceof HTMLElement&&(t={tolerance:0,container:t}),!t.container)throw new Error("You should specify a container element");var r=t.container.getBoundingClientRect();return(e.offsetTop+e.clientHeight-t.tolerance>t.container.scrollTop&&e.offsetLeft+e.clientWidth-t.tolerance>t.container.scrollLeft&&e.offsetLeft+t.tolerance<r.width+t.container.scrollLeft&&e.offsetTop+t.tolerance<r.height+t.container.scrollTop)}function r(){var e,t,r,a=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{tolerance:0,debounce:100,container:window};this.options={},this.trackedElements={},Object.defineProperties(this.options,{container:{configurable:!1,enumerable:!1,get:function(){var e=void 0;return"string"==typeof n.container?e=document.querySelector(n.container):n.container instanceof HTMLElement&&(e=n.container),e||window},set:function(e){n.container=e}},debounce:{get:function(){return parseInt(n.debounce,10)||100},set:function(e){n.debounce=e}},tolerance:{get:function(){return parseInt(n.tolerance,10)||0},set:function(e){n.tolerance=e}}}),Object.defineProperty(this,"_scroll",{enumerable:!1,configurable:!1,writable:!1,value:this._debouncedScroll.call(this)}),e=document.querySelector("body"),t=function(){Object.keys(a.trackedElements).forEach((function(e){a.on("enter",e),a.on("leave",e)}))},(r=window.MutationObserver||window.WebKitMutationObserver)?new r(t).observe(e,{childList:!0,subtree:!0}):(e.addEventListener("DOMNodeInserted",t,!1),e.addEventListener("DOMNodeRemoved",t,!1)),this.attach()}return Object.defineProperties(r.prototype,{_debouncedScroll:{configurable:!1,writable:!1,enumerable:!1,value:function(){var r=this,a=void 0;return function(){clearTimeout(a),a=setTimeout((function(){!function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{tolerance:0},n=Object.keys(r),i=void 0;n.length&&(i=a.container===window?e:t,n.forEach((function(e){r[e].nodes.forEach((function(t){if(i(t.node,a)?(t.wasVisible=t.isVisible,t.isVisible=!0):(t.wasVisible=t.isVisible,t.isVisible=!1),!0===t.isVisible&&!1===t.wasVisible){if(!r[e].enter)return;Object.keys(r[e].enter).forEach((function(a){"function"==typeof r[e].enter[a]&&r[e].enter[a](t.node,"enter")}))}if(!1===t.isVisible&&!0===t.wasVisible){if(!r[e].leave)return;Object.keys(r[e].leave).forEach((function(a){"function"==typeof r[e].leave[a]&&r[e].leave[a](t.node,"leave")}))}}))})))}(r.trackedElements,r.options)}),r.options.debounce)}}},attach:{configurable:!1,writable:!1,enumerable:!1,value:function(){var e=this.options.container;e instanceof HTMLElement&&"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),e.addEventListener("scroll",this._scroll,{passive:!0}),window.addEventListener("resize",this._scroll,{passive:!0}),this._scroll(),this.attached=!0}},destroy:{configurable:!1,writable:!1,enumerable:!1,value:function(){this.options.container.removeEventListener("scroll",this._scroll),window.removeEventListener("resize",this._scroll),this.attached=!1}},off:{configurable:!1,writable:!1,enumerable:!1,value:function(e,t,r){var a=Object.keys(this.trackedElements[t].enter||{}),n=Object.keys(this.trackedElements[t].leave||{});if({}.hasOwnProperty.call(this.trackedElements,t))if(r){if(this.trackedElements[t][e]){var i="function"==typeof r?r.name:r;delete this.trackedElements[t][e][i]}}else delete this.trackedElements[t][e];a.length||n.length||delete this.trackedElements[t]}},on:{configurable:!1,writable:!1,enumerable:!1,value:function(e,t,r){if(!e)throw new Error("No event given. Choose either enter or leave");if(!t)throw new Error("No selector to track");if(["enter","leave"].indexOf(e)<0)throw new Error(e+" event is not supported");({}).hasOwnProperty.call(this.trackedElements,t)||(this.trackedElements[t]={}),this.trackedElements[t].nodes=[];for(var a=0,n=document.querySelectorAll(t);a<n.length;a++){var i={isVisible:!1,wasVisible:!1,node:n[a]};this.trackedElements[t].nodes.push(i)}"function"==typeof r&&(this.trackedElements[t][e]||(this.trackedElements[t][e]={}),this.trackedElements[t][e][r.name||"anonymous"]=r)}}}),r.check=e,r}()},function(e,t){e.exports=jQuery},function(e,t,r){var a;e.exports=((a=function(){function e(e){return n.appendChild(e.dom),e}function t(e){for(var t=0;t<n.children.length;t++)n.children[t].style.display=t===e?"block":"none";r=e}var r=0,n=document.createElement("div");n.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",n.addEventListener("click",(function(e){e.preventDefault(),t(++r%n.children.length)}),!1);var i=(performance||Date).now(),o=i,s=0,l=e(new a.Panel("FPS","#0ff","#002")),u=e(new a.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new a.Panel("MB","#f08","#201"));return t(0),{REVISION:16,dom:n,addPanel:e,showPanel:t,begin:function(){i=(performance||Date).now()},end:function(){s++;var e=(performance||Date).now();if(u.update(e-i,200),e>o+1e3&&(l.update(1e3*s/(e-o),100),o=e,s=0,c)){var t=performance.memory;c.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){i=this.end()},domElement:n,setMode:t}}).Panel=function(e,t,r){var a=1/0,n=0,i=Math.round,o=i(window.devicePixelRatio||1),s=80*o,l=48*o,u=3*o,c=2*o,d=3*o,f=15*o,h=74*o,p=30*o,m=document.createElement("canvas");m.width=s,m.height=l,m.style.cssText="width:80px;height:48px";var v=m.getContext("2d");return v.font="bold "+9*o+"px Helvetica,Arial,sans-serif",v.textBaseline="top",v.fillStyle=r,v.fillRect(0,0,s,l),v.fillStyle=t,v.fillText(e,u,c),v.fillRect(d,f,h,p),v.fillStyle=r,v.globalAlpha=.9,v.fillRect(d,f,h,p),{dom:m,update:function(l,g){a=Math.min(a,l),n=Math.max(n,l),v.fillStyle=r,v.globalAlpha=1,v.fillRect(0,0,s,f),v.fillStyle=t,v.fillText(i(l)+" "+e+" ("+i(a)+"-"+i(n)+")",u,c),v.drawImage(m,d+o,f,h-o,p,d,f,h-o,p),v.fillRect(d+h-o,f,o,p),v.fillStyle=r,v.globalAlpha=.9,v.fillRect(d+h-o,f,o,i((1-l/g)*p))}}},a)},function(e,t,r){(function(a){function n(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==a&&"env"in a&&(e=a.env.DEBUG),e}(t=e.exports=r(22)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var a="color: "+this.color;e.splice(1,0,a,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),e.splice(i,0,a)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=n,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(n())}).call(this,r(21))},function(e,t,r){"use strict";var a=r(0);function n(e,t){var r,n,i,o,s;this.object=e,this.domElement=void 0!==t?t:document,this.enabled=!0,this.target=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.25,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.enableKeys=!0,this.keys={LEFT:37,UP:38,RIGHT:39,BOTTOM:40},this.mouseButtons={ORBIT:a.MOUSE.LEFT,ZOOM:a.MOUSE.MIDDLE,PAN:a.MOUSE.RIGHT},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=function(){return m.phi},this.getAzimuthalAngle=function(){return m.theta},this.saveState=function(){l.target0.copy(l.target),l.position0.copy(l.object.position),l.zoom0=l.object.zoom},this.reset=function(){l.target.copy(l.target0),l.object.position.copy(l.position0),l.object.zoom=l.zoom0,l.object.updateProjectionMatrix(),l.dispatchEvent(u),l.update(),h=f.NONE},this.update=(r=new a.Vector3,n=(new a.Quaternion).setFromUnitVectors(e.up,new a.Vector3(0,1,0)),i=n.clone().inverse(),o=new a.Vector3,s=new a.Quaternion,function(){var e=l.object.position;return r.copy(e).sub(l.target),r.applyQuaternion(n),m.setFromVector3(r),l.autoRotate&&h===f.NONE&&L(2*Math.PI/60/60*l.autoRotateSpeed),m.theta+=v.theta,m.phi+=v.phi,m.theta=Math.max(l.minAzimuthAngle,Math.min(l.maxAzimuthAngle,m.theta)),m.phi=Math.max(l.minPolarAngle,Math.min(l.maxPolarAngle,m.phi)),m.makeSafe(),m.radius*=g,m.radius=Math.max(l.minDistance,Math.min(l.maxDistance,m.radius)),l.target.add(y),r.setFromSpherical(m),r.applyQuaternion(i),e.copy(l.target).add(r),l.object.lookAt(l.target),!0===l.enableDamping?(v.theta*=1-l.dampingFactor,v.phi*=1-l.dampingFactor):v.set(0,0,0),g=1,y.set(0,0,0),!!(x||o.distanceToSquared(l.object.position)>p||8*(1-s.dot(l.object.quaternion))>p)&&(l.dispatchEvent(u),o.copy(l.object.position),s.copy(l.object.quaternion),x=!1,!0)}),this.dispose=function(){l.domElement.removeEventListener("contextmenu",Y,!1),l.domElement.removeEventListener("mousedown",k,!1),l.domElement.removeEventListener("wheel",V,!1),l.domElement.removeEventListener("touchstart",z,!1),l.domElement.removeEventListener("touchend",H,!1),l.domElement.removeEventListener("touchmove",X,!1),document.removeEventListener("mousemove",B,!1),document.removeEventListener("mouseup",j,!1),window.removeEventListener("keydown",G,!1)};var l=this,u={type:"change"},c={type:"start"},d={type:"end"},f={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_DOLLY:4,TOUCH_PAN:5},h=f.NONE,p=1e-6,m=new a.Spherical,v=new a.Spherical,g=1,y=new a.Vector3,x=!1,b=new a.Vector2,w=new a.Vector2,A=new a.Vector2,M=new a.Vector2,T=new a.Vector2,S=new a.Vector2,E=new a.Vector2,_=new a.Vector2,F=new a.Vector2;function P(){return Math.pow(.95,l.zoomSpeed)}function L(e){v.theta-=e}function C(e){v.phi-=e}var O,N=(O=new a.Vector3,function(e,t){O.setFromMatrixColumn(t,0),O.multiplyScalar(-e),y.add(O)}),R=function(){var e=new a.Vector3;return function(t,r){e.setFromMatrixColumn(r,1),e.multiplyScalar(t),y.add(e)}}(),I=function(){var e=new a.Vector3;return function(t,r){var n=l.domElement===document?l.domElement.body:l.domElement;if(l.object instanceof a.PerspectiveCamera){var i=l.object.position;e.copy(i).sub(l.target);var o=e.length();o*=Math.tan(l.object.fov/2*Math.PI/180),N(2*t*o/n.clientHeight,l.object.matrix),R(2*r*o/n.clientHeight,l.object.matrix)}else l.object instanceof a.OrthographicCamera?(N(t*(l.object.right-l.object.left)/l.object.zoom/n.clientWidth,l.object.matrix),R(r*(l.object.top-l.object.bottom)/l.object.zoom/n.clientHeight,l.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),l.enablePan=!1)}}();function D(e){l.object instanceof a.PerspectiveCamera?g/=e:l.object instanceof a.OrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom*e)),l.object.updateProjectionMatrix(),x=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function U(e){l.object instanceof a.PerspectiveCamera?g*=e:l.object instanceof a.OrthographicCamera?(l.object.zoom=Math.max(l.minZoom,Math.min(l.maxZoom,l.object.zoom/e)),l.object.updateProjectionMatrix(),x=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),l.enableZoom=!1)}function k(e){if(!1!==l.enabled){switch(e.preventDefault(),e.button){case l.mouseButtons.ORBIT:if(!1===l.enableRotate)return;!function(e){b.set(e.clientX,e.clientY)}(e),h=f.ROTATE;break;case l.mouseButtons.ZOOM:if(!1===l.enableZoom)return;!function(e){E.set(e.clientX,e.clientY)}(e),h=f.DOLLY;break;case l.mouseButtons.PAN:if(!1===l.enablePan)return;!function(e){M.set(e.clientX,e.clientY)}(e),h=f.PAN}h!==f.NONE&&(document.addEventListener("mousemove",B,!1),document.addEventListener("mouseup",j,!1),l.dispatchEvent(c))}}function B(e){if(!1!==l.enabled)switch(e.preventDefault(),h){case f.ROTATE:if(!1===l.enableRotate)return;!function(e){w.set(e.clientX,e.clientY),A.subVectors(w,b);var t=l.domElement===document?l.domElement.body:l.domElement;L(2*Math.PI*A.x/t.clientWidth*l.rotateSpeed),C(2*Math.PI*A.y/t.clientHeight*l.rotateSpeed),b.copy(w),l.update()}(e);break;case f.DOLLY:if(!1===l.enableZoom)return;!function(e){_.set(e.clientX,e.clientY),F.subVectors(_,E),F.y>0?D(P()):F.y<0&&U(P()),E.copy(_),l.update()}(e);break;case f.PAN:if(!1===l.enablePan)return;!function(e){T.set(e.clientX,e.clientY),S.subVectors(T,M),I(S.x,S.y),M.copy(T),l.update()}(e)}}function j(e){!1!==l.enabled&&(document.removeEventListener("mousemove",B,!1),document.removeEventListener("mouseup",j,!1),l.dispatchEvent(d),h=f.NONE)}function V(e){!1===l.enabled||!1===l.enableZoom||h!==f.NONE&&h!==f.ROTATE||(e.preventDefault(),e.stopPropagation(),function(e){e.deltaY<0?U(P()):e.deltaY>0&&D(P()),l.update()}(e),l.dispatchEvent(c),l.dispatchEvent(d))}function G(e){!1!==l.enabled&&!1!==l.enableKeys&&!1!==l.enablePan&&function(e){switch(e.keyCode){case l.keys.UP:I(0,l.keyPanSpeed),l.update();break;case l.keys.BOTTOM:I(0,-l.keyPanSpeed),l.update();break;case l.keys.LEFT:I(l.keyPanSpeed,0),l.update();break;case l.keys.RIGHT:I(-l.keyPanSpeed,0),l.update()}}(e)}function z(e){if(!1!==l.enabled){switch(e.touches.length){case 1:if(!1===l.enableRotate)return;!function(e){b.set(e.touches[0].pageX,e.touches[0].pageY)}(e),h=f.TOUCH_ROTATE;break;case 2:if(!1===l.enableZoom)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(t*t+r*r);E.set(0,a)}(e),h=f.TOUCH_DOLLY;break;case 3:if(!1===l.enablePan)return;!function(e){M.set(e.touches[0].pageX,e.touches[0].pageY)}(e),h=f.TOUCH_PAN;break;default:h=f.NONE}h!==f.NONE&&l.dispatchEvent(c)}}function X(e){if(!1!==l.enabled)switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:if(!1===l.enableRotate)return;if(h!==f.TOUCH_ROTATE)return;!function(e){w.set(e.touches[0].pageX,e.touches[0].pageY),A.subVectors(w,b);var t=l.domElement===document?l.domElement.body:l.domElement;L(2*Math.PI*A.x/t.clientWidth*l.rotateSpeed),C(2*Math.PI*A.y/t.clientHeight*l.rotateSpeed),b.copy(w),l.update()}(e);break;case 2:if(!1===l.enableZoom)return;if(h!==f.TOUCH_DOLLY)return;!function(e){var t=e.touches[0].pageX-e.touches[1].pageX,r=e.touches[0].pageY-e.touches[1].pageY,a=Math.sqrt(t*t+r*r);_.set(0,a),F.subVectors(_,E),F.y>0?U(P()):F.y<0&&D(P()),E.copy(_),l.update()}(e);break;case 3:if(!1===l.enablePan)return;if(h!==f.TOUCH_PAN)return;!function(e){T.set(e.touches[0].pageX,e.touches[0].pageY),S.subVectors(T,M),I(S.x,S.y),M.copy(T),l.update()}(e);break;default:h=f.NONE}}function H(e){!1!==l.enabled&&(l.dispatchEvent(d),h=f.NONE)}function Y(e){!1!==l.enabled&&e.preventDefault()}l.domElement.addEventListener("contextmenu",Y,!1),l.domElement.addEventListener("mousedown",k,!1),l.domElement.addEventListener("wheel",V,!1),l.domElement.addEventListener("touchstart",z,!1),l.domElement.addEventListener("touchend",H,!1),l.domElement.addEventListener("touchmove",X,!1),window.addEventListener("keydown",G,!1),this.update()}n.prototype=Object.create(a.EventDispatcher.prototype),n.prototype.constructor=n,Object.defineProperties(n.prototype,{center:{get:function(){return console.warn("OrbitControls: .center has been renamed to .target"),this.target}},noZoom:{get:function(){return console.warn("OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),!this.enableZoom},set:function(e){console.warn("OrbitControls: .noZoom has been deprecated. Use .enableZoom instead."),this.enableZoom=!e}},noRotate:{get:function(){return console.warn("OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),!this.enableRotate},set:function(e){console.warn("OrbitControls: .noRotate has been deprecated. Use .enableRotate instead."),this.enableRotate=!e}},noPan:{get:function(){return console.warn("OrbitControls: .noPan has been deprecated. Use .enablePan instead."),!this.enablePan},set:function(e){console.warn("OrbitControls: .noPan has been deprecated. Use .enablePan instead."),this.enablePan=!e}},noKeys:{get:function(){return console.warn("OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),!this.enableKeys},set:function(e){console.warn("OrbitControls: .noKeys has been deprecated. Use .enableKeys instead."),this.enableKeys=!e}},staticMoving:{get:function(){return console.warn("OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),!this.enableDamping},set:function(e){console.warn("OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead."),this.enableDamping=!e}},dynamicDampingFactor:{get:function(){return console.warn("OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor},set:function(e){console.warn("OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead."),this.dampingFactor=e}}});var i=r(3),o=r(4),s=r.n(o),l=r(9),u=r.n(l),c=r(10),d=r(11),f=r.n(d);r(12)("minerender");r.d(t,"a",(function(){return p}));const h={showAxes:!1,showGrid:!1,autoResize:!1,controls:{enabled:!0,zoom:!0,rotate:!0,pan:!0,keys:!0},camera:{type:"perspective",x:20,y:35,z:20,target:[0,0,0]},canvas:{width:void 0,height:void 0},frameRateLimit:-1,enableStats:!1,pauseHidden:!0,forceContext:!1,sendStats:!0};class p{constructor(e,t,r){this.element=r||document.body,this.options=Object.assign({},h,t,e),this.renderType="_Base_"}toImage(e,t){if(t||(t="image/png"),this._renderer){if(e){let e=document.createElement("canvas"),r=e.getContext("2d");return e.width=this._renderer.domElement.width,e.height=this._renderer.domElement.height,r.drawImage(this._renderer.domElement,0,0),function(e){let t,r,a,n=e.getContext("2d"),i=document.createElement("canvas").getContext("2d"),o=n.getImageData(0,0,e.width,e.height),s=o.data.length,l={top:null,left:null,right:null,bottom:null};for(t=0;t<s;t+=4)0!==o.data[t+3]&&(r=t/4%e.width,a=~~(t/4/e.width),null===l.top&&(l.top=a),null===l.left?l.left=r:r<l.left&&(l.left=r),null===l.right?l.right=r:l.right<r&&(l.right=r),null===l.bottom?l.bottom=a:l.bottom<a&&(l.bottom=a));let u=l.bottom-l.top,c=l.right-l.left,d=n.getImageData(l.left,l.top,c,u);return i.canvas.width=c,i.canvas.height=u,i.putImageData(d,0,0),i.canvas}(e).toDataURL(t)}return this._renderer.domElement.toDataURL(t)}}toObj(){if(this._scene){return(new i.OBJExporter).parse(this._scene)}}toGLTF(e){return new Promise((t,r)=>{if(this._scene){(new i.GLTFExporter).parse(this._scene,e=>{t(e)},e)}else r()})}toPLY(e){if(this._scene){return(new i.PLYExporter).parse(this._scene,e)}}initScene(e,t){let r=this;if(console.log(" "),console.log("%c ","font-size: 100px; background: url(https://minerender.org/img/minerender.svg) no-repeat;"),console.log("MineRender/"+(r.renderType||r.constructor.name)+"/1.4.11"),console.log("PRODUCTION build"),console.log("Built @ 2021-02-20T09:28:50.538Z"),console.log(" "),r.options.sendStats){let e,t=!1;try{t=window.self!==window.top}catch(e){return!0}try{e=new URL(t?document.referrer:window.location).hostname}catch(e){console.warn("Failed to get hostname")}c.post({url:"https://minerender.org/stats.php",data:{action:"init",type:r.renderType,host:e,source:t?"iframe":"javascript"}})}let l,d=new a.Scene;r._scene=d,l="orthographic"===r.options.camera.type?new a.OrthographicCamera((r.options.canvas.width||window.innerWidth)/-2,(r.options.canvas.width||window.innerWidth)/2,(r.options.canvas.height||window.innerHeight)/2,(r.options.canvas.height||window.innerHeight)/-2,1,1e3):new a.PerspectiveCamera(75,(r.options.canvas.width||window.innerWidth)/(r.options.canvas.height||window.innerHeight),5,1e3),r._camera=l,r.options.camera.zoom&&(l.zoom=r.options.camera.zoom);let h=new a.WebGLRenderer({alpha:!0,antialias:!0,preserveDrawingBuffer:!0});r._renderer=h,h.setSize(r.options.canvas.width||window.innerWidth,r.options.canvas.height||window.innerHeight),h.setClearColor(0,0),h.setPixelRatio(window.devicePixelRatio),h.shadowMap.enabled=!0,h.shadowMap.type=a.PCFSoftShadowMap,r.element.appendChild(r._canvas=h.domElement);let p=new s.a(h);p.setSize(r.options.canvas.width||window.innerWidth,r.options.canvas.height||window.innerHeight),r._composer=p;let m=new i.SSAARenderPass(d,l);m.unbiased=!0,p.addPass(m);let v=new o.ShaderPass(o.CopyShader);v.renderToScreen=!0,p.addPass(v),r.options.autoResize&&(r._resizeListener=function(){let e=r.element&&r.element!==document.body?r.element.offsetWidth:window.innerWidth,t=r.element&&r.element!==document.body?r.element.offsetHeight:window.innerHeight;r._resize(e,t)},window.addEventListener("resize",r._resizeListener)),r._resize=function(e,t){"orthographic"===r.options.camera.type?(l.left=e/-2,l.right=e/2,l.top=t/2,l.bottom=t/-2):l.aspect=e/t,l.updateProjectionMatrix(),h.setSize(e,t),p.setSize(e,t)},r.options.showAxes&&d.add(new a.AxesHelper(50)),r.options.showGrid&&d.add(new a.GridHelper(100,100));let g=new a.AmbientLight(16777215);d.add(g);let y=new n(l,h.domElement);r._controls=y,y.enableZoom=r.options.controls.zoom,y.enableRotate=r.options.controls.rotate,y.enablePan=r.options.controls.pan,y.enableKeys=r.options.controls.keys,y.target.set(r.options.camera.target[0],r.options.camera.target[1],r.options.camera.target[2]),l.position.x=r.options.camera.x,l.position.y=r.options.camera.y,l.position.z=r.options.camera.z,l.lookAt(new a.Vector3(r.options.camera.target[0],r.options.camera.target[1],r.options.camera.target[2])),r.options.enableStats&&(r._stats=new f.a,r._stats.showPanel(0),document.body.appendChild(r._stats.dom));let x=!1;r.options.frameRateLimit>0&&(x=!0,r._clock=new a.Clock,r._animDelta=0,r._animInterval=1/r.options.frameRateLimit);let b=function(){r._animId=requestAnimationFrame(b),r.options.enableStats&&r._stats.begin(),r.options.pauseHidden&&(void 0!==document.visibilityState&&"visible"!==document.visibilityState||!r.onScreen)||x&&(r._animDelta+=r._clock.getDelta(),r._animDelta<=r._animInterval)||("function"==typeof e&&e(),p.render(),x&&(r._animDelta=r._animDelta%r._animInterval),r.options.enableStats&&r._stats.end())};r._animate=b,t||b(),r.onScreen=!0;let w="minerender-canvas-"+r._scene.uuid+"-"+Date.now();if(r._canvas.id=w,r.options.pauseHidden){r.onScreen=!1;let e=new u.a;r._onScreenObserver=e,e.on("enter","#"+w,(e,t)=>{r.onScreen=!0,r.options.forceContext&&r._renderer.forceContextRestore()}),e.on("leave","#"+w,(e,t)=>{r.onScreen=!1,r.options.forceContext&&r._renderer.forceContextLoss()})}}addToScene(e){let t=this;t._scene&&e&&(e.userData.renderType=t.renderType,t._scene.add(e))}clearScene(e,t){if(e||t)for(let r=this._scene.children.length-1;r>=0;r--){let a=this._scene.children[r];if(t){if(t(a))continue}e&&a.userData.renderType!==this.renderType||(m(a,!0),this._scene.remove(a))}else for(;this._scene.children.length>0;)this._scene.remove(this._scene.children[0])}dispose(){cancelAnimationFrame(this._animId),this._onScreenObserver&&this._onScreenObserver.destroy(),this.clearScene(),this._canvas.remove();let e=this.element;for(;e.firstChild;)e.removeChild(e.firstChild);this.options.autoResize&&window.removeEventListener("resize",this._resizeListener),this._renderer&&(this._renderer.forceContextLoss(),this._renderer.dispose(),this._renderer.context=void 0,this._renderer.domElement=void 0)}}function m(e,t){if(e&&(e.geometry&&e.geometry.dispose&&e.geometry.dispose(),e.material&&e.material.dispose&&e.material.dispose(),e.texture&&e.texture.dispose&&e.texture.dispose(),e.children)){let r=e.children;for(let e=0;e<r.length;e++)m(r[e],t);if(t)for(let t=e.children.length-1;t>=0;t--)e.remove(r[t])}}},function(e,t,r){"use strict";r.r(t),function(e){var a=r(0),n=r(1),i=r(13);let o={camera:{type:"perspective",x:20,y:35,z:20,target:[0,18,0]},makeNonTransparentOpaque:!0};class s extends i.a{constructor(e,t){super(e,o,t),this.renderType="SkinRender",this._animId=-1,this.element.skinRender=this,this.attached=!1}render(e,t){let r=this,i=!1,o=(o,s)=>{i=!0,o.needsUpdate=!0,s&&(s.needsUpdate=!0);let c=-1;32===o.image.height?c=0:64===o.image.height?c=1:console.error("Couldn't detect texture version. Invalid dimensions: "+o.image.width+"x"+o.image.height),console.log("Skin Texture Version: "+c),o.magFilter=a.NearestFilter,o.minFilter=a.NearestFilter,o.anisotropy=0,s&&(s.magFilter=a.NearestFilter,s.minFilter=a.NearestFilter,s.anisotropy=0,s.format=a.RGBFormat),32===o.image.height&&(o.format=a.RGBFormat),r.attached||r._scene?console.log("[SkinRender] is attached - skipping scene init"):super.initScene((function(){r.element.dispatchEvent(new CustomEvent("skinRender",{detail:{playerModel:r.playerModel}}))})),console.log("Slim: "+d);let f=function(e,t,r,i,o){console.log("capeType: "+o);let s=new a.Object3D;s.name="headGroup",s.position.x=0,s.position.y=28,s.position.z=0,s.translateOnAxis(new a.Vector3(0,1,0),-4);let c=l(e,8,8,8,n.a.head[r],i,"head");c.translateOnAxis(new a.Vector3(0,1,0),4),s.add(c);let d=l(e,8.504,8.504,8.504,n.a.hat[r],i,"hat",!0);d.translateOnAxis(new a.Vector3(0,1,0),4),s.add(d);let f=new a.Object3D;f.name="bodyGroup",f.position.x=0,f.position.y=18,f.position.z=0;let h=l(e,8,12,4,n.a.body[r],i,"body");if(f.add(h),r>=1){let t=l(e,8.504,12.504,4.504,n.a.jacket,i,"jacket",!0);f.add(t)}let p=new a.Object3D;p.name="leftArmGroup",p.position.x=i?-5.5:-6,p.position.y=18,p.position.z=0,p.translateOnAxis(new a.Vector3(0,1,0),4);let m=l(e,i?3:4,12,4,n.a.leftArm[r],i,"leftArm");if(m.translateOnAxis(new a.Vector3(0,1,0),-4),p.add(m),r>=1){let t=l(e,i?3.504:4.504,12.504,4.504,n.a.leftSleeve,i,"leftSleeve",!0);t.translateOnAxis(new a.Vector3(0,1,0),-4),p.add(t)}let v=new a.Object3D;v.name="rightArmGroup",v.position.x=i?5.5:6,v.position.y=18,v.position.z=0,v.translateOnAxis(new a.Vector3(0,1,0),4);let g=l(e,i?3:4,12,4,n.a.rightArm[r],i,"rightArm");if(g.translateOnAxis(new a.Vector3(0,1,0),-4),v.add(g),r>=1){let t=l(e,i?3.504:4.504,12.504,4.504,n.a.rightSleeve,i,"rightSleeve",!0);t.translateOnAxis(new a.Vector3(0,1,0),-4),v.add(t)}let y=new a.Object3D;y.name="leftLegGroup",y.position.x=-2,y.position.y=6,y.position.z=0,y.translateOnAxis(new a.Vector3(0,1,0),4);let x=l(e,4,12,4,n.a.leftLeg[r],i,"leftLeg");if(x.translateOnAxis(new a.Vector3(0,1,0),-4),y.add(x),r>=1){let t=l(e,4.504,12.504,4.504,n.a.leftTrousers,i,"leftTrousers",!0);t.translateOnAxis(new a.Vector3(0,1,0),-4),y.add(t)}let b=new a.Object3D;b.name="rightLegGroup",b.position.x=2,b.position.y=6,b.position.z=0,b.translateOnAxis(new a.Vector3(0,1,0),4);let w=l(e,4,12,4,n.a.rightLeg[r],i,"rightLeg");if(w.translateOnAxis(new a.Vector3(0,1,0),-4),b.add(w),r>=1){let t=l(e,4.504,12.504,4.504,n.a.rightTrousers,i,"rightTrousers",!0);t.translateOnAxis(new a.Vector3(0,1,0),-4),b.add(t)}let A=new a.Object3D;if(A.add(s),A.add(f),A.add(p),A.add(v),A.add(y),A.add(b),t){console.log(n.a);let e=n.a.capeRelative;"optifine"===o&&(e=n.a.capeOptifineRelative),"labymod"===o&&(e=n.a.capeLabymodRelative),e=JSON.parse(JSON.stringify(e)),console.log(e);for(let r in e)e[r].x*=t.image.width,e[r].w*=t.image.width,e[r].y*=t.image.height,e[r].h*=t.image.height;console.log(e);let r=new a.Object3D;r.name="capeGroup",r.position.x=0,r.position.y=16,r.position.z=-2.5,r.translateOnAxis(new a.Vector3(0,1,0),8),r.translateOnAxis(new a.Vector3(0,0,1),.5);let i=l(t,10,16,1,e,!1,"cape");i.rotation.x=u(10),i.translateOnAxis(new a.Vector3(0,1,0),-8),i.translateOnAxis(new a.Vector3(0,0,1),-.5),i.rotation.y=u(180),r.add(i),A.add(r)}return A}(o,s,c,d,e._capeType?e._capeType:e.optifine?"optifine":"minecraft");r.addToScene(f),r.playerModel=f,"function"==typeof t&&t()};r._skinImage=new Image,r._skinImage.crossOrigin="anonymous",r._capeImage=new Image,r._capeImage.crossOrigin="anonymous";let s=void 0!==e.cape||void 0!==e.capeUrl||void 0!==e.capeData||void 0!==e.mineskin,d=!1,f=!1,h=!1,p=new a.Texture,m=new a.Texture;if(p.image=r._skinImage,r._skinImage.onload=function(){if(r._skinImage){if(f=!0,console.log("Skin Image Loaded"),void 0===e.slim&&32!==r._skinImage.height){let e=document.createElement("canvas"),t=e.getContext("2d");e.width=r._skinImage.width,e.height=r._skinImage.height,t.drawImage(r._skinImage,0,0),console.log("Slim Detection:");let a=t.getImageData(46,52,1,12).data,n=t.getImageData(54,20,1,12).data,i=!0;for(let e=3;e<48;e+=4){if(255===a[e]){i=!1;break}if(255===n[e]){i=!1;break}}console.log(i),i&&(d=!0)}if(r.options.makeNonTransparentOpaque&&32!==r._skinImage.height){let e=document.createElement("canvas"),n=e.getContext("2d");e.width=r._skinImage.width,e.height=r._skinImage.height,n.drawImage(r._skinImage,0,0);let i=document.createElement("canvas"),o=i.getContext("2d");i.width=r._skinImage.width,i.height=r._skinImage.height;let s=n.getImageData(0,0,e.width,e.height),l=s.data;function t(e,t){return e>0&&t>0&&e<32&&t<32||(e>32&&t>16&&e<64&&t<32||e>16&&t>48&&e<48&&t<64)}for(let r=0;r<l.length;r+=4){let a=l[r+3],n=r/4%e.width,i=Math.floor(r/4/e.width);(a>178||t(n,i))&&(l[r+3]=255)}o.putImageData(s,0,0),console.log(i.toDataURL()),p=new a.CanvasTexture(i)}!f||!h&&s||i||o(p,m)}},r._skinImage.onerror=function(e){console.warn("Skin Image Error"),console.warn(e)},console.log("Has Cape: "+s),s?(m.image=r._capeImage,r._capeImage.onload=function(){r._capeImage&&(h=!0,console.log("Cape Image Loaded"),h&&f&&(i||o(p,m)))},r._capeImage.onerror=function(e){console.warn("Cape Image Error"),console.warn(e),h=!0,f&&(i||o(p))}):(m=null,r._capeImage=null),"string"==typeof e)0===e.indexOf("http")?r._skinImage.src=e:e.length<=16?c("https://minerender.org/nameToUuid.php?name="+e,(function(t,a){if(t)return console.log(t);console.log(a),r._skinImage.src="https://crafatar.com/skins/"+(a.id?a.id:e)})):e.length<=36?image.src="https://crafatar.com/skins/"+e+"?overlay":r._skinImage.src=e;else{if("object"!=typeof e)throw new Error("Invalid texture value");if(e.url?r._skinImage.src=e.url:e.data?r._skinImage.src=e.data:e.username?c("https://minerender.org/nameToUuid.php?name="+e.username,(function(t,a){if(t)return console.log(t);r._skinImage.src="https://crafatar.com/skins/"+(a.id?a.id:e.username)+"?overlay"})):e.uuid?r._skinImage.src="https://crafatar.com/skins/"+e.uuid+"?overlay":e.mineskin&&(r._skinImage.src="https://api.mineskin.org/render/texture/"+e.mineskin),e.cape)if(e.cape.length>36){c(e.cape.startsWith("http")?e.cape:"https://api.capes.dev/get/"+e.cape,(function(t,a){if(t)return console.log(t);a.exists&&(e._capeType=a.type,r._capeImage.src=a.imageUrls.base.full)}))}else{let t="https://api.capes.dev/load/";e.capeUser?t+=e.capeUser:e.username?t+=e.username:e.uuid?t+=e.uuid:console.warn("Couldn't find a user to get a cape from"),c(t+="/"+e.cape,(function(t,a){if(t)return console.log(t);a.exists&&(e._capeType=a.type,r._capeImage.src=a.imageUrls.base.full)}))}else e.capeUrl?r._capeImage.src=e.capeUrl:e.capeData?r._capeImage.src=e.capeData:e.mineskin&&(r._capeImage.src="https://api.mineskin.org/render/texture/"+e.mineskin+"/cape");d=e.slim}}resize(e,t){return this._resize(e,t)}reset(){this._skinImage=null,this._capeImage=null,this._animId&&cancelAnimationFrame(this._animId),this._canvas&&this._canvas.remove()}getPlayerModel(){return this.playerModel}getModelByName(e){return this._scene.getObjectByName(e,!0)}toggleSkinPart(e,t){this._scene.getObjectByName(e,!0).visible=t}}function l(e,t,r,n,i,o,s,l){let u=e.image.width,c=e.image.height,d=new a.BoxGeometry(t,r,n),f=new a.MeshBasicMaterial({map:e,transparent:l||!1,alphaTest:.1,side:l?a.DoubleSide:a.FrontSide});d.computeBoundingBox(),d.faceVertexUvs[0]=[];let h=["right","left","top","bottom","front","back"],p=[];for(let e=0;e<h.length;e++){let t=i[h[e]],r=u,n=c,s=(o&&t.sx?t.sx:t.x)/r,l=t.y/n,d=((o&&t.sx?t.sx:t.x)+(o&&t.sw?t.sw:t.w))/r,f=(t.y+t.h)/n;p[e]=[new a.Vector2(s,f),new a.Vector2(s,l),new a.Vector2(d,l),new a.Vector2(d,f)];let m,v=t.flipX;t.flipY&&(m=p[e].slice(0),p[e][0]=m[2],p[e][1]=m[3],p[e][2]=m[0],p[e][3]=m[1]),v&&(m=p[e].slice(0),p[e][0]=m[3],p[e][1]=m[2],p[e][2]=m[1],p[e][3]=m[0])}let m=0;for(let e=0;e<p.length;e++)d.faceVertexUvs[0][m]=[p[e][0],p[e][1],p[e][3]],d.faceVertexUvs[0][m+1]=[p[e][1],p[e][2],p[e][3]],m+=2;d.uvsNeedUpdate=!0;let v=new a.Mesh(d,f);return v.name=s,v.castShadow=!0,v.receiveShadow=!1,v}function u(e){return e*(Math.PI/180)}function c(e,t){let r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="json",r.onload=function(){let e=r.status,a=r.response||r.responseText;"string"==typeof a&&(a=JSON.parse(a)),t(200===e?null:r.statusText,a)},r.send()}"undefined"!=typeof window&&(window.SkinRender=s),void 0!==e&&(e.SkinRender=s),t.default=s}.call(this,r(15))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=r(2);var o=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.camera=new n.OrthographicCamera(-1,1,1,-1,0,1),e.scene=new n.Scene,e.quad=new n.Mesh(new n.PlaneBufferGeometry(2,2),null),e.quad.frustumCulled=!1,e.scene.add(e.quad),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((a=i)&&a.__esModule?a:{default:a}).default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=s(r(2)),o=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s=o.default;return a.map=e,a.opacity=void 0!==r?r:1,a.uniforms=n.UniformsUtils.clone(s.uniforms),a.material=new n.ShaderMaterial({uniforms:a.uniforms,vertexShader:s.vertexShader,fragmentShader:s.fragmentShader,depthTest:!1,depthWrite:!1}),a.needsSwap=!1,a.fsQuad=new i.default.FullScreenQuad(null),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"render",value:function(e,t,r){var a=e,n=a.autoClear;a.autoClear=!1,this.fsQuad.material=this.material,this.uniforms.opacity.value=this.opacity,this.uniforms.tDiffuse.value=this.map,this.material.transparent=this.opacity<1,a.setRenderTarget(this.renderToScreen?null:r),this.clear&&a.clear(),this.fsQuad.render(a),a.autoClear=n}}]),t}(i.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),i=r(2);var o=function(e){function t(e,r,a,n,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.scene=e,o.camera=r,o.overrideMaterial=a,o.clearColor=n,o.clearAlpha=void 0!==i?i:0,o.clear=!0,o.clearDepth=!1,o.needsSwap=!1,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"render",value:function(e,t,r){var a=e,n=a.autoClear;a.autoClear=!1,this.scene.overrideMaterial=this.overrideMaterial;var i=void 0,o=void 0;this.clearColor&&(i=a.getClearColor().getHex(),o=a.getClearAlpha(),a.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&a.clearDepth(),a.setRenderTarget(this.renderToScreen?null:r),this.clear&&a.clear(a.autoClearColor,a.autoClearDepth,a.autoClearStencil),a.render(this.scene,this.camera),this.clearColor&&a.setClearColor(i,o),this.scene.overrideMaterial=null,a.autoClear=n}}]),t}(((a=i)&&a.__esModule?a:{default:a}).default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),i=r(2);var o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.needsSwap=!1,a.clearColor=void 0!==e?e:0,a.clearAlpha=void 0!==r?r:0,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"render",value:function(e,t,r){var a=void 0,n=void 0;this.clearColor&&(a=e.getClearColor().getHex(),n=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),e.setRenderTarget(this.renderToScreen?null:r),e.clear(),this.clearColor&&e.setClearColor(a,n)}}]),t}(((a=i)&&a.__esModule?a:{default:a}).default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(0)),i=u(r(6)),o=u(r(5)),s=u(r(7)),l=u(r(8));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var a=r;if(this.renderer=t,void 0===a){var s={minFilter:n.LinearFilter,magFilter:n.LinearFilter,format:n.RGBAFormat,stencilBuffer:!1},l=t.getSize(new n.Vector2);this._pixelRatio=t.getPixelRatio(),this._width=l.width,this._height=l.height,(a=new n.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,s)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=a.width,this._height=a.height;this.renderTarget1=a,this.renderTarget2=a.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new i.default(o.default),this.clock=new n.Clock}return a(e,[{key:"swapBuffers",value:function(){var e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}},{key:"addPass",value:function(e){this.passes.push(e);var t=this.renderer.getDrawingBufferSize(new n.Vector2);e.setSize(t.width,t.height)}},{key:"insertPass",value:function(e,t){this.passes.splice(t,0,e)}},{key:"isLastEnabledPass",value:function(e){for(var t=e+1;t<this.passes.length;t+=1)if(this.passes[t].enabled)return!1;return!0}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.clock.getDelta(),t=this.renderer.getRenderTarget(),r=!1,a=void 0,n=void 0,i=this.passes.length;for(n=0;n<i;n+=1){if(!1!==(a=this.passes[n]).enabled&&(a.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(n),a.render(this.renderer,this.writeBuffer,this.readBuffer,e,r),a.needsSwap)){if(r){var o=this.renderer.context;o.stencilFunc(o.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),o.stencilFunc(o.EQUAL,1,4294967295)}this.swapBuffers()}a instanceof s.default?r=!0:a instanceof l.default&&(r=!1)}this.renderer.setRenderTarget(t)}},{key:"reset",value:function(e){var t=e;if(void 0===t){var r=this.renderer.getSize(new n.Vector2);this._pixelRatio=this.renderer.getPixelRatio(),this._width=r.width,this._height=r.height,(t=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=t,this.renderTarget2=t.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}},{key:"setSize",value:function(e,t){this._width=e,this._height=t;var r=this._width*this._pixelRatio,a=this._height*this._pixelRatio;this.renderTarget1.setSize(r,a),this.renderTarget2.setSize(r,a);for(var n=0;n<this.passes.length;n+=1)this.passes[n].setSize(r,a)}},{key:"setPixelRatio",value:function(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}]),e}();t.default=c},function(e,t){var r,a,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{a="function"==typeof clearTimeout?clearTimeout:o}catch(e){a=o}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===o||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},function(e,t,r){var a;function n(e){function r(){if(r.enabled){var e=r,n=+new Date,i=n-(a||n);e.diff=i,e.prev=a,e.curr=n,a=n;for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];o[0]=t.coerce(o[0]),"string"!=typeof o[0]&&o.unshift("%O");var l=0;o[0]=o[0].replace(/%([a-zA-Z%])/g,(function(r,a){if("%%"===r)return r;l++;var n=t.formatters[a];if("function"==typeof n){var i=o[l];r=n.call(e,i),o.splice(l,1),l--}return r})),t.formatArgs.call(e,o),(r.log||t.log||console.log.bind(console)).apply(e,o)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,a=0;for(r in e)a=(a<<5)-a+e.charCodeAt(r),a|=0;return t.colors[Math.abs(a)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),a=r.length,n=0;n<a;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,a;for(r=0,a=t.skips.length;r<a;r++)if(t.skips[r].test(e))return!1;for(r=0,a=t.names.length;r<a;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(23),t.names=[],t.skips=[],t.formatters={}},function(e,t){var r=1e3,a=60*r,n=60*a,i=24*n,o=365.25*i;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,t){t=t||{};var l,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*a;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(l=e,i,"day")||s(l,n,"hour")||s(l,a,"minute")||s(l,r,"second")||l+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=n)return Math.round(e/n)+"h";if(e>=a)return Math.round(e/a)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}]);
|