@realsee/five 6.6.0-alpha.0 → 6.6.0-alpha.2

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 (531) hide show
  1. package/docs/assets/hierarchy.js +1 -0
  2. package/docs/assets/icons.js +1 -1
  3. package/docs/assets/icons.svg +1 -1
  4. package/docs/assets/main.js +5 -5
  5. package/docs/assets/navigation.js +1 -1
  6. package/docs/assets/search.js +1 -1
  7. package/docs/assets/style.css +1440 -1255
  8. package/docs/classes/five.AnimationFrameLoop.html +16 -16
  9. package/docs/classes/five.Camera.html +41 -41
  10. package/docs/classes/five.Fetcher.html +5 -5
  11. package/docs/classes/five.Five.html +211 -211
  12. package/docs/classes/five.InternalWebGLRenderer.html +2 -2
  13. package/docs/classes/five.Model.html +72 -72
  14. package/docs/classes/five.ModelScene.html +34 -34
  15. package/docs/classes/five.Motion.html +17 -17
  16. package/docs/classes/five.NetworkSubscribe.html +35 -35
  17. package/docs/classes/five.PBMContainer.html +17 -17
  18. package/docs/classes/five.PBMCustomShader.html +11 -11
  19. package/docs/classes/five.PBMGroup.html +4 -4
  20. package/docs/classes/five.PBMMesh.html +2 -2
  21. package/docs/classes/five.PBMMeshMaterial.html +84 -84
  22. package/docs/classes/five.PBMPointCloud.html +3 -3
  23. package/docs/classes/five.PBMPointCloudMaterial.html +40 -40
  24. package/docs/classes/five.PBMSkinnedMesh.html +4 -4
  25. package/docs/classes/five.PanoCircleMesh.html +20 -20
  26. package/docs/classes/five.PanoCircleMeshCustom.html +20 -20
  27. package/docs/classes/five.PanoCircleMeshSolid.html +20 -20
  28. package/docs/classes/five.Parameter.html +114 -114
  29. package/docs/classes/five.Scene.html +9 -9
  30. package/docs/classes/five.Subscribe.html +37 -37
  31. package/docs/classes/five.TextureLoader.html +4 -4
  32. package/docs/classes/five.Tile.html +34 -34
  33. package/docs/classes/five.Tile3DModel.html +91 -91
  34. package/docs/classes/five.TileCache.html +8 -8
  35. package/docs/classes/five.TileNode.html +9 -9
  36. package/docs/classes/five.TileRequestScheduler.html +4 -4
  37. package/docs/classes/five.Tileset.html +37 -37
  38. package/docs/classes/five.Trajectory.html +8 -8
  39. package/docs/classes/five.TrajectoryNode.html +7 -7
  40. package/docs/classes/five.Work.html +42 -42
  41. package/docs/classes/five.WorkResolvedObserver.html +40 -40
  42. package/docs/classes/five.XRButton.html +3 -3
  43. package/docs/classes/gltf-loader.DDSLoader.html +3 -0
  44. package/docs/classes/gltf-loader.DRACOLoader.html +8 -0
  45. package/docs/classes/gltf-loader.GLTFLoader.html +19 -0
  46. package/docs/classes/gltf-loader.GLTFObject.html +9 -0
  47. package/docs/classes/gltf-loader.GLTFParser.html +6 -0
  48. package/docs/classes/gltf-loader.THREEGLTFLoader.html +8 -0
  49. package/docs/classes/line.Line.html +10 -10
  50. package/docs/classes/line.LineGeometry.html +17 -17
  51. package/docs/classes/line.LineMaterial.html +8 -8
  52. package/docs/classes/line.LineSegmentsGeometry.html +15 -15
  53. package/docs/classes/line.THREE_Line2.html +4 -4
  54. package/docs/classes/line.THREE_LineSegments2.html +4 -4
  55. package/docs/classes/plugins.BasePlugin.Controller.html +39 -0
  56. package/docs/classes/plugins.CSS3DRenderer.html +6 -0
  57. package/docs/classes/plugins.OrbitControls.html +41 -0
  58. package/docs/classes/plugins.RoundedBoxGeometry.html +3 -0
  59. package/docs/classes/react.Store.html +20 -20
  60. package/docs/classes/sticker.Sticker.html +17 -17
  61. package/docs/classes/vfx.Airflow.html +8 -8
  62. package/docs/classes/vfx.Flame.html +10 -10
  63. package/docs/classes/vfx.Particle.html +78 -78
  64. package/docs/classes/vfx.SpotLight.html +7 -7
  65. package/docs/documents/coordinate.html +4 -4
  66. package/docs/documents/five.FivePlugin.plugins.html +15 -15
  67. package/docs/documents/five.Pose.coordinate.html +4 -4
  68. package/docs/documents/plugins.html +15 -15
  69. package/docs/documents/react-component.html +32 -0
  70. package/docs/enums/five.VolumePlaneIntersect.html +4 -4
  71. package/docs/enums/plugins.BackgroundPluginType.WarningCodeType.html +2 -0
  72. package/docs/functions/five.coordinatesToVector.html +2 -0
  73. package/docs/functions/five.createDebugBoundingMesh.html +1 -1
  74. package/docs/functions/five.createWorks.html +1 -1
  75. package/docs/functions/five.defaultImageURLTransform.html +2 -2
  76. package/docs/functions/five.getViewportScale.html +1 -1
  77. package/docs/functions/five.headingToLongitude.html +4 -0
  78. package/docs/functions/five.imageSupport.html +1 -1
  79. package/docs/functions/five.isBoundingVolume.html +1 -1
  80. package/docs/functions/five.isPanoId.html +1 -1
  81. package/docs/functions/five.loadAt3d.html +1 -1
  82. package/docs/functions/five.loadB3dm.html +1 -1
  83. package/docs/functions/five.loadDome.html +1 -1
  84. package/docs/functions/five.loadDomez.html +1 -1
  85. package/docs/functions/five.loadFbx.html +1 -1
  86. package/docs/functions/five.loadGltf.html +1 -1
  87. package/docs/functions/five.loadPbm.html +1 -1
  88. package/docs/functions/five.loadPly.html +1 -1
  89. package/docs/functions/five.loadPnts.html +1 -1
  90. package/docs/functions/five.loadX3p.html +1 -1
  91. package/docs/functions/five.longitudeToHeading.html +4 -0
  92. package/docs/functions/five.makeBoundingVolume.html +1 -1
  93. package/docs/functions/five.panoEqual.html +1 -1
  94. package/docs/functions/five.panoParse.html +1 -1
  95. package/docs/functions/five.panoStringify.html +1 -1
  96. package/docs/functions/five.parseWork.html +2 -2
  97. package/docs/functions/five.vectorToCoordinates.html +2 -0
  98. package/docs/functions/five.workToJson.html +1 -1
  99. package/docs/functions/plugins.BackgroundPlugin.html +1 -0
  100. package/docs/functions/plugins.ItemMaskPlugin.html +1 -0
  101. package/docs/functions/plugins.OrientationPlugin.html +1 -0
  102. package/docs/functions/plugins.PanoAnimePlugin.html +1 -0
  103. package/docs/functions/plugins.TrajectoryPlugin.html +1 -0
  104. package/docs/functions/react.createFiveFeature.html +1 -1
  105. package/docs/functions/react.createFiveProvider.html +5 -5
  106. package/docs/functions/react.createStore.html +12 -12
  107. package/docs/functions/react.unsafe__useFiveInstance.html +4 -4
  108. package/docs/functions/react.useFiveAction.html +8 -8
  109. package/docs/functions/react.useFiveCameraDirection.html +3 -3
  110. package/docs/functions/react.useFiveCameraRaycaster.html +3 -3
  111. package/docs/functions/react.useFiveCurrentObserver.html +4 -4
  112. package/docs/functions/react.useFiveCurrentState.html +4 -4
  113. package/docs/functions/react.useFiveEventCallback.html +3 -3
  114. package/docs/functions/react.useFiveFloor.html +4 -4
  115. package/docs/functions/react.useFiveHelper.html +4 -4
  116. package/docs/functions/react.useFiveModelIntersectRaycaster.html +4 -4
  117. package/docs/functions/react.useFiveModelReadyState.html +3 -3
  118. package/docs/functions/react.useFiveProject2d.html +4 -4
  119. package/docs/functions/react.useFiveSceneEffect.html +4 -4
  120. package/docs/functions/react.useFiveState.html +1 -1
  121. package/docs/functions/react.useFiveWork.html +5 -5
  122. package/docs/functions/react.withFive.html +1 -1
  123. package/docs/functions/vue.unsafe__useFiveInject.html +4 -4
  124. package/docs/functions/vue.useFiveAction.html +10 -10
  125. package/docs/functions/vue.useFiveCameraDirection.html +3 -3
  126. package/docs/functions/vue.useFiveCameraRaycaster.html +3 -3
  127. package/docs/functions/vue.useFiveCurrentObserver.html +4 -4
  128. package/docs/functions/vue.useFiveCurrentState.html +4 -4
  129. package/docs/functions/vue.useFiveEventCallback.html +3 -3
  130. package/docs/functions/vue.useFiveFloor.html +4 -4
  131. package/docs/functions/vue.useFiveHelper.html +4 -4
  132. package/docs/functions/vue.useFiveModel.html +2 -2
  133. package/docs/functions/vue.useFiveModelBounding.html +2 -2
  134. package/docs/functions/vue.useFiveModelIntersectRaycaster.html +4 -4
  135. package/docs/functions/vue.useFiveModelReadyState.html +3 -3
  136. package/docs/functions/vue.useFiveProject2d.html +4 -4
  137. package/docs/functions/vue.useFiveScene.html +2 -2
  138. package/docs/functions/vue.useFiveState.html +4 -4
  139. package/docs/functions/vue.useFiveWorks.html +5 -5
  140. package/docs/hierarchy.html +1 -1
  141. package/docs/index.html +17 -17
  142. package/docs/interfaces/five.AddableObject.html +9 -9
  143. package/docs/interfaces/five.AjaxOptions.html +9 -9
  144. package/docs/interfaces/five.AnimationFrame.html +5 -5
  145. package/docs/interfaces/five.AnimationFrameContext.html +3 -3
  146. package/docs/interfaces/five.BaseEvent.html +5 -5
  147. package/docs/interfaces/five.BoundingVolume.html +15 -15
  148. package/docs/interfaces/five.BoxBoundingVolume.html +18 -0
  149. package/docs/interfaces/five.CameraPose.html +6 -6
  150. package/docs/interfaces/five.CullingVolume.html +9 -0
  151. package/docs/interfaces/five.Draco.html +12 -0
  152. package/docs/interfaces/five.EventCallback.html +255 -255
  153. package/docs/interfaces/five.FiveInitArgs.html +85 -85
  154. package/docs/interfaces/five.FiveLoadOptions.html +13 -13
  155. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
  156. package/docs/interfaces/five.GestureEvent.html +19 -19
  157. package/docs/interfaces/five.ImageOptions.html +14 -14
  158. package/docs/interfaces/five.ImageURLMappings.html +1 -1
  159. package/docs/interfaces/five.ImageURLOptions.html +15 -15
  160. package/docs/interfaces/five.IntersectEvent.html +8 -8
  161. package/docs/interfaces/five.IntersectMesh.html +2 -0
  162. package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
  163. package/docs/interfaces/five.Intersection.html +5 -5
  164. package/docs/interfaces/five.KTX2.html +9 -0
  165. package/docs/interfaces/five.LoosePanoWork.html +10 -10
  166. package/docs/interfaces/five.LooseWork.html +15 -0
  167. package/docs/interfaces/five.LooseWorkInitial.html +11 -0
  168. package/docs/interfaces/five.LooseWorkModel.html +6 -0
  169. package/docs/interfaces/five.LooseWorkObserver.html +16 -0
  170. package/docs/interfaces/five.LooseWorkPanorama.html +13 -0
  171. package/docs/interfaces/five.LooseWorkVideo.html +4 -0
  172. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +13 -0
  173. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +17 -17
  174. package/docs/interfaces/five.ModeChangeEvent.html +9 -9
  175. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
  176. package/docs/interfaces/five.ModelEvent.html +8 -8
  177. package/docs/interfaces/five.ModelLike.html +3 -3
  178. package/docs/interfaces/five.ModelSceneEvent.html +6 -6
  179. package/docs/interfaces/five.MotionKeyframe.html +4 -4
  180. package/docs/interfaces/five.MovePanoOptions.html +24 -24
  181. package/docs/interfaces/five.NetworkAbortError.html +1 -0
  182. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -0
  183. package/docs/interfaces/five.NetworkOptions.html +7 -7
  184. package/docs/interfaces/five.NetworkProxyError.html +1 -0
  185. package/docs/interfaces/five.NetworkResourceEvent.html +9 -9
  186. package/docs/interfaces/five.NetworkResponseError.html +2 -0
  187. package/docs/interfaces/five.NetworkTimeoutError.html +1 -0
  188. package/docs/interfaces/five.ObjectEvent.html +6 -6
  189. package/docs/interfaces/five.PBMClipperParameter.html +3 -3
  190. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +6 -6
  191. package/docs/interfaces/five.PBMCustomShaderSlots.html +3 -3
  192. package/docs/interfaces/five.PBMMaterial.html +1 -0
  193. package/docs/interfaces/five.PBMMeshMaterialParameters.html +28 -28
  194. package/docs/interfaces/five.PBMPanoDepth.html +9 -9
  195. package/docs/interfaces/five.PBMPanoPicture.html +11 -11
  196. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +28 -28
  197. package/docs/interfaces/five.PBMRefinedScreen.html +6 -6
  198. package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -9
  199. package/docs/interfaces/five.PanoCircleMeshInterface.html +20 -20
  200. package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -3
  201. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -3
  202. package/docs/interfaces/five.PanoEvent.html +11 -11
  203. package/docs/interfaces/five.PanoTextureEvent.html +9 -9
  204. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +38 -38
  205. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
  206. package/docs/interfaces/five.ParameterMaterialValue.html +73 -73
  207. package/docs/interfaces/five.ParameterTilesetValue.html +31 -31
  208. package/docs/interfaces/five.ParameterValue.html +103 -103
  209. package/docs/interfaces/five.Pose.html +13 -13
  210. package/docs/interfaces/five.RegionBoundingVolume.html +21 -0
  211. package/docs/interfaces/five.RenderEvent.html +6 -6
  212. package/docs/interfaces/five.ResolvedParameterValue.html +105 -105
  213. package/docs/interfaces/five.SphereBoundingVolume.html +17 -0
  214. package/docs/interfaces/five.State.html +19 -19
  215. package/docs/interfaces/five.StateEvent.html +7 -7
  216. package/docs/interfaces/five.TextureOptions.html +16 -16
  217. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +12 -12
  218. package/docs/interfaces/five.TileHeader.html +9 -9
  219. package/docs/interfaces/five.TilesetHeader.html +20 -20
  220. package/docs/interfaces/five.TilesetOptions.html +12 -12
  221. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
  222. package/docs/interfaces/five.TrajectoryHeader.html +5 -5
  223. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +34 -34
  224. package/docs/interfaces/five.ViewLayer.html +90 -90
  225. package/docs/interfaces/five.Viewport.html +11 -11
  226. package/docs/interfaces/five.WebXRAxesParams.html +4 -4
  227. package/docs/interfaces/five.WebXRControllerParams.html +2 -2
  228. package/docs/interfaces/five.WorkCubeImage.html +8 -14
  229. package/docs/interfaces/five.WorkImage.html +13 -19
  230. package/docs/interfaces/five.WorkInitial.html +17 -17
  231. package/docs/interfaces/five.WorkInitialJson.html +8 -8
  232. package/docs/interfaces/five.WorkJson.html +12 -12
  233. package/docs/interfaces/five.WorkModel.html +12 -12
  234. package/docs/interfaces/five.WorkModelJson.html +5 -5
  235. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  236. package/docs/interfaces/five.WorkModelLayerJson.html +5 -5
  237. package/docs/interfaces/five.WorkObserver.html +34 -34
  238. package/docs/interfaces/five.WorkObserverJson.html +8 -8
  239. package/docs/interfaces/five.WorkPanoramaJson.html +14 -14
  240. package/docs/interfaces/five.WorkPanoramasJson.html +3 -3
  241. package/docs/interfaces/five.WorkTile.html +14 -20
  242. package/docs/interfaces/five.WorkVideo.html +9 -9
  243. package/docs/interfaces/five.WorksEvent.html +9 -9
  244. package/docs/interfaces/five.XRControllerEvent.html +8 -8
  245. package/docs/interfaces/five.XRGestureEvent.html +11 -11
  246. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +34 -34
  247. package/docs/interfaces/five.XRSessionEvent.html +7 -7
  248. package/docs/interfaces/gltf-loader.DDS.html +7 -0
  249. package/docs/interfaces/gltf-loader.GLTF.html +13 -0
  250. package/docs/interfaces/gltf-loader.GLTFReference.html +3 -0
  251. package/docs/interfaces/gltf-loader.THREEGLTF.html +8 -0
  252. package/docs/interfaces/plugins.BackgroundPluginController.html +37 -0
  253. package/docs/interfaces/plugins.BackgroundPluginType.Config.html +1 -0
  254. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +20 -0
  255. package/docs/interfaces/plugins.BackgroundPluginType.Params.html +3 -0
  256. package/docs/interfaces/plugins.BackgroundPluginType.PluginDataItem.html +1 -0
  257. package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +3 -0
  258. package/docs/interfaces/plugins.BasePlugin.Config.html +5 -0
  259. package/docs/interfaces/plugins.BasePlugin.State.html +8 -0
  260. package/docs/interfaces/plugins.BasePlugin.StateChangeParams.html +7 -0
  261. package/docs/interfaces/plugins.ItemMaskController.html +35 -0
  262. package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +2 -0
  263. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +10 -0
  264. package/docs/interfaces/plugins.ItemMaskPluginType.ItemType.html +13 -0
  265. package/docs/interfaces/plugins.ItemMaskPluginType.MaskType.html +4 -0
  266. package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +4 -0
  267. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +14 -0
  268. package/docs/interfaces/plugins.Keyframe.html +3 -0
  269. package/docs/interfaces/plugins.OrientationPluginController.html +46 -0
  270. package/docs/interfaces/plugins.OrientationPluginType.Config.html +4 -0
  271. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +10 -0
  272. package/docs/interfaces/plugins.OrientationPluginType.Params.html +4 -0
  273. package/docs/interfaces/plugins.OrientationPluginType.State.html +10 -0
  274. package/docs/interfaces/plugins.PanoAnimeController.html +32 -0
  275. package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -0
  276. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +11 -0
  277. package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +4 -0
  278. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +8 -0
  279. package/docs/interfaces/plugins.PlayingState.html +3 -0
  280. package/docs/interfaces/plugins.PluginTemplateType.Config.html +3 -0
  281. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +10 -0
  282. package/docs/interfaces/plugins.PluginTemplateType.Params.html +4 -0
  283. package/docs/interfaces/plugins.PluginTemplateType.State.html +8 -0
  284. package/docs/interfaces/plugins.TrajectoryController.html +50 -0
  285. package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -27
  286. package/docs/interfaces/react.FiveCanvasProps.html +5 -5
  287. package/docs/interfaces/react.FiveInjectionTypes.html +152 -144
  288. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -2
  289. package/docs/interfaces/sticker.IntersectionLike.html +7 -7
  290. package/docs/interfaces/vfx.ParticleArgs.html +67 -67
  291. package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -3
  292. package/docs/interfaces/vue.FiveActionVueCallbacks.html +30 -30
  293. package/docs/modules/five.html +1 -231
  294. package/docs/modules/gltf-loader.html +1 -0
  295. package/docs/modules/line.html +1 -8
  296. package/docs/modules/plugins.BackgroundPluginType.html +1 -0
  297. package/docs/modules/plugins.BasePlugin.html +1 -0
  298. package/docs/modules/plugins.ItemMaskPluginType.html +1 -0
  299. package/docs/modules/plugins.OrientationPluginType.html +1 -0
  300. package/docs/modules/plugins.PanoAnimePluginType.html +1 -0
  301. package/docs/modules/plugins.PluginTemplateType.html +1 -0
  302. package/docs/modules/plugins.html +1 -0
  303. package/docs/modules/react.html +1 -37
  304. package/docs/modules/sticker.html +1 -3
  305. package/docs/modules/vfx.html +1 -8
  306. package/docs/modules/vue.html +1 -24
  307. package/docs/modules.html +1 -0
  308. package/docs/types/five.AjaxResponseType.html +1 -1
  309. package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
  310. package/docs/types/five.AnimationFrameLoopType.html +1 -1
  311. package/docs/types/five.BoundingVolumeJson.html +1 -1
  312. package/docs/types/five.BoxBoundingVolumeJson.html +2 -1
  313. package/docs/types/five.ControllerCustomInitTypes.html +8 -1
  314. package/docs/types/five.ControllerEventTypes.html +66 -33
  315. package/docs/types/five.CubeFace.html +1 -0
  316. package/docs/types/five.EventTypes.html +26 -26
  317. package/docs/types/five.FivePlugin.html +4 -4
  318. package/docs/types/five.FivePluginInit.html +3 -3
  319. package/docs/types/five.FivePluginInstance.html +3 -3
  320. package/docs/types/five.GestureTypes.html +1 -1
  321. package/docs/types/five.LegacyEventType.html +149 -86
  322. package/docs/types/five.LoadResultType.html +12 -1
  323. package/docs/types/five.Mode.html +9 -9
  324. package/docs/types/five.Models.html +11 -11
  325. package/docs/types/five.MotionCircle.html +2 -2
  326. package/docs/types/five.MotionConfig.html +1 -1
  327. package/docs/types/five.MotionInitalValue.html +1 -1
  328. package/docs/types/five.MotionValue.html +1 -1
  329. package/docs/types/five.MovePanoEffect.html +3 -3
  330. package/docs/types/five.NetWorkMeta.html +8 -1
  331. package/docs/types/five.NetworkError.html +1 -1
  332. package/docs/types/five.NetworkErrorCallback.html +1 -1
  333. package/docs/types/five.NetworkProgressCallback.html +1 -1
  334. package/docs/types/five.NetworkResponse.html +3 -1
  335. package/docs/types/five.NetworkState.html +1 -1
  336. package/docs/types/five.NetworkSuccessCallback.html +1 -1
  337. package/docs/types/five.NetworkType.html +1 -1
  338. package/docs/types/five.PBMAlphaMode.html +1 -1
  339. package/docs/types/five.PBMColorStyle.html +1 -1
  340. package/docs/types/five.PBMFloorStyle.html +1 -1
  341. package/docs/types/five.PBMMeshShaderType.html +1 -1
  342. package/docs/types/five.PBMPointBack.html +1 -1
  343. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  344. package/docs/types/five.PBMPointShape.html +1 -1
  345. package/docs/types/five.PBMPointSize.html +1 -1
  346. package/docs/types/five.PBMTransition.html +1 -1
  347. package/docs/types/five.Pano.html +3 -1
  348. package/docs/types/five.PanoId.html +1 -1
  349. package/docs/types/five.ParseOptions.html +11 -6
  350. package/docs/types/five.PostProcessingType.html +1 -1
  351. package/docs/types/five.RegionBoundingVolumeJson.html +2 -1
  352. package/docs/types/five.Scissor.html +2 -2
  353. package/docs/types/five.SphereBoundingVolumeJson.html +2 -1
  354. package/docs/types/five.SubscribeEventMap.html +1 -1
  355. package/docs/types/five.Tile3dOptions.html +1 -1
  356. package/docs/types/five.TileCacheOptions.html +3 -1
  357. package/docs/types/five.TileContentData.html +6 -1
  358. package/docs/types/five.TileRequestOrder.html +1 -1
  359. package/docs/types/five.TileRequestSchedulerOptions.html +4 -1
  360. package/docs/types/five.TilesetFrameState.html +22 -1
  361. package/docs/types/five.TrajectoryContentData.html +7 -1
  362. package/docs/types/five.WebXRControllerKey.html +1 -1
  363. package/docs/types/five.WebXRControllerType.html +1 -1
  364. package/docs/types/five.Works.html +1 -1
  365. package/docs/types/line.LineMaterialParameters.html +8 -1
  366. package/docs/types/plugins.BackgroundPluginType.Mirror.html +1 -0
  367. package/docs/types/plugins.BackgroundPluginType.Mode.html +1 -0
  368. package/docs/types/plugins.BackgroundPluginType.PluginData.html +1 -0
  369. package/docs/types/plugins.BackgroundPluginType.State.html +2 -0
  370. package/docs/types/plugins.BasePlugin.EventMap.html +10 -0
  371. package/docs/types/plugins.ItemMaskPluginType.PluginData.html +3 -0
  372. package/docs/types/plugins.ItemMaskPluginType.ServerData.html +3 -0
  373. package/docs/types/plugins.OrientationPluginType.PluginData.html +1 -0
  374. package/docs/types/plugins.OrientationPluginType.ServerData.html +1 -0
  375. package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -0
  376. package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -0
  377. package/docs/types/plugins.PluginTemplateType.PluginData.html +1 -0
  378. package/docs/types/plugins.PluginTemplateType.ServerData.html +2 -0
  379. package/docs/types/react.FiveInjectionActionFeature.html +1 -1
  380. package/docs/types/react.FiveInjectionDataFeature.html +1 -1
  381. package/docs/types/react.FiveInjectionFeature.html +1 -1
  382. package/docs/types/react.FiveProviderPropTypes.html +11 -1
  383. package/docs/types/react.FiveProviderType.html +1 -1
  384. package/docs/types/react.StoreActionMapHanlder.html +1 -1
  385. package/docs/types/react.StoreActionMapType.html +1 -1
  386. package/docs/types/react.StoreProviderType.html +1 -1
  387. package/docs/types/react.StoreValueMapType.html +1 -1
  388. package/docs/types/vfx.ParticleType.html +1 -1
  389. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
  390. package/docs/types/vue.FiveProviderComponent.html +1 -1
  391. package/docs/types/vue.Project2d.html +1 -1
  392. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  393. package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
  394. package/docs/variables/five.draco.html +1 -0
  395. package/docs/variables/five.ktx2.html +1 -0
  396. package/docs/variables/react.FiveCanvas.html +6 -0
  397. package/docs/variables/react.INJECTION_PROPNAME.html +1 -1
  398. package/docs/variables/react.useFiveScene.html +7 -0
  399. package/docs/variables/vue.FiveCanvas.html +7 -7
  400. package/docs/variables/vue.FiveProvider.html +5 -5
  401. package/five/index.d.ts +53 -57
  402. package/five/index.js +93 -91
  403. package/five/index.mjs +4247 -4193
  404. package/gltf-loader/index.js +5 -5
  405. package/gltf-loader/index.mjs +160 -172
  406. package/line/index.js +4 -4
  407. package/line/index.mjs +15 -15
  408. package/package.json +4 -7
  409. package/plugins/index.js +10 -10
  410. package/plugins/index.mjs +42 -42
  411. package/react/index.d.ts +46 -37
  412. package/react/index.js +3 -3
  413. package/react/index.mjs +8 -8
  414. package/shader-lib/index.js +7 -7
  415. package/shader-lib/index.mjs +14 -14
  416. package/sticker/index.js +3 -3
  417. package/sticker/index.mjs +9 -9
  418. package/umd/five-gltf-loader.js +5 -5
  419. package/umd/five-line.js +4 -4
  420. package/umd/five-plugins.js +10 -10
  421. package/umd/five-react.js +3 -3
  422. package/umd/five-shader-lib.js +8 -8
  423. package/umd/five-sticker.js +3 -3
  424. package/umd/five-vfx.js +7 -7
  425. package/umd/five-vue.js +3 -3
  426. package/umd/five.js +94 -92
  427. package/vfx/index.js +6 -6
  428. package/vfx/index.mjs +12 -12
  429. package/vue/index.js +2 -2
  430. package/vue/index.mjs +2 -2
  431. package/work-downloader/index.js +3 -3
  432. package/work-downloader/index.mjs +4 -4
  433. package/docs/classes/five.BoxBoundingVolume.html +0 -19
  434. package/docs/classes/five.CullingVolume.html +0 -13
  435. package/docs/classes/five.Draco.html +0 -13
  436. package/docs/classes/five.IntersectMesh.html +0 -4
  437. package/docs/classes/five.KTX2.html +0 -10
  438. package/docs/classes/five.NetworkAbortError.html +0 -2
  439. package/docs/classes/five.NetworkFirbiddenError.html +0 -2
  440. package/docs/classes/five.NetworkProxyError.html +0 -2
  441. package/docs/classes/five.NetworkResponseError.html +0 -3
  442. package/docs/classes/five.NetworkTimeoutError.html +0 -2
  443. package/docs/classes/five.PBMMaterial.html +0 -2
  444. package/docs/classes/five.RegionBoundingVolume.html +0 -22
  445. package/docs/classes/five.SphereBoundingVolume.html +0 -18
  446. package/docs/classes/gltf_loader.DDSLoader.html +0 -3
  447. package/docs/classes/gltf_loader.DRACOLoader.html +0 -8
  448. package/docs/classes/gltf_loader.GLTFLoader.html +0 -19
  449. package/docs/classes/gltf_loader.GLTFObject.html +0 -9
  450. package/docs/classes/gltf_loader.GLTFParser.html +0 -6
  451. package/docs/classes/gltf_loader.THREEGLTFLoader.html +0 -8
  452. package/docs/classes/plugins-1.BackgroundPluginController.html +0 -38
  453. package/docs/classes/plugins-1.BasePlugin.Controller.html +0 -39
  454. package/docs/classes/plugins-1.CSS3DRenderer.html +0 -6
  455. package/docs/classes/plugins-1.ItemMaskController.html +0 -36
  456. package/docs/classes/plugins-1.OrbitControls.html +0 -41
  457. package/docs/classes/plugins-1.OrientationPluginController.html +0 -47
  458. package/docs/classes/plugins-1.PanoAnimeController.html +0 -33
  459. package/docs/classes/plugins-1.RoundedBoxGeometry.html +0 -3
  460. package/docs/classes/plugins-1.TrajectoryController.html +0 -51
  461. package/docs/documents/react_component.html +0 -32
  462. package/docs/enums/plugins-1.BackgroundPluginType.WarningCodeType.html +0 -2
  463. package/docs/functions/plugins-1.BackgroundPlugin.html +0 -1
  464. package/docs/functions/plugins-1.ItemMaskPlugin.html +0 -1
  465. package/docs/functions/plugins-1.OrientationPlugin.html +0 -1
  466. package/docs/functions/plugins-1.PanoAnimePlugin.html +0 -1
  467. package/docs/functions/plugins-1.TrajectoryPlugin.html +0 -1
  468. package/docs/functions/react.FiveCanvas.html +0 -6
  469. package/docs/functions/react.useFiveScene.html +0 -7
  470. package/docs/interfaces/gltf_loader.DDS.html +0 -7
  471. package/docs/interfaces/gltf_loader.GLTF.html +0 -13
  472. package/docs/interfaces/gltf_loader.GLTFReference.html +0 -3
  473. package/docs/interfaces/gltf_loader.THREEGLTF.html +0 -8
  474. package/docs/interfaces/plugins-1.BackgroundPluginType.Config.html +0 -1
  475. package/docs/interfaces/plugins-1.BackgroundPluginType.EventMap.html +0 -20
  476. package/docs/interfaces/plugins-1.BackgroundPluginType.Params.html +0 -3
  477. package/docs/interfaces/plugins-1.BackgroundPluginType.PluginDataItem.html +0 -1
  478. package/docs/interfaces/plugins-1.BasePlugin.BaseOptions.html +0 -3
  479. package/docs/interfaces/plugins-1.BasePlugin.Config.html +0 -5
  480. package/docs/interfaces/plugins-1.BasePlugin.State.html +0 -8
  481. package/docs/interfaces/plugins-1.BasePlugin.StateChangeParams.html +0 -7
  482. package/docs/interfaces/plugins-1.ItemMaskPluginType.Config.html +0 -2
  483. package/docs/interfaces/plugins-1.ItemMaskPluginType.EventMap.html +0 -10
  484. package/docs/interfaces/plugins-1.ItemMaskPluginType.ItemType.html +0 -13
  485. package/docs/interfaces/plugins-1.ItemMaskPluginType.MaskType.html +0 -4
  486. package/docs/interfaces/plugins-1.ItemMaskPluginType.Params.html +0 -4
  487. package/docs/interfaces/plugins-1.ItemMaskPluginType.State.html +0 -14
  488. package/docs/interfaces/plugins-1.Keyframe.html +0 -3
  489. package/docs/interfaces/plugins-1.OrientationPluginType.Config.html +0 -4
  490. package/docs/interfaces/plugins-1.OrientationPluginType.EventMap.html +0 -10
  491. package/docs/interfaces/plugins-1.OrientationPluginType.Params.html +0 -4
  492. package/docs/interfaces/plugins-1.OrientationPluginType.State.html +0 -10
  493. package/docs/interfaces/plugins-1.PanoAnimePluginType.Config.html +0 -2
  494. package/docs/interfaces/plugins-1.PanoAnimePluginType.EventMap.html +0 -11
  495. package/docs/interfaces/plugins-1.PanoAnimePluginType.Params.html +0 -4
  496. package/docs/interfaces/plugins-1.PanoAnimePluginType.State.html +0 -8
  497. package/docs/interfaces/plugins-1.PlayingState.html +0 -3
  498. package/docs/interfaces/plugins-1.PluginTemplateType.Config.html +0 -3
  499. package/docs/interfaces/plugins-1.PluginTemplateType.EventMap.html +0 -10
  500. package/docs/interfaces/plugins-1.PluginTemplateType.Params.html +0 -4
  501. package/docs/interfaces/plugins-1.PluginTemplateType.State.html +0 -8
  502. package/docs/modules/gltf_loader.html +0 -11
  503. package/docs/modules/plugins-1.BackgroundPluginType.html +0 -10
  504. package/docs/modules/plugins-1.BasePlugin.html +0 -7
  505. package/docs/modules/plugins-1.ItemMaskPluginType.html +0 -9
  506. package/docs/modules/plugins-1.OrientationPluginType.html +0 -7
  507. package/docs/modules/plugins-1.PanoAnimePluginType.html +0 -7
  508. package/docs/modules/plugins-1.PluginTemplateType.html +0 -7
  509. package/docs/modules/plugins-1.html +0 -22
  510. package/docs/types/five.LooseWork.html +0 -1
  511. package/docs/types/five.LooseWorkInitial.html +0 -1
  512. package/docs/types/five.LooseWorkModel.html +0 -1
  513. package/docs/types/five.LooseWorkObserver.html +0 -1
  514. package/docs/types/five.LooseWorkPanorama.html +0 -1
  515. package/docs/types/five.LooseWorkVideo.html +0 -1
  516. package/docs/types/five.LooseWorkWithExtrinsics.html +0 -2
  517. package/docs/types/plugins-1.BackgroundPluginType.Mirror.html +0 -1
  518. package/docs/types/plugins-1.BackgroundPluginType.Mode.html +0 -1
  519. package/docs/types/plugins-1.BackgroundPluginType.PluginData.html +0 -1
  520. package/docs/types/plugins-1.BackgroundPluginType.State.html +0 -1
  521. package/docs/types/plugins-1.BasePlugin.EventMap.html +0 -6
  522. package/docs/types/plugins-1.ItemMaskPluginType.PluginData.html +0 -1
  523. package/docs/types/plugins-1.ItemMaskPluginType.ServerData.html +0 -1
  524. package/docs/types/plugins-1.OrientationPluginType.PluginData.html +0 -1
  525. package/docs/types/plugins-1.OrientationPluginType.ServerData.html +0 -1
  526. package/docs/types/plugins-1.PanoAnimePluginType.PluginData.html +0 -1
  527. package/docs/types/plugins-1.PanoAnimePluginType.ServerData.html +0 -1
  528. package/docs/types/plugins-1.PluginTemplateType.PluginData.html +0 -1
  529. package/docs/types/plugins-1.PluginTemplateType.ServerData.html +0 -1
  530. package/docs/variables/five.draco-1.html +0 -1
  531. package/docs/variables/five.ktx2-1.html +0 -1
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/14/2025
5
- * Version: 6.6.0-alpha.0
4
+ * Generated: 2025/8/15
5
+ * Version: 6.6.0-alpha.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -283,7 +283,7 @@
283
283
  }
