@realsee/dnalogel 2.1.1 → 2.1.2-alpha.0

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 (520) hide show
  1. package/components/index.js +242 -569
  2. package/dist/index.cjs.js +58 -73
  3. package/dist/index.es.js +7842 -12958
  4. package/dist/index.js +7842 -12958
  5. package/dist/index.umd.js +46 -61
  6. package/docs/assets/highlight.css +3 -3
  7. package/docs/assets/main.js +4 -2
  8. package/docs/assets/search.js +1 -1
  9. package/docs/assets/style.css +462 -619
  10. package/docs/classes/CruisePluginController.html +397 -23
  11. package/docs/classes/Magnifier.html +187 -9
  12. package/docs/classes/ModelRoomLabelController.html +149 -11
  13. package/docs/classes/Object3DHelperController.html +356 -0
  14. package/docs/classes/PaintBrush.html +260 -0
  15. package/docs/classes/PanoTagPluginController.html +940 -0
  16. package/docs/classes/Util.BetterTween.html +134 -0
  17. package/docs/classes/Util.FivePointSelector.html +144 -0
  18. package/docs/classes/Util.Interval.html +158 -0
  19. package/docs/classes/Util.Magnifier.html +196 -0
  20. package/docs/classes/Util.PointDomHelper.html +135 -0
  21. package/docs/classes/Util.PointHelper.html +127 -0
  22. package/docs/classes/Util.Rectangle.html +181 -0
  23. package/docs/enums/CameraMovementEffect.html +70 -3
  24. package/docs/enums/ContentType.html +116 -0
  25. package/docs/enums/DIRECTION.html +81 -1
  26. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +81 -1
  27. package/docs/enums/DimensionType.html +67 -0
  28. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +74 -1
  29. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +81 -1
  30. package/docs/enums/LinkType.html +67 -0
  31. package/docs/enums/PaintBrushTypeEnum.html +74 -0
  32. package/docs/enums/PointType.html +67 -0
  33. package/docs/enums/Rotation.html +77 -3
  34. package/docs/functions/CSS3DRenderPlugin.html +233 -0
  35. package/docs/functions/CameraMovementPlugin.html +237 -0
  36. package/docs/functions/CruisePlugin.html +233 -0
  37. package/docs/functions/GuideLinePlugin.html +235 -0
  38. package/docs/functions/ItemLabelPlugin.html +235 -0
  39. package/docs/functions/MapviewFloorplanPlugin.html +235 -0
  40. package/docs/functions/ModelChassisCompassPlugin.html +237 -0
  41. package/docs/functions/ModelEntryDoorGuidePlugin.html +237 -0
  42. package/docs/functions/ModelFloorplanPlugin.html +235 -0
  43. package/docs/functions/ModelItemLabelPlugin.html +235 -0
  44. package/docs/functions/ModelRoomLabelPlugin.html +233 -0
  45. package/docs/functions/ModelTVVideoPlugin.html +235 -0
  46. package/docs/functions/ModelViewPlugin.html +237 -0
  47. package/docs/functions/Object3DHelperPlugin.html +233 -0
  48. package/docs/functions/PanoCompassPlugin.html +235 -0
  49. package/docs/functions/PanoCursorRaycasterPlugin.html +238 -0
  50. package/docs/functions/PanoDoorLabelPlugin.html +235 -0
  51. package/docs/functions/PanoFloorplanRadarPlugin.html +235 -0
  52. package/docs/functions/PanoMeasurePlugin.html +235 -0
  53. package/docs/functions/PanoRulerPlugin.html +237 -0
  54. package/docs/functions/PanoRulerProPlugin.html +237 -0
  55. package/docs/functions/PanoSpatialTagPlugin.html +237 -0
  56. package/docs/functions/PanoTagPlugin.html +249 -0
  57. package/docs/functions/TopviewFloorplanPlugin.html +235 -0
  58. package/docs/functions/Util.getCoordsFromClient.html +78 -0
  59. package/docs/functions/Util.getCoordsFromElement.html +78 -0
  60. package/docs/functions/Util.getFrameTime.html +70 -0
  61. package/docs/functions/Util.getIntersectFromRelativePosition.html +78 -0
  62. package/docs/functions/Util.getRaycasterFromFivePointer.html +78 -0
  63. package/docs/functions/Util.isNil.html +79 -0
  64. package/docs/functions/Util.nextFrame.html +73 -0
  65. package/docs/functions/Util.notNil.html +78 -0
  66. package/docs/functions/Util.requestAnimationFrameInterval.html +98 -0
  67. package/docs/functions/Util.tweenProgress.html +84 -0
  68. package/docs/functions/pluginFlag.html +233 -0
  69. package/docs/index.html +220 -2
  70. package/docs/interfaces/CSS3DRenderPluginEventMap.html +205 -0
  71. package/docs/interfaces/CSS3DRenderPluginState.html +85 -0
  72. package/docs/interfaces/CameraMovementPluginExportType.html +111 -17
  73. package/docs/interfaces/ContentTypeMap.html +212 -0
  74. package/docs/interfaces/FloorplanBounding.html +89 -10
  75. package/docs/interfaces/FloorplanData.html +95 -3
  76. package/docs/interfaces/FloorplanEntrance.html +114 -15
  77. package/docs/interfaces/FloorplanExtraObject.html +108 -7
  78. package/docs/interfaces/FloorplanExtraObject3D.html +99 -3
  79. package/docs/interfaces/FloorplanFloorData.html +88 -3
  80. package/docs/interfaces/FloorplanImagePosition.html +74 -3
  81. package/docs/interfaces/FloorplanObserver.html +92 -5
  82. package/docs/interfaces/FloorplanOutlineItem.html +88 -3
  83. package/docs/interfaces/FloorplanPosition.html +74 -3
  84. package/docs/interfaces/FloorplanRoomItem.html +134 -17
  85. package/docs/interfaces/FloorplanRoomLabelItem.html +78 -7
  86. package/docs/interfaces/FloorplanServerBounding.html +89 -10
  87. package/docs/interfaces/FloorplanServerComputedData.html +92 -1
  88. package/docs/interfaces/FloorplanServerData.html +74 -3
  89. package/docs/interfaces/FloorplanServerDoorItem.html +92 -1
  90. package/docs/interfaces/FloorplanServerDoorPosition.html +78 -1
  91. package/docs/interfaces/FloorplanServerEntrance.html +114 -15
  92. package/docs/interfaces/FloorplanServerFloorData.html +88 -3
  93. package/docs/interfaces/FloorplanServerImagePosition.html +74 -3
  94. package/docs/interfaces/FloorplanServerObserver.html +92 -5
  95. package/docs/interfaces/FloorplanServerOutlineItem.html +88 -3
  96. package/docs/interfaces/FloorplanServerPosition.html +74 -3
  97. package/docs/interfaces/FloorplanServerRoomItem.html +145 -20
  98. package/docs/interfaces/FloorplanServerRoomLabelItem.html +78 -7
  99. package/docs/interfaces/ItemLabelPluginData.html +64 -1
  100. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +149 -1
  101. package/docs/interfaces/ItemLabelPluginParametersType.html +85 -1
  102. package/docs/interfaces/LineJson.html +71 -1
  103. package/docs/interfaces/ModelChassisCompassPluginData.html +71 -1
  104. package/docs/interfaces/ModelChassisCompassPluginExportType.html +107 -1
  105. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +71 -1
  106. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +78 -1
  107. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +115 -1
  108. package/docs/interfaces/ModelItemLabelPluginData.html +64 -1
  109. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +149 -1
  110. package/docs/interfaces/ModelItemLabelPluginParametersType.html +71 -1
  111. package/docs/interfaces/ModelRoomLabelPluginData.html +64 -1
  112. package/docs/interfaces/ModelTVVideoPluginData.html +85 -1
  113. package/docs/interfaces/ModelTVVideoPluginExportType.html +109 -1
  114. package/docs/interfaces/ModelTVVideoPluginParameterType.html +64 -1
  115. package/docs/interfaces/ModelViewPluginExportType.html +129 -1
  116. package/docs/interfaces/Object3DHelperState.html +78 -0
  117. package/docs/interfaces/OpenParameter.html +74 -3
  118. package/docs/interfaces/PaintBrushAction.html +118 -0
  119. package/docs/interfaces/PaintBrushConfigs.html +122 -0
  120. package/docs/interfaces/PaintBrushState.html +99 -0
  121. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +186 -11
  122. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +227 -1
  123. package/docs/interfaces/PanoMeasureParameterType.html +128 -5
  124. package/docs/interfaces/PanoRulerPluginExportType.html +138 -1
  125. package/docs/interfaces/PanoRulerPluginOptions.html +87 -1
  126. package/docs/interfaces/PanoRulerPluginParameterType.html +78 -1
  127. package/docs/interfaces/PanoRulerProPluginExportType.html +114 -1
  128. package/docs/interfaces/PanoRulerProPluginOptions.html +84 -1
  129. package/docs/interfaces/PanoRulerProPluginParameterType.html +71 -1
  130. package/docs/interfaces/PanoRulerProPluginState.html +78 -1
  131. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +241 -1
  132. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +230 -1
  133. package/docs/interfaces/PanoSpatialTagPluginData.html +114 -1
  134. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +96 -1
  135. package/docs/interfaces/PanoSpatialTagPluginExportType.html +192 -1
  136. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +92 -1
  137. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +113 -1
  138. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +99 -1
  139. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +92 -1
  140. package/docs/interfaces/Point.html +78 -1
  141. package/docs/interfaces/PointJson.html +78 -1
  142. package/docs/interfaces/Room.html +85 -1
  143. package/docs/interfaces/RoomInfo.html +71 -1
  144. package/docs/interfaces/RoomLabel.html +141 -13
  145. package/docs/interfaces/RoomRules.html +230 -1
  146. package/docs/interfaces/Rooms.html +230 -1
  147. package/docs/interfaces/Scissor.html +100 -0
  148. package/docs/interfaces/TagConfig.html +120 -0
  149. package/docs/interfaces/Tags.html +89 -0
  150. package/docs/interfaces/Util.MagnifierParameter.html +116 -0
  151. package/docs/interfaces/Util.MouseGroupParameter.html +79 -0
  152. package/docs/modules/Util.html +91 -0
  153. package/docs/modules.html +425 -36
  154. package/docs/types/ArrayPosition.html +224 -0
  155. package/docs/types/CSS3DRenderExportType.html +224 -0
  156. package/docs/types/CSS3DRenderPluginExportType.html +224 -0
  157. package/docs/types/CSS3DRenderPluginParameterType.html +224 -0
  158. package/docs/types/Color.html +224 -0
  159. package/docs/types/ContentTypeConfigKey.html +224 -0
  160. package/docs/types/ContentTypeConfigKeyArray.html +224 -0
  161. package/docs/types/Create3DDomContainerReturnType.html +224 -0
  162. package/docs/types/Create3DElementReturnType.html +224 -0
  163. package/docs/types/CruisePluginExportType.html +224 -0
  164. package/docs/types/Direction-1.html +224 -0
  165. package/docs/types/Direction4.html +224 -0
  166. package/docs/types/FloorplanRuleLabels.html +226 -0
  167. package/docs/types/FloorplanServerRuleLabels.html +224 -0
  168. package/docs/types/GuideLinePluginExportType.html +224 -0
  169. package/docs/types/HelperEventMap.html +314 -0
  170. package/docs/types/MapviewFloorplanPluginParameterType.html +224 -0
  171. package/docs/types/MapviewFloorplanPluginReturnType.html +224 -0
  172. package/docs/types/MediaData.html +224 -0
  173. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +224 -0
  174. package/docs/types/ModelFloorplanPluginParameterType.html +224 -0
  175. package/docs/types/ModelFloorplanPluginReturnType.html +224 -0
  176. package/docs/types/ModelRoomLabelPluginParameters.html +224 -0
  177. package/docs/types/ModelRoomLabelPluginReturnType.html +224 -0
  178. package/docs/types/MoveArgs.html +226 -0
  179. package/docs/types/MoveOpts.html +226 -0
  180. package/docs/types/Object3DHelperEventMap.html +317 -0
  181. package/docs/types/ObjectFit.html +224 -0
  182. package/docs/types/PaintBrushEventMap.html +255 -0
  183. package/docs/types/PanoCompassPluginData.html +224 -0
  184. package/docs/types/PanoCompassPluginExportType.html +224 -0
  185. package/docs/types/PanoCompassPluginParameterType.html +224 -0
  186. package/docs/types/PanoFloorplanRadarPluginParameterType.html +224 -0
  187. package/docs/types/PanoFloorplanRadarPluginReturnType.html +224 -0
  188. package/docs/types/PanoMeasurePluginEvent.html +224 -0
  189. package/docs/types/PanoMeasureReturnType.html +224 -0
  190. package/docs/types/PanoSpatialTagPluginId.html +224 -0
  191. package/docs/types/PanoTagPluginExportInterface.html +224 -0
  192. package/docs/types/PanoTagPluginParamsInterface.html +224 -0
  193. package/docs/types/PlaneTag.html +233 -0
  194. package/docs/types/PointTag.html +235 -0
  195. package/docs/types/Position.html +224 -0
  196. package/docs/types/RotateArgs.html +226 -0
  197. package/docs/types/RotateOpts.html +226 -0
  198. package/docs/types/RuleLabelsKey.html +224 -0
  199. package/docs/types/RuleLabelsValue.html +224 -0
  200. package/docs/types/Tag.html +235 -0
  201. package/docs/types/Tag2D.html +233 -0
  202. package/docs/types/Tag3D.html +233 -0
  203. package/docs/types/TagId.html +224 -0
  204. package/docs/types/TopviewFloorplanPluginParameterType.html +224 -0
  205. package/docs/types/TopviewFloorplanPluginReturnType.html +224 -0
  206. package/docs/variables/FLOOR_TYPE_MAP.html +226 -0
  207. package/docs/variables/PLUGIN.html +224 -0
  208. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +226 -0
  209. package/docs/variables/ROOM_TYPE_MAP.html +226 -0
  210. package/docs/variables/VERSION.html +224 -0
  211. package/docs/variables/itemLabelPluginServerParams.html +231 -0
  212. package/docs/variables/modelItemLabelPluginServerParams.html +231 -0
  213. package/docs/variables/modelRoomLabelPluginServerParams.html +231 -0
  214. package/libs/CSS3DRenderPlugin/CSS3DRender.d.ts +2 -2
  215. package/libs/CSS3DRenderPlugin/CSS3DRender.js +150 -119
  216. package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -3
  217. package/libs/CSS3DRenderPlugin/Controller.js +45 -42
  218. package/libs/CSS3DRenderPlugin/index.js +4 -12
  219. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +71 -54
  220. package/libs/CruisePlugin/Controller.js +331 -287
  221. package/libs/CruisePlugin/index.js +6 -25
  222. package/libs/CruisePlugin/utils/coordinatesAngle.js +2 -3
  223. package/libs/CruisePlugin/utils/safeCall.js +21 -5
  224. package/libs/GuideLinePlugin/Controller.js +94 -62
  225. package/libs/GuideLinePlugin/index.js +4 -13
  226. package/libs/GuideLinePlugin/utils/getLineGeometries.js +49 -103
  227. package/libs/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
  228. package/libs/ItemLabelPlugin/ItemLabelComponent.js +200 -183
  229. package/libs/ItemLabelPlugin/ItemLabelItem.js +27 -27
  230. package/libs/ItemLabelPlugin/Plugin.js +20 -29
  231. package/libs/ItemLabelPlugin/index.js +5 -18
  232. package/libs/ItemLabelPlugin/utils/parseData.js +15 -4
  233. package/libs/ItemLabelPlugin/utils/transform2RenderData.js +16 -6
  234. package/libs/ModelChassisCompassPlugin/Plugin.js +54 -38
  235. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +58 -46
  236. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +145 -129
  237. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +18 -18
  238. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +19 -24
  239. package/libs/ModelItemLabelPlugin/index.js +5 -14
  240. package/libs/ModelItemLabelPlugin/utils/parseData.js +16 -6
  241. package/libs/ModelRoomLabelPlugin/Controller.js +2 -6
  242. package/libs/ModelRoomLabelPlugin/RoomLabelItem.js +22 -22
  243. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +105 -94
  244. package/libs/ModelRoomLabelPlugin/index.js +4 -10
  245. package/libs/ModelTVVideoPlugin/Plugin.js +101 -94
  246. package/libs/ModelViewPlugin/Plugin.js +71 -60
  247. package/libs/Object3DHelperPlugin/Controller.d.ts +1 -1
  248. package/libs/Object3DHelperPlugin/Controller.js +79 -71
  249. package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +1 -1
  250. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +8 -11
  251. package/libs/Object3DHelperPlugin/index.js +8 -40
  252. package/libs/PanoCompassPlugin/Controller.js +91 -72
  253. package/libs/PanoCompassPlugin/index.js +4 -22
  254. package/libs/PanoCursorRaycasterPlugin/index.js +8 -9
  255. package/libs/PanoDoorLabelPlugin/BaseController.js +42 -33
  256. package/libs/PanoDoorLabelPlugin/Controller.js +84 -80
  257. package/libs/PanoDoorLabelPlugin/DoorLabelItem.js +16 -16
  258. package/libs/PanoDoorLabelPlugin/index.d.ts +1 -1
  259. package/libs/PanoDoorLabelPlugin/index.js +3 -12
  260. package/libs/PanoDoorLabelPlugin/utils.d.ts +2 -2
  261. package/libs/PanoMeasurePlugin/Controller/BaseController.js +14 -24
  262. package/libs/PanoMeasurePlugin/Controller/EditController.js +8 -20
  263. package/libs/PanoMeasurePlugin/Controller/MixedController.js +15 -28
  264. package/libs/PanoMeasurePlugin/Controller/ViewController.js +15 -26
  265. package/libs/PanoMeasurePlugin/Controller/WatchController.js +28 -43
  266. package/libs/PanoMeasurePlugin/Controller/index.d.ts +1 -1
  267. package/libs/PanoMeasurePlugin/Controller/index.js +43 -70
  268. package/libs/PanoMeasurePlugin/Model/index.d.ts +4 -4
  269. package/libs/PanoMeasurePlugin/Model/index.js +38 -45
  270. package/libs/PanoMeasurePlugin/Model/line.d.ts +1 -1
  271. package/libs/PanoMeasurePlugin/Model/line.js +10 -14
  272. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +2 -2
  273. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -3
  274. package/libs/PanoMeasurePlugin/Modules/UIController/style.js +16 -24
  275. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +35 -28
  276. package/libs/PanoMeasurePlugin/index.js +6 -55
  277. package/libs/PanoMeasurePlugin/utils/constants.js +29 -16
  278. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +1 -1
  279. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +4 -5
  280. package/libs/PanoRulerPlugin/Plugin.js +180 -157
  281. package/libs/PanoRulerProPlugin/Controller.js +70 -51
  282. package/libs/PanoRulerProPlugin/RulerItem.js +55 -45
  283. package/libs/PanoRulerProPlugin/RulerItems.js +124 -125
  284. package/libs/PanoRulerProPlugin/index.js +4 -15
  285. package/libs/PanoSpatialTagPlugin/Components/origins.js +24 -25
  286. package/libs/PanoSpatialTagPlugin/Components/tag.js +23 -23
  287. package/libs/PanoSpatialTagPlugin/Plugin.js +61 -72
  288. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -1
  289. package/libs/PanoSpatialTagPlugin/store.js +1 -2
  290. package/libs/PanoTagPlugin/Components/Common/Arrow.js +47 -47
  291. package/libs/PanoTagPlugin/Components/Common/Audio.js +95 -92
  292. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +48 -48
  293. package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +40 -41
  294. package/libs/PanoTagPlugin/Components/Common/Media.js +258 -3303
  295. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +60 -60
  296. package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +96 -107
  297. package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +15 -16
  298. package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +22 -23
  299. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +78 -82
  300. package/libs/PanoTagPlugin/Components/Common/Shadow.js +51 -52
  301. package/libs/PanoTagPlugin/Components/Common/Text.js +84 -937
  302. package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +58 -64
  303. package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +35 -34
  304. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +101 -111
  305. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +43 -45
  306. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +123 -96
  307. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +36 -44
  308. package/libs/PanoTagPlugin/Components/Tag/TextTag.js +71 -83
  309. package/libs/PanoTagPlugin/Components/Tag/index.js +130 -149
  310. package/libs/PanoTagPlugin/Components/TagContainer.js +69 -100
  311. package/libs/PanoTagPlugin/Components/TagWrapper.js +86 -116
  312. package/libs/PanoTagPlugin/controller/TagCacheController.js +2 -3
  313. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +5 -5
  314. package/libs/PanoTagPlugin/controller/TagComputer.js +262 -13
  315. package/libs/PanoTagPlugin/controller/index.js +177 -186
  316. package/libs/PanoTagPlugin/index.js +7 -69
  317. package/libs/PanoTagPlugin/utils/checkRange.d.ts +1 -1
  318. package/libs/PanoTagPlugin/utils/resizeObserver.js +1 -1
  319. package/libs/PanoTagPlugin/utils/search.js +9 -27
  320. package/libs/base/BasePluginWithData.js +0 -1
  321. package/libs/components/PaintBrush/Controller.d.ts +2 -2
  322. package/libs/components/PaintBrush/Controller.js +3 -4
  323. package/libs/components/PaintBrush/index.js +2 -9
  324. package/libs/components/PaintBrush/tween.js +7 -11
  325. package/libs/components/PaintBrush/utils.d.ts +1 -1
  326. package/libs/env.d.ts +1 -0
  327. package/libs/floorplan/Components/BaseImage.js +29 -30
  328. package/libs/floorplan/Components/Camera.js +24 -24
  329. package/libs/floorplan/Components/Compass.js +36 -36
  330. package/libs/floorplan/Components/CurrentFloor.js +65 -74
  331. package/libs/floorplan/Components/Main.js +94 -112
  332. package/libs/floorplan/Components/Normalmage.js +21 -21
  333. package/libs/floorplan/Components/RoomHighlight/Room.js +20 -20
  334. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +43 -44
  335. package/libs/floorplan/Components/RoomLabels/RoomLabel.js +60 -59
  336. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +61 -61
  337. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +136 -124
  338. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.js +21 -21
  339. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.js +20 -20
  340. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.js +22 -22
  341. package/libs/floorplan/Components/RuleLabels/RuleItem.js +68 -68
  342. package/libs/floorplan/Components/RuleLabels/RuleLabels.js +40 -40
  343. package/libs/floorplan/Components/SvgImage.js +19 -19
  344. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +1 -1
  345. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +145 -146
  346. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -47
  347. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -1
  348. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +187 -189
  349. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -47
  350. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +32 -31
  351. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +56 -60
  352. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.js +29 -29
  353. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +75 -83
  354. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +92 -74
  355. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -24
  356. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -1
  357. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +181 -173
  358. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -44
  359. package/libs/floorplan/utils/constant.js +1 -2
  360. package/libs/floorplan/utils/correctFiveState.js +48 -30
  361. package/libs/floorplan/utils/formatData.js +58 -36
  362. package/libs/index.js +90 -328
  363. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-changed-params.js +29 -0
  364. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/get-params.js +23 -0
  365. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/mount-swiper.js +14 -0
  366. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/params-list.js +120 -0
  367. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/update-swiper.js +36 -0
  368. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/components-shared/utils.js +32 -0
  369. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper-slide.js +182 -0
  370. package/libs/node_modules/.pnpm/swiper@8.4.4/node_modules/swiper/svelte/swiper.js +254 -0
  371. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -5
  372. package/libs/shared-utils/Object3DHelper/Controller/CSS3DScaleController.js +5 -16
  373. package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +16 -24
  374. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +1 -1
  375. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +15 -23
  376. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +2 -10
  377. package/libs/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js +27 -29
  378. package/libs/shared-utils/Object3DHelper/Helper/HTML/tipsDom.js +19 -9
  379. package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +4 -5
  380. package/libs/shared-utils/Object3DHelper/Helper/OutlineHelper.js +1 -102
  381. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +8 -14
  382. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -3
  383. package/libs/shared-utils/Object3DHelper/index.js +72 -43
  384. package/libs/shared-utils/Object3DHelper/utils/direction.js +14 -22
  385. package/libs/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +1 -1
  386. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
  387. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
  388. package/libs/shared-utils/Subscribe.js +1 -1
  389. package/libs/shared-utils/animationFrame/BetterTween.js +24 -4
  390. package/libs/shared-utils/animationFrame/calculateProgress.js +3 -9
  391. package/libs/shared-utils/animationFrame/formatRad.js +1 -3
  392. package/libs/shared-utils/animationFrame/index.js +19 -39
  393. package/libs/shared-utils/animationFrame/tween.js +17 -17
  394. package/libs/shared-utils/filter.js +6 -26
  395. package/libs/shared-utils/five/changeMode.js +34 -16
  396. package/libs/shared-utils/index.js +29 -43
  397. package/libs/shared-utils/math/planimetry.d.ts +5 -5
  398. package/libs/shared-utils/math/planimetry.js +34 -121
  399. package/libs/shared-utils/removeArrayItem.d.ts +1 -1
  400. package/libs/shared-utils/three/Assets/index.js +1 -2
  401. package/libs/shared-utils/three/FivePointSelector.d.ts +1 -1
  402. package/libs/shared-utils/three/FivePointSelector.js +12 -26
  403. package/libs/shared-utils/three/Magnifier.d.ts +2 -2
  404. package/libs/shared-utils/three/Magnifier.js +3 -3
  405. package/libs/shared-utils/three/PointDomHelper.js +26 -34
  406. package/libs/shared-utils/three/getIntersect.d.ts +1 -1
  407. package/libs/shared-utils/three/getRaycaster.d.ts +1 -1
  408. package/libs/shared-utils/three/loadTexture.js +25 -7
  409. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +18 -7
  410. package/libs/shared-utils/to.js +26 -8
  411. package/package.json +45 -28
  412. package/dist/style.css +0 -1
  413. package/docs/assets/icons.css +0 -1043
  414. package/docs/assets/icons.png +0 -0
  415. package/docs/assets/icons@2x.png +0 -0
  416. package/docs/assets/widgets.png +0 -0
  417. package/docs/assets/widgets@2x.png +0 -0
  418. package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
  419. package/libs/CSS3DRenderPlugin/typing.js +0 -1
  420. package/libs/CSS3DRenderPlugin/utils/index.js +0 -13
  421. package/libs/CSS3DRenderPlugin/utils/random.js +0 -6
  422. package/libs/CameraMovementPlugin/index.js +0 -15
  423. package/libs/CruisePlugin/typing.js +0 -1
  424. package/libs/GuideLinePlugin/typing.js +0 -1
  425. package/libs/GuideLinePlugin/utils/getPoint.d.ts +0 -3
  426. package/libs/GuideLinePlugin/utils/getPoint.js +0 -18
  427. package/libs/GuideLinePlugin/utils/polyline-normals.d.js +0 -1
  428. package/libs/ItemLabelPlugin/events.type.js +0 -1
  429. package/libs/ModelChassisCompassPlugin/index.js +0 -10
  430. package/libs/ModelEntryDoorGuidePlugin/index.js +0 -11
  431. package/libs/ModelItemLabelPlugin/events.type.js +0 -1
  432. package/libs/ModelRoomLabelPlugin/typings.js +0 -1
  433. package/libs/ModelTVVideoPlugin/index.js +0 -19
  434. package/libs/ModelViewPlugin/index.js +0 -8
  435. package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +0 -2
  436. package/libs/Object3DHelperPlugin/mocks/addObject3D.js +0 -1377
  437. package/libs/Object3DHelperPlugin/mocks/objects.d.ts +0 -7
  438. package/libs/Object3DHelperPlugin/mocks/objects.js +0 -47
  439. package/libs/Object3DHelperPlugin/typings.js +0 -1
  440. package/libs/PanoCompassPlugin/typings.js +0 -1
  441. package/libs/PanoDoorLabelPlugin/typings.js +0 -1
  442. package/libs/PanoMeasurePlugin/typings/data.js +0 -1
  443. package/libs/PanoMeasurePlugin/typings/event.type.js +0 -1
  444. package/libs/PanoMeasurePlugin/typings/index.js +0 -1
  445. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +0 -1
  446. package/libs/PanoMeasurePlugin/typings/utils.type.js +0 -1
  447. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +0 -2
  448. package/libs/PanoMeasurePlugin/utils/clearGroup.js +0 -6
  449. package/libs/PanoRulerPlugin/index.js +0 -11
  450. package/libs/PanoRulerPlugin/typings.js +0 -1
  451. package/libs/PanoRulerProPlugin/typings.js +0 -1
  452. package/libs/PanoSpatialTagPlugin/index.js +0 -24
  453. package/libs/PanoSpatialTagPlugin/typings.js +0 -1
  454. package/libs/PanoTagPlugin/Components/Common/TextItem.js +0 -106
  455. package/libs/PanoTagPlugin/typings/controller.js +0 -1
  456. package/libs/PanoTagPlugin/typings/index.js +0 -7
  457. package/libs/PanoTagPlugin/utils/index.js +0 -36
  458. package/libs/TagComputer.2bc444dc.js +0 -315
  459. package/libs/components/index.js +0 -13
  460. package/libs/floorplan/MapviewFloorplanPlugin/typing.js +0 -1
  461. package/libs/floorplan/ModelFloorplanPlugin/typing.js +0 -1
  462. package/libs/floorplan/PanoFloorplanRadarPlugin/typing.js +0 -1
  463. package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -1
  464. package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -11
  465. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +0 -1
  466. package/libs/floorplan/index.js +0 -67
  467. package/libs/floorplan/typings/floorplanData.js +0 -1
  468. package/libs/floorplan/typings/index.js +0 -1
  469. package/libs/floorplan/typings/utility.js +0 -1
  470. package/libs/hammer.b5b6115e.js +0 -882
  471. package/libs/index.164f1850.js +0 -641
  472. package/libs/index.5d5d1089.js +0 -34
  473. package/libs/index.6a0eead1.js +0 -12
  474. package/libs/index.ad783a2f.js +0 -31
  475. package/libs/index.dca207cb.js +0 -37
  476. package/libs/index.f2f85d71.js +0 -40
  477. package/libs/shared-utils/Object3DHelper/Helper/index.js +0 -30
  478. package/libs/shared-utils/Object3DHelper/typings/Direction.js +0 -1
  479. package/libs/shared-utils/Object3DHelper/typings/Hooks.js +0 -1
  480. package/libs/shared-utils/Object3DHelper/typings/Scissor.js +0 -1
  481. package/libs/shared-utils/Object3DHelper/typings/index.js +0 -1
  482. package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +0 -18
  483. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +0 -1
  484. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.js +0 -6
  485. package/libs/shared-utils/Object3DHelper/utils/getPoint.js +0 -18
  486. package/libs/shared-utils/Object3DHelper/utils/index.js +0 -29
  487. package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +0 -2
  488. package/libs/shared-utils/Object3DHelper/utils/negateScale.js +0 -7
  489. package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +0 -13
  490. package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +0 -5
  491. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.d.js +0 -4
  492. package/libs/shared-utils/Preloader.d.ts +0 -6
  493. package/libs/shared-utils/Preloader.js +0 -18
  494. package/libs/shared-utils/formatRad.d.ts +0 -7
  495. package/libs/shared-utils/formatRad.js +0 -7
  496. package/libs/shared-utils/getRandomColor.d.ts +0 -1
  497. package/libs/shared-utils/getRandomColor.js +0 -6
  498. package/libs/shared-utils/logger.d.ts +0 -16
  499. package/libs/shared-utils/logger.js +0 -27
  500. package/libs/shared-utils/math/evenNumber.d.ts +0 -3
  501. package/libs/shared-utils/math/evenNumber.js +0 -7
  502. package/libs/shared-utils/math/index.js +0 -6
  503. package/libs/shared-utils/px2rem.d.ts +0 -1
  504. package/libs/shared-utils/px2rem.js +0 -6
  505. package/libs/shared-utils/three/getExtraModelLoader.d.ts +0 -6
  506. package/libs/shared-utils/three/getExtraModelLoader.js +0 -18
  507. package/libs/shared-utils/three/getNormal.d.ts +0 -2
  508. package/libs/shared-utils/three/getNormal.js +0 -7
  509. package/libs/shared-utils/three/getTextureLoader.d.ts +0 -6
  510. package/libs/shared-utils/three/getTextureLoader.js +0 -16
  511. package/libs/shared-utils/three/index.js +0 -33
  512. package/libs/shared-utils/three/loadFbxObj.d.ts +0 -2
  513. package/libs/shared-utils/three/loadFbxObj.js +0 -16
  514. package/libs/shared-utils/vectorTocoordinates.d.ts +0 -7
  515. package/libs/shared-utils/vectorTocoordinates.js +0 -10
  516. package/libs/style.css +0 -1
  517. package/libs/tween.esm.bad2b2b4.js +0 -340
  518. package/libs/typings/math.type.js +0 -1
  519. package/libs/typings/utils.type.d.ts +0 -2
  520. package/libs/typings/utils.type.js +0 -1
