@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21

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.
Files changed (715) hide show
  1. package/AGENTS_READ_ME.md +4 -0
  2. package/AI_CONTEXT.md +4 -0
  3. package/README.md +9 -6
  4. package/{guides → ai_guides}/README.md +12 -2
  5. package/ai_guides/ai-doc-guidelines.md +102 -0
  6. package/{guides → ai_guides}/api.md +24 -1
  7. package/ai_guides/features/3dtile.md +172 -0
  8. package/{guides → ai_guides}/features/camera-animation.md +24 -3
  9. package/{guides → ai_guides}/features/clipper.md +2 -0
  10. package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
  11. package/{guides → ai_guides}/features/event.md +2 -0
  12. package/{guides → ai_guides}/features/five.md +4 -0
  13. package/ai_guides/features/flowing-light-2d-pass.md +438 -0
  14. package/ai_guides/features/flowing-light-3d-pass.md +420 -0
  15. package/ai_guides/features/gaussian-blur-pass.md +202 -0
  16. package/{guides → ai_guides}/features/gesture.md +3 -0
  17. package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
  18. package/{guides → ai_guides}/features/image-options.md +3 -0
  19. package/{guides → ai_guides}/features/load-external-model.md +21 -0
  20. package/ai_guides/features/load-progress.md +140 -0
  21. package/ai_guides/features/material.md +153 -0
  22. package/{guides → ai_guides}/features/mode.md +4 -0
  23. package/{guides → ai_guides}/features/model.md +4 -1
  24. package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
  25. package/{guides → ai_guides}/features/multi-work.md +2 -0
  26. package/ai_guides/features/pano-filter.md +148 -0
  27. package/{guides → ai_guides}/features/pano-tile.md +7 -14
  28. package/ai_guides/features/pano-uv.md +131 -0
  29. package/ai_guides/features/parameter.md +153 -0
  30. package/ai_guides/features/plugin.md +210 -0
  31. package/{guides → ai_guides}/features/postprocessing.md +39 -4
  32. package/{guides → ai_guides}/features/raycast.md +11 -0
  33. package/{guides → ai_guides}/features/request-proxy.md +2 -0
  34. package/{guides → ai_guides}/features/screen-project.md +2 -0
  35. package/{guides → ai_guides}/features/state.md +2 -0
  36. package/ai_guides/features/view-layer.md +187 -0
  37. package/{guides → ai_guides}/features/work.md +63 -2
  38. package/{guides → ai_guides}/glossary.md +26 -5
  39. package/{guides → ai_guides}/intro.md +1 -1
  40. package/{guides → ai_guides}/quick-start.md +1 -0
  41. package/ai_guides/release_notes/6.8.md +208 -0
  42. package/{guides → ai_guides}/template.md +17 -3
  43. package/docs/00_FOR_AI_AGENTS.md +11 -0
  44. package/docs/README.md +4 -7
  45. package/docs/assets/hierarchy.js +1 -1
  46. package/docs/assets/navigation.js +1 -1
  47. package/docs/assets/search.js +1 -1
  48. package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
  49. package/docs/classes/five.BoundingMesh.html +2 -2
  50. package/docs/classes/five.Camera.html +1 -1
  51. package/docs/classes/five.EyeDomeLightingPass.html +1 -1
  52. package/docs/classes/five.Five.html +73 -72
  53. package/docs/classes/five.FivePass.html +1 -1
  54. package/docs/classes/five.Histogram.html +19 -0
  55. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  56. package/docs/classes/five.Model.html +31 -31
  57. package/docs/classes/five.ModelScene.html +1 -1
  58. package/docs/classes/five.NetworkSubscribe.html +1 -1
  59. package/docs/classes/five.PBMContainer.html +1 -1
  60. package/docs/classes/five.PBMCustomShader.html +42 -3
  61. package/docs/classes/five.PBMGSObject.html +5 -3
  62. package/docs/classes/five.PBMGroup.html +1 -1
  63. package/docs/classes/five.PBMMesh.html +1 -1
  64. package/docs/classes/five.PBMMeshMaterial.html +16 -7
  65. package/docs/classes/five.PBMPanoFilter.html +61 -0
  66. package/docs/classes/five.PBMPointCloud.html +1 -1
  67. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  68. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  69. package/docs/classes/five.PBMUpdateable.html +41 -0
  70. package/docs/classes/five.PanoCircleMesh.html +1 -1
  71. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  72. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  73. package/docs/classes/five.Parameter.html +57 -53
  74. package/docs/classes/five.Scene.html +1 -1
  75. package/docs/classes/five.Subscribe.html +1 -1
  76. package/docs/classes/five.Tile.html +1 -1
  77. package/docs/classes/five.Tile3D.html +30 -26
  78. package/docs/classes/five.TileNode.html +1 -1
  79. package/docs/classes/five.Trajectory.html +1 -1
  80. package/docs/classes/five.TrajectoryNode.html +1 -1
  81. package/docs/classes/five.Work.html +16 -16
  82. package/docs/classes/five.WorkResolvedObserver.html +27 -2
  83. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  84. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  85. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  86. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  87. package/docs/classes/gltf-loader.GLTFParser.html +1 -1
  88. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  89. package/docs/classes/line.Line.html +1 -1
  90. package/docs/classes/line.LineGeometry.html +1 -1
  91. package/docs/classes/line.LineMaterial.html +1 -1
  92. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  93. package/docs/classes/line.THREE_Line2.html +1 -1
  94. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  95. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  96. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  97. package/docs/classes/sticker.Sticker.html +1 -1
  98. package/docs/classes/vfx.Airflow.html +1 -1
  99. package/docs/classes/vfx.Flame.html +1 -1
  100. package/docs/classes/vfx.Particle.html +1 -1
  101. package/docs/classes/vfx.ParticleGPU.html +1 -1
  102. package/docs/classes/vfx.SpotLight.html +1 -1
  103. package/docs/documents/README.html +11 -2
  104. package/docs/documents/ai-doc-guidelines.html +60 -15
  105. package/docs/documents/api.html +40 -15
  106. package/docs/documents/features_3dtile.html +142 -45
  107. package/docs/documents/features_camera-animation.html +62 -5
  108. package/docs/documents/features_clipper.html +3 -0
  109. package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
  110. package/docs/documents/features_event.html +3 -0
  111. package/docs/documents/features_five.html +4 -0
  112. package/docs/documents/features_flowing-light-2d-pass.html +356 -0
  113. package/docs/documents/features_flowing-light-3d-pass.html +351 -0
  114. package/docs/documents/features_gaussian-blur-pass.html +182 -0
  115. package/docs/documents/features_gesture.html +4 -0
  116. package/docs/documents/features_get-screen-pixels.html +3 -0
  117. package/docs/documents/features_image-options.html +3 -0
  118. package/docs/documents/features_load-external-model.html +25 -2
  119. package/docs/documents/features_load-progress.html +110 -0
  120. package/docs/documents/features_material.html +341 -0
  121. package/docs/documents/features_mode.html +5 -0
  122. package/docs/documents/features_model.html +5 -1
  123. package/docs/documents/features_move-pano-effect.html +3 -0
  124. package/docs/documents/features_multi-work.html +3 -0
  125. package/docs/documents/features_pano-filter.html +122 -0
  126. package/docs/documents/features_pano-tile.html +34 -19
  127. package/docs/documents/features_pano-uv.html +82 -0
  128. package/docs/documents/features_parameter.html +76 -56
  129. package/docs/documents/features_plugin.html +105 -0
  130. package/docs/documents/features_postprocessing.html +22 -5
  131. package/docs/documents/features_raycast.html +4 -1
  132. package/docs/documents/features_request-proxy.html +3 -0
  133. package/docs/documents/features_screen-project.html +3 -0
  134. package/docs/documents/features_state.html +3 -0
  135. package/docs/documents/features_view-layer.html +158 -0
  136. package/docs/documents/features_work.html +63 -2
  137. package/docs/documents/glossary.html +31 -6
  138. package/docs/documents/intro.html +1 -1
  139. package/docs/documents/quick-start.html +1 -0
  140. package/docs/documents/release_notes_6.8.html +189 -0
  141. package/docs/documents/template.html +45 -4
  142. package/docs/functions/five.loadAt3d.html +1 -1
  143. package/docs/functions/five.loadB3dm.html +1 -1
  144. package/docs/functions/five.loadDome.html +1 -1
  145. package/docs/functions/five.loadDomez.html +1 -1
  146. package/docs/functions/five.loadFbx.html +1 -1
  147. package/docs/functions/five.loadGltf.html +1 -1
  148. package/docs/functions/five.loadPbm.html +1 -1
  149. package/docs/functions/five.loadPly.html +1 -1
  150. package/docs/functions/five.loadPnts.html +1 -1
  151. package/docs/functions/five.loadSplat.html +1 -1
  152. package/docs/functions/five.loadSpz.html +1 -1
  153. package/docs/functions/five.loadX3p.html +1 -1
  154. package/docs/functions/five.parseWork.html +1 -1
  155. package/docs/functions/vue.useFiveWorks.html +2 -2
  156. package/docs/hierarchy.html +1 -1
  157. package/docs/index.html +11 -2
  158. package/docs/interfaces/five.AddableObject.html +1 -1
  159. package/docs/interfaces/five.AjaxOptions.html +1 -1
  160. package/docs/interfaces/five.BaseEvent.html +2 -2
  161. package/docs/interfaces/five.EventCallback.html +53 -47
  162. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  163. package/docs/interfaces/five.GestureEvent.html +2 -2
  164. package/docs/interfaces/five.ImageOptions.html +1 -1
  165. package/docs/interfaces/five.IntersectEvent.html +2 -2
  166. package/docs/interfaces/five.IntersectMesh.html +1 -1
  167. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  168. package/docs/interfaces/five.Intersection.html +4 -3
  169. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  170. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  171. package/docs/interfaces/five.ModeChangeEvent.html +2 -2
  172. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  173. package/docs/interfaces/five.ModelEvent.html +2 -2
  174. package/docs/interfaces/five.ModelSceneEvent.html +2 -2
  175. package/docs/interfaces/five.ModelTileEvent.html +8 -0
  176. package/docs/interfaces/five.MovePanoOptions.html +7 -7
  177. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  178. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  179. package/docs/interfaces/five.NetworkOptions.html +1 -1
  180. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  181. package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
  182. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  183. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  184. package/docs/interfaces/five.ObjectEvent.html +2 -2
  185. package/docs/interfaces/five.PBMClipperParameter.html +2 -2
  186. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
  187. package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
  188. package/docs/interfaces/five.PBMMaterial.html +1 -1
  189. package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
  190. package/docs/interfaces/five.PBMPanoDepth.html +5 -5
  191. package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
  192. package/docs/interfaces/five.PBMPanoPicture.html +8 -6
  193. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  194. package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
  195. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  196. package/docs/interfaces/five.PanoEvent.html +2 -2
  197. package/docs/interfaces/five.PanoTextureEvent.html +2 -2
  198. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  199. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  200. package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
  201. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  202. package/docs/interfaces/five.ParameterValue.html +56 -52
  203. package/docs/interfaces/five.Pose.html +1 -1
  204. package/docs/interfaces/five.RenderEvent.html +2 -2
  205. package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
  206. package/docs/interfaces/five.RgbaData.html +7 -0
  207. package/docs/interfaces/five.SplatData.html +2 -2
  208. package/docs/interfaces/five.State.html +1 -1
  209. package/docs/interfaces/five.StateEvent.html +2 -2
  210. package/docs/interfaces/five.TextureOptions.html +1 -1
  211. package/docs/interfaces/five.Tile3DOptions.html +2 -2
  212. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
  213. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  214. package/docs/interfaces/five.ViewLayer.html +30 -26
  215. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  216. package/docs/interfaces/five.WorkImage.html +1 -1
  217. package/docs/interfaces/five.WorkModel.html +8 -8
  218. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  219. package/docs/interfaces/five.WorkObserver.html +27 -2
  220. package/docs/interfaces/five.WorkTile.html +1 -1
  221. package/docs/interfaces/five.WorksEvent.html +2 -2
  222. package/docs/interfaces/five.XRControllerEvent.html +2 -2
  223. package/docs/interfaces/five.XRGestureEvent.html +2 -2
  224. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  225. package/docs/interfaces/five.XRSessionEvent.html +2 -2
  226. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  227. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  228. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  229. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
  230. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  231. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  232. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  233. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  234. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  235. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  236. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  237. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  238. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  239. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  240. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  241. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  242. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  243. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  244. package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
  245. package/docs/modules/five.html +1 -1
  246. package/docs/modules.html +1 -1
  247. package/docs/types/five.ControllerEventTypes.html +27 -25
  248. package/docs/types/five.EasingFunction.html +1 -0
  249. package/docs/types/five.EventTypes.html +27 -25
  250. package/docs/types/five.FivePlugin.html +1 -1
  251. package/docs/types/five.FivePluginInit.html +1 -1
  252. package/docs/types/five.FivePluginInstance.html +1 -1
  253. package/docs/types/five.NetworkProgressCallback.html +1 -1
  254. package/docs/types/five.PBMAlphaMode.html +1 -1
  255. package/docs/types/five.PBMColorStyle.html +1 -1
  256. package/docs/types/five.PBMFloorStyle.html +1 -1
  257. package/docs/types/five.PBMMeshShaderType.html +1 -1
  258. package/docs/types/five.PBMPointBack.html +1 -1
  259. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  260. package/docs/types/five.PBMPointShape.html +1 -1
  261. package/docs/types/five.PBMPointSize.html +1 -1
  262. package/docs/types/five.PBMTransition.html +1 -1
  263. package/docs/types/five.ParseOptions.html +6 -6
  264. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  265. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  266. package/five/application/analysis.d.ts +40 -0
  267. package/five/application/controllers.d.ts +41 -0
  268. package/five/application/events-legacy.d.ts +454 -0
  269. package/five/application/events.d.ts +69 -0
  270. package/five/application/five.d.ts +519 -0
  271. package/five/application/fiveInitArgs.d.ts +176 -0
  272. package/five/application/fiveLoadOptions.d.ts +21 -0
  273. package/five/application/generateDefaultVideoElement.d.ts +2 -0
  274. package/five/application/getViewportScale.d.ts +2 -0
  275. package/five/application/initLights.d.ts +3 -0
  276. package/five/application/mode.d.ts +28 -0
  277. package/five/application/renderPoweredByRealsee.d.ts +3 -0
  278. package/five/assets/cardboard-png-data-url.d.ts +2 -0
  279. package/five/assets/gradient-png-data-url.d.ts +2 -0
  280. package/five/assets/loading-png-data-url.d.ts +2 -0
  281. package/five/assets/phone-png-data-url.d.ts +2 -0
  282. package/five/assets/realsee-png-data-url.d.ts +2 -0
  283. package/five/bvh/bvhMath.d.ts +33 -0
  284. package/five/bvh/bvhMesh.d.ts +7 -0
  285. package/five/bvh/bvhNode.d.ts +29 -0
  286. package/five/bvh/bvhObject.d.ts +18 -0
  287. package/five/bvh/bvhPoints.d.ts +6 -0
  288. package/five/bvh/index.d.ts +10 -0
  289. package/five/bvh/worker.d.ts +35 -0
  290. package/five/cardboard/helper.d.ts +2 -0
  291. package/five/cardboard/index.d.ts +13 -0
  292. package/five/cardboard/sensor.d.ts +158 -0
  293. package/five/certificates/hardware.d.ts +1 -0
  294. package/five/controllers/base.d.ts +167 -0
  295. package/five/controllers/events.d.ts +71 -0
  296. package/five/controllers/floorplan.d.ts +119 -0
  297. package/five/controllers/mapview.d.ts +139 -0
  298. package/five/controllers/model.d.ts +57 -0
  299. package/five/controllers/panorama.d.ts +143 -0
  300. package/five/controllers/panoramaLike.d.ts +87 -0
  301. package/five/controllers/topview.d.ts +42 -0
  302. package/five/controllers/vrPanorama.d.ts +56 -0
  303. package/five/controllers/xrPanorama.d.ts +81 -0
  304. package/five/core/camera.d.ts +65 -0
  305. package/five/core/internalWebGLRenderer.d.ts +14 -0
  306. package/five/core/panoVideo.d.ts +18 -0
  307. package/five/core/scene.d.ts +10 -0
  308. package/five/core/tiling.d.ts +43 -0
  309. package/five/declare.d.ts +2 -1
  310. package/five/gaussian-splatting/util/renderData.d.ts +52 -0
  311. package/five/gaussian-splatting/wasm/data.d.ts +20 -0
  312. package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
  313. package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
  314. package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
  315. package/five/index.d.ts +60 -4637
  316. package/five/index.js +193 -341
  317. package/five/index.mjs +26455 -31011
  318. package/five/meshes/boundingMesh.d.ts +12 -0
  319. package/five/meshes/intersectMesh.d.ts +8 -0
  320. package/five/meshes/panoCircleMesh.d.ts +35 -0
  321. package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
  322. package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
  323. package/five/meshes/panoSphereMesh.d.ts +27 -0
  324. package/five/model/helpers/coordinate-transform.d.ts +3 -0
  325. package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
  326. package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
  327. package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
  328. package/five/model/index.d.ts +70 -0
  329. package/five/model/intersection.d.ts +18 -0
  330. package/five/model/loaders/at3d.d.ts +12 -0
  331. package/five/model/loaders/b3dm.d.ts +9 -0
  332. package/five/model/loaders/dome.d.ts +22 -0
  333. package/five/model/loaders/domez.d.ts +11 -0
  334. package/five/model/loaders/fbx.d.ts +8 -0
  335. package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
  336. package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
  337. package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
  338. package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
  339. package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
  340. package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
  341. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
  342. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
  343. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
  344. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
  345. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
  346. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
  347. package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
  348. package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
  349. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
  350. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
  351. package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
  352. package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
  353. package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
  354. package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
  355. package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
  356. package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
  357. package/five/model/loaders/gltf.d.ts +10 -0
  358. package/five/model/loaders/obj.d.ts +9 -0
  359. package/five/model/loaders/pbm.d.ts +26 -0
  360. package/five/model/loaders/ply.d.ts +24 -0
  361. package/five/model/loaders/pnts.d.ts +8 -0
  362. package/five/model/loaders/protobuf/dome.d.ts +540 -0
  363. package/five/model/loaders/protobuf/pbm.d.ts +203 -0
  364. package/five/model/loaders/shared.d.ts +16 -0
  365. package/five/model/loaders/splat.d.ts +8 -0
  366. package/five/model/loaders/spz.d.ts +14 -0
  367. package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
  368. package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
  369. package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
  370. package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
  371. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
  372. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
  373. package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
  374. package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
  375. package/five/model/loaders/x3p.d.ts +22 -0
  376. package/five/model/materials/pbmMaterial.d.ts +137 -0
  377. package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
  378. package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
  379. package/five/model/model-scene.d.ts +172 -0
  380. package/five/model/model.d.ts +209 -0
  381. package/five/model/objects/pbmContainer.d.ts +28 -0
  382. package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
  383. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
  384. package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
  385. package/five/model/objects/pbmGroup.d.ts +8 -0
  386. package/five/model/objects/pbmMesh.d.ts +10 -0
  387. package/five/model/objects/pbmPointCloud.d.ts +7 -0
  388. package/five/model/parameter.d.ts +140 -0
  389. package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
  390. package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
  391. package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
  392. package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
  393. package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
  394. package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
  395. package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
  396. package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
  397. package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
  398. package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
  399. package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
  400. package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
  401. package/five/model/tile3d/header.d.ts +88 -0
  402. package/five/model/tile3d/index.d.ts +214 -0
  403. package/five/model/tile3d/tile-cache.d.ts +18 -0
  404. package/five/model/tile3d/tile-content.d.ts +10 -0
  405. package/five/model/tile3d/tile-node.d.ts +24 -0
  406. package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
  407. package/five/model/tile3d/tile.d.ts +79 -0
  408. package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
  409. package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
  410. package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
  411. package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
  412. package/five/model/tile3d/tileset.d.ts +69 -0
  413. package/five/model/tile3d/trajectory-content.d.ts +9 -0
  414. package/five/model/tile3d/trajectory-node.d.ts +15 -0
  415. package/five/model/tile3d/trajectory.d.ts +30 -0
  416. package/five/model/tile3d/types.d.ts +33 -0
  417. package/five/model/view-layer.d.ts +20 -0
  418. package/five/renderer/five-renderer.d.ts +17 -0
  419. package/five/renderer/index.d.ts +3 -0
  420. package/five/renderer/postprocessing/composer.d.ts +37 -0
  421. package/five/renderer/postprocessing/index.d.ts +7 -0
  422. package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
  423. package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
  424. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
  425. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
  426. package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
  427. package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
  428. package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
  429. package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
  430. package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
  431. package/five/renderer/tools/full-screen-quad.d.ts +15 -0
  432. package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
  433. package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
  434. package/five/renderer/tools/render-full-screen.d.ts +2 -0
  435. package/five/texture/histogram.d.ts +54 -0
  436. package/five/texture/imageBitmap.d.ts +13 -0
  437. package/five/texture/initTexture.d.ts +3 -0
  438. package/five/texture/loader.d.ts +39 -0
  439. package/five/texture/textureData.d.ts +11 -0
  440. package/five/thirdparty/fflate.d.ts +1407 -0
  441. package/five/thirdparty/hammer.d.ts +375 -0
  442. package/five/thirdparty/jsrsasign.d.ts +753 -0
  443. package/five/thirdparty/meshopt_decoder.d.ts +15 -0
  444. package/five/three-version-check.d.ts +1 -0
  445. package/five/types/addableObject.d.ts +12 -0
  446. package/five/types/cube.d.ts +1 -0
  447. package/five/types/gestureInput.d.ts +24 -0
  448. package/five/types/imageOptions.d.ts +20 -0
  449. package/five/types/intersectMeshInterface.d.ts +8 -0
  450. package/five/types/movePanoEffect.d.ts +13 -0
  451. package/five/types/movePanoOptions.d.ts +36 -0
  452. package/five/types/panoCircleMeshInterface.d.ts +34 -0
  453. package/five/types/plugin.d.ts +25 -0
  454. package/five/types/pose.d.ts +17 -0
  455. package/five/types/state.d.ts +20 -0
  456. package/five/types/viewport.d.ts +22 -0
  457. package/five/utils/ajax.d.ts +66 -0
  458. package/five/utils/animationFrameLoop.d.ts +45 -0
  459. package/five/utils/array.d.ts +31 -0
  460. package/five/utils/asyncTaskQueue.d.ts +8 -0
  461. package/five/utils/bufferGeometry.d.ts +33 -0
  462. package/five/utils/calculateProgress.d.ts +39 -0
  463. package/five/utils/calculateThreeMouse.d.ts +13 -0
  464. package/five/utils/canplayVideo.d.ts +2 -0
  465. package/five/utils/clamp.d.ts +2 -0
  466. package/five/utils/clock.d.ts +17 -0
  467. package/five/utils/createSymbol.d.ts +5 -0
  468. package/five/utils/decodeText.d.ts +2 -0
  469. package/five/utils/deepEqual.d.ts +2 -0
  470. package/five/utils/deepFreeze.d.ts +2 -0
  471. package/five/utils/defineProperty.d.ts +9 -0
  472. package/five/utils/detector.d.ts +14 -0
  473. package/five/utils/distance.d.ts +10 -0
  474. package/five/utils/draco.d.ts +26 -0
  475. package/five/utils/easing.d.ts +63 -0
  476. package/five/utils/event.d.ts +159 -0
  477. package/five/utils/formatRad.d.ts +7 -0
  478. package/five/utils/imageSupport.d.ts +6 -0
  479. package/five/utils/imageURL.d.ts +42 -0
  480. package/five/utils/isEmptyObject.d.ts +2 -0
  481. package/five/utils/isNil.d.ts +6 -0
  482. package/five/utils/isNumber.d.ts +2 -0
  483. package/five/utils/isPowerOfTwo.d.ts +2 -0
  484. package/five/utils/isPromise.d.ts +2 -0
  485. package/five/utils/isSimilar.d.ts +6 -0
  486. package/five/utils/json.d.ts +7 -0
  487. package/five/utils/ktx2.d.ts +30 -0
  488. package/five/utils/lzma/index.d.ts +2 -0
  489. package/five/utils/lzma/lzma.d.ts +3 -0
  490. package/five/utils/lzma/lzmaWASM.d.ts +2 -0
  491. package/five/utils/lzma/lzmaWorker.d.ts +14 -0
  492. package/five/utils/memoryUsage.d.ts +29 -0
  493. package/five/utils/motion.d.ts +38 -0
  494. package/five/utils/noop.d.ts +6 -0
  495. package/five/utils/now.d.ts +7 -0
  496. package/five/utils/pano.d.ts +9 -0
  497. package/five/utils/pick.d.ts +3 -0
  498. package/five/utils/poseUtils.d.ts +5 -0
  499. package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
  500. package/five/utils/renderDepth.d.ts +2 -0
  501. package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
  502. package/five/utils/requestPermission.d.ts +3 -0
  503. package/five/utils/shaderContentFix.d.ts +7 -0
  504. package/five/utils/shaderMaterial.d.ts +20 -0
  505. package/five/utils/stateUtils.d.ts +5 -0
  506. package/five/utils/string-pattern.d.ts +8 -0
  507. package/five/utils/subscribe.d.ts +67 -0
  508. package/five/utils/tileCube.d.ts +19 -0
  509. package/five/utils/toFastProperties.d.ts +1 -0
  510. package/five/utils/typedCache.d.ts +10 -0
  511. package/five/utils/uniform.d.ts +15 -0
  512. package/five/utils/url.d.ts +35 -0
  513. package/five/utils/uuid.d.ts +5 -0
  514. package/five/utils/values.d.ts +2 -0
  515. package/five/utils/vectorCoordinates.d.ts +29 -0
  516. package/five/utils/volume.d.ts +111 -0
  517. package/five/utils/webglError.d.ts +7 -0
  518. package/five/utils/worker.d.ts +26 -0
  519. package/five/webxr/XRControllerModelFactory.d.ts +28 -0
  520. package/five/webxr/motionHelper.d.ts +68 -0
  521. package/five/webxr/xrButton.d.ts +4 -0
  522. package/five/webxr/xrController.d.ts +24 -0
  523. package/five/webxr/xrManager.d.ts +84 -0
  524. package/five/work/_ALLOW_HOST.d.ts +2 -0
  525. package/five/work/index.d.ts +6 -0
  526. package/five/work/keychain.d.ts +5 -0
  527. package/five/work/looseWorkType.d.ts +121 -0
  528. package/five/work/verify.d.ts +7 -0
  529. package/five/work/work.d.ts +236 -0
  530. package/five/work/workFetcher.d.ts +4 -0
  531. package/five/work/workJson.d.ts +3 -0
  532. package/five/work/workJsonType.d.ts +73 -0
  533. package/five/work/workObserverUtils.d.ts +36 -0
  534. package/five/work/workParser.d.ts +6 -0
  535. package/five/work/workResolvedObserver.d.ts +12 -0
  536. package/five/work/workVerify.d.ts +2 -0
  537. package/five/work/works.d.ts +10 -0
  538. package/gltf-loader/gltf-object.d.ts +17 -0
  539. package/gltf-loader/index.d.ts +60 -160
  540. package/gltf-loader/index.js +9 -9
  541. package/gltf-loader/index.mjs +1351 -1451
  542. package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
  543. package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
  544. package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
  545. package/line/circle_png.d.ts +1 -0
  546. package/line/index.d.ts +19 -69
  547. package/line/index.js +4 -4
  548. package/line/index.mjs +334 -513
  549. package/line/utils/Line2.d.ts +7 -0
  550. package/line/utils/LineGeometry.d.ts +10 -0
  551. package/line/utils/LineMaterial.d.ts +20 -0
  552. package/line/utils/LineSegments2.d.ts +11 -0
  553. package/line/utils/LineSegmentsGeometry.d.ts +15 -0
  554. package/llms.txt +43 -31
  555. package/package.json +11 -2
  556. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  557. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  558. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  559. package/plugins/BasePlugin/index.d.ts +119 -0
  560. package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
  561. package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
  562. package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
  563. package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
  564. package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
  565. package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
  566. package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
  567. package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
  568. package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
  569. package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
  570. package/plugins/ItemMaskPlugin/index.d.ts +5 -0
  571. package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
  572. package/plugins/OrientationPlugin/Controller.d.ts +82 -0
  573. package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
  574. package/plugins/OrientationPlugin/index.d.ts +6 -0
  575. package/plugins/OrientationPlugin/typing.d.ts +25 -0
  576. package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
  577. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  578. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  579. package/plugins/PluginTemplate/Controller.d.ts +27 -0
  580. package/plugins/PluginTemplate/index.d.ts +5 -0
  581. package/plugins/PluginTemplate/typing.d.ts +21 -0
  582. package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
  583. package/plugins/TrajectoryPlugin/index.d.ts +6 -0
  584. package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
  585. package/plugins/index.d.ts +9 -1102
  586. package/plugins/index.js +17 -21
  587. package/plugins/index.mjs +3342 -4245
  588. package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
  589. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  590. package/plugins/utils/absoluteUrl.d.ts +5 -0
  591. package/plugins/utils/clamp.d.ts +2 -0
  592. package/plugins/utils/loadImage.d.ts +1 -0
  593. package/plugins/utils/motion.d.ts +38 -0
  594. package/plugins/utils/now.d.ts +6 -0
  595. package/plugins/utils/uuid.d.ts +5 -0
  596. package/react/canvas.d.ts +19 -0
  597. package/react/context.d.ts +11 -0
  598. package/react/createProvider.d.ts +95 -0
  599. package/react/createStore.d.ts +144 -0
  600. package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
  601. package/react/hooks/useFiveAction.d.ts +147 -0
  602. package/react/hooks/useFiveCameraDirection.d.ts +7 -0
  603. package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
  604. package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
  605. package/react/hooks/useFiveCurrentState.d.ts +15 -0
  606. package/react/hooks/useFiveEventCallback.d.ts +12 -0
  607. package/react/hooks/useFiveFloor.d.ts +15 -0
  608. package/react/hooks/useFiveHelper.d.ts +14 -0
  609. package/react/hooks/useFiveModelBounding.d.ts +5 -0
  610. package/react/hooks/useFiveModelEffect.d.ts +14 -0
  611. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
  612. package/react/hooks/useFiveModelReadyState.d.ts +8 -0
  613. package/react/hooks/useFiveProject2d.d.ts +20 -0
  614. package/react/hooks/useFiveSceneEffect.d.ts +21 -0
  615. package/react/hooks/useFiveState.d.ts +6 -0
  616. package/react/hooks/useFiveWork.d.ts +29 -0
  617. package/react/index.d.ts +24 -830
  618. package/react/index.js +3 -3
  619. package/react/index.mjs +572 -783
  620. package/react/rendererPool.d.ts +7 -0
  621. package/react/withFive.d.ts +213 -0
  622. package/shader-lib/EvenessPlane/index.d.ts +10 -0
  623. package/shader-lib/PointCloudExpand/index.d.ts +59 -0
  624. package/shader-lib/PolygonCuter/index.d.ts +52 -0
  625. package/shader-lib/PolygonCuter/worker.d.ts +14 -0
  626. package/shader-lib/ShineModel/index.d.ts +7 -0
  627. package/shader-lib/SweepModel/index.d.ts +7 -0
  628. package/shader-lib/index.d.ts +5 -86
  629. package/shader-lib/index.js +13 -14
  630. package/shader-lib/index.mjs +424 -824
  631. package/sticker/geometry.d.ts +3 -0
  632. package/sticker/index.d.ts +68 -71
  633. package/sticker/index.js +3 -3
  634. package/sticker/index.mjs +102 -142
  635. package/umd/five-gltf-loader.js +9 -9
  636. package/umd/five-line.js +4 -4
  637. package/umd/five-plugins.js +17 -21
  638. package/umd/five-react.js +3 -3
  639. package/umd/five-shader-lib.js +13 -14
  640. package/umd/five-sticker.js +3 -3
  641. package/umd/five-vfx.js +21 -21
  642. package/umd/five-vue.js +3 -3
  643. package/umd/five.js +188 -336
  644. package/vfx/airflow/airflow.d.ts +18 -0
  645. package/vfx/airflow/fragment-shader.d.ts +2 -0
  646. package/vfx/airflow/vertex-shader.d.ts +2 -0
  647. package/vfx/common/scale-shader.d.ts +2 -0
  648. package/vfx/common/simplex-noise-shader.d.ts +2 -0
  649. package/vfx/frame/fragment-shader.d.ts +2 -0
  650. package/vfx/frame/frame.d.ts +22 -0
  651. package/vfx/frame/vertex-shader.d.ts +2 -0
  652. package/vfx/index.d.ts +7 -363
  653. package/vfx/index.js +21 -21
  654. package/vfx/index.mjs +454 -910
  655. package/vfx/particle/fragment-shader.d.ts +2 -0
  656. package/vfx/particle/instance.d.ts +36 -0
  657. package/vfx/particle/particle.d.ts +205 -0
  658. package/vfx/particle/utils.d.ts +11 -0
  659. package/vfx/particle/vertex-shader.d.ts +2 -0
  660. package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
  661. package/vfx/particle-gpu/instance.d.ts +36 -0
  662. package/vfx/particle-gpu/particle.d.ts +95 -0
  663. package/vfx/particle-gpu/utils.d.ts +11 -0
  664. package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
  665. package/vfx/spotLight/fragment-shader.d.ts +2 -0
  666. package/vfx/spotLight/spotLight.d.ts +15 -0
  667. package/vfx/spotLight/vertex-shader.d.ts +2 -0
  668. package/vue/context.d.ts +7 -0
  669. package/vue/hooks/FiveCanvas.d.ts +36 -0
  670. package/vue/hooks/FiveProvider.d.ts +35 -0
  671. package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
  672. package/vue/hooks/useFiveAction.d.ts +178 -0
  673. package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
  674. package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
  675. package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
  676. package/vue/hooks/useFiveCurrentState.d.ts +16 -0
  677. package/vue/hooks/useFiveEventCallback.d.ts +11 -0
  678. package/vue/hooks/useFiveFloor.d.ts +16 -0
  679. package/vue/hooks/useFiveHelper.d.ts +15 -0
  680. package/vue/hooks/useFiveModel.d.ts +7 -0
  681. package/vue/hooks/useFiveModelBounding.d.ts +7 -0
  682. package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
  683. package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
  684. package/vue/hooks/useFiveProject2d.d.ts +26 -0
  685. package/vue/hooks/useFiveScene.d.ts +6 -0
  686. package/vue/hooks/useFiveState.d.ts +16 -0
  687. package/vue/hooks/useFiveWork.d.ts +30 -0
  688. package/vue/index.d.ts +23 -467
  689. package/vue/index.js +3 -3
  690. package/vue/index.mjs +309 -301
  691. package/vue/rendererPool.d.ts +10 -0
  692. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  693. package/work-downloader/components/model.d.ts +3 -0
  694. package/work-downloader/components/observer.d.ts +7 -0
  695. package/work-downloader/download.d.ts +16 -0
  696. package/work-downloader/index.d.ts +2 -33
  697. package/work-downloader/index.js +3 -3
  698. package/work-downloader/index.mjs +317 -556
  699. package/work-downloader/type.d.ts +28 -0
  700. package/work-downloader/utils/download-to-file.d.ts +1 -0
  701. package/work-downloader/utils/image-processing.d.ts +7 -0
  702. package/work-downloader/utils/join-url.d.ts +2 -0
  703. package/work-downloader/utils/log.d.ts +1 -0
  704. package/work-downloader/utils/relative-url.d.ts +1 -0
  705. package/docs/documents/five.FivePlugin.plugin.html +0 -60
  706. package/docs/documents/plugin.html +0 -60
  707. package/docs/media/five.ts +0 -2881
  708. package/docs/media/pass.ts +0 -64
  709. package/guides/ai-doc-guidelines.md +0 -72
  710. package/guides/features/3dtile.md +0 -264
  711. package/guides/features/parameter.md +0 -178
  712. package/guides/plugin.md +0 -206
  713. /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
  714. /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
  715. /package/{guides → ai_guides}/support.md +0 -0
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2026/1/28
5
- * Version: 6.8.0-alpha.2
4
+ * Generated: 3/19/2026
5
+ * Version: 6.8.0-alpha.21
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,10 +252,10 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("three");function He(p){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const u in p)if(u!=="default"){const m=Object.getOwnPropertyDescriptor(p,u);Object.defineProperty(g,u,m.get?m:{enumerable:!0,get:()=>p[u]})}}return g.default=p,Object.freeze(g)}const be=He(c);var Ie=function(p,g){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,m){u.__proto__=m}||function(u,m){for(var T in m)Object.prototype.hasOwnProperty.call(m,T)&&(u[T]=m[T])},Ie(p,g)};function Oe(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");Ie(p,g);function u(){this.constructor=p}p.prototype=g===null?Object.create(g):(u.prototype=g.prototype,new u)}var Fe=(function(){function p(e){c.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}p.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:p,load:function(e,r,n,t){var a=this,i;this.resourcePath!==""?i=this.resourcePath:this.path!==""?i=this.path:i=c.LoaderUtils.extractUrlBase(e),a.manager.itemStart(e);var s=function(l){t?t(l):console.error(l),a.manager.itemError(e),a.manager.itemEnd(e)},o=new c.FileLoader(a.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),a.crossOrigin==="use-credentials"&&o.setWithCredentials(!0),o.load(e,function(l){try{a.parse(l,i,function(f){r(f),a.manager.itemEnd(e)},s)}catch(f){s(f)}},n,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,r,n,t){var a,i={};if(typeof e=="string")a=e;else{var s=c.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(s===D){try{i[u.KHR_BINARY_GLTF]=new U(e)}catch(h){t&&t(h);return}a=i[u.KHR_BINARY_GLTF].content}else a=c.LoaderUtils.decodeText(new Uint8Array(e))}var o=JSON.parse(a);if(o.asset===void 0||o.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}if(o.extensionsUsed)for(var l=0;l<o.extensionsUsed.length;++l){var f=o.extensionsUsed[l],v=o.extensionsRequired||[];switch(f){case u.KHR_LIGHTS_PUNCTUAL:i[f]=new T(o);break;case u.KHR_MATERIALS_CLEARCOAT:i[f]=new M;break;case u.KHR_MATERIALS_TRANSMISSION:i[f]=new C;break;case u.KHR_MATERIALS_UNLIT:i[f]=new A;break;case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:i[f]=new j;break;case u.KHR_DRACO_MESH_COMPRESSION:i[f]=new x(o,this.dracoLoader);break;case u.MSFT_TEXTURE_DDS:i[f]=new m(this.ddsLoader);break;case u.KHR_TEXTURE_TRANSFORM:i[f]=new w;break;case u.KHR_MESH_QUANTIZATION:i[f]=new te;break;case u.REALSEE_MATERIALS_LIGHTMAP:i[f]=new Q;break;default:v.indexOf(f)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}var d=new O(o,i,{path:r||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager});d.fileLoader.setRequestHeader(this.requestHeader),d.parse(n,t)}});function g(){var e={};return{get:function(r){return e[r]},add:function(r,n){e[r]=n},remove:function(r){delete e[r]},removeAll:function(){e={}}}}var u={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",MSFT_TEXTURE_DDS:"MSFT_texture_dds",REALSEE_MATERIALS_LIGHTMAP:"REALSEE_materials_lightmap"};function m(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");this.name=u.MSFT_TEXTURE_DDS,this.ddsLoader=e}function T(e){this.name=u.KHR_LIGHTS_PUNCTUAL;var r=e.extensions&&e.extensions[u.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=r.lights||[]}T.prototype.loadLight=function(e){var r=this.lightDefs[e],n,t=new c.Color(16777215);r.color!==void 0&&t.fromArray(r.color);var a=r.range!==void 0?r.range:0;switch(r.type){case"directional":n=new c.DirectionalLight(t),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new c.PointLight(t),n.distance=a;break;case"spot":n=new c.SpotLight(t),n.distance=a,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,n.angle=r.spot.outerConeAngle,n.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,n.target.position.set(0,0,-1),n.add(n.target);break;default:throw new Error('THREE.GLTFLoader: Unexpected light type, "'+r.type+'".')}return n.position.set(0,0,0),n.decay=2,r.intensity!==void 0&&(n.intensity=r.intensity),n.name=r.name||"light_"+e,Promise.resolve(n)};function A(){this.name=u.KHR_MATERIALS_UNLIT}A.prototype.getMaterialType=function(){return c.MeshBasicMaterial},A.prototype.extendParams=function(e,r,n){var t=[];e.color=new c.Color(1,1,1),e.opacity=1;var a=r.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){var i=a.baseColorFactor;e.color.fromArray(i),e.opacity=i[3]}a.baseColorTexture!==void 0&&t.push(n.assignTexture(e,"map",a.baseColorTexture))}return Promise.all(t)};function M(){this.name=u.KHR_MATERIALS_CLEARCOAT}M.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},M.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];if(a.clearcoatFactor!==void 0&&(e.clearcoat=a.clearcoatFactor),a.clearcoatTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatMap",a.clearcoatTexture)),a.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=a.clearcoatRoughnessFactor),a.clearcoatRoughnessTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatRoughnessMap",a.clearcoatRoughnessTexture)),a.clearcoatNormalTexture!==void 0&&(t.push(n.assignTexture(e,"clearcoatNormalMap",a.clearcoatNormalTexture)),a.clearcoatNormalTexture.scale!==void 0)){var i=a.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new c.Vector2(i,i)}return Promise.all(t)};function C(){this.name=u.KHR_MATERIALS_TRANSMISSION}C.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},C.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];return a.transmissionFactor!==void 0&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=e.opacity!==void 0?e.opacity:.5),Promise.all(t)};var D="glTF",_=12,I={JSON:1313821514,BIN:5130562};function U(e){this.name=u.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(e,0,_);if(this.header={magic:c.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==D)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=new DataView(e,_),t=0;t<n.byteLength;){var a=n.getUint32(t,!0);t+=4;var i=n.getUint32(t,!0);if(t+=4,i===I.JSON){var s=new Uint8Array(e,_+t,a);this.content=c.LoaderUtils.decodeText(s)}else if(i===I.BIN){var o=_+t;this.body=e.slice(o,o+a)}t+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}function x(e,r){if(!r)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=u.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=r,this.dracoLoader.preload()}x.prototype.decodePrimitive=function(e,r){var n=this.json,t=this.dracoLoader,a=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,s={},o={},l={};for(var f in i){var v=le[f]||f.toLowerCase();s[v]=i[f]}for(f in e.attributes){var v=le[f]||f.toLowerCase();if(i[f]!==void 0){var d=n.accessors[e.attributes[f]],h=Z[d.componentType];l[v]=h,o[v]=d.normalized===!0}}return r.getDependency("bufferView",a).then(function(S){return new Promise(function(L){t.decodeDracoFile(S,function(E){for(var y in E.attributes){var R=E.attributes[y],F=o[y];F!==void 0&&(R.normalized=F)}L(E)},s,l)})})};function w(){this.name=u.KHR_TEXTURE_TRANSFORM}w.prototype.extendTexture=function(e,r){return e=e.clone(),r.offset!==void 0&&e.offset.fromArray(r.offset),r.rotation!==void 0&&(e.rotation=r.rotation),r.scale!==void 0&&e.repeat.fromArray(r.scale),r.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e};function b(e){c.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP"," uniform sampler2D specularMap;","#endif"].join(`
256
- `),n=["#ifdef USE_GLOSSINESSMAP"," uniform sampler2D glossinessMap;","#endif"].join(`
257
- `),t=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP"," vec4 texelSpecular = texture2D( specularMap, vUv );"," texelSpecular = sRGBToLinear( texelSpecular );"," // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture"," specularFactor *= texelSpecular.rgb;","#endif"].join(`
258
- `),a=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
259
- `),i=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
260
- `),s={specular:{value:new c.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var l in s)o.uniforms[l]=s[l];o.fragmentShader=o.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;"),o.fragmentShader=o.fragmentShader.replace("uniform float metalness;","uniform float glossiness;"),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_pars_fragment>",r),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_pars_fragment>",n),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_fragment>",t),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_fragment>",a),o.fragmentShader=o.fragmentShader.replace("#include <lights_physical_fragment>",i)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(o){s.specular.value=o}},specularMap:{get:function(){return s.specularMap.value},set:function(o){s.specularMap.value=o}},glossiness:{get:function(){return s.glossiness.value},set:function(o){s.glossiness.value=o}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(o){s.glossinessMap.value=o,o?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}b.prototype=Object.create(c.MeshStandardMaterial.prototype),b.prototype.constructor=b,b.prototype.copy=function(e){return c.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function j(){return{name:u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return b},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new c.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(t.diffuseFactor)){var i=t.diffuseFactor;e.color.fromArray(i),e.opacity=i[3]}if(t.diffuseTexture!==void 0&&a.push(n.assignTexture(e,"map",t.diffuseTexture)),e.emissive=new c.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new c.Color(1,1,1),Array.isArray(t.specularFactor)&&e.specular.fromArray(t.specularFactor),t.specularGlossinessTexture!==void 0){var s=t.specularGlossinessTexture;a.push(n.assignTexture(e,"glossinessMap",s)),a.push(n.assignTexture(e,"specularMap",s))}return Promise.all(a)},createMaterial:function(e){var r=new b(e);return r.fog=!0,r.color=e.color,r.map=e.map===void 0?null:e.map,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=e.aoMap===void 0?null:e.aoMap,r.aoMapIntensity=1,r.emissive=e.emissive,r.emissiveIntensity=1,r.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,r.bumpMap=e.bumpMap===void 0?null:e.bumpMap,r.bumpScale=1,r.normalMap=e.normalMap===void 0?null:e.normalMap,r.normalMapType=c.TangentSpaceNormalMap,e.normalScale&&(r.normalScale=e.normalScale),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=e.specularMap===void 0?null:e.specularMap,r.specular=e.specular,r.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,r.glossiness=e.glossiness,r.alphaMap=null,r.envMap=e.envMap===void 0?null:e.envMap,r.envMapIntensity=1,r.refractionRatio=.98,r}}}function te(){this.name=u.KHR_MESH_QUANTIZATION}function P(e,r,n,t){c.Interpolant.call(this,e,r,n,t)}P.prototype=Object.create(c.Interpolant.prototype),P.prototype.constructor=P,P.prototype.copySampleValue_=function(e){for(var r=this.resultBuffer,n=this.sampleValues,t=this.valueSize,a=e*t*3+t,i=0;i!==t;i++)r[i]=n[a+i];return r},P.prototype.beforeStart_=P.prototype.copySampleValue_,P.prototype.afterEnd_=P.prototype.copySampleValue_,P.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,l=s*3,f=t-r,v=(n-r)/f,d=v*v,h=d*v,S=e*l,L=S-l,E=-2*h+3*d,y=h-d,R=1-E,F=y-d+v,H=0;H!==s;H++){var ne=i[L+H+s],ae=i[L+H+o]*f,ee=i[S+H+s],K=i[S+H]*f;a[H]=R*ne+F*ae+E*ee+y*K}return a};function Q(e){this.parser=e,this.name=u.REALSEE_MATERIALS_LIGHTMAP}Q.prototype.getMaterialType=function(e){return c.MeshPhongMaterial},Q.prototype.extendParams=function(e,r,n){if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var t=[],a=r.extensions[this.name];return a.lightMapTexture!==void 0&&t.push(n.assignTexture(e,"lightMap",a.lightMapTexture)),a.lightMapIntensity!==void 0&&(e.lightMapIntensity=a.lightMapIntensity),Promise.all(t)};var B={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Z={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},$={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},z={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},W={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},le={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},V={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ae={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},pe={"image/png":c.RGBAFormat,"image/jpeg":c.RGBFormat};function he(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}function Se(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),e.DefaultMaterial}function oe(e,r,n){for(var t in n.extensions)e[t]===void 0&&(r.userData.gltfExtensions=r.userData.gltfExtensions||{},r.userData.gltfExtensions[t]=n.extensions[t])}function Y(e,r){r.extras!==void 0&&(typeof r.extras=="object"?Object.assign(e.userData,r.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+r.extras))}function ye(e,r,n){for(var t=!1,a=!1,i=0,s=r.length;i<s;i++){var o=r[i];if(o.POSITION!==void 0&&(t=!0),o.NORMAL!==void 0&&(a=!0),t&&a)break}if(!t&&!a)return Promise.resolve(e);for(var l=[],f=[],i=0,s=r.length;i<s;i++){var o=r[i];if(t){var v=o.POSITION!==void 0?n.getDependency("accessor",o.POSITION):e.attributes.position;l.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;f.push(v)}}return Promise.all([Promise.all(l),Promise.all(f)]).then(function(d){var h=d[0],S=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=S),e.morphTargetsRelative=!0,e})}function Ee(e,r){if(e.updateMorphTargets(),r.weights!==void 0)for(var n=0,t=r.weights.length;n<t;n++)e.morphTargetInfluences[n]=r.weights[n];if(r.extras&&Array.isArray(r.extras.targetNames)){var a=r.extras.targetNames;if(e.morphTargetInfluences.length===a.length){e.morphTargetDictionary={};for(var n=0,t=a.length;n<t;n++)e.morphTargetDictionary[a[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function G(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+q(r.attributes):n=e.indices+":"+q(e.attributes)+":"+e.mode,n}function q(e){for(var r="",n=Object.keys(e).sort(),t=0,a=n.length;t<a;t++)r+=n[t]+":"+e[n[t]]+";";return r}function O(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new g,this.associations=new Map,this.primitiveCache={},this.textureLoader=new c.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}O.prototype.parse=function(e,r){var n=this,t=this.json,a=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(i){var s={scene:i[0][t.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:t.asset,parser:n,userData:{}};oe(a,s,t),Y(s,t),e(s)}).catch(r)},O.prototype.markDefs=function(){for(var e=this.json.nodes||[],r=this.json.skins||[],n=this.json.meshes||[],t={},a={},i=0,s=r.length;i<s;i++)for(var o=r[i].joints,l=0,f=o.length;l<f;l++)e[o[l]].isBone=!0;for(var v=0,d=e.length;v<d;v++){var h=e[v];h.mesh!==void 0&&(t[h.mesh]===void 0&&(t[h.mesh]=a[h.mesh]=0),t[h.mesh]++,h.skin!==void 0&&(n[h.mesh].isSkinnedMesh=!0))}this.json.meshReferences=t,this.json.meshUses=a},O.prototype.getDependency=function(e,r){var n=e+":"+r,t=this.cache.get(n);if(!t){switch(e){case"scene":t=this.loadScene(r);break;case"node":t=this.loadNode(r);break;case"mesh":t=this.loadMesh(r);break;case"accessor":t=this.loadAccessor(r);break;case"bufferView":t=this.loadBufferView(r);break;case"buffer":t=this.loadBuffer(r);break;case"material":t=this.loadMaterial(r);break;case"texture":t=this.loadTexture(r);break;case"skin":t=this.loadSkin(r);break;case"animation":t=this.loadAnimation(r);break;case"camera":t=this.loadCamera(r);break;case"light":t=this.extensions[u.KHR_LIGHTS_PUNCTUAL].loadLight(r);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,t)}return t},O.prototype.getDependencies=function(e){var r=this.cache.get(e);if(!r){var n=this,t=this.json[e+(e==="mesh"?"es":"s")]||[];r=Promise.all(t.map(function(a,i){return n.getDependency(e,i)})),this.cache.add(e,r)}return r},O.prototype.loadBuffer=function(e){var r=this.json.buffers[e],n=this.fileLoader;if(r.type&&r.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+r.type+" buffer type is not supported.");if(r.uri===void 0&&e===0)return Promise.resolve(this.extensions[u.KHR_BINARY_GLTF].body);var t=this.options;return new Promise(function(a,i){n.load(he(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},O.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(n){var t=r.byteLength||0,a=r.byteOffset||0;return n.slice(a,a+t)})},O.prototype.loadAccessor=function(e){var r=this,n=this.json,t=this.json.accessors[e];if(t.bufferView===void 0&&t.sparse===void 0)return Promise.resolve(null);var a=[];return t.bufferView!==void 0?a.push(this.getDependency("bufferView",t.bufferView)):a.push(null),t.sparse!==void 0&&(a.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(a).then(function(i){var s=i[0],o=W[t.type],l=Z[t.componentType],f=l.BYTES_PER_ELEMENT,v=f*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,S=t.normalized===!0,L,E;if(h&&h!==v){var y=Math.floor(d/h),R="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+y+":"+t.count,F=r.cache.get(R);F||(L=new l(s,y*h,t.count*h/f),F=new c.InterleavedBuffer(L,h/f),r.cache.add(R,F)),E=new c.InterleavedBufferAttribute(F,o,d%h/f,S)}else s===null?L=new l(t.count*o):L=new l(s,d,t.count*o),E=new c.BufferAttribute(L,o,S);if(t.sparse!==void 0){var H=W.SCALAR,ne=Z[t.sparse.indices.componentType],ae=t.sparse.indices.byteOffset||0,ee=t.sparse.values.byteOffset||0,K=new ne(i[1],ae,t.sparse.count*H),ue=new l(i[2],ee,t.sparse.count*o);s!==null&&(E=new c.BufferAttribute(E.array.slice(),E.itemSize,E.normalized));for(var N=0,Le=K.length;N<Le;N++){var se=K[N];if(E.setX(se,ue[N*o]),o>=2&&E.setY(se,ue[N*o+1]),o>=3&&E.setZ(se,ue[N*o+2]),o>=4&&E.setW(se,ue[N*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return E})},O.prototype.loadTexture=function(e){var r=this,n=this.json,t=this.options,a=this.textureLoader,i=self.URL||self.webkitURL,s=n.textures[e],o=s.extensions||{},l;o[u.MSFT_TEXTURE_DDS]?l=n.images[o[u.MSFT_TEXTURE_DDS].source]:l=n.images[s.source];var f=l.uri,v=!1;return l.bufferView!==void 0&&(f=r.getDependency("bufferView",l.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:l.mimeType});return f=i.createObjectURL(h),f})),Promise.resolve(f).then(function(d){var h=t.manager.getHandler(d);return h||(h=o[u.MSFT_TEXTURE_DDS]?r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(S,L){h.load(he(d,t.path),S,void 0,L)})}).then(function(d){v===!0&&i.revokeObjectURL(f),d.flipY=!1,s.name&&(d.name=s.name),l.mimeType in pe&&(d.format=pe[l.mimeType]);var h=n.samplers||{},S=h[s.sampler]||{};return d.magFilter=$[S.magFilter]||c.LinearFilter,d.minFilter=$[S.minFilter]||c.LinearMipmapLinearFilter,d.wrapS=z[S.wrapS]||c.RepeatWrapping,d.wrapT=z[S.wrapT]||c.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},O.prototype.assignTexture=function(e,r,n){var t=this;return this.getDependency("texture",n.index).then(function(a){if(!a.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=c.RGBFormat;break}if(n.texCoord!==void 0&&n.texCoord!=0&&!(r==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),t.extensions[u.KHR_TEXTURE_TRANSFORM]){var i=n.extensions!==void 0?n.extensions[u.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var s=t.associations.get(a);a=t.extensions[u.KHR_TEXTURE_TRANSFORM].extendTexture(a,i),t.associations.set(a,s)}}e[r]=a})},O.prototype.assignFinalMaterial=function(e){var r=e.geometry,n=e.material,t=r.attributes.tangent!==void 0,a=r.attributes.color!==void 0,i=r.attributes.normal===void 0,s=e.isSkinnedMesh===!0,o=Object.keys(r.morphAttributes).length>0,l=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var f="PointsMaterial:"+n.uuid,v=this.cache.get(f);v||(v=new c.PointsMaterial,c.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(f,v)),n=v}else if(e.isLine){var f="LineBasicMaterial:"+n.uuid,d=this.cache.get(f);d||(d=new c.LineBasicMaterial,c.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(f,d)),n=d}if(t||a||i||s||o){var f="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(f+="specular-glossiness:"),s&&(f+="skinning:"),t&&(f+="vertex-tangents:"),a&&(f+="vertex-colors:"),i&&(f+="flat-shading:"),o&&(f+="morph-targets:"),l&&(f+="morph-normals:");var h=this.cache.get(f);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),l&&(h.morphNormals=!0),this.cache.add(f,h),this.associations.set(h,this.associations.get(n))),n=h}n.aoMap&&r.attributes.uv2===void 0&&r.attributes.uv!==void 0&&r.setAttribute("uv2",r.attributes.uv),n.normalScale&&!t&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!t&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},O.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},l=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var f=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=f.getMaterialType(),l.push(f.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),l.push(v.extendParams(s,a,r))}else{i=c.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new c.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var h=d.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}d.baseColorTexture!==void 0&&l.push(r.assignTexture(s,"map",d.baseColorTexture)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(l.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),l.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=c.DoubleSide);var S=a.alphaMode||ce.OPAQUE;if(S===ce.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,S===ce.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==c.MeshBasicMaterial&&(l.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new c.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==c.MeshBasicMaterial&&(l.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==c.MeshBasicMaterial&&(s.emissive=new c.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==c.MeshBasicMaterial&&l.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var L=t[u.KHR_MATERIALS_CLEARCOAT];i=L.getMaterialType(),l.push(L.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var L=t[u.KHR_MATERIALS_TRANSMISSION];i=L.getMaterialType(),l.push(L.extendParams(s,{extensions:o},r))}if(o[u.REALSEE_MATERIALS_LIGHTMAP]){var E=t[u.REALSEE_MATERIALS_LIGHTMAP];i=E.getMaterialType(),l.push(E.extendParams(s,{extensions:o},r))}return Promise.all(l).then(function(){var y;return i===b?y=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):y=new i(s),a.name&&(y.name=a.name),y.map&&(y.map.encoding=c.sRGBEncoding),y.emissiveMap&&(y.emissiveMap.encoding=c.sRGBEncoding),Y(y,a),r.associations.set(y,{type:"materials",index:e}),a.extensions&&oe(t,y,a),y})};function ve(e,r,n){var t=r.attributes,a=new c.Box3;if(t.POSITION!==void 0){var i=n.json.accessors[t.POSITION],s=i.min,o=i.max;if(s!==void 0&&o!==void 0)a.set(new c.Vector3(s[0],s[1],s[2]),new c.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var l=r.targets;if(l!==void 0){for(var f=new c.Vector3,v=new c.Vector3,d=0,h=l.length;d<h;d++){var S=l[d];if(S.POSITION!==void 0){var i=n.json.accessors[S.POSITION],s=i.min,o=i.max;s!==void 0&&o!==void 0?(v.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),v.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),v.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),f.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(f)}e.boundingBox=a;var L=new c.Sphere;a.getCenter(L.center),L.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=L}function X(e,r,n){var t=r.attributes,a=[];function i(f,v){return n.getDependency("accessor",f).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=le[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var l=n.getDependency("accessor",r.indices).then(function(f){e.setIndex(f)});a.push(l)}return Y(e,r),ve(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?ye(e,r.targets,n):e})}function ie(e,r){var n=e.getIndex();if(n===null){var t=[],a=e.getAttribute("position");if(a!==void 0){for(var i=0;i<a.count;i++)t.push(i);e.setIndex(t),n=e.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e}var s=n.count-2,o=[];if(r===c.TriangleFanDrawMode)for(var i=1;i<=s;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(var i=0;i<s;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==s&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(o),l}return O.prototype.loadGeometries=function(e){var r=this,n=this.extensions,t=this.primitiveCache;function a(h){return n[u.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,r).then(function(S){return X(S,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var l=e[s],f=G(l),v=t[f];if(v)i.push(v.promise);else{var d;l.extensions&&l.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(l):d=X(new c.BufferGeometry,l,r),t[f]={primitive:l,promise:d},i.push(d)}}return Promise.all(i)},O.prototype.loadMesh=function(e){for(var r=this,n=this.json,t=n.meshes[e],a=t.primitives,i=[],s=0,o=a.length;s<o;s++){var l=a[s].material===void 0?Se(this.cache):this.getDependency("material",a[s].material);i.push(l)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(f){for(var v=f.slice(0,f.length-1),d=f[f.length-1],h=[],S=0,L=d.length;S<L;S++){var E=d[S],y=a[S],R,F=v[S];if(y.mode===B.TRIANGLES||y.mode===B.TRIANGLE_STRIP||y.mode===B.TRIANGLE_FAN||y.mode===void 0)R=t.isSkinnedMesh===!0?new c.SkinnedMesh(E,F):new c.Mesh(E,F),R.isSkinnedMesh===!0&&!R.geometry.attributes.skinWeight.normalized&&R.normalizeSkinWeights(),y.mode===B.TRIANGLE_STRIP?R.geometry=ie(R.geometry,c.TriangleStripDrawMode):y.mode===B.TRIANGLE_FAN&&(R.geometry=ie(R.geometry,c.TriangleFanDrawMode));else if(y.mode===B.LINES)R=new c.LineSegments(E,F);else if(y.mode===B.LINE_STRIP)R=new c.Line(E,F);else if(y.mode===B.LINE_LOOP)R=new c.LineLoop(E,F);else if(y.mode===B.POINTS)R=new c.Points(E,F);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+y.mode);Object.keys(R.geometry.morphAttributes).length>0&&Ee(R,t),R.name=t.name||"mesh_"+e,d.length>1&&(R.name+="_"+S),Y(R,t),r.assignFinalMaterial(R),h.push(R)}if(h.length===1)return h[0];for(var H=new c.Group,S=0,L=h.length;S<L;S++)H.add(h[S]);return H})},O.prototype.loadCamera=function(e){var r,n=this.json.cameras[e],t=n[n.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?r=new c.PerspectiveCamera(c.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new c.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),Y(r,n),Promise.resolve(r)},O.prototype.loadSkin=function(e){var r=this.json.skins[e],n={joints:r.joints};return r.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",r.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},O.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],l=0,f=n.channels.length;l<f;l++){var v=n.channels[l],d=n.samplers[v.sampler],h=v.target,S=h.node!==void 0?h.node:h.id,L=n.parameters!==void 0?n.parameters[d.input]:d.input,E=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",S)),a.push(this.getDependency("accessor",L)),i.push(this.getDependency("accessor",E)),s.push(d),o.push(h)}return Promise.all([Promise.all(t),Promise.all(a),Promise.all(i),Promise.all(s),Promise.all(o)]).then(function(y){for(var R=y[0],F=y[1],H=y[2],ne=y[3],ae=y[4],ee=[],K=0,ue=R.length;K<ue;K++){var N=R[K],Le=F[K],se=H[K],Me=ne[K],_e=ae[K];if(N!==void 0){N.updateMatrix(),N.matrixAutoUpdate=!0;var ge;switch(V[_e.path]){case V.weights:ge=c.NumberKeyframeTrack;break;case V.rotation:ge=c.QuaternionKeyframeTrack;break;case V.position:case V.scale:default:ge=c.VectorKeyframeTrack;break}var De=N.name?N.name:N.uuid,Pe=Me.interpolation!==void 0?Ae[Me.interpolation]:c.InterpolateLinear,Te=[];V[_e.path]===V.weights?N.traverse(function(de){de.isMesh===!0&&de.morphTargetInfluences&&Te.push(de.name?de.name:de.uuid)}):Te.push(De);var J=se.array;if(se.normalized){var fe;if(J.constructor===Int8Array)fe=1/127;else if(J.constructor===Uint8Array)fe=1/255;else if(J.constructor==Int16Array)fe=1/32767;else if(J.constructor===Uint16Array)fe=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Ce=new Float32Array(J.length),re=0,Re=J.length;re<Re;re++)Ce[re]=J[re]*fe;J=Ce}for(var re=0,Re=Te.length;re<Re;re++){var we=new ge(Te[re]+"."+V[_e.path],Le.array,J,Pe);Me.interpolation==="CUBICSPLINE"&&(we.createInterpolant=function(Ge){return new P(this.times,this.values,this.getValueSize()/3,Ge)},we.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),ee.push(we)}}}var Ue=n.name?n.name:"animation_"+e;return new c.AnimationClip(Ue,void 0,ee)})},O.prototype.loadNode=function(e){var r=this.json,n=this.extensions,t=this,a=r.meshReferences,i=r.meshUses,s=r.nodes[e];return(function(){var o=[];return s.mesh!==void 0&&o.push(t.getDependency("mesh",s.mesh).then(function(l){var f;if(a[s.mesh]>1){var v=i[s.mesh]++;f=l.clone(),f.name+="_instance_"+v}else f=l;return s.weights!==void 0&&f.traverse(function(d){if(d.isMesh)for(var h=0,S=s.weights.length;h<S;h++)d.morphTargetInfluences[h]=s.weights[h]}),f})),s.camera!==void 0&&o.push(t.getDependency("camera",s.camera)),s.extensions&&s.extensions[u.KHR_LIGHTS_PUNCTUAL]&&s.extensions[u.KHR_LIGHTS_PUNCTUAL].light!==void 0&&o.push(t.getDependency("light",s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(o)})().then(function(o){var l;if(s.isBone===!0?l=new c.Bone:o.length>1?l=new c.Group:o.length===1?l=o[0]:l=new c.Object3D,l!==o[0])for(var f=0,v=o.length;f<v;f++)l.add(o[f]);if(s.name&&(l.userData.name=s.name,l.name=c.PropertyBinding.sanitizeNodeName(s.name)),Y(l,s),s.extensions&&oe(n,l,s),s.matrix!==void 0){var d=new c.Matrix4;d.fromArray(s.matrix),l.applyMatrix4(d)}else s.translation!==void 0&&l.position.fromArray(s.translation),s.rotation!==void 0&&l.quaternion.fromArray(s.rotation),s.scale!==void 0&&l.scale.fromArray(s.scale);return t.associations.set(l,{type:"nodes",index:e}),l})},O.prototype.loadScene=(function(){function e(r,n,t,a){var i=t.nodes[r];return a.getDependency("node",r).then(function(s){if(i.skin===void 0)return s;var o;return a.getDependency("skin",i.skin).then(function(l){o=l;for(var f=[],v=0,d=o.joints.length;v<d;v++)f.push(a.getDependency("node",o.joints[v]));return Promise.all(f)}).then(function(l){return s.traverse(function(f){if(f.isMesh){for(var v=[],d=[],h=0,S=l.length;h<S;h++){var L=l[h];if(L){v.push(L);var E=new c.Matrix4;o.inverseBindMatrices!==void 0&&E.fromArray(o.inverseBindMatrices.array,h*16),d.push(E)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}f.bind(new c.Skeleton(v,d),f.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var l=i.children,f=0,v=l.length;f<v;f++){var d=l[f];o.push(e(d,s,t,a))}return Promise.all(o)})}return function(n){var t=this.json,a=this.extensions,i=this.json.scenes[n],s=this,o=new c.Group;i.name&&(o.name=i.name),Y(o,i),i.extensions&&oe(a,o,i);for(var l=i.nodes||[],f=[],v=0,d=l.length;v<d;v++)f.push(e(l[v],o,t,s));return Promise.all(f).then(function(){return o})}})(),p})(),k=function(p){c.Loader.call(this,p),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};k.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:k,setDecoderPath:function(p){return this.decoderPath=p,this},setDecoderConfig:function(p){return this.decoderConfig=p,this},setWorkerLimit:function(p){return this.workerLimit=p,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(p,g,u,m){var T=new c.FileLoader(this.manager);T.setPath(this.path),T.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&T.setWithCredentials(!0),T.load(p,A=>{var M={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(A,M).then(g).catch(m)},u,m)},decodeDracoFile:function(p,g,u,m){var T={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:m||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,T).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var m=g.attributeTypes[u];m.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=m.name)}var T=JSON.stringify(g);if(k.taskCache.has(p)){var A=k.taskCache.get(p);if(A.key===T)return A.promise;if(p.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var M,C=this.workerNextTaskID++,D=p.byteLength,_=this._getWorker(C,D).then(I=>(M=I,new Promise((U,x)=>{M._callbacks[C]={resolve:U,reject:x},M.postMessage({type:"decode",id:C,taskConfig:g,buffer:p},[p])}))).then(I=>this._createGeometry(I.geometry));return _.catch(()=>!0).then(()=>{M&&C&&this._releaseTask(M,C)}),k.taskCache.set(p,{key:T,promise:_}),_},_createGeometry:function(p){var g=new c.BufferGeometry;p.index&&g.setIndex(new c.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var m=p.attributes[u],T=m.name,A=m.array,M=m.itemSize;g.setAttribute(T,new c.BufferAttribute(A,M))}return g},_loadLibrary:function(p,g){var u=new c.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((m,T)=>{u.load(p,m,void 0,T)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var p=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return p?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(u=>{var m=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var T=k.DRACOWorker.toString(),A=["/* draco decoder */",m,"","/* worker */",T.substring(T.indexOf("{")+1,T.lastIndexOf("}"))].join(`
261
- `);this.workerSourceURL=URL.createObjectURL(new Blob([A]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(T){var A=T.data;switch(A.type){case"decode":u._callbacks[A.id].resolve(A);break;case"error":u._callbacks[A.id].reject(A);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+A.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(m,T){return m._taskLoad>T._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}});k.DRACOWorker=function(){var p,g;onmessage=function(T){var A=T.data;switch(A.type){case"init":p=A.decoderConfig,g=new Promise(function(D){p.onModuleLoaded=function(_){D({draco:_})},DracoDecoderModule(p)});break;case"decode":var M=A.buffer,C=A.taskConfig;g.then(D=>{var _=D.draco,I=new _.Decoder,U=new _.DecoderBuffer;U.Init(new Int8Array(M),M.byteLength);try{var x=u(_,I,U,C),w=x.attributes.map(b=>b.array.buffer);x.index&&w.push(x.index.array.buffer),self.postMessage({type:"decode",id:A.id,geometry:x},w)}catch(b){console.error(b),self.postMessage({type:"error",id:A.id,error:b.message})}finally{_.destroy(U),_.destroy(I)}});break}};function u(T,A,M,C){var D=C.attributeIDs,_=C.attributeTypes,I,U,x=A.GetEncodedGeometryType(M);if(x===T.TRIANGULAR_MESH)I=new T.Mesh,U=A.DecodeBufferToMesh(M,I);else if(x===T.POINT_CLOUD)I=new T.PointCloud,U=A.DecodeBufferToPointCloud(M,I);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!U.ok()||I.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+U.error_msg());var w={index:null,attributes:[]};for(var b in D){var j=self[_[b]],te,P;if(C.useUniqueIDs)P=D[b],te=A.GetAttributeByUniqueId(I,P);else{if(P=A.GetAttributeId(I,T[D[b]]),P===-1)continue;te=A.GetAttribute(I,P)}w.attributes.push(m(T,A,I,b,j,te))}if(x===T.TRIANGULAR_MESH){for(var Q=I.num_faces(),B=Q*3,Z=new Uint32Array(B),$=new T.DracoInt32Array,z=0;z<Q;++z){A.GetFaceFromMesh(I,z,$);for(var W=0;W<3;++W)Z[z*3+W]=$.GetValue(W)}w.index={array:Z,itemSize:1},T.destroy($)}return T.destroy(I),w}function m(T,A,M,C,D,_){var I=_.num_components(),U=M.num_points(),x=U*I,w,b;switch(D){case Float32Array:w=new T.DracoFloat32Array,A.GetAttributeFloatForAllPoints(M,_,w),b=new Float32Array(x);break;case Int8Array:w=new T.DracoInt8Array,A.GetAttributeInt8ForAllPoints(M,_,w),b=new Int8Array(x);break;case Int16Array:w=new T.DracoInt16Array,A.GetAttributeInt16ForAllPoints(M,_,w),b=new Int16Array(x);break;case Int32Array:w=new T.DracoInt32Array,A.GetAttributeInt32ForAllPoints(M,_,w),b=new Int32Array(x);break;case Uint8Array:w=new T.DracoUInt8Array,A.GetAttributeUInt8ForAllPoints(M,_,w),b=new Uint8Array(x);break;case Uint16Array:w=new T.DracoUInt16Array,A.GetAttributeUInt16ForAllPoints(M,_,w),b=new Uint16Array(x);break;case Uint32Array:w=new T.DracoUInt32Array,A.GetAttributeUInt32ForAllPoints(M,_,w),b=new Uint32Array(x);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var j=0;j<x;j++)b[j]=w.GetValue(j);return T.destroy(w),{name:C,array:b,itemSize:I}}};k.taskCache=new WeakMap;k.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")};k.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")};k.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")};k.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var me=function(p){c.CompressedTextureLoader.call(this,p)};me.prototype=Object.assign(Object.create(c.CompressedTextureLoader.prototype),{constructor:me,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},m=542327876,T=131072,A=512,M=1024,C=2048,D=4096,_=8192,I=16384,U=32768,x=4;function w(l){return l.charCodeAt(0)+(l.charCodeAt(1)<<8)+(l.charCodeAt(2)<<16)+(l.charCodeAt(3)<<24)}function b(l){return String.fromCharCode(l&255,l>>8&255,l>>16&255,l>>24&255)}function j(l,f,v,d){for(var h=v*d*4,S=new Uint8Array(l,f,h),L=new Uint8Array(h),E=0,y=0,R=0;R<d;R++)for(var F=0;F<v;F++){var H=S[y];y++;var ne=S[y];y++;var ae=S[y];y++;var ee=S[y];y++,L[E]=ae,E++,L[E]=ne,E++,L[E]=H,E++,L[E]=ee,E++}return L}var te=w("DXT1"),P=w("DXT3"),Q=w("DXT5"),B=w("ETC1"),Z=31,$=0,z=1,W=2,le=3,V=4,Ae=7,ce=20,pe=21,he=22,Se=23,oe=24,Y=25,ye=26,Ee=28,G=new Int32Array(p,0,Z);if(G[$]!==m)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!G[ce]&x)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var q,O=G[pe],ve=!1;switch(O){case te:q=8,u.format=c.RGB_S3TC_DXT1_Format;break;case P:q=16,u.format=c.RGBA_S3TC_DXT3_Format;break;case Q:q=16,u.format=c.RGBA_S3TC_DXT5_Format;break;case B:q=8,u.format=c.RGB_ETC1_Format;break;default:if(G[he]===32&&G[Se]&16711680&&G[oe]&65280&&G[Y]&255&&G[ye]&4278190080)ve=!0,q=64,u.format=c.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",b(O)),u}u.mipmapCount=1,G[W]&T&&g!==!1&&(u.mipmapCount=Math.max(1,G[Ae]));var X=G[Ee];if(u.isCubemap=!!(X&A),u.isCubemap&&(!(X&M)||!(X&C)||!(X&D)||!(X&_)||!(X&I)||!(X&U)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=G[V],u.height=G[le];for(var ie=G[z]+4,e=u.isCubemap?6:1,r=0;r<e;r++)for(var n=u.width,t=u.height,a=0;a<u.mipmapCount;a++){if(ve)var i=j(p,ie,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*q,i=new Uint8Array(p,ie,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ie+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var xe=(function(p){Oe(g,p);function g(u){var m=p.call(this)||this;return m.needsRender=!0,u&&u.children.length&&m.add.apply(m,u.children),m.mixer=new be.AnimationMixer(m),m}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),m=new be.AnimationMixer(u);return u.mixer=m,u.needsRender=!0,u},g})(be.Group),Ne="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",ke=(function(p){Oe(g,p);function g(u){var m=p.call(this,u)||this;return m.ddsLoader=new me(u),m.dracoLoader=new k(u),m.dracoLoader.setDecoderPath(Ne),m}return Object.defineProperty(g,"version",{get:function(){return"6.8.0-alpha.2"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,m,T,A){return p.prototype.load.call(this,u,m,T,A)},g.prototype.parse=function(u,m,T,A){return p.prototype.parse.call(this,u,m,function(M){var C=new xe(M.scene),D=M.scenes.map(function(_){return _===M.scene?C:new xe(_)});T(Object.assign(M,{scene:C,scenes:D}))},A)},g})(Fe);exports.DDSLoader=me;exports.DRACOLoader=k;exports.GLTFLoader=ke;exports.GLTFObject=xe;exports.THREEGLTFLoader=Fe;
255
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`three`);c=s(c);var l=(function(){function e(e){c.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}e.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:e,load:function(e,t,n,r){var i=this,a=this.resourcePath===``?this.path===``?c.LoaderUtils.extractUrlBase(e):this.path:this.resourcePath;i.manager.itemStart(e);var o=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},s=new c.FileLoader(i.manager);s.setPath(this.path),s.setResponseType(`arraybuffer`),s.setRequestHeader(this.requestHeader),i.crossOrigin===`use-credentials`&&s.setWithCredentials(!0),s.load(e,function(n){try{i.parse(n,a,function(n){t(n),i.manager.itemEnd(e)},o)}catch(e){o(e)}},n,o)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,t,u,d){var h,v={};if(typeof e==`string`)h=e;else if(c.LoaderUtils.decodeText(new Uint8Array(e,0,4))===l){try{v[n.KHR_BINARY_GLTF]=new f(e)}catch(e){d&&d(e);return}h=v[n.KHR_BINARY_GLTF].content}else h=c.LoaderUtils.decodeText(new Uint8Array(e));var b=JSON.parse(h);if(b.asset===void 0||b.asset.version[0]<2){d&&d(Error(`THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.`));return}if(b.extensionsUsed)for(var x=0;x<b.extensionsUsed.length;++x){var S=b.extensionsUsed[x],C=b.extensionsRequired||[];switch(S){case n.KHR_LIGHTS_PUNCTUAL:v[S]=new i(b);break;case n.KHR_MATERIALS_CLEARCOAT:v[S]=new o;break;case n.KHR_MATERIALS_TRANSMISSION:v[S]=new s;break;case n.KHR_MATERIALS_UNLIT:v[S]=new a;break;case n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:v[S]=new g;break;case n.KHR_DRACO_MESH_COMPRESSION:v[S]=new p(b,this.dracoLoader);break;case n.MSFT_TEXTURE_DDS:v[S]=new r(this.ddsLoader);break;case n.KHR_TEXTURE_TRANSFORM:v[S]=new m;break;case n.KHR_MESH_QUANTIZATION:v[S]=new _;break;case n.REALSEE_MATERIALS_LIGHTMAP:v[S]=new y;break;default:C.indexOf(S)>=0&&console.warn(`THREE.GLTFLoader: Unknown extension "`+S+`".`)}}var w=new R(b,v,{path:t||this.resourcePath||``,crossOrigin:this.crossOrigin,manager:this.manager});w.fileLoader.setRequestHeader(this.requestHeader),w.parse(u,d)}});function t(){var e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}var n={KHR_BINARY_GLTF:`KHR_binary_glTF`,KHR_DRACO_MESH_COMPRESSION:`KHR_draco_mesh_compression`,KHR_LIGHTS_PUNCTUAL:`KHR_lights_punctual`,KHR_MATERIALS_CLEARCOAT:`KHR_materials_clearcoat`,KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:`KHR_materials_pbrSpecularGlossiness`,KHR_MATERIALS_TRANSMISSION:`KHR_materials_transmission`,KHR_MATERIALS_UNLIT:`KHR_materials_unlit`,KHR_TEXTURE_TRANSFORM:`KHR_texture_transform`,KHR_MESH_QUANTIZATION:`KHR_mesh_quantization`,MSFT_TEXTURE_DDS:`MSFT_texture_dds`,REALSEE_MATERIALS_LIGHTMAP:`REALSEE_materials_lightmap`};function r(e){if(!e)throw Error(`THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader`);this.name=n.MSFT_TEXTURE_DDS,this.ddsLoader=e}function i(e){this.name=n.KHR_LIGHTS_PUNCTUAL,this.lightDefs=(e.extensions&&e.extensions[n.KHR_LIGHTS_PUNCTUAL]||{}).lights||[]}i.prototype.loadLight=function(e){var t=this.lightDefs[e],n,r=new c.Color(16777215);t.color!==void 0&&r.fromArray(t.color);var i=t.range===void 0?0:t.range;switch(t.type){case`directional`:n=new c.DirectionalLight(r),n.target.position.set(0,0,-1),n.add(n.target);break;case`point`:n=new c.PointLight(r),n.distance=i;break;case`spot`:n=new c.SpotLight(r),n.distance=i,t.spot=t.spot||{},t.spot.innerConeAngle=t.spot.innerConeAngle===void 0?0:t.spot.innerConeAngle,t.spot.outerConeAngle=t.spot.outerConeAngle===void 0?Math.PI/4:t.spot.outerConeAngle,n.angle=t.spot.outerConeAngle,n.penumbra=1-t.spot.innerConeAngle/t.spot.outerConeAngle,n.target.position.set(0,0,-1),n.add(n.target);break;default:throw Error(`THREE.GLTFLoader: Unexpected light type, "`+t.type+`".`)}return n.position.set(0,0,0),n.decay=2,t.intensity!==void 0&&(n.intensity=t.intensity),n.name=t.name||`light_`+e,Promise.resolve(n)};function a(){this.name=n.KHR_MATERIALS_UNLIT}a.prototype.getMaterialType=function(){return c.MeshBasicMaterial},a.prototype.extendParams=function(e,t,n){var r=[];e.color=new c.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var a=i.baseColorFactor;e.color.fromArray(a),e.opacity=a[3]}i.baseColorTexture!==void 0&&r.push(n.assignTexture(e,`map`,i.baseColorTexture))}return Promise.all(r)};function o(){this.name=n.KHR_MATERIALS_CLEARCOAT}o.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},o.prototype.extendParams=function(e,t,n){var r=[],i=t.extensions[this.name];if(i.clearcoatFactor!==void 0&&(e.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&r.push(n.assignTexture(e,`clearcoatMap`,i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(e,`clearcoatRoughnessMap`,i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(e,`clearcoatNormalMap`,i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){var a=i.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new c.Vector2(a,a)}return Promise.all(r)};function s(){this.name=n.KHR_MATERIALS_TRANSMISSION}s.prototype.getMaterialType=function(){return c.MeshPhysicalMaterial},s.prototype.extendParams=function(e,t,n){return t.extensions[this.name].transmissionFactor!==void 0&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=e.opacity===void 0?.5:e.opacity),Promise.all([])};var l=`glTF`,u=12,d={JSON:1313821514,BIN:5130562};function f(e){this.name=n.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,u);if(this.header={magic:c.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==l)throw Error(`THREE.GLTFLoader: Unsupported glTF-Binary header.`);if(this.header.version<2)throw Error(`THREE.GLTFLoader: Legacy binary file detected.`);for(var r=new DataView(e,u),i=0;i<r.byteLength;){var a=r.getUint32(i,!0);i+=4;var o=r.getUint32(i,!0);if(i+=4,o===d.JSON){var s=new Uint8Array(e,u+i,a);this.content=c.LoaderUtils.decodeText(s)}else if(o===d.BIN){var f=u+i;this.body=e.slice(f,f+a)}i+=a}if(this.content===null)throw Error(`THREE.GLTFLoader: JSON content not found.`)}function p(e,t){if(!t)throw Error(`THREE.GLTFLoader: No DRACOLoader instance provided.`);this.name=n.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}p.prototype.decodePrimitive=function(e,t){var n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},s={},c={};for(var l in a){var u=T[l]||l.toLowerCase();o[u]=a[l]}for(l in e.attributes){var u=T[l]||l.toLowerCase();if(a[l]!==void 0){var d=n.accessors[e.attributes[l]];c[u]=x[d.componentType],s[u]=d.normalized===!0}}return t.getDependency(`bufferView`,i).then(function(e){return new Promise(function(t){r.decodeDracoFile(e,function(e){for(var n in e.attributes){var r=e.attributes[n],i=s[n];i!==void 0&&(r.normalized=i)}t(e)},o,c)})})};function m(){this.name=n.KHR_TEXTURE_TRANSFORM}m.prototype.extendTexture=function(e,t){return e=e.clone(),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),t.texCoord!==void 0&&console.warn(`THREE.GLTFLoader: Custom UV sets in "`+this.name+`" extension not yet supported.`),e.needsUpdate=!0,e};function h(e){c.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var t=[`#ifdef USE_SPECULARMAP`,` uniform sampler2D specularMap;`,`#endif`].join(`
256
+ `),n=[`#ifdef USE_GLOSSINESSMAP`,` uniform sampler2D glossinessMap;`,`#endif`].join(`
257
+ `),r=[`vec3 specularFactor = specular;`,`#ifdef USE_SPECULARMAP`,` vec4 texelSpecular = texture2D( specularMap, vUv );`,` texelSpecular = sRGBToLinear( texelSpecular );`,` // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture`,` specularFactor *= texelSpecular.rgb;`,`#endif`].join(`
258
+ `),i=[`float glossinessFactor = glossiness;`,`#ifdef USE_GLOSSINESSMAP`,` vec4 texelGlossiness = texture2D( glossinessMap, vUv );`,` // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture`,` glossinessFactor *= texelGlossiness.a;`,`#endif`].join(`
259
+ `),a=[`PhysicalMaterial material;`,`material.diffuseColor = diffuseColor.rgb;`,`vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );`,`float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );`,`material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.`,`material.specularRoughness += geometryRoughness;`,`material.specularRoughness = min( material.specularRoughness, 1.0 );`,`material.specularColor = specularFactor.rgb;`].join(`
260
+ `),o={specular:{value:new c.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=o,this.onBeforeCompile=function(e){for(var s in o)e.uniforms[s]=o[s];e.fragmentShader=e.fragmentShader.replace(`uniform float roughness;`,`uniform vec3 specular;`),e.fragmentShader=e.fragmentShader.replace(`uniform float metalness;`,`uniform float glossiness;`),e.fragmentShader=e.fragmentShader.replace(`#include <roughnessmap_pars_fragment>`,t),e.fragmentShader=e.fragmentShader.replace(`#include <metalnessmap_pars_fragment>`,n),e.fragmentShader=e.fragmentShader.replace(`#include <roughnessmap_fragment>`,r),e.fragmentShader=e.fragmentShader.replace(`#include <metalnessmap_fragment>`,i),e.fragmentShader=e.fragmentShader.replace(`#include <lights_physical_fragment>`,a)},Object.defineProperties(this,{specular:{get:function(){return o.specular.value},set:function(e){o.specular.value=e}},specularMap:{get:function(){return o.specularMap.value},set:function(e){o.specularMap.value=e}},glossiness:{get:function(){return o.glossiness.value},set:function(e){o.glossiness.value=e}},glossinessMap:{get:function(){return o.glossinessMap.value},set:function(e){o.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP=``,this.defines.USE_ROUGHNESSMAP=``):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}h.prototype=Object.create(c.MeshStandardMaterial.prototype),h.prototype.constructor=h,h.prototype.copy=function(e){return c.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function g(){return{name:n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:[`color`,`map`,`lightMap`,`lightMapIntensity`,`aoMap`,`aoMapIntensity`,`emissive`,`emissiveIntensity`,`emissiveMap`,`bumpMap`,`bumpScale`,`normalMap`,`normalMapType`,`displacementMap`,`displacementScale`,`displacementBias`,`specularMap`,`specular`,`glossinessMap`,`glossiness`,`alphaMap`,`envMap`,`envMapIntensity`,`refractionRatio`],getMaterialType:function(){return h},extendParams:function(e,t,n){var r=t.extensions[this.name];e.color=new c.Color(1,1,1),e.opacity=1;var i=[];if(Array.isArray(r.diffuseFactor)){var a=r.diffuseFactor;e.color.fromArray(a),e.opacity=a[3]}if(r.diffuseTexture!==void 0&&i.push(n.assignTexture(e,`map`,r.diffuseTexture)),e.emissive=new c.Color(0,0,0),e.glossiness=r.glossinessFactor===void 0?1:r.glossinessFactor,e.specular=new c.Color(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),r.specularGlossinessTexture!==void 0){var o=r.specularGlossinessTexture;i.push(n.assignTexture(e,`glossinessMap`,o)),i.push(n.assignTexture(e,`specularMap`,o))}return Promise.all(i)},createMaterial:function(e){var t=new h(e);return t.fog=!0,t.color=e.color,t.map=e.map===void 0?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=e.aoMap===void 0?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,t.bumpMap=e.bumpMap===void 0?null:e.bumpMap,t.bumpScale=1,t.normalMap=e.normalMap===void 0?null:e.normalMap,t.normalMapType=c.TangentSpaceNormalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=e.specularMap===void 0?null:e.specularMap,t.specular=e.specular,t.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=e.envMap===void 0?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}}function _(){this.name=n.KHR_MESH_QUANTIZATION}function v(e,t,n,r){c.Interpolant.call(this,e,t,n,r)}v.prototype=Object.create(c.Interpolant.prototype),v.prototype.constructor=v,v.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,a=0;a!==r;a++)t[a]=n[i+a];return t},v.prototype.beforeStart_=v.prototype.copySampleValue_,v.prototype.afterEnd_=v.prototype.copySampleValue_,v.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=o*2,c=o*3,l=r-t,u=(n-t)/l,d=u*u,f=d*u,p=e*c,m=p-c,h=-2*f+3*d,g=f-d,_=1-h,v=g-d+u,y=0;y!==o;y++){var b=a[m+y+o],x=a[m+y+s]*l,S=a[p+y+o],C=a[p+y]*l;i[y]=_*b+v*x+h*S+g*C}return i};function y(e){this.parser=e,this.name=n.REALSEE_MATERIALS_LIGHTMAP}y.prototype.getMaterialType=function(e){return c.MeshPhongMaterial},y.prototype.extendParams=function(e,t,n){if(!t.extensions||!t.extensions[this.name])return Promise.resolve();var r=[],i=t.extensions[this.name];return i.lightMapTexture!==void 0&&r.push(n.assignTexture(e,`lightMap`,i.lightMapTexture)),i.lightMapIntensity!==void 0&&(e.lightMapIntensity=i.lightMapIntensity),Promise.all(r)};var b={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},x={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},S={9728:c.NearestFilter,9729:c.LinearFilter,9984:c.NearestMipmapNearestFilter,9985:c.LinearMipmapNearestFilter,9986:c.NearestMipmapLinearFilter,9987:c.LinearMipmapLinearFilter},C={33071:c.ClampToEdgeWrapping,33648:c.MirroredRepeatWrapping,10497:c.RepeatWrapping},w={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},T={POSITION:`position`,NORMAL:`normal`,TANGENT:`tangent`,TEXCOORD_0:`uv`,TEXCOORD_1:`uv2`,COLOR_0:`color`,WEIGHTS_0:`skinWeight`,JOINTS_0:`skinIndex`},E={scale:`scale`,translation:`position`,rotation:`quaternion`,weights:`morphTargetInfluences`},D={CUBICSPLINE:void 0,LINEAR:c.InterpolateLinear,STEP:c.InterpolateDiscrete},O={OPAQUE:`OPAQUE`,MASK:`MASK`,BLEND:`BLEND`},k={"image/png":c.RGBAFormat,"image/jpeg":c.RGBFormat};function A(e,t){return typeof e!=`string`||e===``?``:(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function j(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new c.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:c.FrontSide})),e.DefaultMaterial}function M(e,t,n){for(var r in n.extensions)e[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function N(e,t){t.extras!==void 0&&(typeof t.extras==`object`?Object.assign(e.userData,t.extras):console.warn(`THREE.GLTFLoader: Ignoring primitive type .extras, `+t.extras))}function P(e,t,n){for(var r=!1,i=!1,a=0,o=t.length;a<o;a++){var s=t[a];if(s.POSITION!==void 0&&(r=!0),s.NORMAL!==void 0&&(i=!0),r&&i)break}if(!r&&!i)return Promise.resolve(e);for(var c=[],l=[],a=0,o=t.length;a<o;a++){var s=t[a];if(r){var u=s.POSITION===void 0?e.attributes.position:n.getDependency(`accessor`,s.POSITION);c.push(u)}if(i){var u=s.NORMAL===void 0?e.attributes.normal:n.getDependency(`accessor`,s.NORMAL);l.push(u)}}return Promise.all([Promise.all(c),Promise.all(l)]).then(function(t){var n=t[0],a=t[1];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=a),e.morphTargetsRelative=!0,e})}function F(e,t){if(e.updateMorphTargets(),t.weights!==void 0)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length){e.morphTargetDictionary={};for(var n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n}else console.warn(`THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.`)}}function I(e){var t=e.extensions&&e.extensions[n.KHR_DRACO_MESH_COMPRESSION];return t?`draco:`+t.bufferView+`:`+t.indices+`:`+L(t.attributes):e.indices+`:`+L(e.attributes)+`:`+e.mode}function L(e){for(var t=``,n=Object.keys(e).sort(),r=0,i=n.length;r<i;r++)t+=n[r]+`:`+e[n[r]]+`;`;return t}function R(e,n,r){this.json=e||{},this.extensions=n||{},this.options=r||{},this.cache=new t,this.associations=new Map,this.primitiveCache={},this.textureLoader=new c.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new c.FileLoader(this.options.manager),this.fileLoader.setResponseType(`arraybuffer`),this.options.crossOrigin===`use-credentials`&&this.fileLoader.setWithCredentials(!0)}R.prototype.parse=function(e,t){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies(`scene`),this.getDependencies(`animation`),this.getDependencies(`camera`)]).then(function(t){var a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};M(i,a,r),N(a,r),e(a)}).catch(t)},R.prototype.markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r={},i={},a=0,o=t.length;a<o;a++)for(var s=t[a].joints,c=0,l=s.length;c<l;c++)e[s[c]].isBone=!0;for(var u=0,d=e.length;u<d;u++){var f=e[u];f.mesh!==void 0&&(r[f.mesh]===void 0&&(r[f.mesh]=i[f.mesh]=0),r[f.mesh]++,f.skin!==void 0&&(n[f.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},R.prototype.getDependency=function(e,t){var r=e+`:`+t,i=this.cache.get(r);if(!i){switch(e){case`scene`:i=this.loadScene(t);break;case`node`:i=this.loadNode(t);break;case`mesh`:i=this.loadMesh(t);break;case`accessor`:i=this.loadAccessor(t);break;case`bufferView`:i=this.loadBufferView(t);break;case`buffer`:i=this.loadBuffer(t);break;case`material`:i=this.loadMaterial(t);break;case`texture`:i=this.loadTexture(t);break;case`skin`:i=this.loadSkin(t);break;case`animation`:i=this.loadAnimation(t);break;case`camera`:i=this.loadCamera(t);break;case`light`:i=this.extensions[n.KHR_LIGHTS_PUNCTUAL].loadLight(t);break;default:throw Error(`Unknown type: `+e)}this.cache.add(r,i)}return i},R.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var n=this,r=this.json[e+(e===`mesh`?`es`:`s`)]||[];t=Promise.all(r.map(function(t,r){return n.getDependency(e,r)})),this.cache.add(e,t)}return t},R.prototype.loadBuffer=function(e){var t=this.json.buffers[e],r=this.fileLoader;if(t.type&&t.type!==`arraybuffer`)throw Error(`THREE.GLTFLoader: `+t.type+` buffer type is not supported.`);if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[n.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(e,n){r.load(A(t.uri,i.path),e,void 0,function(){n(Error(`THREE.GLTFLoader: Failed to load buffer "`+t.uri+`".`))})})},R.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency(`buffer`,t.buffer).then(function(e){var n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)})},R.prototype.loadAccessor=function(e){var t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0)return Promise.resolve(null);var i=[];return r.bufferView===void 0?i.push(null):i.push(this.getDependency(`bufferView`,r.bufferView)),r.sparse!==void 0&&(i.push(this.getDependency(`bufferView`,r.sparse.indices.bufferView)),i.push(this.getDependency(`bufferView`,r.sparse.values.bufferView))),Promise.all(i).then(function(e){var i=e[0],a=w[r.type],o=x[r.componentType],s=o.BYTES_PER_ELEMENT,l=s*a,u=r.byteOffset||0,d=r.bufferView===void 0?void 0:n.bufferViews[r.bufferView].byteStride,f=r.normalized===!0,p,m;if(d&&d!==l){var h=Math.floor(u/d),g=`InterleavedBuffer:`+r.bufferView+`:`+r.componentType+`:`+h+`:`+r.count,_=t.cache.get(g);_||(p=new o(i,h*d,r.count*d/s),_=new c.InterleavedBuffer(p,d/s),t.cache.add(g,_)),m=new c.InterleavedBufferAttribute(_,a,u%d/s,f)}else p=i===null?new o(r.count*a):new o(i,u,r.count*a),m=new c.BufferAttribute(p,a,f);if(r.sparse!==void 0){var v=w.SCALAR,y=x[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,S=r.sparse.values.byteOffset||0,C=new y(e[1],b,r.sparse.count*v),T=new o(e[2],S,r.sparse.count*a);i!==null&&(m=new c.BufferAttribute(m.array.slice(),m.itemSize,m.normalized));for(var E=0,D=C.length;E<D;E++){var O=C[E];if(m.setX(O,T[E*a]),a>=2&&m.setY(O,T[E*a+1]),a>=3&&m.setZ(O,T[E*a+2]),a>=4&&m.setW(O,T[E*a+3]),a>=5)throw Error(`THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.`)}}return m})},R.prototype.loadTexture=function(e){var t=this,r=this.json,i=this.options,a=this.textureLoader,o=self.URL||self.webkitURL,s=r.textures[e],l=s.extensions||{},u=l[n.MSFT_TEXTURE_DDS]?r.images[l[n.MSFT_TEXTURE_DDS].source]:r.images[s.source],d=u.uri,f=!1;return u.bufferView!==void 0&&(d=t.getDependency(`bufferView`,u.bufferView).then(function(e){f=!0;var t=new Blob([e],{type:u.mimeType});return d=o.createObjectURL(t),d})),Promise.resolve(d).then(function(e){var r=i.manager.getHandler(e);return r||(r=l[n.MSFT_TEXTURE_DDS]?t.extensions[n.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(t,n){r.load(A(e,i.path),t,void 0,n)})}).then(function(n){f===!0&&o.revokeObjectURL(d),n.flipY=!1,s.name&&(n.name=s.name),u.mimeType in k&&(n.format=k[u.mimeType]);var i=(r.samplers||{})[s.sampler]||{};return n.magFilter=S[i.magFilter]||c.LinearFilter,n.minFilter=S[i.minFilter]||c.LinearMipmapLinearFilter,n.wrapS=C[i.wrapS]||c.RepeatWrapping,n.wrapT=C[i.wrapT]||c.RepeatWrapping,t.associations.set(n,{type:`textures`,index:e}),n})},R.prototype.assignTexture=function(e,t,r){var i=this;return this.getDependency(`texture`,r.index).then(function(a){if(!a.isCompressedTexture)switch(t){case`aoMap`:case`emissiveMap`:case`metalnessMap`:case`normalMap`:case`roughnessMap`:a.format=c.RGBFormat;break}if(r.texCoord!==void 0&&r.texCoord!=0&&!(t===`aoMap`&&r.texCoord==1)&&console.warn(`THREE.GLTFLoader: Custom UV set `+r.texCoord+` for texture `+t+` not yet supported.`),i.extensions[n.KHR_TEXTURE_TRANSFORM]){var o=r.extensions===void 0?void 0:r.extensions[n.KHR_TEXTURE_TRANSFORM];if(o){var s=i.associations.get(a);a=i.extensions[n.KHR_TEXTURE_TRANSFORM].extendTexture(a,o),i.associations.set(a,s)}}e[t]=a})},R.prototype.assignFinalMaterial=function(e){var t=e.geometry,n=e.material,r=t.attributes.tangent!==void 0,i=t.attributes.color!==void 0,a=t.attributes.normal===void 0,o=e.isSkinnedMesh===!0,s=Object.keys(t.morphAttributes).length>0,l=s&&t.morphAttributes.normal!==void 0;if(e.isPoints){var u=`PointsMaterial:`+n.uuid,d=this.cache.get(u);d||(d=new c.PointsMaterial,c.Material.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,d.sizeAttenuation=!1,this.cache.add(u,d)),n=d}else if(e.isLine){var u=`LineBasicMaterial:`+n.uuid,f=this.cache.get(u);f||(f=new c.LineBasicMaterial,c.Material.prototype.copy.call(f,n),f.color.copy(n.color),this.cache.add(u,f)),n=f}if(r||i||a||o||s){var u=`ClonedMaterial:`+n.uuid+`:`;n.isGLTFSpecularGlossinessMaterial&&(u+=`specular-glossiness:`),o&&(u+=`skinning:`),r&&(u+=`vertex-tangents:`),i&&(u+=`vertex-colors:`),a&&(u+=`flat-shading:`),s&&(u+=`morph-targets:`),l&&(u+=`morph-normals:`);var p=this.cache.get(u);p||(p=n.clone(),o&&(p.skinning=!0),r&&(p.vertexTangents=!0),i&&(p.vertexColors=!0),a&&(p.flatShading=!0),s&&(p.morphTargets=!0),l&&(p.morphNormals=!0),this.cache.add(u,p),this.associations.set(p,this.associations.get(n))),n=p}n.aoMap&&t.attributes.uv2===void 0&&t.attributes.uv!==void 0&&t.setAttribute(`uv2`,t.attributes.uv),n.normalScale&&!r&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!r&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},R.prototype.loadMaterial=function(e){var t=this,r=this.json,i=this.extensions,a=r.materials[e],o,s={},l=a.extensions||{},u=[];if(l[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var d=i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=d.getMaterialType(),u.push(d.extendParams(s,a,t))}else if(l[n.KHR_MATERIALS_UNLIT]){var f=i[n.KHR_MATERIALS_UNLIT];o=f.getMaterialType(),u.push(f.extendParams(s,a,t))}else{o=c.MeshStandardMaterial;var p=a.pbrMetallicRoughness||{};if(s.color=new c.Color(1,1,1),s.opacity=1,Array.isArray(p.baseColorFactor)){var m=p.baseColorFactor;s.color.fromArray(m),s.opacity=m[3]}p.baseColorTexture!==void 0&&u.push(t.assignTexture(s,`map`,p.baseColorTexture)),s.metalness=p.metallicFactor===void 0?1:p.metallicFactor,s.roughness=p.roughnessFactor===void 0?1:p.roughnessFactor,p.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(s,`metalnessMap`,p.metallicRoughnessTexture)),u.push(t.assignTexture(s,`roughnessMap`,p.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=c.DoubleSide);var g=a.alphaMode||O.OPAQUE;if(g===O.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,g===O.MASK&&(s.alphaTest=a.alphaCutoff===void 0?.5:a.alphaCutoff)),a.normalTexture!==void 0&&o!==c.MeshBasicMaterial&&(u.push(t.assignTexture(s,`normalMap`,a.normalTexture)),s.normalScale=new c.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&o!==c.MeshBasicMaterial&&(u.push(t.assignTexture(s,`aoMap`,a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&o!==c.MeshBasicMaterial&&(s.emissive=new c.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&o!==c.MeshBasicMaterial&&u.push(t.assignTexture(s,`emissiveMap`,a.emissiveTexture)),l[n.KHR_MATERIALS_CLEARCOAT]){var _=i[n.KHR_MATERIALS_CLEARCOAT];o=_.getMaterialType(),u.push(_.extendParams(s,{extensions:l},t))}if(l[n.KHR_MATERIALS_TRANSMISSION]){var _=i[n.KHR_MATERIALS_TRANSMISSION];o=_.getMaterialType(),u.push(_.extendParams(s,{extensions:l},t))}if(l[n.REALSEE_MATERIALS_LIGHTMAP]){var v=i[n.REALSEE_MATERIALS_LIGHTMAP];o=v.getMaterialType(),u.push(v.extendParams(s,{extensions:l},t))}return Promise.all(u).then(function(){var r=o===h?i[n.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new o(s);return a.name&&(r.name=a.name),r.map&&(r.map.encoding=c.sRGBEncoding),r.emissiveMap&&(r.emissiveMap.encoding=c.sRGBEncoding),N(r,a),t.associations.set(r,{type:`materials`,index:e}),a.extensions&&M(i,r,a),r})};function z(e,t,n){var r=t.attributes,i=new c.Box3;if(r.POSITION!==void 0){var a=n.json.accessors[r.POSITION],o=a.min,s=a.max;if(o!==void 0&&s!==void 0)i.set(new c.Vector3(o[0],o[1],o[2]),new c.Vector3(s[0],s[1],s[2]));else{console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`);return}}else return;var l=t.targets;if(l!==void 0){for(var u=new c.Vector3,d=new c.Vector3,f=0,p=l.length;f<p;f++){var m=l[f];if(m.POSITION!==void 0){var a=n.json.accessors[m.POSITION],o=a.min,s=a.max;o!==void 0&&s!==void 0?(d.setX(Math.max(Math.abs(o[0]),Math.abs(s[0]))),d.setY(Math.max(Math.abs(o[1]),Math.abs(s[1]))),d.setZ(Math.max(Math.abs(o[2]),Math.abs(s[2]))),u.max(d)):console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`)}}i.expandByVector(u)}e.boundingBox=i;var h=new c.Sphere;i.getCenter(h.center),h.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=h}function B(e,t,n){var r=t.attributes,i=[];function a(t,r){return n.getDependency(`accessor`,t).then(function(t){e.setAttribute(r,t)})}for(var o in r){var s=T[o]||o.toLowerCase();s in e.attributes||i.push(a(r[o],s))}if(t.indices!==void 0&&!e.index){var c=n.getDependency(`accessor`,t.indices).then(function(t){e.setIndex(t)});i.push(c)}return N(e,t),z(e,t,n),Promise.all(i).then(function(){return t.targets===void 0?e:P(e,t.targets,n)})}function V(e,t){var n=e.getIndex();if(n===null){var r=[],i=e.getAttribute(`position`);if(i!==void 0){for(var a=0;a<i.count;a++)r.push(a);e.setIndex(r),n=e.getIndex()}else return console.error(`THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.`),e}var o=n.count-2,s=[];if(t===c.TriangleFanDrawMode)for(var a=1;a<=o;a++)s.push(n.getX(0)),s.push(n.getX(a)),s.push(n.getX(a+1));else for(var a=0;a<o;a++)a%2==0?(s.push(n.getX(a)),s.push(n.getX(a+1)),s.push(n.getX(a+2))):(s.push(n.getX(a+2)),s.push(n.getX(a+1)),s.push(n.getX(a)));s.length/3!==o&&console.error(`THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.`);var l=e.clone();return l.setIndex(s),l}return R.prototype.loadGeometries=function(e){var t=this,r=this.extensions,i=this.primitiveCache;function a(e){return r[n.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then(function(n){return B(n,e,t)})}for(var o=[],s=0,l=e.length;s<l;s++){var u=e[s],d=I(u),f=i[d];if(f)o.push(f.promise);else{var p=u.extensions&&u.extensions[n.KHR_DRACO_MESH_COMPRESSION]?a(u):B(new c.BufferGeometry,u,t);i[d]={primitive:u,promise:p},o.push(p)}}return Promise.all(o)},R.prototype.loadMesh=function(e){for(var t=this,n=this.json.meshes[e],r=n.primitives,i=[],a=0,o=r.length;a<o;a++){var s=r[a].material===void 0?j(this.cache):this.getDependency(`material`,r[a].material);i.push(s)}return i.push(t.loadGeometries(r)),Promise.all(i).then(function(i){for(var a=i.slice(0,i.length-1),o=i[i.length-1],s=[],l=0,u=o.length;l<u;l++){var d=o[l],f=r[l],p,m=a[l];if(f.mode===b.TRIANGLES||f.mode===b.TRIANGLE_STRIP||f.mode===b.TRIANGLE_FAN||f.mode===void 0)p=n.isSkinnedMesh===!0?new c.SkinnedMesh(d,m):new c.Mesh(d,m),p.isSkinnedMesh===!0&&!p.geometry.attributes.skinWeight.normalized&&p.normalizeSkinWeights(),f.mode===b.TRIANGLE_STRIP?p.geometry=V(p.geometry,c.TriangleStripDrawMode):f.mode===b.TRIANGLE_FAN&&(p.geometry=V(p.geometry,c.TriangleFanDrawMode));else if(f.mode===b.LINES)p=new c.LineSegments(d,m);else if(f.mode===b.LINE_STRIP)p=new c.Line(d,m);else if(f.mode===b.LINE_LOOP)p=new c.LineLoop(d,m);else if(f.mode===b.POINTS)p=new c.Points(d,m);else throw Error(`THREE.GLTFLoader: Primitive mode unsupported: `+f.mode);Object.keys(p.geometry.morphAttributes).length>0&&F(p,n),p.name=n.name||`mesh_`+e,o.length>1&&(p.name+=`_`+l),N(p,n),t.assignFinalMaterial(p),s.push(p)}if(s.length===1)return s[0];for(var h=new c.Group,l=0,u=s.length;l<u;l++)h.add(s[l]);return h})},R.prototype.loadCamera=function(e){var t,n=this.json.cameras[e],r=n[n.type];if(!r){console.warn(`THREE.GLTFLoader: Missing camera parameters.`);return}return n.type===`perspective`?t=new c.PerspectiveCamera(c.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type===`orthographic`&&(t=new c.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=n.name),N(t,n),Promise.resolve(t)},R.prototype.loadSkin=function(e){var t=this.json.skins[e],n={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency(`accessor`,t.inverseBindMatrices).then(function(e){return n.inverseBindMatrices=e,n})},R.prototype.loadAnimation=function(e){for(var t=this.json.animations[e],n=[],r=[],i=[],a=[],o=[],s=0,l=t.channels.length;s<l;s++){var u=t.channels[s],d=t.samplers[u.sampler],f=u.target,p=f.node===void 0?f.id:f.node,m=t.parameters===void 0?d.input:t.parameters[d.input],h=t.parameters===void 0?d.output:t.parameters[d.output];n.push(this.getDependency(`node`,p)),r.push(this.getDependency(`accessor`,m)),i.push(this.getDependency(`accessor`,h)),a.push(d),o.push(f)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(a),Promise.all(o)]).then(function(n){for(var r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=[],u=0,d=r.length;u<d;u++){var f=r[u],p=i[u],m=a[u],h=o[u],g=s[u];if(f!==void 0){f.updateMatrix(),f.matrixAutoUpdate=!0;var _;switch(E[g.path]){case E.weights:_=c.NumberKeyframeTrack;break;case E.rotation:_=c.QuaternionKeyframeTrack;break;case E.position:case E.scale:default:_=c.VectorKeyframeTrack;break}var y=f.name?f.name:f.uuid,b=h.interpolation===void 0?c.InterpolateLinear:D[h.interpolation],x=[];E[g.path]===E.weights?f.traverse(function(e){e.isMesh===!0&&e.morphTargetInfluences&&x.push(e.name?e.name:e.uuid)}):x.push(y);var S=m.array;if(m.normalized){var C;if(S.constructor===Int8Array)C=1/127;else if(S.constructor===Uint8Array)C=1/255;else if(S.constructor==Int16Array)C=1/32767;else if(S.constructor===Uint16Array)C=1/65535;else throw Error(`THREE.GLTFLoader: Unsupported output accessor component type.`);for(var w=new Float32Array(S.length),T=0,O=S.length;T<O;T++)w[T]=S[T]*C;S=w}for(var T=0,O=x.length;T<O;T++){var k=new _(x[T]+`.`+E[g.path],p.array,S,b);h.interpolation===`CUBICSPLINE`&&(k.createInterpolant=function(e){return new v(this.times,this.values,this.getValueSize()/3,e)},k.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(k)}}}return new c.AnimationClip(t.name?t.name:`animation_`+e,void 0,l)})},R.prototype.loadNode=function(e){var t=this.json,r=this.extensions,i=this,a=t.meshReferences,o=t.meshUses,s=t.nodes[e];return function(){var e=[];return s.mesh!==void 0&&e.push(i.getDependency(`mesh`,s.mesh).then(function(e){var t;if(a[s.mesh]>1){var n=o[s.mesh]++;t=e.clone(),t.name+=`_instance_`+n}else t=e;return s.weights!==void 0&&t.traverse(function(e){if(e.isMesh)for(var t=0,n=s.weights.length;t<n;t++)e.morphTargetInfluences[t]=s.weights[t]}),t})),s.camera!==void 0&&e.push(i.getDependency(`camera`,s.camera)),s.extensions&&s.extensions[n.KHR_LIGHTS_PUNCTUAL]&&s.extensions[n.KHR_LIGHTS_PUNCTUAL].light!==void 0&&e.push(i.getDependency(`light`,s.extensions[n.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(e)}().then(function(t){var n=s.isBone===!0?new c.Bone:t.length>1?new c.Group:t.length===1?t[0]:new c.Object3D;if(n!==t[0])for(var a=0,o=t.length;a<o;a++)n.add(t[a]);if(s.name&&(n.userData.name=s.name,n.name=c.PropertyBinding.sanitizeNodeName(s.name)),N(n,s),s.extensions&&M(r,n,s),s.matrix!==void 0){var l=new c.Matrix4;l.fromArray(s.matrix),n.applyMatrix4(l)}else s.translation!==void 0&&n.position.fromArray(s.translation),s.rotation!==void 0&&n.quaternion.fromArray(s.rotation),s.scale!==void 0&&n.scale.fromArray(s.scale);return i.associations.set(n,{type:`nodes`,index:e}),n})},R.prototype.loadScene=function(){function e(t,n,r,i){var a=r.nodes[t];return i.getDependency(`node`,t).then(function(e){if(a.skin===void 0)return e;var t;return i.getDependency(`skin`,a.skin).then(function(e){t=e;for(var n=[],r=0,a=t.joints.length;r<a;r++)n.push(i.getDependency(`node`,t.joints[r]));return Promise.all(n)}).then(function(n){return e.traverse(function(e){if(e.isMesh){for(var r=[],i=[],a=0,o=n.length;a<o;a++){var s=n[a];if(s){r.push(s);var l=new c.Matrix4;t.inverseBindMatrices!==void 0&&l.fromArray(t.inverseBindMatrices.array,a*16),i.push(l)}else console.warn(`THREE.GLTFLoader: Joint "%s" could not be found.`,t.joints[a])}e.bind(new c.Skeleton(r,i),e.matrixWorld)}}),e})}).then(function(t){n.add(t);var o=[];if(a.children)for(var s=a.children,c=0,l=s.length;c<l;c++){var u=s[c];o.push(e(u,t,r,i))}return Promise.all(o)})}return function(t){var n=this.json,r=this.extensions,i=this.json.scenes[t],a=this,o=new c.Group;i.name&&(o.name=i.name),N(o,i),i.extensions&&M(r,o,i);for(var s=i.nodes||[],l=[],u=0,d=s.length;u<d;u++)l.push(e(s[u],o,n,a));return Promise.all(l).then(function(){return o})}}(),e})(),u=function(e){c.Loader.call(this,e),this.decoderPath=``,this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL=``,this.defaultAttributeIDs={position:`POSITION`,normal:`NORMAL`,color:`COLOR`,uv:`TEX_COORD`},this.defaultAttributeTypes={position:`Float32Array`,normal:`Float32Array`,color:`Float32Array`,uv:`Float32Array`}};u.prototype=Object.assign(Object.create(c.Loader.prototype),{constructor:u,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn(`THREE.DRACOLoader: The .setVerbosity() method has been removed.`)},setDrawMode:function(){console.warn(`THREE.DRACOLoader: The .setDrawMode() method has been removed.`)},setSkipDequantization:function(){console.warn(`THREE.DRACOLoader: The .setSkipDequantization() method has been removed.`)},load:function(e,t,n,r){var i=new c.FileLoader(this.manager);i.setPath(this.path),i.setResponseType(`arraybuffer`),this.crossOrigin===`use-credentials`&&i.setWithCredentials(!0),i.load(e,e=>{var n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)},decodeDracoFile:function(e,t,n,r){var i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)},decodeGeometry:function(e,t){for(var n in t.attributeTypes){var r=t.attributeTypes[n];r.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[n]=r.name)}var i=JSON.stringify(t);if(u.taskCache.has(e)){var a=u.taskCache.get(e);if(a.key===i)return a.promise;if(e.byteLength===0)throw Error(`THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.`)}var o,s=this.workerNextTaskID++,c=e.byteLength,l=this._getWorker(s,c).then(n=>(o=n,new Promise((n,r)=>{o._callbacks[s]={resolve:n,reject:r},o.postMessage({type:`decode`,id:s,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return l.catch(()=>!0).then(()=>{o&&s&&this._releaseTask(o,s)}),u.taskCache.set(e,{key:i,promise:l}),l},_createGeometry:function(e){var t=new c.BufferGeometry;e.index&&t.setIndex(new c.BufferAttribute(e.index.array,1));for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n],i=r.name,a=r.array,o=r.itemSize;t.setAttribute(i,new c.BufferAttribute(a,o))}return t},_loadLibrary:function(e,t){var n=new c.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),new Promise((t,r)=>{n.load(e,t,void 0,r)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e=typeof WebAssembly!=`object`||this.decoderConfig.type===`js`,t=[];return e?t.push(this._loadLibrary(`draco_decoder.js`,`text`)):(t.push(this._loadLibrary(`draco_wasm_wrapper.js`,`text`)),t.push(this._loadLibrary(`draco_decoder.wasm`,`arraybuffer`))),this.decoderPending=Promise.all(t).then(t=>{var n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=u.DRACOWorker.toString(),i=[`/* draco decoder */`,n,``,`/* worker */`,r.substring(r.indexOf(`{`)+1,r.lastIndexOf(`}`))].join(`
261
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var n=new Worker(this.workerSourceURL);n._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:`init`,decoderConfig:this.decoderConfig}),n.onmessage=function(e){var t=e.data;switch(t.type){case`decode`:n._callbacks[t.id].resolve(t);break;case`error`:n._callbacks[t.id].reject(t);break;default:console.error(`THREE.DRACOLoader: Unexpected message, "`+t.type+`"`)}},this.workerPool.push(n)}else this.workerPool.sort(function(e,t){return e._taskLoad>t._taskLoad?-1:1});var n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log(`Task load: `,this.workerPool.map(e=>e._taskLoad))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),u.DRACOWorker=function(){var e,t;onmessage=function(r){var i=r.data;switch(i.type){case`init`:e=i.decoderConfig,t=new Promise(function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)});break;case`decode`:var a=i.buffer,o=i.taskConfig;t.then(e=>{var t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(a),a.byteLength);try{var c=n(t,r,s,o),l=c.attributes.map(e=>e.array.buffer);c.index&&l.push(c.index.array.buffer),self.postMessage({type:`decode`,id:i.id,geometry:c},l)}catch(e){console.error(e),self.postMessage({type:`error`,id:i.id,error:e.message})}finally{t.destroy(s),t.destroy(r)}});break}};function n(e,t,n,i){var a=i.attributeIDs,o=i.attributeTypes,s,c,l=t.GetEncodedGeometryType(n);if(l===e.TRIANGULAR_MESH)s=new e.Mesh,c=t.DecodeBufferToMesh(n,s);else if(l===e.POINT_CLOUD)s=new e.PointCloud,c=t.DecodeBufferToPointCloud(n,s);else throw Error(`THREE.DRACOLoader: Unexpected geometry type.`);if(!c.ok()||s.ptr===0)throw Error(`THREE.DRACOLoader: Decoding failed: `+c.error_msg());var u={index:null,attributes:[]};for(var d in a){var f=self[o[d]],p,m;if(i.useUniqueIDs)m=a[d],p=t.GetAttributeByUniqueId(s,m);else{if(m=t.GetAttributeId(s,e[a[d]]),m===-1)continue;p=t.GetAttribute(s,m)}u.attributes.push(r(e,t,s,d,f,p))}if(l===e.TRIANGULAR_MESH){for(var h=s.num_faces(),g=h*3,_=new Uint32Array(g),v=new e.DracoInt32Array,y=0;y<h;++y){t.GetFaceFromMesh(s,y,v);for(var b=0;b<3;++b)_[y*3+b]=v.GetValue(b)}u.index={array:_,itemSize:1},e.destroy(v)}return e.destroy(s),u}function r(e,t,n,r,i,a){var o=a.num_components(),s=n.num_points()*o,c,l;switch(i){case Float32Array:c=new e.DracoFloat32Array,t.GetAttributeFloatForAllPoints(n,a,c),l=new Float32Array(s);break;case Int8Array:c=new e.DracoInt8Array,t.GetAttributeInt8ForAllPoints(n,a,c),l=new Int8Array(s);break;case Int16Array:c=new e.DracoInt16Array,t.GetAttributeInt16ForAllPoints(n,a,c),l=new Int16Array(s);break;case Int32Array:c=new e.DracoInt32Array,t.GetAttributeInt32ForAllPoints(n,a,c),l=new Int32Array(s);break;case Uint8Array:c=new e.DracoUInt8Array,t.GetAttributeUInt8ForAllPoints(n,a,c),l=new Uint8Array(s);break;case Uint16Array:c=new e.DracoUInt16Array,t.GetAttributeUInt16ForAllPoints(n,a,c),l=new Uint16Array(s);break;case Uint32Array:c=new e.DracoUInt32Array,t.GetAttributeUInt32ForAllPoints(n,a,c),l=new Uint32Array(s);break;default:throw Error(`THREE.DRACOLoader: Unexpected attribute type.`)}for(var u=0;u<s;u++)l[u]=c.GetValue(u);return e.destroy(c),{name:r,array:l,itemSize:o}}},u.taskCache=new WeakMap,u.setDecoderPath=function(){console.warn(`THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.`)},u.setDecoderConfig=function(){console.warn(`THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.`)},u.releaseDecoderModule=function(){console.warn(`THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.`)},u.getDecoderModule=function(){console.warn(`THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.`)};var d=function(e){c.CompressedTextureLoader.call(this,e)};d.prototype=Object.assign(Object.create(c.CompressedTextureLoader.prototype),{constructor:d,parse:function(e,t){var n={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},r=542327876,i=131072,a=512,o=1024,s=2048,l=4096,u=8192,d=16384,f=32768,p=4;function m(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function h(e){return String.fromCharCode(e&255,e>>8&255,e>>16&255,e>>24&255)}function g(e,t,n,r){for(var i=n*r*4,a=new Uint8Array(e,t,i),o=new Uint8Array(i),s=0,c=0,l=0;l<r;l++)for(var u=0;u<n;u++){var d=a[c];c++;var f=a[c];c++;var p=a[c];c++;var m=a[c];c++,o[s]=p,s++,o[s]=f,s++,o[s]=d,s++,o[s]=m,s++}return o}var _=m(`DXT1`),v=m(`DXT3`),y=m(`DXT5`),b=m(`ETC1`),x=31,S=0,C=1,w=2,T=3,E=4,D=7,O=20,k=21,A=22,j=23,M=24,N=25,P=26,F=28,I=new Int32Array(e,0,x);if(I[S]!==r)return console.error(`THREE.DDSLoader.parse: Invalid magic number in DDS header.`),n;if(!I[O]&p)return console.error(`THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code.`),n;var L,R=I[k],z=!1;switch(R){case _:L=8,n.format=c.RGB_S3TC_DXT1_Format;break;case v:L=16,n.format=c.RGBA_S3TC_DXT3_Format;break;case y:L=16,n.format=c.RGBA_S3TC_DXT5_Format;break;case b:L=8,n.format=c.RGB_ETC1_Format;break;default:if(I[A]===32&&I[j]&16711680&&I[M]&65280&&I[N]&255&&I[P]&4278190080)z=!0,L=64,n.format=c.RGBAFormat;else return console.error(`THREE.DDSLoader.parse: Unsupported FourCC code `,h(R)),n}n.mipmapCount=1,I[w]&i&&t!==!1&&(n.mipmapCount=Math.max(1,I[D]));var B=I[F];if(n.isCubemap=!!(B&a),n.isCubemap&&(!(B&o)||!(B&s)||!(B&l)||!(B&u)||!(B&d)||!(B&f)))return console.error(`THREE.DDSLoader.parse: Incomplete cubemap faces`),n;n.width=I[E],n.height=I[T];for(var V=I[C]+4,H=n.isCubemap?6:1,U=0;U<H;U++)for(var W=n.width,G=n.height,K=0;K<n.mipmapCount;K++){if(z)var q=g(e,V,W,G),J=q.length;else var J=Math.max(4,W)/4*Math.max(4,G)/4*L,q=new Uint8Array(e,V,J);var Y={data:q,width:W,height:G};n.mipmaps.push(Y),V+=J,W=Math.max(W>>1,1),G=Math.max(G>>1,1)}return n}});var f=class extends c.Group{constructor(e){super(),this.needsRender=!0,e&&e.children.length&&this.add(...e.children),this.mixer=new c.AnimationMixer(this)}clone(){let e=super.clone(!0);return e.mixer=new c.AnimationMixer(e),e.needsRender=!0,e}},p=`https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/`,m=class extends l{static get version(){return`6.8.0-alpha.21`}constructor(e){super(e),this.ddsLoader=new d(e),this.dracoLoader=new u(e),this.dracoLoader.setDecoderPath(p)}load(e,t,n,r){return super.load(e,t,n,r)}parse(e,t,n,r){return super.parse(e,t,e=>{let t=new f(e.scene),r=e.scenes.map(n=>n===e.scene?t:new f(n));n(Object.assign(e,{scene:t,scenes:r}))},r)}};exports.DDSLoader=d,exports.DRACOLoader=u,exports.GLTFLoader=m,exports.GLTFObject=f,exports.THREEGLTFLoader=l;