284
284
  }
285
285
  #endif
286
- `,H="",R={type:["pointcloud"],fragment:{mainBefore:V,mainStart:H,mainEnd:W},uniforms:{evennessPlaneNormal:new a.Uniform(new a.Vector3),evennessPlaneConstant:new a.Uniform(0),evennessPlanes:new a.Uniform([]),evennessPlaneDepth:new a.Uniform(0)},defines:{USE_PLANE_DISTANCE:!1}},L=function(r){S(e,r);function e(){var n=r.call(this,R)||this;return Object.defineProperties(n,{evennessPlane:{get:function(){return{depth:this.uniforms.evennessPlaneDepth.value,points:this.uniforms.evennessPoints.value}},set:function(t){var o=t.points,l=t.depth,m=!1;if(o.length!==0&&o.length%4===0){m=!0;var d=o[0],u=o[1],p=o[2],i=o[3],g=new a.Vector3().subVectors(u,d),x=new a.Vector3().subVectors(p,d),c=new a.Vector3().crossVectors(g,x).normalize(),h=-c.dot(d),s=l,v=d.clone().add(c.clone().negate().multiplyScalar(s)),f=d.clone().add(c.clone().multiplyScalar(s)),y=u.clone().add(c.clone().negate().multiplyScalar(s)),E=u.clone().add(c.clone().multiplyScalar(s)),_=p.clone().add(c.clone().negate().multiplyScalar(s)),P=p.clone().add(c.clone().multiplyScalar(s)),w=i.clone().add(c.clone().negate().multiplyScalar(s)),F=i.clone().add(c.clone().multiplyScalar(s)),z=new a.Plane().setFromCoplanarPoints(f,E,P),N=new a.Plane().setFromCoplanarPoints(_,y,v),M=new a.Plane().setFromCoplanarPoints(E,f,v),O=new a.Plane().setFromCoplanarPoints(w,F,P),T=new a.Plane().setFromCoplanarPoints(P,E,y),b=new a.Plane().setFromCoplanarPoints(v,f,F);this.uniforms.evennessPlanes.value=[{normal:z.normal,constant:z.constant},{normal:N.normal,constant:N.constant},{normal:M.normal,constant:M.constant},{normal:O.normal,constant:O.constant},{normal:T.normal,constant:T.constant},{normal:b.normal,constant:b.constant}],this.uniforms.evennessPlaneDepth.value=l,this.uniforms.evennessPlaneNormal.value=c,this.uniforms.evennessPlaneConstant.value=h}this.defines.USE_PLANE_DISTANCE=m,this.needsUpdate=!0}}}),n.evennessPlane={depth:0,points:[]},n}return e}(C.CustomShader),j=`
286
+ `,H="",R={type:["pointcloud"],fragment:{mainBefore:V,mainStart:H,mainEnd:W},uniforms:{evennessPlaneNormal:new a.Uniform(new a.Vector3),evennessPlaneConstant:new a.Uniform(0),evennessPlanes:new a.Uniform([]),evennessPlaneDepth:new a.Uniform(0)},defines:{USE_PLANE_DISTANCE:!1}},L=(function(r){S(e,r);function e(){var n=r.call(this,R)||this;return Object.defineProperties(n,{evennessPlane:{get:function(){return{depth:this.uniforms.evennessPlaneDepth.value,points:this.uniforms.evennessPoints.value}},set:function(t){var o=t.points,l=t.depth,m=!1;if(o.length!==0&&o.length%4===0){m=!0;var d=o[0],u=o[1],p=o[2],i=o[3],g=new a.Vector3().subVectors(u,d),x=new a.Vector3().subVectors(p,d),c=new a.Vector3().crossVectors(g,x).normalize(),h=-c.dot(d),s=l,v=d.clone().add(c.clone().negate().multiplyScalar(s)),f=d.clone().add(c.clone().multiplyScalar(s)),y=u.clone().add(c.clone().negate().multiplyScalar(s)),E=u.clone().add(c.clone().multiplyScalar(s)),_=p.clone().add(c.clone().negate().multiplyScalar(s)),P=p.clone().add(c.clone().multiplyScalar(s)),w=i.clone().add(c.clone().negate().multiplyScalar(s)),F=i.clone().add(c.clone().multiplyScalar(s)),z=new a.Plane().setFromCoplanarPoints(f,E,P),N=new a.Plane().setFromCoplanarPoints(_,y,v),M=new a.Plane().setFromCoplanarPoints(E,f,v),O=new a.Plane().setFromCoplanarPoints(w,F,P),T=new a.Plane().setFromCoplanarPoints(P,E,y),b=new a.Plane().setFromCoplanarPoints(v,f,F);this.uniforms.evennessPlanes.value=[{normal:z.normal,constant:z.constant},{normal:N.normal,constant:N.constant},{normal:M.normal,constant:M.constant},{normal:O.normal,constant:O.constant},{normal:T.normal,constant:T.constant},{normal:b.normal,constant:b.constant}],this.uniforms.evennessPlaneDepth.value=l,this.uniforms.evennessPlaneNormal.value=c,this.uniforms.evennessPlaneConstant.value=h}this.defines.USE_PLANE_DISTANCE=m,this.needsUpdate=!0}}}),n.evennessPlane={depth:0,points:[]},n}return e})(C.CustomShader),j=`
287
287
  #if NUM_SWEEP_OBJECTS > 0