@@ -1,1377 +0,0 @@
1
- import * as je from "three";
2
- import Be from "three";
3
- var De = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, Ie = { exports: {} };
4
- (function(y) {
5
- var M, l, S, R, O, N, B, U, C, E, K, V, I, z, Z, q, W, te, re, he, le, ce, ue, Q, ae;
6
- (function(D) {
7
- var se = typeof De == "object" ? De : typeof self == "object" ? self : typeof this == "object" ? this : {};
8
- D(ne(se, ne(y.exports)));
9
- function ne(s, c) {
10
- return s !== se && (typeof Object.create == "function" ? Object.defineProperty(s, "__esModule", { value: !0 }) : s.__esModule = !0), function(p, m) {
11
- return s[p] = c ? c(p, m) : m;
12
- };
13
- }
14
- })(function(D) {
15
- var se = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, c) {
16
- s.__proto__ = c;
17
- } || function(s, c) {
18
- for (var p in c)
19
- Object.prototype.hasOwnProperty.call(c, p) && (s[p] = c[p]);
20
- };
21
- M = function(s, c) {
22
- if (typeof c != "function" && c !== null)
23
- throw new TypeError("Class extends value " + String(c) + " is not a constructor or null");
24
- se(s, c);
25
- function p() {
26
- this.constructor = s;
27
- }
28
- s.prototype = c === null ? Object.create(c) : (p.prototype = c.prototype, new p());
29
- }, l = Object.assign || function(s) {
30
- for (var c, p = 1, m = arguments.length; p < m; p++) {
31
- c = arguments[p];
32
- for (var T in c)
33
- Object.prototype.hasOwnProperty.call(c, T) && (s[T] = c[T]);
34
- }
35
- return s;
36
- }, S = function(s, c) {
37
- var p = {};
38
- for (var m in s)
39
- Object.prototype.hasOwnProperty.call(s, m) && c.indexOf(m) < 0 && (p[m] = s[m]);
40
- if (s != null && typeof Object.getOwnPropertySymbols == "function")
41
- for (var T = 0, m = Object.getOwnPropertySymbols(s); T < m.length; T++)
42
- c.indexOf(m[T]) < 0 && Object.prototype.propertyIsEnumerable.call(s, m[T]) && (p[m[T]] = s[m[T]]);
43
- return p;
44
- }, R = function(s, c, p, m) {
45
- var T = arguments.length, g = T < 3 ? c : m === null ? m = Object.getOwnPropertyDescriptor(c, p) : m, x;
46
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
47
- g = Reflect.decorate(s, c, p, m);
48
- else
49
- for (var H = s.length - 1; H >= 0; H--)
50
- (x = s[H]) && (g = (T < 3 ? x(g) : T > 3 ? x(c, p, g) : x(c, p)) || g);
51
- return T > 3 && g && Object.defineProperty(c, p, g), g;
52
- }, O = function(s, c) {
53
- return function(p, m) {
54
- c(p, m, s);
55
- };
56
- }, N = function(s, c) {
57
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
58
- return Reflect.metadata(s, c);
59
- }, B = function(s, c, p, m) {
60
- function T(g) {
61
- return g instanceof p ? g : new p(function(x) {
62
- x(g);
63
- });
64
- }
65
- return new (p || (p = Promise))(function(g, x) {
66
- function H($) {
67
- try {
68
- P(m.next($));
69
- } catch (G) {
70
- x(G);
71
- }
72
- }
73
- function Y($) {
74
- try {
75
- P(m.throw($));
76
- } catch (G) {
77
- x(G);
78
- }
79
- }
80
- function P($) {
81
- $.done ? g($.value) : T($.value).then(H, Y);
82
- }
83
- P((m = m.apply(s, c || [])).next());
84
- });
85
- }, U = function(s, c) {
86
- var p = { label: 0, sent: function() {
87
- if (g[0] & 1)
88
- throw g[1];
89
- return g[1];
90
- }, trys: [], ops: [] }, m, T, g, x;
91
- return x = { next: H(0), throw: H(1), return: H(2) }, typeof Symbol == "function" && (x[Symbol.iterator] = function() {
92
- return this;
93
- }), x;
94
- function H(P) {
95
- return function($) {
96
- return Y([P, $]);
97
- };
98
- }
99
- function Y(P) {
100
- if (m)
101
- throw new TypeError("Generator is already executing.");
102
- for (; p; )
103
- try {
104
- if (m = 1, T && (g = P[0] & 2 ? T.return : P[0] ? T.throw || ((g = T.return) && g.call(T), 0) : T.next) && !(g = g.call(T, P[1])).done)
105
- return g;
106
- switch (T = 0, g && (P = [P[0] & 2, g.value]), P[0]) {
107
- case 0:
108
- case 1:
109
- g = P;
110
- break;
111
- case 4:
112
- return p.label++, { value: P[1], done: !1 };
113
- case 5:
114
- p.label++, T = P[1], P = [0];
115
- continue;
116
- case 7:
117
- P = p.ops.pop(), p.trys.pop();
118
- continue;
119
- default:
120
- if (g = p.trys, !(g = g.length > 0 && g[g.length - 1]) && (P[0] === 6 || P[0] === 2)) {
121
- p = 0;
122
- continue;
123
- }
124
- if (P[0] === 3 && (!g || P[1] > g[0] && P[1] < g[3])) {
125
- p.label = P[1];
126
- break;
127
- }
128
- if (P[0] === 6 && p.label < g[1]) {
129
- p.label = g[1], g = P;
130
- break;
131
- }
132
- if (g && p.label < g[2]) {
133
- p.label = g[2], p.ops.push(P);
134
- break;
135
- }
136
- g[2] && p.ops.pop(), p.trys.pop();
137
- continue;
138
- }
139
- P = c.call(s, p);
140
- } catch ($) {
141
- P = [6, $], T = 0;
142
- } finally {
143
- m = g = 0;
144
- }
145
- if (P[0] & 5)
146
- throw P[1];
147
- return { value: P[0] ? P[1] : void 0, done: !0 };
148
- }
149
- }, C = function(s, c) {
150
- for (var p in s)
151
- p !== "default" && !Object.prototype.hasOwnProperty.call(c, p) && ae(c, s, p);
152
- }, ae = Object.create ? function(s, c, p, m) {
153
- m === void 0 && (m = p);
154
- var T = Object.getOwnPropertyDescriptor(c, p);
155
- (!T || ("get" in T ? !c.__esModule : T.writable || T.configurable)) && (T = { enumerable: !0, get: function() {
156
- return c[p];
157
- } }), Object.defineProperty(s, m, T);
158
- } : function(s, c, p, m) {
159
- m === void 0 && (m = p), s[m] = c[p];
160
- }, E = function(s) {
161
- var c = typeof Symbol == "function" && Symbol.iterator, p = c && s[c], m = 0;
162
- if (p)
163
- return p.call(s);
164
- if (s && typeof s.length == "number")
165
- return {
166
- next: function() {
167
- return s && m >= s.length && (s = void 0), { value: s && s[m++], done: !s };
168
- }
169
- };
170
- throw new TypeError(c ? "Object is not iterable." : "Symbol.iterator is not defined.");
171
- }, K = function(s, c) {
172
- var p = typeof Symbol == "function" && s[Symbol.iterator];
173
- if (!p)
174
- return s;
175
- var m = p.call(s), T, g = [], x;
176
- try {
177
- for (; (c === void 0 || c-- > 0) && !(T = m.next()).done; )
178
- g.push(T.value);
179
- } catch (H) {
180
- x = { error: H };
181
- } finally {
182
- try {
183
- T && !T.done && (p = m.return) && p.call(m);
184
- } finally {
185
- if (x)
186
- throw x.error;
187
- }
188
- }
189
- return g;
190
- }, V = function() {
191
- for (var s = [], c = 0; c < arguments.length; c++)
192
- s = s.concat(K(arguments[c]));
193
- return s;
194
- }, I = function() {
195
- for (var s = 0, c = 0, p = arguments.length; c < p; c++)
196
- s += arguments[c].length;
197
- for (var m = Array(s), T = 0, c = 0; c < p; c++)
198
- for (var g = arguments[c], x = 0, H = g.length; x < H; x++, T++)
199
- m[T] = g[x];
200
- return m;
201
- }, z = function(s, c, p) {
202
- if (p || arguments.length === 2)
203
- for (var m = 0, T = c.length, g; m < T; m++)
204
- (g || !(m in c)) && (g || (g = Array.prototype.slice.call(c, 0, m)), g[m] = c[m]);
205
- return s.concat(g || Array.prototype.slice.call(c));
206
- }, Z = function(s) {
207
- return this instanceof Z ? (this.v = s, this) : new Z(s);
208
- }, q = function(s, c, p) {
209
- if (!Symbol.asyncIterator)
210
- throw new TypeError("Symbol.asyncIterator is not defined.");
211
- var m = p.apply(s, c || []), T, g = [];
212
- return T = {}, x("next"), x("throw"), x("return"), T[Symbol.asyncIterator] = function() {
213
- return this;
214
- }, T;
215
- function x(J) {
216
- m[J] && (T[J] = function(me) {
217
- return new Promise(function(t, e) {
218
- g.push([J, me, t, e]) > 1 || H(J, me);
219
- });
220
- });
221
- }
222
- function H(J, me) {
223
- try {
224
- Y(m[J](me));
225
- } catch (t) {
226
- G(g[0][3], t);
227
- }
228
- }
229
- function Y(J) {
230
- J.value instanceof Z ? Promise.resolve(J.value.v).then(P, $) : G(g[0][2], J);
231
- }
232
- function P(J) {
233
- H("next", J);
234
- }
235
- function $(J) {
236
- H("throw", J);
237
- }
238
- function G(J, me) {
239
- J(me), g.shift(), g.length && H(g[0][0], g[0][1]);
240
- }
241
- }, W = function(s) {
242
- var c, p;
243
- return c = {}, m("next"), m("throw", function(T) {
244
- throw T;
245
- }), m("return"), c[Symbol.iterator] = function() {
246
- return this;
247
- }, c;
248
- function m(T, g) {
249
- c[T] = s[T] ? function(x) {
250
- return (p = !p) ? { value: Z(s[T](x)), done: T === "return" } : g ? g(x) : x;
251
- } : g;
252
- }
253
- }, te = function(s) {
254
- if (!Symbol.asyncIterator)
255
- throw new TypeError("Symbol.asyncIterator is not defined.");
256
- var c = s[Symbol.asyncIterator], p;
257
- return c ? c.call(s) : (s = typeof E == "function" ? E(s) : s[Symbol.iterator](), p = {}, m("next"), m("throw"), m("return"), p[Symbol.asyncIterator] = function() {
258
- return this;
259
- }, p);
260
- function m(g) {
261
- p[g] = s[g] && function(x) {
262
- return new Promise(function(H, Y) {
263
- x = s[g](x), T(H, Y, x.done, x.value);
264
- });
265
- };
266
- }
267
- function T(g, x, H, Y) {
268
- Promise.resolve(Y).then(function(P) {
269
- g({ value: P, done: H });
270
- }, x);
271
- }
272
- }, re = function(s, c) {
273
- return Object.defineProperty ? Object.defineProperty(s, "raw", { value: c }) : s.raw = c, s;
274
- };
275
- var ne = Object.create ? function(s, c) {
276
- Object.defineProperty(s, "default", { enumerable: !0, value: c });
277
- } : function(s, c) {
278
- s.default = c;
279
- };
280
- he = function(s) {
281
- if (s && s.__esModule)
282
- return s;
283
- var c = {};
284
- if (s != null)
285
- for (var p in s)
286
- p !== "default" && Object.prototype.hasOwnProperty.call(s, p) && ae(c, s, p);
287
- return ne(c, s), c;
288
- }, le = function(s) {
289
- return s && s.__esModule ? s : { default: s };
290
- }, ce = function(s, c, p, m) {
291
- if (p === "a" && !m)
292
- throw new TypeError("Private accessor was defined without a getter");
293
- if (typeof c == "function" ? s !== c || !m : !c.has(s))
294
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
295
- return p === "m" ? m : p === "a" ? m.call(s) : m ? m.value : c.get(s);
296
- }, ue = function(s, c, p, m, T) {
297
- if (m === "m")
298
- throw new TypeError("Private method is not writable");
299
- if (m === "a" && !T)
300
- throw new TypeError("Private accessor was defined without a setter");
301
- if (typeof c == "function" ? s !== c || !T : !c.has(s))
302
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
303
- return m === "a" ? T.call(s, p) : T ? T.value = p : c.set(s, p), p;
304
- }, Q = function(s, c) {
305
- if (c === null || typeof c != "object" && typeof c != "function")
306
- throw new TypeError("Cannot use 'in' operator on non-object");
307
- return typeof s == "function" ? c === s : s.has(c);
308
- }, D("__extends", M), D("__assign", l), D("__rest", S), D("__decorate", R), D("__param", O), D("__metadata", N), D("__awaiter", B), D("__generator", U), D("__exportStar", C), D("__createBinding", ae), D("__values", E), D("__read", K), D("__spread", V), D("__spreadArrays", I), D("__spreadArray", z), D("__await", Z), D("__asyncGenerator", q), D("__asyncDelegator", W), D("__asyncValues", te), D("__makeTemplateObject", re), D("__importStar", he), D("__importDefault", le), D("__classPrivateFieldGet", ce), D("__classPrivateFieldSet", ue), D("__classPrivateFieldIn", Q);
309
- });
310
- })(Ie);
311
- var Fe;
312
- Object.defineProperty(Te, "__esModule", { value: !0 });
313
- var Ue = Ie.exports, f = Be;
314
- function Ke(y) {
315
- if (y && y.__esModule)
316
- return y;
317
- var M = /* @__PURE__ */ Object.create(null);
318
- return y && Object.keys(y).forEach(function(l) {
319
- if (l !== "default") {
320
- var S = Object.getOwnPropertyDescriptor(y, l);
321
- Object.defineProperty(M, l, S.get ? S : { enumerable: !0, get: function() {
322
- return y[l];
323
- } });
324
- }
325
- }), M.default = y, Object.freeze(M);
326
- }
327
- var Oe = Ke(f), He = function() {
328
- function y(t) {
329
- f.Loader.call(this, t), this.dracoLoader = null, this.ddsLoader = null;
330
- }
331
- function M() {
332
- var t = {};
333
- return { get: function(e) {
334
- return t[e];
335
- }, add: function(e, a) {
336
- t[e] = a;
337
- }, remove: function(e) {
338
- delete t[e];
339
- }, removeAll: function() {
340
- t = {};
341
- } };
342
- }
343
- y.prototype = Object.assign(Object.create(f.Loader.prototype), { constructor: y, load: function(t, e, a, r) {
344
- var i, n = this;
345
- i = this.resourcePath !== "" ? this.resourcePath : this.path !== "" ? this.path : f.LoaderUtils.extractUrlBase(t), n.manager.itemStart(t);
346
- var u = function(h) {
347
- r ? r(h) : console.error(h), n.manager.itemError(t), n.manager.itemEnd(t);
348
- }, o = new f.FileLoader(n.manager);
349
- o.setPath(this.path), o.setResponseType("arraybuffer"), o.setRequestHeader(this.requestHeader), n.crossOrigin === "use-credentials" && o.setWithCredentials(!0), o.load(t, function(h) {
350
- try {
351
- n.parse(h, i, function(d) {
352
- e(d), n.manager.itemEnd(t);
353
- }, u);
354
- } catch (d) {
355
- u(d);
356
- }
357
- }, a, u);
358
- }, setDRACOLoader: function(t) {
359
- return this.dracoLoader = t, this;
360
- }, setDDSLoader: function(t) {
361
- return this.ddsLoader = t, this;
362
- }, parse: function(t, e, a, r) {
363
- var i, n = {};
364
- if (typeof t == "string")
365
- i = t;
366
- else if (f.LoaderUtils.decodeText(new Uint8Array(t, 0, 4)) === B) {
367
- try {
368
- n[l.KHR_BINARY_GLTF] = new E(t);
369
- } catch (v) {
370
- return void (r && r(v));
371
- }
372
- i = n[l.KHR_BINARY_GLTF].content;
373
- } else
374
- i = f.LoaderUtils.decodeText(new Uint8Array(t));
375
- var u = JSON.parse(i);
376
- if (u.asset === void 0 || u.asset.version[0] < 2)
377
- r && r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
378
- else {
379
- if (u.extensionsUsed)
380
- for (var o = 0; o < u.extensionsUsed.length; ++o) {
381
- var h = u.extensionsUsed[o], d = u.extensionsRequired || [];
382
- switch (h) {
383
- case l.KHR_LIGHTS_PUNCTUAL:
384
- n[h] = new R(u);
385
- break;
386
- case l.KHR_MATERIALS_CLEARCOAT:
387
- n[h] = new N();
388
- break;
389
- case l.KHR_MATERIALS_UNLIT:
390
- n[h] = new O();
391
- break;
392
- case l.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:
393
- n[h] = new z();
394
- break;
395
- case l.KHR_DRACO_MESH_COMPRESSION:
396
- n[h] = new K(u, this.dracoLoader);
397
- break;
398
- case l.MSFT_TEXTURE_DDS:
399
- n[h] = new S(this.ddsLoader);
400
- break;
401
- case l.KHR_TEXTURE_TRANSFORM:
402
- n[h] = new V();
403
- break;
404
- case l.KHR_MESH_QUANTIZATION:
405
- n[h] = new Z();
406
- break;
407
- default:
408
- d.indexOf(h) >= 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + h + '".');
409
- }
410
- }
411
- var _ = new G(u, n, { path: e || this.resourcePath || "", crossOrigin: this.crossOrigin, manager: this.manager });
412
- _.fileLoader.setRequestHeader(this.requestHeader), _.parse(a, r);
413
- }
414
- } });
415
- var l = { 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_UNLIT: "KHR_materials_unlit", KHR_TEXTURE_TRANSFORM: "KHR_texture_transform", KHR_MESH_QUANTIZATION: "KHR_mesh_quantization", MSFT_TEXTURE_DDS: "MSFT_texture_dds" };
416
- function S(t) {
417
- if (!t)
418
- throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");
419
- this.name = l.MSFT_TEXTURE_DDS, this.ddsLoader = t;
420
- }
421
- function R(t) {
422
- this.name = l.KHR_LIGHTS_PUNCTUAL;
423
- var e = t.extensions && t.extensions[l.KHR_LIGHTS_PUNCTUAL] || {};
424
- this.lightDefs = e.lights || [];
425
- }
426
- function O() {
427
- this.name = l.KHR_MATERIALS_UNLIT;
428
- }
429
- function N() {
430
- this.name = l.KHR_MATERIALS_CLEARCOAT;
431
- }
432
- R.prototype.loadLight = function(t) {
433
- var e, a = this.lightDefs[t], r = new f.Color(16777215);
434
- a.color !== void 0 && r.fromArray(a.color);
435
- var i = a.range !== void 0 ? a.range : 0;
436
- switch (a.type) {
437
- case "directional":
438
- (e = new f.DirectionalLight(r)).target.position.set(0, 0, -1), e.add(e.target);
439
- break;
440
- case "point":
441
- (e = new f.PointLight(r)).distance = i;
442
- break;
443
- case "spot":
444
- (e = new f.SpotLight(r)).distance = i, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, e.angle = a.spot.outerConeAngle, e.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, e.target.position.set(0, 0, -1), e.add(e.target);
445
- break;
446
- default:
447
- throw new Error('THREE.GLTFLoader: Unexpected light type, "' + a.type + '".');
448
- }
449
- return e.position.set(0, 0, 0), e.decay = 2, a.intensity !== void 0 && (e.intensity = a.intensity), e.name = a.name || "light_" + t, Promise.resolve(e);
450
- }, O.prototype.getMaterialType = function() {
451
- return f.MeshBasicMaterial;
452
- }, O.prototype.extendParams = function(t, e, a) {
453
- var r = [];
454
- t.color = new f.Color(1, 1, 1), t.opacity = 1;
455
- var i = e.pbrMetallicRoughness;
456
- if (i) {
457
- if (Array.isArray(i.baseColorFactor)) {
458
- var n = i.baseColorFactor;
459
- t.color.fromArray(n), t.opacity = n[3];
460
- }
461
- i.baseColorTexture !== void 0 && r.push(a.assignTexture(t, "map", i.baseColorTexture));
462
- }
463
- return Promise.all(r);
464
- }, N.prototype.getMaterialType = function() {
465
- return f.MeshPhysicalMaterial;
466
- }, N.prototype.extendParams = function(t, e, a) {
467
- var r = [], i = e.extensions[this.name];
468
- if (i.clearcoatFactor !== void 0 && (t.clearcoat = i.clearcoatFactor), i.clearcoatTexture !== void 0 && r.push(a.assignTexture(t, "clearcoatMap", i.clearcoatTexture)), i.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = i.clearcoatRoughnessFactor), i.clearcoatRoughnessTexture !== void 0 && r.push(a.assignTexture(t, "clearcoatRoughnessMap", i.clearcoatRoughnessTexture)), i.clearcoatNormalTexture !== void 0 && (r.push(a.assignTexture(t, "clearcoatNormalMap", i.clearcoatNormalTexture)), i.clearcoatNormalTexture.scale !== void 0)) {
469
- var n = i.clearcoatNormalTexture.scale;
470
- t.clearcoatNormalScale = new f.Vector2(n, n);
471
- }
472
- return Promise.all(r);
473
- };
474
- var B = "glTF", U = 1313821514, C = 5130562;
475
- function E(t) {
476
- this.name = l.KHR_BINARY_GLTF, this.content = null, this.body = null;
477
- var e = new DataView(t, 0, 12);
478
- if (this.header = { magic: f.LoaderUtils.decodeText(new Uint8Array(t.slice(0, 4))), version: e.getUint32(4, !0), length: e.getUint32(8, !0) }, this.header.magic !== B)
479
- throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
480
- if (this.header.version < 2)
481
- throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
482
- for (var a = new DataView(t, 12), r = 0; r < a.byteLength; ) {
483
- var i = a.getUint32(r, !0);
484
- r += 4;
485
- var n = a.getUint32(r, !0);
486
- if (r += 4, n === U) {
487
- var u = new Uint8Array(t, 12 + r, i);
488
- this.content = f.LoaderUtils.decodeText(u);
489
- } else if (n === C) {
490
- var o = 12 + r;
491
- this.body = t.slice(o, o + i);
492
- }
493
- r += i;
494
- }
495
- if (this.content === null)
496
- throw new Error("THREE.GLTFLoader: JSON content not found.");
497
- }
498
- function K(t, e) {
499
- if (!e)
500
- throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
501
- this.name = l.KHR_DRACO_MESH_COMPRESSION, this.json = t, this.dracoLoader = e, this.dracoLoader.preload();
502
- }
503
- function V() {
504
- this.name = l.KHR_TEXTURE_TRANSFORM;
505
- }
506
- function I(t) {
507
- f.MeshStandardMaterial.call(this), this.isGLTFSpecularGlossinessMaterial = !0;
508
- var e = ["#ifdef USE_SPECULARMAP", " uniform sampler2D specularMap;", "#endif"].join(`
509
- `), a = ["#ifdef USE_GLOSSINESSMAP", " uniform sampler2D glossinessMap;", "#endif"].join(`
510
- `), r = ["vec3 specularFactor = specular;", "#ifdef USE_SPECULARMAP", " vec4 texelSpecular = texture2D( specularMap, vUv );", " texelSpecular = sRGBToLinear( texelSpecular );", " // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture", " specularFactor *= texelSpecular.rgb;", "#endif"].join(`
511
- `), i = ["float glossinessFactor = glossiness;", "#ifdef USE_GLOSSINESSMAP", " vec4 texelGlossiness = texture2D( glossinessMap, vUv );", " // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture", " glossinessFactor *= texelGlossiness.a;", "#endif"].join(`
512
- `), n = ["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(`
513
- `), u = { specular: { value: new f.Color().setHex(16777215) }, glossiness: { value: 1 }, specularMap: { value: null }, glossinessMap: { value: null } };
514
- this._extraUniforms = u, this.onBeforeCompile = function(o) {
515
- for (var h in u)
516
- o.uniforms[h] = u[h];
517
- 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>", e), o.fragmentShader = o.fragmentShader.replace("#include <metalnessmap_pars_fragment>", a), o.fragmentShader = o.fragmentShader.replace("#include <roughnessmap_fragment>", r), o.fragmentShader = o.fragmentShader.replace("#include <metalnessmap_fragment>", i), o.fragmentShader = o.fragmentShader.replace("#include <lights_physical_fragment>", n);
518
- }, Object.defineProperties(this, { specular: { get: function() {
519
- return u.specular.value;
520
- }, set: function(o) {
521
- u.specular.value = o;
522
- } }, specularMap: { get: function() {
523
- return u.specularMap.value;
524
- }, set: function(o) {
525
- u.specularMap.value = o;
526
- } }, glossiness: { get: function() {
527
- return u.glossiness.value;
528
- }, set: function(o) {
529
- u.glossiness.value = o;
530
- } }, glossinessMap: { get: function() {
531
- return u.glossinessMap.value;
532
- }, set: function(o) {
533
- u.glossinessMap.value = o, o ? (this.defines.USE_GLOSSINESSMAP = "", this.defines.USE_ROUGHNESSMAP = "") : (delete this.defines.USE_ROUGHNESSMAP, delete this.defines.USE_GLOSSINESSMAP);
534
- } } }), delete this.metalness, delete this.roughness, delete this.metalnessMap, delete this.roughnessMap, this.setValues(t);
535
- }
536
- function z() {
537
- return { name: l.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() {
538
- return I;
539
- }, extendParams: function(t, e, a) {
540
- var r = e.extensions[this.name];
541
- t.color = new f.Color(1, 1, 1), t.opacity = 1;
542
- var i = [];
543
- if (Array.isArray(r.diffuseFactor)) {
544
- var n = r.diffuseFactor;
545
- t.color.fromArray(n), t.opacity = n[3];
546
- }
547
- if (r.diffuseTexture !== void 0 && i.push(a.assignTexture(t, "map", r.diffuseTexture)), t.emissive = new f.Color(0, 0, 0), t.glossiness = r.glossinessFactor !== void 0 ? r.glossinessFactor : 1, t.specular = new f.Color(1, 1, 1), Array.isArray(r.specularFactor) && t.specular.fromArray(r.specularFactor), r.specularGlossinessTexture !== void 0) {
548
- var u = r.specularGlossinessTexture;
549
- i.push(a.assignTexture(t, "glossinessMap", u)), i.push(a.assignTexture(t, "specularMap", u));
550
- }
551
- return Promise.all(i);
552
- }, createMaterial: function(t) {
553
- var e = new I(t);
554
- return e.fog = !0, e.color = t.color, e.map = t.map === void 0 ? null : t.map, e.lightMap = null, e.lightMapIntensity = 1, e.aoMap = t.aoMap === void 0 ? null : t.aoMap, e.aoMapIntensity = 1, e.emissive = t.emissive, e.emissiveIntensity = 1, e.emissiveMap = t.emissiveMap === void 0 ? null : t.emissiveMap, e.bumpMap = t.bumpMap === void 0 ? null : t.bumpMap, e.bumpScale = 1, e.normalMap = t.normalMap === void 0 ? null : t.normalMap, e.normalMapType = f.TangentSpaceNormalMap, t.normalScale && (e.normalScale = t.normalScale), e.displacementMap = null, e.displacementScale = 1, e.displacementBias = 0, e.specularMap = t.specularMap === void 0 ? null : t.specularMap, e.specular = t.specular, e.glossinessMap = t.glossinessMap === void 0 ? null : t.glossinessMap, e.glossiness = t.glossiness, e.alphaMap = null, e.envMap = t.envMap === void 0 ? null : t.envMap, e.envMapIntensity = 1, e.refractionRatio = 0.98, e;
555
- } };
556
- }
557
- function Z() {
558
- this.name = l.KHR_MESH_QUANTIZATION;
559
- }
560
- function q(t, e, a, r) {
561
- f.Interpolant.call(this, t, e, a, r);
562
- }
563
- K.prototype.decodePrimitive = function(t, e) {
564
- var a = this.json, r = this.dracoLoader, i = t.extensions[this.name].bufferView, n = t.extensions[this.name].attributes, u = {}, o = {}, h = {};
565
- for (var d in n) {
566
- var _ = ne[d] || d.toLowerCase();
567
- u[_] = n[d];
568
- }
569
- for (d in t.attributes)
570
- if (_ = ne[d] || d.toLowerCase(), n[d] !== void 0) {
571
- var v = a.accessors[t.attributes[d]], b = Q[v.componentType];
572
- h[_] = b, o[_] = v.normalized === !0;
573
- }
574
- return e.getDependency("bufferView", i).then(function(A) {
575
- return new Promise(function(L) {
576
- r.decodeDracoFile(A, function(w) {
577
- for (var j in w.attributes) {
578
- var k = w.attributes[j], F = o[j];
579
- F !== void 0 && (k.normalized = F);
580
- }
581
- L(w);
582
- }, u, h);
583
- });
584
- });
585
- }, V.prototype.extendTexture = function(t, e) {
586
- return t = t.clone(), e.offset !== void 0 && t.offset.fromArray(e.offset), e.rotation !== void 0 && (t.rotation = e.rotation), e.scale !== void 0 && t.repeat.fromArray(e.scale), e.texCoord !== void 0 && console.warn('THREE.GLTFLoader: Custom UV sets in "' + this.name + '" extension not yet supported.'), t.needsUpdate = !0, t;
587
- }, I.prototype = Object.create(f.MeshStandardMaterial.prototype), I.prototype.constructor = I, I.prototype.copy = function(t) {
588
- return f.MeshStandardMaterial.prototype.copy.call(this, t), this.specularMap = t.specularMap, this.specular.copy(t.specular), this.glossinessMap = t.glossinessMap, this.glossiness = t.glossiness, delete this.metalness, delete this.roughness, delete this.metalnessMap, delete this.roughnessMap, this;
589
- }, q.prototype = Object.create(f.Interpolant.prototype), q.prototype.constructor = q, q.prototype.copySampleValue_ = function(t) {
590
- for (var e = this.resultBuffer, a = this.sampleValues, r = this.valueSize, i = t * r * 3 + r, n = 0; n !== r; n++)
591
- e[n] = a[i + n];
592
- return e;
593
- }, q.prototype.beforeStart_ = q.prototype.copySampleValue_, q.prototype.afterEnd_ = q.prototype.copySampleValue_, q.prototype.interpolate_ = function(t, e, a, r) {
594
- for (var i = this.resultBuffer, n = this.sampleValues, u = this.valueSize, o = 2 * u, h = 3 * u, d = r - e, _ = (a - e) / d, v = _ * _, b = v * _, A = t * h, L = A - h, w = -2 * b + 3 * v, j = b - v, k = 1 - w, F = j - v + _, X = 0; X !== u; X++) {
595
- var fe = n[L + X + u], ie = n[L + X + o] * d, ee = n[A + X + u], pe = n[A + X] * d;
596
- i[X] = k * fe + F * ie + w * ee + j * pe;
597
- }
598
- return i;
599
- };
600
- var W = 0, te = 1, re = 2, he = 3, le = 4, ce = 5, ue = 6, Q = { 5120: Int8Array, 5121: Uint8Array, 5122: Int16Array, 5123: Uint16Array, 5125: Uint32Array, 5126: Float32Array }, ae = { 9728: f.NearestFilter, 9729: f.LinearFilter, 9984: f.NearestMipmapNearestFilter, 9985: f.LinearMipmapNearestFilter, 9986: f.NearestMipmapLinearFilter, 9987: f.LinearMipmapLinearFilter }, D = { 33071: f.ClampToEdgeWrapping, 33648: f.MirroredRepeatWrapping, 10497: f.RepeatWrapping }, se = { SCALAR: 1, VEC2: 2, VEC3: 3, VEC4: 4, MAT2: 4, MAT3: 9, MAT4: 16 }, ne = { POSITION: "position", NORMAL: "normal", TANGENT: "tangent", TEXCOORD_0: "uv", TEXCOORD_1: "uv2", COLOR_0: "color", WEIGHTS_0: "skinWeight", JOINTS_0: "skinIndex" }, s = { scale: "scale", translation: "position", rotation: "quaternion", weights: "morphTargetInfluences" }, c = { CUBICSPLINE: void 0, LINEAR: f.InterpolateLinear, STEP: f.InterpolateDiscrete }, p = "OPAQUE", m = "MASK", T = "BLEND", g = { "image/png": f.RGBAFormat, "image/jpeg": f.RGBFormat };
601
- function x(t, e) {
602
- return typeof t != "string" || t === "" ? "" : (/^https?:\/\//i.test(e) && /^\//.test(t) && (e = e.replace(/(^https?:\/\/[^\/]+).*/i, "$1")), /^(https?:)?\/\//i.test(t) || /^data:.*,.*$/i.test(t) || /^blob:.*$/i.test(t) ? t : e + t);
603
- }
604
- function H(t, e, a) {
605
- for (var r in a.extensions)
606
- t[r] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[r] = a.extensions[r]);
607
- }
608
- function Y(t, e) {
609
- e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(t.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
610
- }
611
- function P(t, e) {
612
- if (t.updateMorphTargets(), e.weights !== void 0)
613
- for (var a = 0, r = e.weights.length; a < r; a++)
614
- t.morphTargetInfluences[a] = e.weights[a];
615
- if (e.extras && Array.isArray(e.extras.targetNames)) {
616
- var i = e.extras.targetNames;
617
- if (t.morphTargetInfluences.length === i.length)
618
- for (t.morphTargetDictionary = {}, a = 0, r = i.length; a < r; a++)
619
- t.morphTargetDictionary[i[a]] = a;
620
- else
621
- console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
622
- }
623
- }
624
- function $(t) {
625
- for (var e = "", a = Object.keys(t).sort(), r = 0, i = a.length; r < i; r++)
626
- e += a[r] + ":" + t[a[r]] + ";";
627
- return e;
628
- }
629
- function G(t, e, a) {
630
- this.json = t || {}, this.extensions = e || {}, this.options = a || {}, this.cache = new M(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.textureLoader = new f.TextureLoader(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.fileLoader = new f.FileLoader(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
631
- }
632
- function J(t, e, a) {
633
- var r = e.attributes, i = [];
634
- function n(d, _) {
635
- return a.getDependency("accessor", d).then(function(v) {
636
- t.setAttribute(_, v);
637
- });
638
- }
639
- for (var u in r) {
640
- var o = ne[u] || u.toLowerCase();
641
- o in t.attributes || i.push(n(r[u], o));
642
- }
643
- if (e.indices !== void 0 && !t.index) {
644
- var h = a.getDependency("accessor", e.indices).then(function(d) {
645
- t.setIndex(d);
646
- });
647
- i.push(h);
648
- }
649
- return Y(t, e), function(d, _, v) {
650
- var b = _.attributes, A = new f.Box3();
651
- if (b.POSITION !== void 0) {
652
- var L = (ie = v.json.accessors[b.POSITION]).min, w = ie.max;
653
- if (L !== void 0 && w !== void 0) {
654
- A.set(new f.Vector3(L[0], L[1], L[2]), new f.Vector3(w[0], w[1], w[2]));
655
- var j = _.targets;
656
- if (j !== void 0) {
657
- for (var k = new f.Vector3(), F = new f.Vector3(), X = 0, fe = j.length; X < fe; X++) {
658
- var ie, ee = j[X];
659
- ee.POSITION !== void 0 && (L = (ie = v.json.accessors[ee.POSITION]).min, w = ie.max, L !== void 0 && w !== void 0 ? (F.setX(Math.max(Math.abs(L[0]), Math.abs(w[0]))), F.setY(Math.max(Math.abs(L[1]), Math.abs(w[1]))), F.setZ(Math.max(Math.abs(L[2]), Math.abs(w[2]))), k.max(F)) : console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION."));
660
- }
661
- A.expandByVector(k);
662
- }
663
- d.boundingBox = A;
664
- var pe = new f.Sphere();
665
- A.getCenter(pe.center), pe.radius = A.min.distanceTo(A.max) / 2, d.boundingSphere = pe;
666
- } else
667
- console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
668
- }
669
- }(t, e, a), Promise.all(i).then(function() {
670
- return e.targets !== void 0 ? function(d, _, v) {
671
- for (var b = !1, A = !1, L = 0, w = _.length; L < w && ((F = _[L]).POSITION !== void 0 && (b = !0), F.NORMAL !== void 0 && (A = !0), !b || !A); L++)
672
- ;
673
- if (!b && !A)
674
- return Promise.resolve(d);
675
- var j = [], k = [];
676
- for (L = 0, w = _.length; L < w; L++) {
677
- var F = _[L];
678
- if (b) {
679
- var X = F.POSITION !== void 0 ? v.getDependency("accessor", F.POSITION) : d.attributes.position;
680
- j.push(X);
681
- }
682
- A && (X = F.NORMAL !== void 0 ? v.getDependency("accessor", F.NORMAL) : d.attributes.normal, k.push(X));
683
- }
684
- return Promise.all([Promise.all(j), Promise.all(k)]).then(function(fe) {
685
- var ie = fe[0], ee = fe[1];
686
- return b && (d.morphAttributes.position = ie), A && (d.morphAttributes.normal = ee), d.morphTargetsRelative = !0, d;
687
- });
688
- }(t, e.targets, a) : t;
689
- });
690
- }
691
- function me(t, e) {
692
- var a = t.getIndex();
693
- if (a === null) {
694
- var r = [], i = t.getAttribute("position");
695
- if (i === void 0)
696
- return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), t;
697
- for (var n = 0; n < i.count; n++)
698
- r.push(n);
699
- t.setIndex(r), a = t.getIndex();
700
- }
701
- var u = a.count - 2, o = [];
702
- if (e === f.TriangleFanDrawMode)
703
- for (n = 1; n <= u; n++)
704
- o.push(a.getX(0)), o.push(a.getX(n)), o.push(a.getX(n + 1));
705
- else
706
- for (n = 0; n < u; n++)
707
- n % 2 == 0 ? (o.push(a.getX(n)), o.push(a.getX(n + 1)), o.push(a.getX(n + 2))) : (o.push(a.getX(n + 2)), o.push(a.getX(n + 1)), o.push(a.getX(n)));
708
- o.length / 3 !== u && console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
709
- var h = t.clone();
710
- return h.setIndex(o), h;
711
- }
712
- return G.prototype.parse = function(t, e) {
713
- var a = this, r = this.json, i = this.extensions;
714
- this.cache.removeAll(), this.markDefs(), Promise.all([this.getDependencies("scene"), this.getDependencies("animation"), this.getDependencies("camera")]).then(function(n) {
715
- var u = { scene: n[0][r.scene || 0], scenes: n[0], animations: n[1], cameras: n[2], asset: r.asset, parser: a, userData: {} };
716
- H(i, u, r), Y(u, r), t(u);
717
- }).catch(e);
718
- }, G.prototype.markDefs = function() {
719
- for (var t = this.json.nodes || [], e = this.json.skins || [], a = this.json.meshes || [], r = {}, i = {}, n = 0, u = e.length; n < u; n++)
720
- for (var o = e[n].joints, h = 0, d = o.length; h < d; h++)
721
- t[o[h]].isBone = !0;
722
- for (var _ = 0, v = t.length; _ < v; _++) {
723
- var b = t[_];
724
- b.mesh !== void 0 && (r[b.mesh] === void 0 && (r[b.mesh] = i[b.mesh] = 0), r[b.mesh]++, b.skin !== void 0 && (a[b.mesh].isSkinnedMesh = !0));
725
- }
726
- this.json.meshReferences = r, this.json.meshUses = i;
727
- }, G.prototype.getDependency = function(t, e) {
728
- var a = t + ":" + e, r = this.cache.get(a);
729
- if (!r) {
730
- switch (t) {
731
- case "scene":
732
- r = this.loadScene(e);
733
- break;
734
- case "node":
735
- r = this.loadNode(e);
736
- break;
737
- case "mesh":
738
- r = this.loadMesh(e);
739
- break;
740
- case "accessor":
741
- r = this.loadAccessor(e);
742
- break;
743
- case "bufferView":
744
- r = this.loadBufferView(e);
745
- break;
746
- case "buffer":
747
- r = this.loadBuffer(e);
748
- break;
749
- case "material":
750
- r = this.loadMaterial(e);
751
- break;
752
- case "texture":
753
- r = this.loadTexture(e);
754
- break;
755
- case "skin":
756
- r = this.loadSkin(e);
757
- break;
758
- case "animation":
759
- r = this.loadAnimation(e);
760
- break;
761
- case "camera":
762
- r = this.loadCamera(e);
763
- break;
764
- case "light":
765
- r = this.extensions[l.KHR_LIGHTS_PUNCTUAL].loadLight(e);
766
- break;
767
- default:
768
- throw new Error("Unknown type: " + t);
769
- }
770
- this.cache.add(a, r);
771
- }
772
- return r;
773
- }, G.prototype.getDependencies = function(t) {
774
- var e = this.cache.get(t);
775
- if (!e) {
776
- var a = this, r = this.json[t + (t === "mesh" ? "es" : "s")] || [];
777
- e = Promise.all(r.map(function(i, n) {
778
- return a.getDependency(t, n);
779
- })), this.cache.add(t, e);
780
- }
781
- return e;
782
- }, G.prototype.loadBuffer = function(t) {
783
- var e = this.json.buffers[t], a = this.fileLoader;
784
- if (e.type && e.type !== "arraybuffer")
785
- throw new Error("THREE.GLTFLoader: " + e.type + " buffer type is not supported.");
786
- if (e.uri === void 0 && t === 0)
787
- return Promise.resolve(this.extensions[l.KHR_BINARY_GLTF].body);
788
- var r = this.options;
789
- return new Promise(function(i, n) {
790
- a.load(x(e.uri, r.path), i, void 0, function() {
791
- n(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
792
- });
793
- });
794
- }, G.prototype.loadBufferView = function(t) {
795
- var e = this.json.bufferViews[t];
796
- return this.getDependency("buffer", e.buffer).then(function(a) {
797
- var r = e.byteLength || 0, i = e.byteOffset || 0;
798
- return a.slice(i, i + r);
799
- });
800
- }, G.prototype.loadAccessor = function(t) {
801
- var e = this, a = this.json, r = this.json.accessors[t];
802
- if (r.bufferView === void 0 && r.sparse === void 0)
803
- return Promise.resolve(null);
804
- var i = [];
805
- return r.bufferView !== void 0 ? i.push(this.getDependency("bufferView", r.bufferView)) : i.push(null), r.sparse !== void 0 && (i.push(this.getDependency("bufferView", r.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", r.sparse.values.bufferView))), Promise.all(i).then(function(n) {
806
- var u, o, h = n[0], d = se[r.type], _ = Q[r.componentType], v = _.BYTES_PER_ELEMENT, b = v * d, A = r.byteOffset || 0, L = r.bufferView !== void 0 ? a.bufferViews[r.bufferView].byteStride : void 0, w = r.normalized === !0;
807
- if (L && L !== b) {
808
- var j = Math.floor(A / L), k = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + j + ":" + r.count, F = e.cache.get(k);
809
- F || (u = new _(h, j * L, r.count * L / v), F = new f.InterleavedBuffer(u, L / v), e.cache.add(k, F)), o = new f.InterleavedBufferAttribute(F, d, A % L / v, w);
810
- } else
811
- u = h === null ? new _(r.count * d) : new _(h, A, r.count * d), o = new f.BufferAttribute(u, d, w);
812
- if (r.sparse !== void 0) {
813
- var X = se.SCALAR, fe = Q[r.sparse.indices.componentType], ie = r.sparse.indices.byteOffset || 0, ee = r.sparse.values.byteOffset || 0, pe = new fe(n[1], ie, r.sparse.count * X), de = new _(n[2], ee, r.sparse.count * d);
814
- h !== null && (o = new f.BufferAttribute(o.array.slice(), o.itemSize, o.normalized));
815
- for (var ve = 0, Se = pe.length; ve < Se; ve++) {
816
- var ye = pe[ve];
817
- if (o.setX(ye, de[ve * d]), d >= 2 && o.setY(ye, de[ve * d + 1]), d >= 3 && o.setZ(ye, de[ve * d + 2]), d >= 4 && o.setW(ye, de[ve * d + 3]), d >= 5)
818
- throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
819
- }
820
- }
821
- return o;
822
- });
823
- }, G.prototype.loadTexture = function(t) {
824
- var e, a = this, r = this.json, i = this.options, n = this.textureLoader, u = self.URL || self.webkitURL, o = r.textures[t], h = o.extensions || {}, d = (e = h[l.MSFT_TEXTURE_DDS] ? r.images[h[l.MSFT_TEXTURE_DDS].source] : r.images[o.source]).uri, _ = !1;
825
- return e.bufferView !== void 0 && (d = a.getDependency("bufferView", e.bufferView).then(function(v) {
826
- _ = !0;
827
- var b = new Blob([v], { type: e.mimeType });
828
- return d = u.createObjectURL(b);
829
- })), Promise.resolve(d).then(function(v) {
830
- var b = i.manager.getHandler(v);
831
- return b || (b = h[l.MSFT_TEXTURE_DDS] ? a.extensions[l.MSFT_TEXTURE_DDS].ddsLoader : n), new Promise(function(A, L) {
832
- b.load(x(v, i.path), A, void 0, L);
833
- });
834
- }).then(function(v) {
835
- _ === !0 && u.revokeObjectURL(d), v.flipY = !1, o.name && (v.name = o.name), e.mimeType in g && (v.format = g[e.mimeType]);
836
- var b = (r.samplers || {})[o.sampler] || {};
837
- return v.magFilter = ae[b.magFilter] || f.LinearFilter, v.minFilter = ae[b.minFilter] || f.LinearMipmapLinearFilter, v.wrapS = D[b.wrapS] || f.RepeatWrapping, v.wrapT = D[b.wrapT] || f.RepeatWrapping, a.associations.set(v, { type: "textures", index: t }), v;
838
- });
839
- }, G.prototype.assignTexture = function(t, e, a) {
840
- var r = this;
841
- return this.getDependency("texture", a.index).then(function(i) {
842
- if (!i.isCompressedTexture)
843
- switch (e) {
844
- case "aoMap":
845
- case "emissiveMap":
846
- case "metalnessMap":
847
- case "normalMap":
848
- case "roughnessMap":
849
- i.format = f.RGBFormat;
850
- }
851
- if (a.texCoord === void 0 || a.texCoord == 0 || e === "aoMap" && a.texCoord == 1 || console.warn("THREE.GLTFLoader: Custom UV set " + a.texCoord + " for texture " + e + " not yet supported."), r.extensions[l.KHR_TEXTURE_TRANSFORM]) {
852
- var n = a.extensions !== void 0 ? a.extensions[l.KHR_TEXTURE_TRANSFORM] : void 0;
853
- if (n) {
854
- var u = this.associations.get(i);
855
- i = r.extensions[l.KHR_TEXTURE_TRANSFORM].extendTexture(i, n), this.associations.set(i, u);
856
- }
857
- }
858
- t[e] = i;
859
- });
860
- }, G.prototype.assignFinalMaterial = function(t) {
861
- var e = t.geometry, a = t.material, r = e.attributes.tangent !== void 0, i = e.attributes.color !== void 0, n = e.attributes.normal === void 0, u = t.isSkinnedMesh === !0, o = Object.keys(e.morphAttributes).length > 0, h = o && e.morphAttributes.normal !== void 0;
862
- if (t.isPoints) {
863
- var d = "PointsMaterial:" + a.uuid, _ = this.cache.get(d);
864
- _ || (_ = new f.PointsMaterial(), f.Material.prototype.copy.call(_, a), _.color.copy(a.color), _.map = a.map, _.sizeAttenuation = !1, this.cache.add(d, _)), a = _;
865
- } else if (t.isLine) {
866
- d = "LineBasicMaterial:" + a.uuid;
867
- var v = this.cache.get(d);
868
- v || (v = new f.LineBasicMaterial(), f.Material.prototype.copy.call(v, a), v.color.copy(a.color), this.cache.add(d, v)), a = v;
869
- }
870
- if (r || i || n || u || o) {
871
- d = "ClonedMaterial:" + a.uuid + ":", a.isGLTFSpecularGlossinessMaterial && (d += "specular-glossiness:"), u && (d += "skinning:"), r && (d += "vertex-tangents:"), i && (d += "vertex-colors:"), n && (d += "flat-shading:"), o && (d += "morph-targets:"), h && (d += "morph-normals:");
872
- var b = this.cache.get(d);
873
- b || (b = a.clone(), u && (b.skinning = !0), r && (b.vertexTangents = !0), i && (b.vertexColors = !0), n && (b.flatShading = !0), o && (b.morphTargets = !0), h && (b.morphNormals = !0), this.cache.add(d, b), this.associations.set(b, this.associations.get(a))), a = b;
874
- }
875
- a.aoMap && e.attributes.uv2 === void 0 && e.attributes.uv !== void 0 && e.setAttribute("uv2", e.attributes.uv), a.normalScale && !r && (a.normalScale.y = -a.normalScale.y), a.clearcoatNormalScale && !r && (a.clearcoatNormalScale.y = -a.clearcoatNormalScale.y), t.material = a;
876
- }, G.prototype.loadMaterial = function(t) {
877
- var e, a = this, r = this.json, i = this.extensions, n = r.materials[t], u = {}, o = n.extensions || {}, h = [];
878
- if (o[l.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]) {
879
- var d = i[l.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];
880
- e = d.getMaterialType(), h.push(d.extendParams(u, n, a));
881
- } else if (o[l.KHR_MATERIALS_UNLIT]) {
882
- var _ = i[l.KHR_MATERIALS_UNLIT];
883
- e = _.getMaterialType(), h.push(_.extendParams(u, n, a));
884
- } else {
885
- e = f.MeshStandardMaterial;
886
- var v = n.pbrMetallicRoughness || {};
887
- if (u.color = new f.Color(1, 1, 1), u.opacity = 1, Array.isArray(v.baseColorFactor)) {
888
- var b = v.baseColorFactor;
889
- u.color.fromArray(b), u.opacity = b[3];
890
- }
891
- v.baseColorTexture !== void 0 && h.push(a.assignTexture(u, "map", v.baseColorTexture)), u.metalness = v.metallicFactor !== void 0 ? v.metallicFactor : 1, u.roughness = v.roughnessFactor !== void 0 ? v.roughnessFactor : 1, v.metallicRoughnessTexture !== void 0 && (h.push(a.assignTexture(u, "metalnessMap", v.metallicRoughnessTexture)), h.push(a.assignTexture(u, "roughnessMap", v.metallicRoughnessTexture)));
892
- }
893
- n.doubleSided === !0 && (u.side = f.DoubleSide);
894
- var A = n.alphaMode || p;
895
- if (A === T ? (u.transparent = !0, u.depthWrite = !1) : (u.transparent = !1, A === m && (u.alphaTest = n.alphaCutoff !== void 0 ? n.alphaCutoff : 0.5)), n.normalTexture !== void 0 && e !== f.MeshBasicMaterial && (h.push(a.assignTexture(u, "normalMap", n.normalTexture)), u.normalScale = new f.Vector2(1, 1), n.normalTexture.scale !== void 0 && u.normalScale.set(n.normalTexture.scale, n.normalTexture.scale)), n.occlusionTexture !== void 0 && e !== f.MeshBasicMaterial && (h.push(a.assignTexture(u, "aoMap", n.occlusionTexture)), n.occlusionTexture.strength !== void 0 && (u.aoMapIntensity = n.occlusionTexture.strength)), n.emissiveFactor !== void 0 && e !== f.MeshBasicMaterial && (u.emissive = new f.Color().fromArray(n.emissiveFactor)), n.emissiveTexture !== void 0 && e !== f.MeshBasicMaterial && h.push(a.assignTexture(u, "emissiveMap", n.emissiveTexture)), o[l.KHR_MATERIALS_CLEARCOAT]) {
896
- var L = i[l.KHR_MATERIALS_CLEARCOAT];
897
- e = L.getMaterialType(), h.push(L.extendParams(u, { extensions: o }, a));
898
- }
899
- return Promise.all(h).then(function() {
900
- var w;
901
- return w = e === I ? i[l.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(u) : new e(u), n.name && (w.name = n.name), w.map && (w.map.encoding = f.sRGBEncoding), w.emissiveMap && (w.emissiveMap.encoding = f.sRGBEncoding), Y(w, n), a.associations.set(w, { type: "materials", index: t }), n.extensions && H(i, w, n), w;
902
- });
903
- }, G.prototype.loadGeometries = function(t) {
904
- var e = this, a = this.extensions, r = this.primitiveCache;
905
- function i(L) {
906
- return a[l.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(L, e).then(function(w) {
907
- return J(w, L, e);
908
- });
909
- }
910
- for (var n, u, o = [], h = 0, d = t.length; h < d; h++) {
911
- var _, v = t[h], b = (u = void 0, (u = (n = v).extensions && n.extensions[l.KHR_DRACO_MESH_COMPRESSION]) ? "draco:" + u.bufferView + ":" + u.indices + ":" + $(u.attributes) : n.indices + ":" + $(n.attributes) + ":" + n.mode), A = r[b];
912
- A ? o.push(A.promise) : (_ = v.extensions && v.extensions[l.KHR_DRACO_MESH_COMPRESSION] ? i(v) : J(new f.BufferGeometry(), v, e), r[b] = { primitive: v, promise: _ }, o.push(_));
913
- }
914
- return Promise.all(o);
915
- }, G.prototype.loadMesh = function(t) {
916
- for (var e, a = this, r = this.json.meshes[t], i = r.primitives, n = [], u = 0, o = i.length; u < o; u++) {
917
- var h = i[u].material === void 0 ? ((e = this.cache).DefaultMaterial === void 0 && (e.DefaultMaterial = new f.MeshStandardMaterial({ color: 16777215, emissive: 0, metalness: 1, roughness: 1, transparent: !1, depthTest: !0, side: f.FrontSide })), e.DefaultMaterial) : this.getDependency("material", i[u].material);
918
- n.push(h);
919
- }
920
- return n.push(a.loadGeometries(i)), Promise.all(n).then(function(d) {
921
- for (var _ = d.slice(0, d.length - 1), v = d[d.length - 1], b = [], A = 0, L = v.length; A < L; A++) {
922
- var w, j = v[A], k = i[A], F = _[A];
923
- if (k.mode === le || k.mode === ce || k.mode === ue || k.mode === void 0)
924
- (w = r.isSkinnedMesh === !0 ? new f.SkinnedMesh(j, F) : new f.Mesh(j, F)).isSkinnedMesh !== !0 || w.geometry.attributes.skinWeight.normalized || w.normalizeSkinWeights(), k.mode === ce ? w.geometry = me(w.geometry, f.TriangleStripDrawMode) : k.mode === ue && (w.geometry = me(w.geometry, f.TriangleFanDrawMode));
925
- else if (k.mode === te)
926
- w = new f.LineSegments(j, F);
927
- else if (k.mode === he)
928
- w = new f.Line(j, F);
929
- else if (k.mode === re)
930
- w = new f.LineLoop(j, F);
931
- else {
932
- if (k.mode !== W)
933
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + k.mode);
934
- w = new f.Points(j, F);
935
- }
936
- Object.keys(w.geometry.morphAttributes).length > 0 && P(w, r), w.name = r.name || "mesh_" + t, v.length > 1 && (w.name += "_" + A), Y(w, r), a.assignFinalMaterial(w), b.push(w);
937
- }
938
- if (b.length === 1)
939
- return b[0];
940
- var X = new f.Group();
941
- for (A = 0, L = b.length; A < L; A++)
942
- X.add(b[A]);
943
- return X;
944
- });
945
- }, G.prototype.loadCamera = function(t) {
946
- var e, a = this.json.cameras[t], r = a[a.type];
947
- if (r)
948
- return a.type === "perspective" ? e = new f.PerspectiveCamera(f.MathUtils.radToDeg(r.yfov), r.aspectRatio || 1, r.znear || 1, r.zfar || 2e6) : a.type === "orthographic" && (e = new f.OrthographicCamera(-r.xmag, r.xmag, r.ymag, -r.ymag, r.znear, r.zfar)), a.name && (e.name = a.name), Y(e, a), Promise.resolve(e);
949
- console.warn("THREE.GLTFLoader: Missing camera parameters.");
950
- }, G.prototype.loadSkin = function(t) {
951
- var e = this.json.skins[t], a = { joints: e.joints };
952
- return e.inverseBindMatrices === void 0 ? Promise.resolve(a) : this.getDependency("accessor", e.inverseBindMatrices).then(function(r) {
953
- return a.inverseBindMatrices = r, a;
954
- });
955
- }, G.prototype.loadAnimation = function(t) {
956
- for (var e = this.json.animations[t], a = [], r = [], i = [], n = [], u = [], o = 0, h = e.channels.length; o < h; o++) {
957
- var d = e.channels[o], _ = e.samplers[d.sampler], v = d.target, b = v.node !== void 0 ? v.node : v.id, A = e.parameters !== void 0 ? e.parameters[_.input] : _.input, L = e.parameters !== void 0 ? e.parameters[_.output] : _.output;
958
- a.push(this.getDependency("node", b)), r.push(this.getDependency("accessor", A)), i.push(this.getDependency("accessor", L)), n.push(_), u.push(v);
959
- }
960
- return Promise.all([Promise.all(a), Promise.all(r), Promise.all(i), Promise.all(n), Promise.all(u)]).then(function(w) {
961
- for (var j = w[0], k = w[1], F = w[2], X = w[3], fe = w[4], ie = [], ee = 0, pe = j.length; ee < pe; ee++) {
962
- var de = j[ee], ve = k[ee], Se = F[ee], ye = X[ee], Le = fe[ee];
963
- if (de !== void 0) {
964
- var Re;
965
- switch (de.updateMatrix(), de.matrixAutoUpdate = !0, s[Le.path]) {
966
- case s.weights:
967
- Re = f.NumberKeyframeTrack;
968
- break;
969
- case s.rotation:
970
- Re = f.QuaternionKeyframeTrack;
971
- break;
972
- case s.position:
973
- case s.scale:
974
- default:
975
- Re = f.VectorKeyframeTrack;
976
- }
977
- var Ge = de.name ? de.name : de.uuid, ke = ye.interpolation !== void 0 ? c[ye.interpolation] : f.InterpolateLinear, Me = [];
978
- s[Le.path] === s.weights ? de.traverse(function(be) {
979
- be.isMesh === !0 && be.morphTargetInfluences && Me.push(be.name ? be.name : be.uuid);
980
- }) : Me.push(Ge);
981
- var ge = Se.array;
982
- if (Se.normalized) {
983
- var we;
984
- if (ge.constructor === Int8Array)
985
- we = 1 / 127;
986
- else if (ge.constructor === Uint8Array)
987
- we = 1 / 255;
988
- else if (ge.constructor == Int16Array)
989
- we = 1 / 32767;
990
- else {
991
- if (ge.constructor !== Uint16Array)
992
- throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");
993
- we = 1 / 65535;
994
- }
995
- for (var Ce = new Float32Array(ge.length), _e = 0, Ee = ge.length; _e < Ee; _e++)
996
- Ce[_e] = ge[_e] * we;
997
- ge = Ce;
998
- }
999
- for (_e = 0, Ee = Me.length; _e < Ee; _e++) {
1000
- var xe = new Re(Me[_e] + "." + s[Le.path], ve.array, ge, ke);
1001
- ye.interpolation === "CUBICSPLINE" && (xe.createInterpolant = function(be) {
1002
- return new q(this.times, this.values, this.getValueSize() / 3, be);
1003
- }, xe.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0), ie.push(xe);
1004
- }
1005
- }
1006
- }
1007
- var Ne = e.name ? e.name : "animation_" + t;
1008
- return new f.AnimationClip(Ne, void 0, ie);
1009
- });
1010
- }, G.prototype.loadNode = function(t) {
1011
- var e, a = this.json, r = this.extensions, i = this, n = a.meshReferences, u = a.meshUses, o = a.nodes[t];
1012
- return (e = [], o.mesh !== void 0 && e.push(i.getDependency("mesh", o.mesh).then(function(h) {
1013
- var d;
1014
- if (n[o.mesh] > 1) {
1015
- var _ = u[o.mesh]++;
1016
- (d = h.clone()).name += "_instance_" + _;
1017
- } else
1018
- d = h;
1019
- return o.weights !== void 0 && d.traverse(function(v) {
1020
- if (v.isMesh)
1021
- for (var b = 0, A = o.weights.length; b < A; b++)
1022
- v.morphTargetInfluences[b] = o.weights[b];
1023
- }), d;
1024
- })), o.camera !== void 0 && e.push(i.getDependency("camera", o.camera)), o.extensions && o.extensions[l.KHR_LIGHTS_PUNCTUAL] && o.extensions[l.KHR_LIGHTS_PUNCTUAL].light !== void 0 && e.push(i.getDependency("light", o.extensions[l.KHR_LIGHTS_PUNCTUAL].light)), Promise.all(e)).then(function(h) {
1025
- var d;
1026
- if ((d = o.isBone === !0 ? new f.Bone() : h.length > 1 ? new f.Group() : h.length === 1 ? h[0] : new f.Object3D()) !== h[0])
1027
- for (var _ = 0, v = h.length; _ < v; _++)
1028
- d.add(h[_]);
1029
- if (o.name && (d.userData.name = o.name, d.name = f.PropertyBinding.sanitizeNodeName(o.name)), Y(d, o), o.extensions && H(r, d, o), o.matrix !== void 0) {
1030
- var b = new f.Matrix4();
1031
- b.fromArray(o.matrix), d.applyMatrix4(b);
1032
- } else
1033
- o.translation !== void 0 && d.position.fromArray(o.translation), o.rotation !== void 0 && d.quaternion.fromArray(o.rotation), o.scale !== void 0 && d.scale.fromArray(o.scale);
1034
- return i.associations.set(d, { type: "nodes", index: t }), d;
1035
- });
1036
- }, G.prototype.loadScene = function() {
1037
- function t(e, a, r, i) {
1038
- var n = r.nodes[e];
1039
- return i.getDependency("node", e).then(function(u) {
1040
- return n.skin === void 0 ? u : i.getDependency("skin", n.skin).then(function(h) {
1041
- for (var d = [], _ = 0, v = (o = h).joints.length; _ < v; _++)
1042
- d.push(i.getDependency("node", o.joints[_]));
1043
- return Promise.all(d);
1044
- }).then(function(h) {
1045
- return u.traverse(function(d) {
1046
- if (d.isMesh) {
1047
- for (var _ = [], v = [], b = 0, A = h.length; b < A; b++) {
1048
- var L = h[b];
1049
- if (L) {
1050
- _.push(L);
1051
- var w = new f.Matrix4();
1052
- o.inverseBindMatrices !== void 0 && w.fromArray(o.inverseBindMatrices.array, 16 * b), v.push(w);
1053
- } else
1054
- console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', o.joints[b]);
1055
- }
1056
- d.bind(new f.Skeleton(_, v), d.matrixWorld);
1057
- }
1058
- }), u;
1059
- });
1060
- var o;
1061
- }).then(function(u) {
1062
- a.add(u);
1063
- var o = [];
1064
- if (n.children)
1065
- for (var h = n.children, d = 0, _ = h.length; d < _; d++) {
1066
- var v = h[d];
1067
- o.push(t(v, u, r, i));
1068
- }
1069
- return Promise.all(o);
1070
- });
1071
- }
1072
- return function(e) {
1073
- var a = this.json, r = this.extensions, i = this.json.scenes[e], n = new f.Group();
1074
- i.name && (n.name = i.name), Y(n, i), i.extensions && H(r, n, i);
1075
- for (var u = i.nodes || [], o = [], h = 0, d = u.length; h < d; h++)
1076
- o.push(t(u[h], n, a, this));
1077
- return Promise.all(o).then(function() {
1078
- return n;
1079
- });
1080
- };
1081
- }(), y;
1082
- }(), oe = function(y) {
1083
- f.Loader.call(this, y), 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" };
1084
- };
1085
- oe.prototype = Object.assign(Object.create(f.Loader.prototype), { constructor: oe, setDecoderPath: function(y) {
1086
- return this.decoderPath = y, this;
1087
- }, setDecoderConfig: function(y) {
1088
- return this.decoderConfig = y, this;
1089
- }, setWorkerLimit: function(y) {
1090
- return this.workerLimit = y, this;
1091
- }, setVerbosity: function() {
1092
- console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.");
1093
- }, setDrawMode: function() {
1094
- console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.");
1095
- }, setSkipDequantization: function() {
1096
- console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.");
1097
- }, load: function(y, M, l, S) {
1098
- var R = new f.FileLoader(this.manager);
1099
- R.setPath(this.path), R.setResponseType("arraybuffer"), this.crossOrigin === "use-credentials" && R.setWithCredentials(!0), R.load(y, (O) => {
1100
- var N = { attributeIDs: this.defaultAttributeIDs, attributeTypes: this.defaultAttributeTypes, useUniqueIDs: !1 };
1101
- this.decodeGeometry(O, N).then(M).catch(S);
1102
- }, l, S);
1103
- }, decodeDracoFile: function(y, M, l, S) {
1104
- var R = { attributeIDs: l || this.defaultAttributeIDs, attributeTypes: S || this.defaultAttributeTypes, useUniqueIDs: !!l };
1105
- this.decodeGeometry(y, R).then(M);
1106
- }, decodeGeometry: function(y, M) {
1107
- for (var l in M.attributeTypes) {
1108
- var S = M.attributeTypes[l];
1109
- S.BYTES_PER_ELEMENT !== void 0 && (M.attributeTypes[l] = S.name);
1110
- }
1111
- var R, O = JSON.stringify(M);
1112
- if (oe.taskCache.has(y)) {
1113
- var N = oe.taskCache.get(y);
1114
- if (N.key === O)
1115
- return N.promise;
1116
- if (y.byteLength === 0)
1117
- throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.");
1118
- }
1119
- var B = this.workerNextTaskID++, U = y.byteLength, C = this._getWorker(B, U).then((E) => (R = E, new Promise((K, V) => {
1120
- R._callbacks[B] = { resolve: K, reject: V }, R.postMessage({ type: "decode", id: B, taskConfig: M, buffer: y }, [y]);
1121
- }))).then((E) => this._createGeometry(E.geometry));
1122
- return C.catch(() => !0).then(() => {
1123
- R && B && this._releaseTask(R, B);
1124
- }), oe.taskCache.set(y, { key: O, promise: C }), C;
1125
- }, _createGeometry: function(y) {
1126
- var M = new f.BufferGeometry();
1127
- y.index && M.setIndex(new f.BufferAttribute(y.index.array, 1));
1128
- for (var l = 0; l < y.attributes.length; l++) {
1129
- var S = y.attributes[l], R = S.name, O = S.array, N = S.itemSize;
1130
- M.setAttribute(R, new f.BufferAttribute(O, N));
1131
- }
1132
- return M;
1133
- }, _loadLibrary: function(y, M) {
1134
- var l = new f.FileLoader(this.manager);
1135
- return l.setPath(this.decoderPath), l.setResponseType(M), new Promise((S, R) => {
1136
- l.load(y, S, void 0, R);
1137
- });
1138
- }, preload: function() {
1139
- return this._initDecoder(), this;
1140
- }, _initDecoder: function() {
1141
- if (this.decoderPending)
1142
- return this.decoderPending;
1143
- var y = typeof WebAssembly != "object" || this.decoderConfig.type === "js", M = [];
1144
- return y ? M.push(this._loadLibrary("draco_decoder.js", "text")) : (M.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), M.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(M).then((l) => {
1145
- var S = l[0];
1146
- y || (this.decoderConfig.wasmBinary = l[1]);
1147
- var R = oe.DRACOWorker.toString(), O = ["/* draco decoder */", S, "", "/* worker */", R.substring(R.indexOf("{") + 1, R.lastIndexOf("}"))].join(`
1148
- `);
1149
- this.workerSourceURL = URL.createObjectURL(new Blob([O]));
1150
- }), this.decoderPending;
1151
- }, _getWorker: function(y, M) {
1152
- return this._initDecoder().then(() => {
1153
- var l;
1154
- return this.workerPool.length < this.workerLimit ? ((l = new Worker(this.workerSourceURL))._callbacks = {}, l._taskCosts = {}, l._taskLoad = 0, l.postMessage({ type: "init", decoderConfig: this.decoderConfig }), l.onmessage = function(S) {
1155
- var R = S.data;
1156
- switch (R.type) {
1157
- case "decode":
1158
- l._callbacks[R.id].resolve(R);
1159
- break;
1160
- case "error":
1161
- l._callbacks[R.id].reject(R);
1162
- break;
1163
- default:
1164
- console.error('THREE.DRACOLoader: Unexpected message, "' + R.type + '"');
1165
- }
1166
- }, this.workerPool.push(l)) : this.workerPool.sort(function(S, R) {
1167
- return S._taskLoad > R._taskLoad ? -1 : 1;
1168
- }), (l = this.workerPool[this.workerPool.length - 1])._taskCosts[y] = M, l._taskLoad += M, l;
1169
- });
1170
- }, _releaseTask: function(y, M) {
1171
- y._taskLoad -= y._taskCosts[M], delete y._callbacks[M], delete y._taskCosts[M];
1172
- }, debug: function() {
1173
- console.log("Task load: ", this.workerPool.map((y) => y._taskLoad));
1174
- }, dispose: function() {
1175
- for (var y = 0; y < this.workerPool.length; ++y)
1176
- this.workerPool[y].terminate();
1177
- return this.workerPool.length = 0, this;
1178
- } }), oe.DRACOWorker = function() {
1179
- var y, M;
1180
- function l(S, R, O, N, B, U) {
1181
- var C, E, K = U.num_components(), V = O.num_points() * K;
1182
- switch (B) {
1183
- case Float32Array:
1184
- C = new S.DracoFloat32Array(), R.GetAttributeFloatForAllPoints(O, U, C), E = new Float32Array(V);
1185
- break;
1186
- case Int8Array:
1187
- C = new S.DracoInt8Array(), R.GetAttributeInt8ForAllPoints(O, U, C), E = new Int8Array(V);
1188
- break;
1189
- case Int16Array:
1190
- C = new S.DracoInt16Array(), R.GetAttributeInt16ForAllPoints(O, U, C), E = new Int16Array(V);
1191
- break;
1192
- case Int32Array:
1193
- C = new S.DracoInt32Array(), R.GetAttributeInt32ForAllPoints(O, U, C), E = new Int32Array(V);
1194
- break;
1195
- case Uint8Array:
1196
- C = new S.DracoUInt8Array(), R.GetAttributeUInt8ForAllPoints(O, U, C), E = new Uint8Array(V);
1197
- break;
1198
- case Uint16Array:
1199
- C = new S.DracoUInt16Array(), R.GetAttributeUInt16ForAllPoints(O, U, C), E = new Uint16Array(V);
1200
- break;
1201
- case Uint32Array:
1202
- C = new S.DracoUInt32Array(), R.GetAttributeUInt32ForAllPoints(O, U, C), E = new Uint32Array(V);
1203
- break;
1204
- default:
1205
- throw new Error("THREE.DRACOLoader: Unexpected attribute type.");
1206
- }
1207
- for (var I = 0; I < V; I++)
1208
- E[I] = C.GetValue(I);
1209
- return S.destroy(C), { name: N, array: E, itemSize: K };
1210
- }
1211
- onmessage = function(S) {
1212
- var R = S.data;
1213
- switch (R.type) {
1214
- case "init":
1215
- y = R.decoderConfig, M = new Promise(function(B) {
1216
- y.onModuleLoaded = function(U) {
1217
- B({ draco: U });
1218
- }, DracoDecoderModule(y);
1219
- });
1220
- break;
1221
- case "decode":
1222
- var O = R.buffer, N = R.taskConfig;
1223
- M.then((B) => {
1224
- var U = B.draco, C = new U.Decoder(), E = new U.DecoderBuffer();
1225
- E.Init(new Int8Array(O), O.byteLength);
1226
- try {
1227
- var K = function(I, z, Z, q) {
1228
- var W, te, re = q.attributeIDs, he = q.attributeTypes, le = z.GetEncodedGeometryType(Z);
1229
- if (le === I.TRIANGULAR_MESH)
1230
- W = new I.Mesh(), te = z.DecodeBufferToMesh(Z, W);
1231
- else {
1232
- if (le !== I.POINT_CLOUD)
1233
- throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
1234
- W = new I.PointCloud(), te = z.DecodeBufferToPointCloud(Z, W);
1235
- }
1236
- if (!te.ok() || W.ptr === 0)
1237
- throw new Error("THREE.DRACOLoader: Decoding failed: " + te.error_msg());
1238
- var ce = { index: null, attributes: [] };
1239
- for (var ue in re) {
1240
- var Q, ae, D = self[he[ue]];
1241
- if (q.useUniqueIDs)
1242
- ae = re[ue], Q = z.GetAttributeByUniqueId(W, ae);
1243
- else {
1244
- if ((ae = z.GetAttributeId(W, I[re[ue]])) === -1)
1245
- continue;
1246
- Q = z.GetAttribute(W, ae);
1247
- }
1248
- ce.attributes.push(l(I, z, W, ue, D, Q));
1249
- }
1250
- if (le === I.TRIANGULAR_MESH) {
1251
- for (var se = W.num_faces(), ne = new Uint32Array(3 * se), s = new I.DracoInt32Array(), c = 0; c < se; ++c) {
1252
- z.GetFaceFromMesh(W, c, s);
1253
- for (var p = 0; p < 3; ++p)
1254
- ne[3 * c + p] = s.GetValue(p);
1255
- }
1256
- ce.index = { array: ne, itemSize: 1 }, I.destroy(s);
1257
- }
1258
- return I.destroy(W), ce;
1259
- }(U, C, E, N), V = K.attributes.map((I) => I.array.buffer);
1260
- K.index && V.push(K.index.array.buffer), self.postMessage({ type: "decode", id: R.id, geometry: K }, V);
1261
- } catch (I) {
1262
- console.error(I), self.postMessage({ type: "error", id: R.id, error: I.message });
1263
- } finally {
1264
- U.destroy(E), U.destroy(C);
1265
- }
1266
- });
1267
- }
1268
- };
1269
- }, oe.taskCache = /* @__PURE__ */ new WeakMap(), oe.setDecoderPath = function() {
1270
- console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.");
1271
- }, oe.setDecoderConfig = function() {
1272
- console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.");
1273
- }, oe.releaseDecoderModule = function() {
1274
- console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.");
1275
- }, oe.getDecoderModule = function() {
1276
- console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.");
1277
- };
1278
- var Ae = function(y) {
1279
- f.CompressedTextureLoader.call(this, y);
1280
- };
1281
- Ae.prototype = Object.assign(Object.create(f.CompressedTextureLoader.prototype), { constructor: Ae, parse: function(y, M) {
1282
- var l = { mipmaps: [], width: 0, height: 0, format: null, mipmapCount: 1 };
1283
- function S(Q) {
1284
- return Q.charCodeAt(0) + (Q.charCodeAt(1) << 8) + (Q.charCodeAt(2) << 16) + (Q.charCodeAt(3) << 24);
1285
- }
1286
- function R(Q, ae, D, se) {
1287
- for (var ne = D * se * 4, s = new Uint8Array(Q, ae, ne), c = new Uint8Array(ne), p = 0, m = 0, T = 0; T < se; T++)
1288
- for (var g = 0; g < D; g++) {
1289
- var x = s[m], H = s[++m], Y = s[++m], P = s[++m];
1290
- m++, c[p] = Y, c[++p] = H, c[++p] = x, c[++p] = P, p++;
1291
- }
1292
- return c;
1293
- }
1294
- var O, N = S("DXT1"), B = S("DXT3"), U = S("DXT5"), C = S("ETC1"), E = new Int32Array(y, 0, 31);
1295
- if (E[0] !== 542327876)
1296
- return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."), l;
1297
- if (4 & !E[20])
1298
- return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."), l;
1299
- var K, V = E[21], I = !1;
1300
- switch (V) {
1301
- case N:
1302
- O = 8, l.format = f.RGB_S3TC_DXT1_Format;
1303
- break;
1304
- case B:
1305
- O = 16, l.format = f.RGBA_S3TC_DXT3_Format;
1306
- break;
1307
- case U:
1308
- O = 16, l.format = f.RGBA_S3TC_DXT5_Format;
1309
- break;
1310
- case C:
1311
- O = 8, l.format = f.RGB_ETC1_Format;
1312
- break;
1313
- default:
1314
- if (!(E[22] === 32 && 16711680 & E[23] && 65280 & E[24] && 255 & E[25] && 4278190080 & E[26]))
1315
- return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ", (K = V, String.fromCharCode(255 & K, K >> 8 & 255, K >> 16 & 255, K >> 24 & 255))), l;
1316
- I = !0, O = 64, l.format = f.RGBAFormat;
1317
- }
1318
- l.mipmapCount = 1, 131072 & E[2] && M !== !1 && (l.mipmapCount = Math.max(1, E[7]));
1319
- var z = E[28];
1320
- if (l.isCubemap = !!(512 & z), l.isCubemap && (!(1024 & z) || !(2048 & z) || !(4096 & z) || !(8192 & z) || !(16384 & z) || !(32768 & z)))
1321
- return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"), l;
1322
- l.width = E[4], l.height = E[3];
1323
- for (var Z = E[1] + 4, q = l.isCubemap ? 6 : 1, W = 0; W < q; W++)
1324
- for (var te = l.width, re = l.height, he = 0; he < l.mipmapCount; he++) {
1325
- if (I)
1326
- var le = (ce = R(y, Z, te, re)).length;
1327
- else {
1328
- le = Math.max(4, te) / 4 * Math.max(4, re) / 4 * O;
1329
- var ce = new Uint8Array(y, Z, le);
1330
- }
1331
- var ue = { data: ce, width: te, height: re };
1332
- l.mipmaps.push(ue), Z += le, te = Math.max(te >> 1, 1), re = Math.max(re >> 1, 1);
1333
- }
1334
- return l;
1335
- } });
1336
- var Pe = function(y) {
1337
- function M(l) {
1338
- var S = y.call(this) || this;
1339
- return S.needsRender = !0, l && l.children.length && S.add.apply(S, l.children), S.mixer = new Oe.AnimationMixer(S), S;
1340
- }
1341
- return Ue.__extends(M, y), M.prototype.clone = function() {
1342
- var l = y.prototype.clone.call(this, !0), S = new Oe.AnimationMixer(l);
1343
- return l.mixer = S, l.needsRender = !0, l;
1344
- }, M;
1345
- }(Oe.Group), Ve = function(y) {
1346
- function M(l) {
1347
- var S = y.call(this, l) || this;
1348
- return S.ddsLoader = new Ae(l), S.dracoLoader = new oe(l), S.dracoLoader.setDecoderPath("https://vr-public.realsee-cdn.cn/release/static/image/release/five/gltf/"), S;
1349
- }
1350
- return Ue.__extends(M, y), Object.defineProperty(M, "version", { get: function() {
1351
- return "5.0.0-alpha.149";
1352
- }, enumerable: !1, configurable: !0 }), M.prototype.load = function(l, S, R, O) {
1353
- return y.prototype.load.call(this, l, S, R, O);
1354
- }, M.prototype.parse = function(l, S, R, O) {
1355
- return y.prototype.parse.call(this, l, S, function(N) {
1356
- var B = new Pe(N.scene), U = N.scenes.map(function(C) {
1357
- return C === N.scene ? B : new Pe(C);
1358
- });
1359
- R(Object.assign(N, { scene: B, scenes: U }));
1360
- }, O);
1361
- }, M;
1362
- }(He);
1363
- Te.DDSLoader = Ae, Te.DRACOLoader = oe, Fe = Te.GLTFLoader = Ve, Te.GLTFObject = Pe, Te.THREEGLTFLoader = He;
1364
- function ze(y, M) {
1365
- const l = new je.Vector3(3.8058113175002797, -1.4285810796152072, -4.748098691966687), S = y.modelUrl, R = new Fe();
1366
- return new Promise((O, N) => {
1367
- R.load(S, function(U) {
1368
- const C = U.scene;
1369
- C.traverse((E) => {
1370
- E.material && (E.material.envMapIntensity = 0.5);
1371
- }), M.add(C), C.position.copy(l), C.needsRender = !0, O(C);
1372
- });
1373
- });
1374
- }
1375
- export {
1376
- ze as default
1377
- };