288
288
  uniform float sweepProgress;
289
289
  uniform float sweepRange;
@@ -329,7 +329,7 @@
329
329
  }
330
330
  #pragma unroll_loop_end
331
331
  #endif
332
- `,q="",$=function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:j,mainStart:q,mainEnd:G},uniforms:{sweepProgress:new a.Uniform(0),sweepRange:new a.Uniform(0),sweepBoxs:new a.Uniform([]),interval:new a.Uniform(.04),threshold:new a.Uniform(.002)},defines:{NUM_SWEEP_OBJECTS:0}})||this;return Object.defineProperties(n,{sweepBoxs:{get:function(){return this.uniforms.sweepBoxs.value},set:function(t){var o=t.length;o>0&&(this.defines.NUM_SWEEP_OBJECTS=o,this.needsUpdate=!0,this.uniforms.sweepBoxs.value=t)}}}),n.sweepBoxs=[],n}return e.prototype.onBeforeCompile=function(n,t){var o=String(this.sweepBoxs.length);n.vertexShader=n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g,o)},e}(C.CustomShader),k=`
332
+ `,q="",$=(function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:j,mainStart:q,mainEnd:G},uniforms:{sweepProgress:new a.Uniform(0),sweepRange:new a.Uniform(0),sweepBoxs:new a.Uniform([]),interval:new a.Uniform(.04),threshold:new a.Uniform(.002)},defines:{NUM_SWEEP_OBJECTS:0}})||this;return Object.defineProperties(n,{sweepBoxs:{get:function(){return this.uniforms.sweepBoxs.value},set:function(t){var o=t.length;o>0&&(this.defines.NUM_SWEEP_OBJECTS=o,this.needsUpdate=!0,this.uniforms.sweepBoxs.value=t)}}}),n.sweepBoxs=[],n}return e.prototype.onBeforeCompile=function(n,t){var o=String(this.sweepBoxs.length);n.vertexShader=n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g,o)},e})(C.CustomShader),k=`
333
333
  uniform float pointCloudExpand_progress;
334
334
 
335
335
  vec4 pointCloudExpand_permute(vec4 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }
@@ -416,7 +416,7 @@ float pointCloudExpand_progress2 = step(pointCloudExpand_progress, 1.0 - pointCl
416
416
  pointCloudExpand_sizeBasis = mix(0.1 * step(abs(pointCloudExpand_noise), 0.5 / pointCloudExpand_boundingRadius), pointCloudExpand_sizeBasis, pointCloudExpand_progress2);
417
417
  gl_PointSize = gl_PointSize * pointCloudExpand_sizeScale + pointCloudExpand_sizeBasis;
418
418
  vPointSize = gl_PointSize;
419
- `,K=function(r){S(e,r);function e(){return r.call(this,{type:["pointcloud"],vertex:{mainBefore:k,mainEnd:Y},uniforms:{pointCloudExpand_progress:new a.Uniform(0)}})||this}return Object.defineProperty(e.prototype,"progress",{get:function(){return this.uniforms.pointCloudExpand_progress.value},set:function(n){this.uniforms.pointCloudExpand_progress.value=n},enumerable:!1,configurable:!0}),e}(C.CustomShader),Q=`
419
+ `,K=(function(r){S(e,r);function e(){return r.call(this,{type:["pointcloud"],vertex:{mainBefore:k,mainEnd:Y},uniforms:{pointCloudExpand_progress:new a.Uniform(0)}})||this}return Object.defineProperty(e.prototype,"progress",{get:function(){return this.uniforms.pointCloudExpand_progress.value},set:function(n){this.uniforms.pointCloudExpand_progress.value=n},enumerable:!1,configurable:!0}),e})(C.CustomShader),Q=`
420
420
  uniform sampler2D polygonTexture;
421
421
 
422
422
  struct PolygonClipper {
@@ -500,7 +500,7 @@ vPointSize = gl_PointSize;
500
500
  }
501
501
  }
502
502
 
503
- `,I=function(){function r(){this.canvasCache=new Map,this.canvas=document.createElement("canvas"),this.canvas.width=512,this.canvas.height=512,this.polygonTexture=new a.CanvasTexture(this.canvas),this.polygonCount=0}return r.prototype.setSize=function(e){this.canvas.width=e,this.canvas.height=e},r.prototype.generatePolygonCanvas=function(e){var n=JSON.stringify(e);if(this.canvasCache.has(n))return this.canvasCache.get(n);var t=document.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height;var o=t.getContext("2d");if(!o)throw new Error("Failed to get canvas context");if(this.polygonCount>=24)throw new Error("polygon count exceed 24, please clear the canvas");o.clearRect(0,0,this.canvas.width,this.canvas.height),o.fillStyle="rgba(0,0,0,1.0)",o.beginPath();var l=e[0][0],m=e[0][0],d=e[0][1],u=e[0][1];e.forEach(function(s){var v=s[0],f=s[1];l=Math.min(l,v),m=Math.max(m,v),d=Math.min(d,f),u=Math.max(u,f)});var p=m-l,i=u-d,g=this.canvas.width,x=p>=i?g/p:g/i,c=e.map(function(s){var v=s[0]-l,f=s[1]-d;return[v,f]}),h=c.map(function(s){return[s[0]*x,s[1]*x]});return h.forEach(function(s,v){var f=s[0],y=s[1];v===0?o.moveTo(f,y):o.lineTo(f,y)}),o.closePath(),o.fill(),this.polygonCount++,this.canvasCache.set(n,t),t},r.generatePolygonGeometry=function(e,n){for(var t=new a.BufferGeometry,o=e.slice(0,-1),l=o.map(function(g){return[g[0],0,g[1]]}),m=o.map(function(g){return[g[0],n,g[1]]}),d=D(D([],l,!0),m,!0),u=o.length,p=[],i=1;i<u-1;i++)p.push(0,i,i+1);for(var i=1;i<u-1;i++)p.push(u,u+i,u+i+1);for(var i=0;i<u-1;i++)p.push(i,i+1,u+i),p.push(i+1,i+1+u,u+i);return t.setAttribute("position",new a.Float32BufferAttribute(d.flat(),3)),t.setIndex(p),t.computeVertexNormals(),t},r.prototype.generatePolygonTexture=function(e){var n=this.canvas.getContext("2d",{willReadFrequently:!0});if(!n)throw new Error("Failed to get canvas context");for(var t=n.createImageData(this.canvas.width,this.canvas.height),o=0;o<this.canvas.width;o++)for(var l=0;l<this.canvas.height;l++){for(var m=0,d=0,u=0,p=0;p<e.length;p++){var i=e[p].getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("Failed to get canvas context");var g=i.getImageData(o,l,1,1).data;if(g[3]===255){var x=p%8,c=Math.floor(p/8);c===0?m=m|1<<x:c===1?d=d|1<<x:c===2&&(u=u|1<<x)}}var h=(o+l*this.canvas.width)*4;t.data[h]=m,t.data[h+1]=d,t.data[h+2]=u,t.data[h+3]=255}return n.putImageData(t,0,0),new a.CanvasTexture(this.canvas)},r}(),U=new I,X=function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:Q,mainEnd:Z},uniforms:{polygonClippers:new a.Uniform([]),polygonTexture:new a.Uniform(null)}})||this;return n._polygonClippers=[],n._radio=512,n}return Object.defineProperty(e.prototype,"polygonClippers",{get:function(){return this._polygonClippers},set:function(n){this._polygonClippers=n;var t=this.uniforms;t.polygonClippers.value=n.map(function(p){var i=new a.Matrix4().getInverse(p.polygonTransform),g=p.polygonHeight,x=p.cutOutSide,c=p.polygon,h=c[0][0],s=c[0][0],v=c[0][1],f=c[0][1];c.forEach(function(_){var P=_[0],w=_[1];h=Math.min(h,P),s=Math.max(s,P),v=Math.min(v,w),f=Math.max(f,w)});var y=new a.Vector2(h,v),E=s-h>=f-v?s-h:f-v;return{polygonTransformInverse:i,polygonHeight:g,minPos:y,polygonScale:E,cutOutSide:x}});for(var o=[],l=0;l<n.length;l++){var m=n[l].polygon,d=U.generatePolygonCanvas(m);o.push(d)}var u=U.generatePolygonTexture(o);this.uniforms.polygonTexture.value=u,this.needsUpdate=!0},enumerable:!1,configurable:!0}),e.prototype.onBeforeCompile=function(n,t){var o=String(this.polygonClippers.length);n.vertexShader=n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g,o)},e}(C.CustomShader),nn=`
503
+ `,I=(function(){function r(){this.canvasCache=new Map,this.canvas=document.createElement("canvas"),this.canvas.width=512,this.canvas.height=512,this.polygonTexture=new a.CanvasTexture(this.canvas),this.polygonCount=0}return r.prototype.setSize=function(e){this.canvas.width=e,this.canvas.height=e},r.prototype.generatePolygonCanvas=function(e){var n=JSON.stringify(e);if(this.canvasCache.has(n))return this.canvasCache.get(n);var t=document.createElement("canvas");t.width=this.canvas.width,t.height=this.canvas.height;var o=t.getContext("2d");if(!o)throw new Error("Failed to get canvas context");if(this.polygonCount>=24)throw new Error("polygon count exceed 24, please clear the canvas");o.clearRect(0,0,this.canvas.width,this.canvas.height),o.fillStyle="rgba(0,0,0,1.0)",o.beginPath();var l=e[0][0],m=e[0][0],d=e[0][1],u=e[0][1];e.forEach(function(s){var v=s[0],f=s[1];l=Math.min(l,v),m=Math.max(m,v),d=Math.min(d,f),u=Math.max(u,f)});var p=m-l,i=u-d,g=this.canvas.width,x=p>=i?g/p:g/i,c=e.map(function(s){var v=s[0]-l,f=s[1]-d;return[v,f]}),h=c.map(function(s){return[s[0]*x,s[1]*x]});return h.forEach(function(s,v){var f=s[0],y=s[1];v===0?o.moveTo(f,y):o.lineTo(f,y)}),o.closePath(),o.fill(),this.polygonCount++,this.canvasCache.set(n,t),t},r.generatePolygonGeometry=function(e,n){for(var t=new a.BufferGeometry,o=e.slice(0,-1),l=o.map(function(g){return[g[0],0,g[1]]}),m=o.map(function(g){return[g[0],n,g[1]]}),d=D(D([],l,!0),m,!0),u=o.length,p=[],i=1;i<u-1;i++)p.push(0,i,i+1);for(var i=1;i<u-1;i++)p.push(u,u+i,u+i+1);for(var i=0;i<u-1;i++)p.push(i,i+1,u+i),p.push(i+1,i+1+u,u+i);return t.setAttribute("position",new a.Float32BufferAttribute(d.flat(),3)),t.setIndex(p),t.computeVertexNormals(),t},r.prototype.generatePolygonTexture=function(e){var n=this.canvas.getContext("2d",{willReadFrequently:!0});if(!n)throw new Error("Failed to get canvas context");for(var t=n.createImageData(this.canvas.width,this.canvas.height),o=0;o<this.canvas.width;o++)for(var l=0;l<this.canvas.height;l++){for(var m=0,d=0,u=0,p=0;p<e.length;p++){var i=e[p].getContext("2d",{willReadFrequently:!0});if(!i)throw new Error("Failed to get canvas context");var g=i.getImageData(o,l,1,1).data;if(g[3]===255){var x=p%8,c=Math.floor(p/8);c===0?m=m|1<<x:c===1?d=d|1<<x:c===2&&(u=u|1<<x)}}var h=(o+l*this.canvas.width)*4;t.data[h]=m,t.data[h+1]=d,t.data[h+2]=u,t.data[h+3]=255}return n.putImageData(t,0,0),new a.CanvasTexture(this.canvas)},r})(),U=new I,X=(function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","pointcloud"],fragment:{mainBefore:Q,mainEnd:Z},uniforms:{polygonClippers:new a.Uniform([]),polygonTexture:new a.Uniform(null)}})||this;return n._polygonClippers=[],n._radio=512,n}return Object.defineProperty(e.prototype,"polygonClippers",{get:function(){return this._polygonClippers},set:function(n){this._polygonClippers=n;var t=this.uniforms;t.polygonClippers.value=n.map(function(p){var i=new a.Matrix4().getInverse(p.polygonTransform),g=p.polygonHeight,x=p.cutOutSide,c=p.polygon,h=c[0][0],s=c[0][0],v=c[0][1],f=c[0][1];c.forEach(function(_){var P=_[0],w=_[1];h=Math.min(h,P),s=Math.max(s,P),v=Math.min(v,w),f=Math.max(f,w)});var y=new a.Vector2(h,v),E=s-h>=f-v?s-h:f-v;return{polygonTransformInverse:i,polygonHeight:g,minPos:y,polygonScale:E,cutOutSide:x}});for(var o=[],l=0;l<n.length;l++){var m=n[l].polygon,d=U.generatePolygonCanvas(m);o.push(d)}var u=U.generatePolygonTexture(o);this.uniforms.polygonTexture.value=u,this.needsUpdate=!0},enumerable:!1,configurable:!0}),e.prototype.onBeforeCompile=function(n,t){var o=String(this.polygonClippers.length);n.vertexShader=n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g,o)},e})(C.CustomShader),nn=`
504
504
  #if NUM_SHINE_OBJECTS > 0
505
505
  uniform float shineProgress;
506
506
  struct SHINE_OBJECT {
@@ -525,4 +525,4 @@ vPointSize = gl_PointSize;
525
525
  }
526
526
  #pragma unroll_loop_end
527
527
  #endif
528
- `,on="",tn=function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","none"],fragment:{mainBefore:nn,mainStart:on,mainEnd:en},uniforms:{shineProgress:new a.Uniform(0),shineBoxes:new a.Uniform([])},defines:{NUM_SHINE_OBJECTS:0}})||this;return Object.defineProperties(n,{shineBoxes:{get:function(){return this.uniforms.shineBoxes.value},set:function(t){var o=t.length;o>0&&(this.defines.NUM_SHINE_OBJECTS=o,this.uniforms.shineBoxes.value=t)}}}),n.shineBoxes=[],n}return e.prototype.onBeforeCompile=function(n,t){var o=String(this.shineBoxes.length);n.vertexShader=n.vertexShader.replace(/NUM_SHINE_OBJECTS/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g,o)},e}(C.CustomShader);exports.EvenessPlaneShader=L;exports.PointCloudExpandShader=K;exports.PolygonCuterShader=X;exports.PolygonGenerater=I;exports.ShineModelShader=tn;exports.SweepModelShader=$;
528
+ `,on="",tn=(function(r){S(e,r);function e(){var n=r.call(this,{type:["basic","phong","none"],fragment:{mainBefore:nn,mainStart:on,mainEnd:en},uniforms:{shineProgress:new a.Uniform(0),shineBoxes:new a.Uniform([])},defines:{NUM_SHINE_OBJECTS:0}})||this;return Object.defineProperties(n,{shineBoxes:{get:function(){return this.uniforms.shineBoxes.value},set:function(t){var o=t.length;o>0&&(this.defines.NUM_SHINE_OBJECTS=o,this.uniforms.shineBoxes.value=t)}}}),n.shineBoxes=[],n}return e.prototype.onBeforeCompile=function(n,t){var o=String(this.shineBoxes.length);n.vertexShader=n.vertexShader.replace(/NUM_SHINE_OBJECTS/g,o),n.fragmentShader=n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g,o)},e})(C.CustomShader);exports.EvenessPlaneShader=L;exports.PointCloudExpandShader=K;exports.PolygonCuterShader=X;exports.PolygonGenerater=I;exports.ShineModelShader=tn;exports.SweepModelShader=$;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/14/2025
5
- * Version: 6.6.0-alpha.0
4
+ * Generated: 2025/8/15
5
+ * Version: 6.6.0-alpha.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -324,7 +324,7 @@ var I = `
324
324
  }
325
325
  }, Z = (
326
326
  /** @class */
327
- function(i) {
327
+ (function(i) {
328
328
  S(e, i);
329
329
  function e() {
330
330
  var n = i.call(this, V) || this;
@@ -359,7 +359,7 @@ var I = `
359
359
  }, n;
360
360
  }
361
361
  return e;
362
- }(C)
362
+ })(C)
363
363
  ), W = `
364
364
  #if NUM_SWEEP_OBJECTS > 0
365
365
  uniform float sweepProgress;
@@ -408,7 +408,7 @@ var I = `
408
408
  #endif
409
409
  `, R = "", X = (
410
410
  /** @class */
411
- function(i) {
411
+ (function(i) {
412
412
  S(e, i);
413
413
  function e() {
414
414
  var n = i.call(this, {
@@ -447,7 +447,7 @@ var I = `
447
447
  var o = String(this.sweepBoxs.length);
448
448
  n.vertexShader = n.vertexShader.replace(/NUM_SWEEP_OBJECTS/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_SWEEP_OBJECTS/g, o);
449
449
  }, e;
450
- }(C)
450
+ })(C)
451
451
  ), L = `
452
452
  uniform float pointCloudExpand_progress;
453
453
 
@@ -537,7 +537,7 @@ gl_PointSize = gl_PointSize * pointCloudExpand_sizeScale + pointCloudExpand_size
537
537
  vPointSize = gl_PointSize;
538
538
  `, nn = (
539
539
  /** @class */
540
- function(i) {
540
+ (function(i) {
541
541
  S(e, i);
542
542
  function e() {
543
543
  return i.call(this, {
@@ -561,7 +561,7 @@ vPointSize = gl_PointSize;
561
561
  enumerable: !1,
562
562
  configurable: !0
563
563
  }), e;
564
- }(C)
564
+ })(C)
565
565
  ), j = `
566
566
  uniform sampler2D polygonTexture;
567
567
 
@@ -648,7 +648,7 @@ vPointSize = gl_PointSize;
648
648
 
649
649
  `, q = (
650
650
  /** @class */
651
- function() {
651
+ (function() {
652
652
  function i() {
653
653
  this.canvasCache = /* @__PURE__ */ new Map(), this.canvas = document.createElement("canvas"), this.canvas.width = 512, this.canvas.height = 512, this.polygonTexture = new r.CanvasTexture(this.canvas), this.polygonCount = 0;
654
654
  }
@@ -716,10 +716,10 @@ vPointSize = gl_PointSize;
716
716
  }
717
717
  return n.putImageData(t, 0, 0), new r.CanvasTexture(this.canvas);
718
718
  }, i;
719
- }()
719
+ })()
720
720
  ), b = new q(), en = (
721
721
  /** @class */
722
- function(i) {
722
+ (function(i) {
723
723
  S(e, i);
724
724
  function e() {
725
725
  var n = i.call(this, {
@@ -770,7 +770,7 @@ vPointSize = gl_PointSize;
770
770
  var o = String(this.polygonClippers.length);
771
771
  n.vertexShader = n.vertexShader.replace(/NUM_POLYGON_CLIPPER/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_POLYGON_CLIPPER/g, o);
772
772
  }, e;
773
- }(C)
773
+ })(C)
774
774
  ), k = `
775
775
  #if NUM_SHINE_OBJECTS > 0
776
776
  uniform float shineProgress;
@@ -798,7 +798,7 @@ vPointSize = gl_PointSize;
798
798
  #endif
799
799
  `, K = "", on = (
800
800
  /** @class */
801
- function(i) {
801
+ (function(i) {
802
802
  S(e, i);
803
803
  function e() {
804
804
  var n = i.call(this, {
@@ -832,7 +832,7 @@ vPointSize = gl_PointSize;
832
832
  var o = String(this.shineBoxes.length);
833
833
  n.vertexShader = n.vertexShader.replace(/NUM_SHINE_OBJECTS/g, o), n.fragmentShader = n.fragmentShader.replace(/NUM_SHINE_OBJECTS/g, o);
834
834
  }, e;
835
- }(C)
835
+ })(C)
836
836
  );
837
837
  export {
838
838
  Z as EvenessPlaneShader,
package/sticker/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/14/2025
5
- * Version: 6.6.0-alpha.0
4
+ * Generated: 2025/8/15
5
+ * Version: 6.6.0-alpha.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
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 g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var p=s.map=new a.Texture;p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,S(r,function(){p.image=r,p.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var f=s.map=new a.VideoTexture(r);f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.6.0-alpha.0"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(a.Mesh);exports.Sticker=b;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||(function(t){return setTimeout(t,16)}),R=typeof performance!="undefined"&&typeof performance.timing!="undefined"?performance.timing.navigationStart:Date.now(),l=typeof performance!="undefined"?(function(){return R+performance.now()}):(function(){return Date.now()});function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=(function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var p=s.map=new a.Texture;p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,S(r,function(){p.image=r,p.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var f=s.map=new a.VideoTexture(r);f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.6.0-alpha.2"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n})(a.Mesh);exports.Sticker=b;
package/sticker/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/14/2025
5
- * Version: 6.6.0-alpha.0
4
+ * Generated: 2025/8/15
5
+ * Version: 6.6.0-alpha.2
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -302,13 +302,13 @@ var h = new Float32Array([
302
302
  u.setAttribute("position", new a.BufferAttribute(h, 3));
303
303
  u.setAttribute("uv", new a.BufferAttribute(g, 2));
304
304
  u.setIndex(new a.BufferAttribute(E, 1));
305
- var d = window, w = d.requestAnimationFrame || d.mozRequestAnimationFrame || d.webkitRequestAnimationFrame || d.msRequestAnimationFrame || function(r) {
305
+ var d = window, w = d.requestAnimationFrame || d.mozRequestAnimationFrame || d.webkitRequestAnimationFrame || d.msRequestAnimationFrame || (function(r) {
306
306
  return setTimeout(r, 16);
307
- }, T = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), c = typeof performance != "undefined" ? function() {
307
+ }), T = typeof performance != "undefined" && typeof performance.timing != "undefined" ? performance.timing.navigationStart : Date.now(), c = typeof performance != "undefined" ? (function() {
308
308
  return T + performance.now();
309
- } : function() {
309
+ }) : (function() {
310
310
  return Date.now();
311
- };
311
+ });
312
312
  function _(r, n) {
313
313
  r.naturalWidth > 0 && w(function() {
314
314
  return n();
@@ -340,7 +340,7 @@ function v(r, n) {
340
340
  }
341
341
  var A = (
342
342
  /** @class */
343
- function(r) {
343
+ (function(r) {
344
344
  y(n, r);
345
345
  function n(e, i, t) {
346
346
  var o = this, s = new a.MeshBasicMaterial();
@@ -366,7 +366,7 @@ var A = (
366
366
  }
367
367
  return Object.defineProperty(n, "version", {
368
368
  get: function() {
369
- return "6.6.0-alpha.0";
369
+ return "6.6.0-alpha.2";
370
370
  },
371
371
  enumerable: !1,
372
372
  configurable: !0
@@ -391,7 +391,7 @@ var A = (
391
391
  var e;
392
392
  (e = this.material.map) === null || e === void 0 || e.dispose(), this.material.dispose();
393
393
  }, n;
394
- }(a.Mesh)
394
+ })(a.Mesh)
395
395
  );
396
396
  export {
397
397
  A as Sticker
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/14/2025
5
- * Version: 6.6.0-alpha.0
4
+ * Generated: 2025/8/15
5
+ * Version: 6.6.0-alpha.2
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
- */(function(V,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],l):(V=typeof globalThis!="undefined"?globalThis:V||self,l(V.FiveSDK_GLTFLoader={},V.THREE))})(this,function(V,l){"use strict";function Ue(p){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const u in p)if(u!=="default"){const A=Object.getOwnPropertyDescriptor(p,u);Object.defineProperty(g,u,A.get?A:{enumerable:!0,get:()=>p[u]})}}return g.default=p,Object.freeze(g)}const ye=Ue(l);var Te=function(p,g){return Te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,A){u.__proto__=A}||function(u,A){for(var m in A)Object.prototype.hasOwnProperty.call(A,m)&&(u[m]=A[m])},Te(p,g)};function Fe(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");Te(p,g);function u(){this.constructor=p}p.prototype=g===null?Object.create(g):(u.prototype=g.prototype,new u)}typeof SuppressedError=="function"&&SuppressedError;var De=function(){function p(e){l.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}p.prototype=Object.assign(Object.create(l.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=l.LoaderUtils.extractUrlBase(e),a.manager.itemStart(e);var s=function(f){t?t(f):console.error(f),a.manager.itemError(e),a.manager.itemEnd(e)},o=new l.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(f){try{a.parse(f,i,function(c){r(c),a.manager.itemEnd(e)},s)}catch(c){s(c)}},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=l.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(s===P){try{i[u.KHR_BINARY_GLTF]=new G(e)}catch(h){t&&t(h);return}a=i[u.KHR_BINARY_GLTF].content}else a=l.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 f=0;f<o.extensionsUsed.length;++f){var c=o.extensionsUsed[f],v=o.extensionsRequired||[];switch(c){case u.KHR_LIGHTS_PUNCTUAL:i[c]=new m(o);break;case u.KHR_MATERIALS_CLEARCOAT:i[c]=new M;break;case u.KHR_MATERIALS_TRANSMISSION:i[c]=new O;break;case u.KHR_MATERIALS_UNLIT:i[c]=new S;break;case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:i[c]=new X;break;case u.KHR_DRACO_MESH_COMPRESSION:i[c]=new R(o,this.dracoLoader);break;case u.MSFT_TEXTURE_DDS:i[c]=new A(this.ddsLoader);break;case u.KHR_TEXTURE_TRANSFORM:i[c]=new I;break;case u.KHR_MESH_QUANTIZATION:i[c]=new ne;break;case u.REALSEE_MATERIALS_LIGHTMAP:i[c]=new Z;break;default:v.indexOf(c)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}var d=new F(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 A(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 m(e){this.name=u.KHR_LIGHTS_PUNCTUAL;var r=e.extensions&&e.extensions[u.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=r.lights||[]}m.prototype.loadLight=function(e){var r=this.lightDefs[e],n,t=new l.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 l.DirectionalLight(t),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new l.PointLight(t),n.distance=a;break;case"spot":n=new l.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 S(){this.name=u.KHR_MATERIALS_UNLIT}S.prototype.getMaterialType=function(){return l.MeshBasicMaterial},S.prototype.extendParams=function(e,r,n){var t=[];e.color=new l.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 l.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 l.Vector2(i,i)}return Promise.all(t)};function O(){this.name=u.KHR_MATERIALS_TRANSMISSION}O.prototype.getMaterialType=function(){return l.MeshPhysicalMaterial},O.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 P="glTF",w=12,x={JSON:1313821514,BIN:5130562};function G(e){this.name=u.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(e,0,w);if(this.header={magic:l.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==P)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,w),t=0;t<n.byteLength;){var a=n.getUint32(t,!0);t+=4;var i=n.getUint32(t,!0);if(t+=4,i===x.JSON){var s=new Uint8Array(e,w+t,a);this.content=l.LoaderUtils.decodeText(s)}else if(i===x.BIN){var o=w+t;this.body=e.slice(o,o+a)}t+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}function R(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()}R.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={},f={};for(var c in i){var v=fe[c]||c.toLowerCase();s[v]=i[c]}for(c in e.attributes){var v=fe[c]||c.toLowerCase();if(i[c]!==void 0){var d=n.accessors[e.attributes[c]],h=$[d.componentType];f[v]=h,o[v]=d.normalized===!0}}return r.getDependency("bufferView",a).then(function(y){return new Promise(function(_){t.decodeDracoFile(y,function(L){for(var T in L.attributes){var b=L.attributes[T],D=o[T];D!==void 0&&(b.normalized=D)}_(L)},s,f)})})};function I(){this.name=u.KHR_TEXTURE_TRANSFORM}I.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 C(e){l.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP"," uniform sampler2D specularMap;","#endif"].join(`
255
+ */(function(V,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],l):(V=typeof globalThis!="undefined"?globalThis:V||self,l(V.FiveSDK_GLTFLoader={},V.THREE))})(this,(function(V,l){"use strict";function Ue(p){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const u in p)if(u!=="default"){const A=Object.getOwnPropertyDescriptor(p,u);Object.defineProperty(g,u,A.get?A:{enumerable:!0,get:()=>p[u]})}}return g.default=p,Object.freeze(g)}const ye=Ue(l);var Le=function(p,g){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,A){u.__proto__=A}||function(u,A){for(var m in A)Object.prototype.hasOwnProperty.call(A,m)&&(u[m]=A[m])},Le(p,g)};function Fe(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");Le(p,g);function u(){this.constructor=p}p.prototype=g===null?Object.create(g):(u.prototype=g.prototype,new u)}typeof SuppressedError=="function"&&SuppressedError;var De=(function(){function p(e){l.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}p.prototype=Object.assign(Object.create(l.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=l.LoaderUtils.extractUrlBase(e),a.manager.itemStart(e);var s=function(f){t?t(f):console.error(f),a.manager.itemError(e),a.manager.itemEnd(e)},o=new l.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(f){try{a.parse(f,i,function(c){r(c),a.manager.itemEnd(e)},s)}catch(c){s(c)}},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=l.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(s===P){try{i[u.KHR_BINARY_GLTF]=new G(e)}catch(h){t&&t(h);return}a=i[u.KHR_BINARY_GLTF].content}else a=l.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 f=0;f<o.extensionsUsed.length;++f){var c=o.extensionsUsed[f],v=o.extensionsRequired||[];switch(c){case u.KHR_LIGHTS_PUNCTUAL:i[c]=new m(o);break;case u.KHR_MATERIALS_CLEARCOAT:i[c]=new _;break;case u.KHR_MATERIALS_TRANSMISSION:i[c]=new O;break;case u.KHR_MATERIALS_UNLIT:i[c]=new S;break;case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:i[c]=new X;break;case u.KHR_DRACO_MESH_COMPRESSION:i[c]=new R(o,this.dracoLoader);break;case u.MSFT_TEXTURE_DDS:i[c]=new A(this.ddsLoader);break;case u.KHR_TEXTURE_TRANSFORM:i[c]=new I;break;case u.KHR_MESH_QUANTIZATION:i[c]=new ne;break;case u.REALSEE_MATERIALS_LIGHTMAP:i[c]=new Z;break;default:v.indexOf(c)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}var d=new F(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 A(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 m(e){this.name=u.KHR_LIGHTS_PUNCTUAL;var r=e.extensions&&e.extensions[u.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=r.lights||[]}m.prototype.loadLight=function(e){var r=this.lightDefs[e],n,t=new l.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 l.DirectionalLight(t),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new l.PointLight(t),n.distance=a;break;case"spot":n=new l.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 S(){this.name=u.KHR_MATERIALS_UNLIT}S.prototype.getMaterialType=function(){return l.MeshBasicMaterial},S.prototype.extendParams=function(e,r,n){var t=[];e.color=new l.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 _(){this.name=u.KHR_MATERIALS_CLEARCOAT}_.prototype.getMaterialType=function(){return l.MeshPhysicalMaterial},_.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 l.Vector2(i,i)}return Promise.all(t)};function O(){this.name=u.KHR_MATERIALS_TRANSMISSION}O.prototype.getMaterialType=function(){return l.MeshPhysicalMaterial},O.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 P="glTF",w=12,C={JSON:1313821514,BIN:5130562};function G(e){this.name=u.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(e,0,w);if(this.header={magic:l.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==P)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,w),t=0;t<n.byteLength;){var a=n.getUint32(t,!0);t+=4;var i=n.getUint32(t,!0);if(t+=4,i===C.JSON){var s=new Uint8Array(e,w+t,a);this.content=l.LoaderUtils.decodeText(s)}else if(i===C.BIN){var o=w+t;this.body=e.slice(o,o+a)}t+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}function R(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()}R.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={},f={};for(var c in i){var v=fe[c]||c.toLowerCase();s[v]=i[c]}for(c in e.attributes){var v=fe[c]||c.toLowerCase();if(i[c]!==void 0){var d=n.accessors[e.attributes[c]],h=$[d.componentType];f[v]=h,o[v]=d.normalized===!0}}return r.getDependency("bufferView",a).then(function(y){return new Promise(function(M){t.decodeDracoFile(y,function(T){for(var L in T.attributes){var b=T.attributes[L],D=o[L];D!==void 0&&(b.normalized=D)}M(T)},s,f)})})};function I(){this.name=u.KHR_TEXTURE_TRANSFORM}I.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 x(e){l.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP"," uniform sampler2D specularMap;","#endif"].join(`
256
256
  `),n=["#ifdef USE_GLOSSINESSMAP"," uniform sampler2D glossinessMap;","#endif"].join(`
257
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
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
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 l.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];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)}C.prototype=Object.create(l.MeshStandardMaterial.prototype),C.prototype.constructor=C,C.prototype.copy=function(e){return l.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 X(){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 C},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new l.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 l.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new l.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 C(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=l.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 ne(){this.name=u.KHR_MESH_QUANTIZATION}function U(e,r,n,t){l.Interpolant.call(this,e,r,n,t)}U.prototype=Object.create(l.Interpolant.prototype),U.prototype.constructor=U,U.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},U.prototype.beforeStart_=U.prototype.copySampleValue_,U.prototype.afterEnd_=U.prototype.copySampleValue_,U.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,c=t-r,v=(n-r)/c,d=v*v,h=d*v,y=e*f,_=y-f,L=-2*h+3*d,T=h-d,b=1-L,D=T-d+v,k=0;k!==s;k++){var ae=i[_+k+s],se=i[_+k+o]*c,re=i[y+k+s],j=i[y+k]*c;a[k]=b*ae+D*se+L*re+T*j}return a};function Z(e){this.parser=e,this.name=u.REALSEE_MATERIALS_LIGHTMAP}Z.prototype.getMaterialType=function(e){return l.MeshPhongMaterial},Z.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 K={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},$={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ee={9728:l.NearestFilter,9729:l.LinearFilter,9984:l.NearestMipmapNearestFilter,9985:l.LinearMipmapNearestFilter,9986:l.NearestMipmapLinearFilter,9987:l.LinearMipmapLinearFilter},H={33071:l.ClampToEdgeWrapping,33648:l.MirroredRepeatWrapping,10497:l.RepeatWrapping},Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fe={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},_e={CUBICSPLINE:void 0,LINEAR:l.InterpolateLinear,STEP:l.InterpolateDiscrete},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},ve={"image/png":l.RGBAFormat,"image/jpeg":l.RGBFormat};function ge(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 Me(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new l.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:l.FrontSide})),e.DefaultMaterial}function ie(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 q(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 we(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 f=[],c=[],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;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;c.push(v)}}return Promise.all([Promise.all(f),Promise.all(c)]).then(function(d){var h=d[0],y=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=y),e.morphTargetsRelative=!0,e})}function be(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 N(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+J(r.attributes):n=e.indices+":"+J(e.attributes)+":"+e.mode,n}function J(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 F(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 l.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new l.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}F.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:{}};ie(a,s,t),q(s,t),e(s)}).catch(r)},F.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,f=0,c=o.length;f<c;f++)e[o[f]].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},F.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},F.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},F.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(ge(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},F.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)})},F.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=Y[t.type],f=$[t.componentType],c=f.BYTES_PER_ELEMENT,v=c*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,y=t.normalized===!0,_,L;if(h&&h!==v){var T=Math.floor(d/h),b="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count,D=r.cache.get(b);D||(_=new f(s,T*h,t.count*h/c),D=new l.InterleavedBuffer(_,h/c),r.cache.add(b,D)),L=new l.InterleavedBufferAttribute(D,o,d%h/c,y)}else s===null?_=new f(t.count*o):_=new f(s,d,t.count*o),L=new l.BufferAttribute(_,o,y);if(t.sparse!==void 0){var k=Y.SCALAR,ae=$[t.sparse.indices.componentType],se=t.sparse.indices.byteOffset||0,re=t.sparse.values.byteOffset||0,j=new ae(i[1],se,t.sparse.count*k),le=new f(i[2],re,t.sparse.count*o);s!==null&&(L=new l.BufferAttribute(L.array.slice(),L.itemSize,L.normalized));for(var E=0,Ie=j.length;E<Ie;E++){var oe=j[E];if(L.setX(oe,le[E*o]),o>=2&&L.setY(oe,le[E*o+1]),o>=3&&L.setZ(oe,le[E*o+2]),o>=4&&L.setW(oe,le[E*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return L})},F.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||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var c=f.uri,v=!1;return f.bufferView!==void 0&&(c=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return c=i.createObjectURL(h),c})),Promise.resolve(c).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(y,_){h.load(ge(d,t.path),y,void 0,_)})}).then(function(d){v===!0&&i.revokeObjectURL(c),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in ve&&(d.format=ve[f.mimeType]);var h=n.samplers||{},y=h[s.sampler]||{};return d.magFilter=ee[y.magFilter]||l.LinearFilter,d.minFilter=ee[y.minFilter]||l.LinearMipmapLinearFilter,d.wrapS=H[y.wrapS]||l.RepeatWrapping,d.wrapT=H[y.wrapT]||l.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},F.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=l.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})},F.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,f=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var c="PointsMaterial:"+n.uuid,v=this.cache.get(c);v||(v=new l.PointsMaterial,l.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(c,v)),n=v}else if(e.isLine){var c="LineBasicMaterial:"+n.uuid,d=this.cache.get(c);d||(d=new l.LineBasicMaterial,l.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(c,d)),n=d}if(t||a||i||s||o){var c="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),s&&(c+="skinning:"),t&&(c+="vertex-tangents:"),a&&(c+="vertex-colors:"),i&&(c+="flat-shading:"),o&&(c+="morph-targets:"),f&&(c+="morph-normals:");var h=this.cache.get(c);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(c,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},F.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=c.getMaterialType(),f.push(c.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=l.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new l.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&&f.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&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=l.DoubleSide);var y=a.alphaMode||ce.OPAQUE;if(y===ce.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,y===ce.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new l.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==l.MeshBasicMaterial&&(s.emissive=new l.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==l.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var _=t[u.KHR_MATERIALS_CLEARCOAT];i=_.getMaterialType(),f.push(_.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var _=t[u.KHR_MATERIALS_TRANSMISSION];i=_.getMaterialType(),f.push(_.extendParams(s,{extensions:o},r))}if(o[u.REALSEE_MATERIALS_LIGHTMAP]){var L=t[u.REALSEE_MATERIALS_LIGHTMAP];i=L.getMaterialType(),f.push(L.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var T;return i===C?T=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):T=new i(s),a.name&&(T.name=a.name),T.map&&(T.map.encoding=l.sRGBEncoding),T.emissiveMap&&(T.emissiveMap.encoding=l.sRGBEncoding),q(T,a),r.associations.set(T,{type:"materials",index:e}),a.extensions&&ie(t,T,a),T})};function me(e,r,n){var t=r.attributes,a=new l.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 l.Vector3(s[0],s[1],s[2]),new l.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var c=new l.Vector3,v=new l.Vector3,d=0,h=f.length;d<h;d++){var y=f[d];if(y.POSITION!==void 0){var i=n.json.accessors[y.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]))),c.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}e.boundingBox=a;var _=new l.Sphere;a.getCenter(_.center),_.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=_}function W(e,r,n){var t=r.attributes,a=[];function i(c,v){return n.getDependency("accessor",c).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=fe[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(c){e.setIndex(c)});a.push(f)}return q(e,r),me(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?we(e,r.targets,n):e})}function ue(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===l.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 f=e.clone();return f.setIndex(o),f}return F.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(y){return W(y,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],c=N(f),v=t[c];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=W(new l.BufferGeometry,f,r),t[c]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},F.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 f=a[s].material===void 0?Me(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(c){for(var v=c.slice(0,c.length-1),d=c[c.length-1],h=[],y=0,_=d.length;y<_;y++){var L=d[y],T=a[y],b,D=v[y];if(T.mode===K.TRIANGLES||T.mode===K.TRIANGLE_STRIP||T.mode===K.TRIANGLE_FAN||T.mode===void 0)b=t.isSkinnedMesh===!0?new l.SkinnedMesh(L,D):new l.Mesh(L,D),b.isSkinnedMesh===!0&&!b.geometry.attributes.skinWeight.normalized&&b.normalizeSkinWeights(),T.mode===K.TRIANGLE_STRIP?b.geometry=ue(b.geometry,l.TriangleStripDrawMode):T.mode===K.TRIANGLE_FAN&&(b.geometry=ue(b.geometry,l.TriangleFanDrawMode));else if(T.mode===K.LINES)b=new l.LineSegments(L,D);else if(T.mode===K.LINE_STRIP)b=new l.Line(L,D);else if(T.mode===K.LINE_LOOP)b=new l.LineLoop(L,D);else if(T.mode===K.POINTS)b=new l.Points(L,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+T.mode);Object.keys(b.geometry.morphAttributes).length>0&&be(b,t),b.name=t.name||"mesh_"+e,d.length>1&&(b.name+="_"+y),q(b,t),r.assignFinalMaterial(b),h.push(b)}if(h.length===1)return h[0];for(var k=new l.Group,y=0,_=h.length;y<_;y++)k.add(h[y]);return k})},F.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 l.PerspectiveCamera(l.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new l.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),q(r,n),Promise.resolve(r)},F.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})},F.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,c=n.channels.length;f<c;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,y=h.node!==void 0?h.node:h.id,_=n.parameters!==void 0?n.parameters[d.input]:d.input,L=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",_)),i.push(this.getDependency("accessor",L)),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(T){for(var b=T[0],D=T[1],k=T[2],ae=T[3],se=T[4],re=[],j=0,le=b.length;j<le;j++){var E=b[j],Ie=D[j],oe=k[j],Ce=ae[j],xe=se[j];if(E!==void 0){E.updateMatrix(),E.matrixAutoUpdate=!0;var Ae;switch(z[xe.path]){case z.weights:Ae=l.NumberKeyframeTrack;break;case z.rotation:Ae=l.QuaternionKeyframeTrack;break;case z.position:case z.scale:default:Ae=l.VectorKeyframeTrack;break}var ke=E.name?E.name:E.uuid,Ee=Ce.interpolation!==void 0?_e[Ce.interpolation]:l.InterpolateLinear,Se=[];z[xe.path]===z.weights?E.traverse(function(pe){pe.isMesh===!0&&pe.morphTargetInfluences&&Se.push(pe.name?pe.name:pe.uuid)}):Se.push(ke);var Q=oe.array;if(oe.normalized){var de;if(Q.constructor===Int8Array)de=1/127;else if(Q.constructor===Uint8Array)de=1/255;else if(Q.constructor==Int16Array)de=1/32767;else if(Q.constructor===Uint16Array)de=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Pe=new Float32Array(Q.length),te=0,Re=Q.length;te<Re;te++)Pe[te]=Q[te]*de;Q=Pe}for(var te=0,Re=Se.length;te<Re;te++){var Oe=new Ae(Se[te]+"."+z[xe.path],Ie.array,Q,Ee);Ce.interpolation==="CUBICSPLINE"&&(Oe.createInterpolant=function(Ke){return new U(this.times,this.values,this.getValueSize()/3,Ke)},Oe.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),re.push(Oe)}}}var Be=n.name?n.name:"animation_"+e;return new l.AnimationClip(Be,void 0,re)})},F.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(f){var c;if(a[s.mesh]>1){var v=i[s.mesh]++;c=f.clone(),c.name+="_instance_"+v}else c=f;return s.weights!==void 0&&c.traverse(function(d){if(d.isMesh)for(var h=0,y=s.weights.length;h<y;h++)d.morphTargetInfluences[h]=s.weights[h]}),c})),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 f;if(s.isBone===!0?f=new l.Bone:o.length>1?f=new l.Group:o.length===1?f=o[0]:f=new l.Object3D,f!==o[0])for(var c=0,v=o.length;c<v;c++)f.add(o[c]);if(s.name&&(f.userData.name=s.name,f.name=l.PropertyBinding.sanitizeNodeName(s.name)),q(f,s),s.extensions&&ie(n,f,s),s.matrix!==void 0){var d=new l.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return t.associations.set(f,{type:"nodes",index:e}),f})},F.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(f){o=f;for(var c=[],v=0,d=o.joints.length;v<d;v++)c.push(a.getDependency("node",o.joints[v]));return Promise.all(c)}).then(function(f){return s.traverse(function(c){if(c.isMesh){for(var v=[],d=[],h=0,y=f.length;h<y;h++){var _=f[h];if(_){v.push(_);var L=new l.Matrix4;o.inverseBindMatrices!==void 0&&L.fromArray(o.inverseBindMatrices.array,h*16),d.push(L)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}c.bind(new l.Skeleton(v,d),c.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,c=0,v=f.length;c<v;c++){var d=f[c];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 l.Group;i.name&&(o.name=i.name),q(o,i),i.extensions&&ie(a,o,i);for(var f=i.nodes||[],c=[],v=0,d=f.length;v<d;v++)c.push(e(f[v],o,t,s));return Promise.all(c).then(function(){return o})}}(),p}(),B=function(p){l.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"}};B.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:B,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,A){var m=new l.FileLoader(this.manager);m.setPath(this.path),m.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&m.setWithCredentials(!0),m.load(p,S=>{var M={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(S,M).then(g).catch(A)},u,A)},decodeDracoFile:function(p,g,u,A){var m={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:A||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,m).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var A=g.attributeTypes[u];A.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=A.name)}var m=JSON.stringify(g);if(B.taskCache.has(p)){var S=B.taskCache.get(p);if(S.key===m)return S.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,O=this.workerNextTaskID++,P=p.byteLength,w=this._getWorker(O,P).then(x=>(M=x,new Promise((G,R)=>{M._callbacks[O]={resolve:G,reject:R},M.postMessage({type:"decode",id:O,taskConfig:g,buffer:p},[p])}))).then(x=>this._createGeometry(x.geometry));return w.catch(()=>!0).then(()=>{M&&O&&this._releaseTask(M,O)}),B.taskCache.set(p,{key:m,promise:w}),w},_createGeometry:function(p){var g=new l.BufferGeometry;p.index&&g.setIndex(new l.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var A=p.attributes[u],m=A.name,S=A.array,M=A.itemSize;g.setAttribute(m,new l.BufferAttribute(S,M))}return g},_loadLibrary:function(p,g){var u=new l.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((A,m)=>{u.load(p,A,void 0,m)})},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 A=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var m=B.DRACOWorker.toString(),S=["/* draco decoder */",A,"","/* worker */",m.substring(m.indexOf("{")+1,m.lastIndexOf("}"))].join(`
261
- `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),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(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._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}}),B.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(w){P({draco:w})},DracoDecoderModule(p)});break;case"decode":var M=S.buffer,O=S.taskConfig;g.then(P=>{var w=P.draco,x=new w.Decoder,G=new w.DecoderBuffer;G.Init(new Int8Array(M),M.byteLength);try{var R=u(w,x,G,O),I=R.attributes.map(C=>C.array.buffer);R.index&&I.push(R.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:R},I)}catch(C){console.error(C),self.postMessage({type:"error",id:S.id,error:C.message})}finally{w.destroy(G),w.destroy(x)}});break}};function u(m,S,M,O){var P=O.attributeIDs,w=O.attributeTypes,x,G,R=S.GetEncodedGeometryType(M);if(R===m.TRIANGULAR_MESH)x=new m.Mesh,G=S.DecodeBufferToMesh(M,x);else if(R===m.POINT_CLOUD)x=new m.PointCloud,G=S.DecodeBufferToPointCloud(M,x);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!G.ok()||x.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+G.error_msg());var I={index:null,attributes:[]};for(var C in P){var X=self[w[C]],ne,U;if(O.useUniqueIDs)U=P[C],ne=S.GetAttributeByUniqueId(x,U);else{if(U=S.GetAttributeId(x,m[P[C]]),U===-1)continue;ne=S.GetAttribute(x,U)}I.attributes.push(A(m,S,x,C,X,ne))}if(R===m.TRIANGULAR_MESH){for(var Z=x.num_faces(),K=Z*3,$=new Uint32Array(K),ee=new m.DracoInt32Array,H=0;H<Z;++H){S.GetFaceFromMesh(x,H,ee);for(var Y=0;Y<3;++Y)$[H*3+Y]=ee.GetValue(Y)}I.index={array:$,itemSize:1},m.destroy(ee)}return m.destroy(x),I}function A(m,S,M,O,P,w){var x=w.num_components(),G=M.num_points(),R=G*x,I,C;switch(P){case Float32Array:I=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(M,w,I),C=new Float32Array(R);break;case Int8Array:I=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(M,w,I),C=new Int8Array(R);break;case Int16Array:I=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(M,w,I),C=new Int16Array(R);break;case Int32Array:I=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(M,w,I),C=new Int32Array(R);break;case Uint8Array:I=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(M,w,I),C=new Uint8Array(R);break;case Uint16Array:I=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(M,w,I),C=new Uint16Array(R);break;case Uint32Array:I=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(M,w,I),C=new Uint32Array(R);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<R;X++)C[X]=I.GetValue(X);return m.destroy(I),{name:O,array:C,itemSize:x}}},B.taskCache=new WeakMap,B.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},B.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},B.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},B.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var he=function(p){l.CompressedTextureLoader.call(this,p)};he.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:he,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,M=1024,O=2048,P=4096,w=8192,x=16384,G=32768,R=4;function I(f){return f.charCodeAt(0)+(f.charCodeAt(1)<<8)+(f.charCodeAt(2)<<16)+(f.charCodeAt(3)<<24)}function C(f){return String.fromCharCode(f&255,f>>8&255,f>>16&255,f>>24&255)}function X(f,c,v,d){for(var h=v*d*4,y=new Uint8Array(f,c,h),_=new Uint8Array(h),L=0,T=0,b=0;b<d;b++)for(var D=0;D<v;D++){var k=y[T];T++;var ae=y[T];T++;var se=y[T];T++;var re=y[T];T++,_[L]=se,L++,_[L]=ae,L++,_[L]=k,L++,_[L]=re,L++}return _}var ne=I("DXT1"),U=I("DXT3"),Z=I("DXT5"),K=I("ETC1"),$=31,ee=0,H=1,Y=2,fe=3,z=4,_e=7,ce=20,ve=21,ge=22,Me=23,ie=24,q=25,we=26,be=28,N=new Int32Array(p,0,$);if(N[ee]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!N[ce]&R)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var J,F=N[ve],me=!1;switch(F){case ne:J=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:J=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case Z:J=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case K:J=8,u.format=l.RGB_ETC1_Format;break;default:if(N[ge]===32&&N[Me]&16711680&&N[ie]&65280&&N[q]&255&&N[we]&4278190080)me=!0,J=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",C(F)),u}u.mipmapCount=1,N[Y]&m&&g!==!1&&(u.mipmapCount=Math.max(1,N[_e]));var W=N[be];if(u.isCubemap=!!(W&S),u.isCubemap&&(!(W&M)||!(W&O)||!(W&P)||!(W&w)||!(W&x)||!(W&G)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=N[z],u.height=N[fe];for(var ue=N[H]+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(me)var i=X(p,ue,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*J,i=new Uint8Array(p,ue,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ue+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var Le=function(p){Fe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new ye.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new ye.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g}(ye.Group),Ge="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ne=function(p){Fe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new he(u),A.dracoLoader=new B(u),A.dracoLoader.setDecoderPath(Ge),A}return Object.defineProperty(g,"version",{get:function(){return"6.6.0-alpha.0"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(M){var O=new Le(M.scene),P=M.scenes.map(function(w){return w===M.scene?O:new Le(w)});m(Object.assign(M,{scene:O,scenes:P}))},S)},g}(De);V.DDSLoader=he,V.DRACOLoader=B,V.GLTFLoader=Ne,V.GLTFObject=Le,V.THREEGLTFLoader=De,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
260
+ `),s={specular:{value:new l.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];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)}x.prototype=Object.create(l.MeshStandardMaterial.prototype),x.prototype.constructor=x,x.prototype.copy=function(e){return l.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 X(){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 x},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new l.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 l.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new l.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 x(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=l.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 ne(){this.name=u.KHR_MESH_QUANTIZATION}function U(e,r,n,t){l.Interpolant.call(this,e,r,n,t)}U.prototype=Object.create(l.Interpolant.prototype),U.prototype.constructor=U,U.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},U.prototype.beforeStart_=U.prototype.copySampleValue_,U.prototype.afterEnd_=U.prototype.copySampleValue_,U.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,c=t-r,v=(n-r)/c,d=v*v,h=d*v,y=e*f,M=y-f,T=-2*h+3*d,L=h-d,b=1-T,D=L-d+v,k=0;k!==s;k++){var ae=i[M+k+s],se=i[M+k+o]*c,re=i[y+k+s],j=i[y+k]*c;a[k]=b*ae+D*se+T*re+L*j}return a};function Z(e){this.parser=e,this.name=u.REALSEE_MATERIALS_LIGHTMAP}Z.prototype.getMaterialType=function(e){return l.MeshPhongMaterial},Z.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 K={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},$={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ee={9728:l.NearestFilter,9729:l.LinearFilter,9984:l.NearestMipmapNearestFilter,9985:l.LinearMipmapNearestFilter,9986:l.NearestMipmapLinearFilter,9987:l.LinearMipmapLinearFilter},H={33071:l.ClampToEdgeWrapping,33648:l.MirroredRepeatWrapping,10497:l.RepeatWrapping},Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fe={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Me={CUBICSPLINE:void 0,LINEAR:l.InterpolateLinear,STEP:l.InterpolateDiscrete},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},ve={"image/png":l.RGBAFormat,"image/jpeg":l.RGBFormat};function ge(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 _e(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new l.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:l.FrontSide})),e.DefaultMaterial}function ie(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 q(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 we(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 f=[],c=[],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;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;c.push(v)}}return Promise.all([Promise.all(f),Promise.all(c)]).then(function(d){var h=d[0],y=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=y),e.morphTargetsRelative=!0,e})}function be(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 N(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+J(r.attributes):n=e.indices+":"+J(e.attributes)+":"+e.mode,n}function J(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 F(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 l.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new l.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}F.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:{}};ie(a,s,t),q(s,t),e(s)}).catch(r)},F.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,f=0,c=o.length;f<c;f++)e[o[f]].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},F.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},F.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},F.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(ge(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},F.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)})},F.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=Y[t.type],f=$[t.componentType],c=f.BYTES_PER_ELEMENT,v=c*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,y=t.normalized===!0,M,T;if(h&&h!==v){var L=Math.floor(d/h),b="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+L+":"+t.count,D=r.cache.get(b);D||(M=new f(s,L*h,t.count*h/c),D=new l.InterleavedBuffer(M,h/c),r.cache.add(b,D)),T=new l.InterleavedBufferAttribute(D,o,d%h/c,y)}else s===null?M=new f(t.count*o):M=new f(s,d,t.count*o),T=new l.BufferAttribute(M,o,y);if(t.sparse!==void 0){var k=Y.SCALAR,ae=$[t.sparse.indices.componentType],se=t.sparse.indices.byteOffset||0,re=t.sparse.values.byteOffset||0,j=new ae(i[1],se,t.sparse.count*k),le=new f(i[2],re,t.sparse.count*o);s!==null&&(T=new l.BufferAttribute(T.array.slice(),T.itemSize,T.normalized));for(var B=0,Ie=j.length;B<Ie;B++){var oe=j[B];if(T.setX(oe,le[B*o]),o>=2&&T.setY(oe,le[B*o+1]),o>=3&&T.setZ(oe,le[B*o+2]),o>=4&&T.setW(oe,le[B*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return T})},F.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||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var c=f.uri,v=!1;return f.bufferView!==void 0&&(c=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return c=i.createObjectURL(h),c})),Promise.resolve(c).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(y,M){h.load(ge(d,t.path),y,void 0,M)})}).then(function(d){v===!0&&i.revokeObjectURL(c),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in ve&&(d.format=ve[f.mimeType]);var h=n.samplers||{},y=h[s.sampler]||{};return d.magFilter=ee[y.magFilter]||l.LinearFilter,d.minFilter=ee[y.minFilter]||l.LinearMipmapLinearFilter,d.wrapS=H[y.wrapS]||l.RepeatWrapping,d.wrapT=H[y.wrapT]||l.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},F.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=l.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})},F.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,f=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var c="PointsMaterial:"+n.uuid,v=this.cache.get(c);v||(v=new l.PointsMaterial,l.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(c,v)),n=v}else if(e.isLine){var c="LineBasicMaterial:"+n.uuid,d=this.cache.get(c);d||(d=new l.LineBasicMaterial,l.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(c,d)),n=d}if(t||a||i||s||o){var c="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),s&&(c+="skinning:"),t&&(c+="vertex-tangents:"),a&&(c+="vertex-colors:"),i&&(c+="flat-shading:"),o&&(c+="morph-targets:"),f&&(c+="morph-normals:");var h=this.cache.get(c);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(c,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},F.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=c.getMaterialType(),f.push(c.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=l.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new l.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&&f.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&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=l.DoubleSide);var y=a.alphaMode||ce.OPAQUE;if(y===ce.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,y===ce.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new l.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==l.MeshBasicMaterial&&(s.emissive=new l.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==l.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var M=t[u.KHR_MATERIALS_CLEARCOAT];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var M=t[u.KHR_MATERIALS_TRANSMISSION];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.REALSEE_MATERIALS_LIGHTMAP]){var T=t[u.REALSEE_MATERIALS_LIGHTMAP];i=T.getMaterialType(),f.push(T.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var L;return i===x?L=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):L=new i(s),a.name&&(L.name=a.name),L.map&&(L.map.encoding=l.sRGBEncoding),L.emissiveMap&&(L.emissiveMap.encoding=l.sRGBEncoding),q(L,a),r.associations.set(L,{type:"materials",index:e}),a.extensions&&ie(t,L,a),L})};function me(e,r,n){var t=r.attributes,a=new l.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 l.Vector3(s[0],s[1],s[2]),new l.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var c=new l.Vector3,v=new l.Vector3,d=0,h=f.length;d<h;d++){var y=f[d];if(y.POSITION!==void 0){var i=n.json.accessors[y.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]))),c.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}e.boundingBox=a;var M=new l.Sphere;a.getCenter(M.center),M.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=M}function W(e,r,n){var t=r.attributes,a=[];function i(c,v){return n.getDependency("accessor",c).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=fe[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(c){e.setIndex(c)});a.push(f)}return q(e,r),me(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?we(e,r.targets,n):e})}function ue(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===l.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 f=e.clone();return f.setIndex(o),f}return F.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(y){return W(y,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],c=N(f),v=t[c];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=W(new l.BufferGeometry,f,r),t[c]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},F.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 f=a[s].material===void 0?_e(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(c){for(var v=c.slice(0,c.length-1),d=c[c.length-1],h=[],y=0,M=d.length;y<M;y++){var T=d[y],L=a[y],b,D=v[y];if(L.mode===K.TRIANGLES||L.mode===K.TRIANGLE_STRIP||L.mode===K.TRIANGLE_FAN||L.mode===void 0)b=t.isSkinnedMesh===!0?new l.SkinnedMesh(T,D):new l.Mesh(T,D),b.isSkinnedMesh===!0&&!b.geometry.attributes.skinWeight.normalized&&b.normalizeSkinWeights(),L.mode===K.TRIANGLE_STRIP?b.geometry=ue(b.geometry,l.TriangleStripDrawMode):L.mode===K.TRIANGLE_FAN&&(b.geometry=ue(b.geometry,l.TriangleFanDrawMode));else if(L.mode===K.LINES)b=new l.LineSegments(T,D);else if(L.mode===K.LINE_STRIP)b=new l.Line(T,D);else if(L.mode===K.LINE_LOOP)b=new l.LineLoop(T,D);else if(L.mode===K.POINTS)b=new l.Points(T,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+L.mode);Object.keys(b.geometry.morphAttributes).length>0&&be(b,t),b.name=t.name||"mesh_"+e,d.length>1&&(b.name+="_"+y),q(b,t),r.assignFinalMaterial(b),h.push(b)}if(h.length===1)return h[0];for(var k=new l.Group,y=0,M=h.length;y<M;y++)k.add(h[y]);return k})},F.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 l.PerspectiveCamera(l.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new l.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),q(r,n),Promise.resolve(r)},F.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})},F.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,c=n.channels.length;f<c;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,y=h.node!==void 0?h.node:h.id,M=n.parameters!==void 0?n.parameters[d.input]:d.input,T=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",M)),i.push(this.getDependency("accessor",T)),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(L){for(var b=L[0],D=L[1],k=L[2],ae=L[3],se=L[4],re=[],j=0,le=b.length;j<le;j++){var B=b[j],Ie=D[j],oe=k[j],xe=ae[j],Ce=se[j];if(B!==void 0){B.updateMatrix(),B.matrixAutoUpdate=!0;var Ae;switch(z[Ce.path]){case z.weights:Ae=l.NumberKeyframeTrack;break;case z.rotation:Ae=l.QuaternionKeyframeTrack;break;case z.position:case z.scale:default:Ae=l.VectorKeyframeTrack;break}var ke=B.name?B.name:B.uuid,Be=xe.interpolation!==void 0?Me[xe.interpolation]:l.InterpolateLinear,Se=[];z[Ce.path]===z.weights?B.traverse(function(pe){pe.isMesh===!0&&pe.morphTargetInfluences&&Se.push(pe.name?pe.name:pe.uuid)}):Se.push(ke);var Q=oe.array;if(oe.normalized){var de;if(Q.constructor===Int8Array)de=1/127;else if(Q.constructor===Uint8Array)de=1/255;else if(Q.constructor==Int16Array)de=1/32767;else if(Q.constructor===Uint16Array)de=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Pe=new Float32Array(Q.length),te=0,Re=Q.length;te<Re;te++)Pe[te]=Q[te]*de;Q=Pe}for(var te=0,Re=Se.length;te<Re;te++){var Oe=new Ae(Se[te]+"."+z[Ce.path],Ie.array,Q,Be);xe.interpolation==="CUBICSPLINE"&&(Oe.createInterpolant=function(Ke){return new U(this.times,this.values,this.getValueSize()/3,Ke)},Oe.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),re.push(Oe)}}}var Ee=n.name?n.name:"animation_"+e;return new l.AnimationClip(Ee,void 0,re)})},F.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(f){var c;if(a[s.mesh]>1){var v=i[s.mesh]++;c=f.clone(),c.name+="_instance_"+v}else c=f;return s.weights!==void 0&&c.traverse(function(d){if(d.isMesh)for(var h=0,y=s.weights.length;h<y;h++)d.morphTargetInfluences[h]=s.weights[h]}),c})),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 f;if(s.isBone===!0?f=new l.Bone:o.length>1?f=new l.Group:o.length===1?f=o[0]:f=new l.Object3D,f!==o[0])for(var c=0,v=o.length;c<v;c++)f.add(o[c]);if(s.name&&(f.userData.name=s.name,f.name=l.PropertyBinding.sanitizeNodeName(s.name)),q(f,s),s.extensions&&ie(n,f,s),s.matrix!==void 0){var d=new l.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return t.associations.set(f,{type:"nodes",index:e}),f})},F.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(f){o=f;for(var c=[],v=0,d=o.joints.length;v<d;v++)c.push(a.getDependency("node",o.joints[v]));return Promise.all(c)}).then(function(f){return s.traverse(function(c){if(c.isMesh){for(var v=[],d=[],h=0,y=f.length;h<y;h++){var M=f[h];if(M){v.push(M);var T=new l.Matrix4;o.inverseBindMatrices!==void 0&&T.fromArray(o.inverseBindMatrices.array,h*16),d.push(T)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}c.bind(new l.Skeleton(v,d),c.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,c=0,v=f.length;c<v;c++){var d=f[c];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 l.Group;i.name&&(o.name=i.name),q(o,i),i.extensions&&ie(a,o,i);for(var f=i.nodes||[],c=[],v=0,d=f.length;v<d;v++)c.push(e(f[v],o,t,s));return Promise.all(c).then(function(){return o})}})(),p})(),E=function(p){l.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"}};E.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:E,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,A){var m=new l.FileLoader(this.manager);m.setPath(this.path),m.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&m.setWithCredentials(!0),m.load(p,S=>{var _={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(S,_).then(g).catch(A)},u,A)},decodeDracoFile:function(p,g,u,A){var m={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:A||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,m).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var A=g.attributeTypes[u];A.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=A.name)}var m=JSON.stringify(g);if(E.taskCache.has(p)){var S=E.taskCache.get(p);if(S.key===m)return S.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 _,O=this.workerNextTaskID++,P=p.byteLength,w=this._getWorker(O,P).then(C=>(_=C,new Promise((G,R)=>{_._callbacks[O]={resolve:G,reject:R},_.postMessage({type:"decode",id:O,taskConfig:g,buffer:p},[p])}))).then(C=>this._createGeometry(C.geometry));return w.catch(()=>!0).then(()=>{_&&O&&this._releaseTask(_,O)}),E.taskCache.set(p,{key:m,promise:w}),w},_createGeometry:function(p){var g=new l.BufferGeometry;p.index&&g.setIndex(new l.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var A=p.attributes[u],m=A.name,S=A.array,_=A.itemSize;g.setAttribute(m,new l.BufferAttribute(S,_))}return g},_loadLibrary:function(p,g){var u=new l.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((A,m)=>{u.load(p,A,void 0,m)})},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 A=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var m=E.DRACOWorker.toString(),S=["/* draco decoder */",A,"","/* worker */",m.substring(m.indexOf("{")+1,m.lastIndexOf("}"))].join(`
261
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),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(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._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}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(w){P({draco:w})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,O=S.taskConfig;g.then(P=>{var w=P.draco,C=new w.Decoder,G=new w.DecoderBuffer;G.Init(new Int8Array(_),_.byteLength);try{var R=u(w,C,G,O),I=R.attributes.map(x=>x.array.buffer);R.index&&I.push(R.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:R},I)}catch(x){console.error(x),self.postMessage({type:"error",id:S.id,error:x.message})}finally{w.destroy(G),w.destroy(C)}});break}};function u(m,S,_,O){var P=O.attributeIDs,w=O.attributeTypes,C,G,R=S.GetEncodedGeometryType(_);if(R===m.TRIANGULAR_MESH)C=new m.Mesh,G=S.DecodeBufferToMesh(_,C);else if(R===m.POINT_CLOUD)C=new m.PointCloud,G=S.DecodeBufferToPointCloud(_,C);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!G.ok()||C.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+G.error_msg());var I={index:null,attributes:[]};for(var x in P){var X=self[w[x]],ne,U;if(O.useUniqueIDs)U=P[x],ne=S.GetAttributeByUniqueId(C,U);else{if(U=S.GetAttributeId(C,m[P[x]]),U===-1)continue;ne=S.GetAttribute(C,U)}I.attributes.push(A(m,S,C,x,X,ne))}if(R===m.TRIANGULAR_MESH){for(var Z=C.num_faces(),K=Z*3,$=new Uint32Array(K),ee=new m.DracoInt32Array,H=0;H<Z;++H){S.GetFaceFromMesh(C,H,ee);for(var Y=0;Y<3;++Y)$[H*3+Y]=ee.GetValue(Y)}I.index={array:$,itemSize:1},m.destroy(ee)}return m.destroy(C),I}function A(m,S,_,O,P,w){var C=w.num_components(),G=_.num_points(),R=G*C,I,x;switch(P){case Float32Array:I=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,w,I),x=new Float32Array(R);break;case Int8Array:I=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,w,I),x=new Int8Array(R);break;case Int16Array:I=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,w,I),x=new Int16Array(R);break;case Int32Array:I=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,w,I),x=new Int32Array(R);break;case Uint8Array:I=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,w,I),x=new Uint8Array(R);break;case Uint16Array:I=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,w,I),x=new Uint16Array(R);break;case Uint32Array:I=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,w,I),x=new Uint32Array(R);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<R;X++)x[X]=I.GetValue(X);return m.destroy(I),{name:O,array:x,itemSize:C}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var he=function(p){l.CompressedTextureLoader.call(this,p)};he.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:he,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,O=2048,P=4096,w=8192,C=16384,G=32768,R=4;function I(f){return f.charCodeAt(0)+(f.charCodeAt(1)<<8)+(f.charCodeAt(2)<<16)+(f.charCodeAt(3)<<24)}function x(f){return String.fromCharCode(f&255,f>>8&255,f>>16&255,f>>24&255)}function X(f,c,v,d){for(var h=v*d*4,y=new Uint8Array(f,c,h),M=new Uint8Array(h),T=0,L=0,b=0;b<d;b++)for(var D=0;D<v;D++){var k=y[L];L++;var ae=y[L];L++;var se=y[L];L++;var re=y[L];L++,M[T]=se,T++,M[T]=ae,T++,M[T]=k,T++,M[T]=re,T++}return M}var ne=I("DXT1"),U=I("DXT3"),Z=I("DXT5"),K=I("ETC1"),$=31,ee=0,H=1,Y=2,fe=3,z=4,Me=7,ce=20,ve=21,ge=22,_e=23,ie=24,q=25,we=26,be=28,N=new Int32Array(p,0,$);if(N[ee]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!N[ce]&R)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var J,F=N[ve],me=!1;switch(F){case ne:J=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:J=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case Z:J=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case K:J=8,u.format=l.RGB_ETC1_Format;break;default:if(N[ge]===32&&N[_e]&16711680&&N[ie]&65280&&N[q]&255&&N[we]&4278190080)me=!0,J=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",x(F)),u}u.mipmapCount=1,N[Y]&m&&g!==!1&&(u.mipmapCount=Math.max(1,N[Me]));var W=N[be];if(u.isCubemap=!!(W&S),u.isCubemap&&(!(W&_)||!(W&O)||!(W&P)||!(W&w)||!(W&C)||!(W&G)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=N[z],u.height=N[fe];for(var ue=N[H]+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(me)var i=X(p,ue,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*J,i=new Uint8Array(p,ue,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ue+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var Te=(function(p){Fe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new ye.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new ye.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g})(ye.Group),Ge="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ne=(function(p){Fe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new he(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ge),A}return Object.defineProperty(g,"version",{get:function(){return"6.6.0-alpha.2"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var O=new Te(_.scene),P=_.scenes.map(function(w){return w===_.scene?O:new Te(w)});m(Object.assign(_,{scene:O,scenes:P}))},S)},g})(De);V.DDSLoader=he,V.DRACOLoader=E,V.GLTFLoader=Ne,V.GLTFObject=Te,V.THREEGLTFLoader=De,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));