@realsee/dnalogel 3.77.4-alpha.0 → 3.77.4-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (523) hide show
  1. package/CHANGELOG.md +837 -846
  2. package/dist/DigitalPerformancePlugin/controller/index.d.ts +224 -0
  3. package/dist/DigitalPerformancePlugin/core/DigitalHuman.d.ts +54 -0
  4. package/dist/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +40 -0
  5. package/dist/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +150 -0
  6. package/dist/DigitalPerformancePlugin/core/Trace.d.ts +9 -0
  7. package/dist/DigitalPerformancePlugin/index.d.ts +11 -0
  8. package/dist/DigitalPerformancePlugin/mock.d.ts +76 -0
  9. package/dist/DigitalPerformancePlugin/typings/index.d.ts +79 -0
  10. package/dist/GuideLinePlugin/Controller.d.ts +2 -34
  11. package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +2 -7
  12. package/dist/index.cjs.js +86 -73
  13. package/dist/index.d.ts +1 -0
  14. package/dist/index.js +12911 -11239
  15. package/dist/index.umd.js +87 -74
  16. package/libs/DigitalPerformancePlugin/controller/index.d.ts +2 -2
  17. package/libs/DigitalPerformancePlugin/controller/index.js +164 -173
  18. package/libs/DigitalPerformancePlugin/core/DigitalHuman.d.ts +15 -6
  19. package/libs/DigitalPerformancePlugin/core/DigitalHuman.js +125 -98
  20. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.d.ts +11 -5
  21. package/libs/DigitalPerformancePlugin/core/DigitalPlayground.js +84 -74
  22. package/libs/DigitalPerformancePlugin/core/DigitalStateMachine.d.ts +7 -0
  23. package/libs/DigitalPerformancePlugin/mock.d.ts +6 -0
  24. package/libs/DigitalPerformancePlugin/mock.js +270 -273
  25. package/libs/GuideLinePlugin/Components/Tag.js +163 -151
  26. package/libs/GuideLinePlugin/Controller.d.ts +2 -34
  27. package/libs/GuideLinePlugin/Controller.js +22 -56
  28. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +69 -76
  29. package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +2 -7
  30. package/libs/base/BasePlugin.js +1 -1
  31. package/libs/index.d.ts +1 -0
  32. package/libs/index.js +161 -150
  33. package/libs/shared-utils/logger.js +1 -1
  34. package/package.json +2 -2
  35. package/docs/.nojekyll +0 -1
  36. package/docs/assets/custom.css +0 -0
  37. package/docs/assets/highlight.css +0 -127
  38. package/docs/assets/icons.js +0 -18
  39. package/docs/assets/icons.svg +0 -1
  40. package/docs/assets/main.js +0 -60
  41. package/docs/assets/navigation.js +0 -1
  42. package/docs/assets/search.js +0 -1
  43. package/docs/assets/style.css +0 -1493
  44. package/docs/classes/AreaMakerPluginType.AreaMakerController.html +0 -59
  45. package/docs/classes/AreaMakerPluginType.AreaMakerItem.html +0 -71
  46. package/docs/classes/CSS3DRender.html +0 -100
  47. package/docs/classes/GuideLineItem.GuideLineItem.html +0 -21
  48. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +0 -72
  49. package/docs/classes/ModelMakerPluginInstance.html +0 -116
  50. package/docs/classes/ModelMakerPluginType.ModelMakerBoxItem.html +0 -52
  51. package/docs/classes/ModelMakerPluginType.ModelMakerPolygonItem.html +0 -52
  52. package/docs/classes/ModelMakerPluginType.ModelMakerPrismItem.html +0 -53
  53. package/docs/classes/ModelRoomLabelController.html +0 -19
  54. package/docs/classes/MoveController.html +0 -45
  55. package/docs/classes/Object3DHelperController.html +0 -45
  56. package/docs/classes/PaintBrush.html +0 -15
  57. package/docs/classes/PanoMeasurePluginLine.html +0 -24
  58. package/docs/classes/PanoMeasurePluginModel.html +0 -23
  59. package/docs/classes/PanoMeasurePluginPoint.html +0 -7
  60. package/docs/classes/PanoMeasurePluginPolyline.html +0 -27
  61. package/docs/classes/PanoTagPluginController.html +0 -111
  62. package/docs/classes/Sculpt.html +0 -77
  63. package/docs/classes/Util.BetterTween.html +0 -6
  64. package/docs/classes/Util.FiveDomEvents.html +0 -13
  65. package/docs/classes/Util.FivePuppet.html +0 -20
  66. package/docs/classes/Util.Interval.html +0 -11
  67. package/docs/classes/Util.LegacyPointHelper.html +0 -7
  68. package/docs/classes/Util.LightTag.html +0 -47
  69. package/docs/classes/Util.LineSegments.html +0 -4
  70. package/docs/classes/Util.Magnifier.html +0 -26
  71. package/docs/classes/Util.Object3D.html +0 -8
  72. package/docs/classes/Util.PointDomHelper.html +0 -8
  73. package/docs/classes/Util.PointHelper.html +0 -10
  74. package/docs/classes/Util.PointSelector.html +0 -66
  75. package/docs/classes/Util.PointSelectorHelper.html +0 -14
  76. package/docs/classes/Util.Rectangle.html +0 -12
  77. package/docs/classes/Util.sculpt.BaseEditor.html +0 -17
  78. package/docs/classes/Util.sculpt.BoxMesh.html +0 -48
  79. package/docs/classes/Util.sculpt.BoxMeshEditor.html +0 -18
  80. package/docs/classes/Util.sculpt.CircleMesh.html +0 -26
  81. package/docs/classes/Util.sculpt.CircleMeshEditor.html +0 -18
  82. package/docs/classes/Util.sculpt.CircleWithEdgeMesh.html +0 -26
  83. package/docs/classes/Util.sculpt.CylinderMesh.html +0 -25
  84. package/docs/classes/Util.sculpt.CylinderMeshEditor.html +0 -18
  85. package/docs/classes/Util.sculpt.LineMesh.html +0 -34
  86. package/docs/classes/Util.sculpt.PointMesh.html +0 -24
  87. package/docs/classes/Util.sculpt.PolygonMesh.html +0 -40
  88. package/docs/classes/Util.sculpt.PrismMesh.html +0 -48
  89. package/docs/classes/Util.sculpt.PrismMeshEditor.html +0 -18
  90. package/docs/classes/Util.sculpt.RectangleMesh.html +0 -41
  91. package/docs/classes/Util.sculpt.RectangleMeshEditor.html +0 -18
  92. package/docs/classes/Util.sculpt.RectangleWithEdgeMesh.html +0 -44
  93. package/docs/classes/WalkController.html +0 -42
  94. package/docs/enums/CameraMovementEffect.html +0 -4
  95. package/docs/enums/ContentType.html +0 -34
  96. package/docs/enums/DIRECTION.html +0 -5
  97. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +0 -5
  98. package/docs/enums/DimensionType.html +0 -4
  99. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +0 -4
  100. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +0 -5
  101. package/docs/enums/PaintBrushTypeEnum.html +0 -4
  102. package/docs/enums/PointType.html +0 -4
  103. package/docs/enums/Rotation.html +0 -5
  104. package/docs/functions/AreaMakerPlugin.html +0 -1
  105. package/docs/functions/CSS3DRenderPlugin.html +0 -1
  106. package/docs/functions/CameraMovementPlugin.html +0 -2
  107. package/docs/functions/CruisePlugin.html +0 -1
  108. package/docs/functions/CurrentPanoImagePlugin.html +0 -1
  109. package/docs/functions/FloorplanGuidePlugin.html +0 -1
  110. package/docs/functions/GuideLinePlugin.html +0 -1
  111. package/docs/functions/ItemLabelPlugin.html +0 -1
  112. package/docs/functions/MapviewFloorplanPlugin.html +0 -1
  113. package/docs/functions/MeasurePlugin.html +0 -1
  114. package/docs/functions/ModelChassisCompassPlugin.html +0 -2
  115. package/docs/functions/ModelEntryDoorGuidePlugin.html +0 -2
  116. package/docs/functions/ModelFloorplanPlugin.html +0 -1
  117. package/docs/functions/ModelItemLabelPlugin.html +0 -1
  118. package/docs/functions/ModelMakerPlugin.html +0 -1
  119. package/docs/functions/ModelRoomLabelPlugin.html +0 -1
  120. package/docs/functions/ModelTVVideoPlugin.html +0 -1
  121. package/docs/functions/ModelViewPlugin.html +0 -2
  122. package/docs/functions/MovePlugin.html +0 -1
  123. package/docs/functions/Object3DHelperPlugin.html +0 -1
  124. package/docs/functions/PanoCompassPlugin.html +0 -1
  125. package/docs/functions/PanoCursorRaycasterPlugin.html +0 -2
  126. package/docs/functions/PanoDoorLabelPlugin.html +0 -1
  127. package/docs/functions/PanoFloorplanRadarPlugin.html +0 -1
  128. package/docs/functions/PanoMeasurePlugin.html +0 -1
  129. package/docs/functions/PanoRulerPlugin.html +0 -2
  130. package/docs/functions/PanoRulerProPlugin.html +0 -2
  131. package/docs/functions/PanoSpatialTagPlugin.html +0 -2
  132. package/docs/functions/PanoTagPlugin.html +0 -1
  133. package/docs/functions/PanoVideoPlugin.html +0 -10
  134. package/docs/functions/PipelinePlugin.html +0 -1
  135. package/docs/functions/SculptPlugin.html +0 -2
  136. package/docs/functions/SculptPluginForFive.html +0 -2
  137. package/docs/functions/TopviewFloorplanPlugin.html +0 -1
  138. package/docs/functions/Util.awaitNextFrame.html +0 -1
  139. package/docs/functions/Util.blink.html +0 -13
  140. package/docs/functions/Util.blinkWithPreset.html +0 -6
  141. package/docs/functions/Util.bounding.html +0 -1
  142. package/docs/functions/Util.boundingBox.html +0 -1
  143. package/docs/functions/Util.boundingSphere.html +0 -1
  144. package/docs/functions/Util.boxVertex.html +0 -7
  145. package/docs/functions/Util.boxVertexes.html +0 -1
  146. package/docs/functions/Util.checkFiveModelLoaded.html +0 -2
  147. package/docs/functions/Util.cleanup.html +0 -3
  148. package/docs/functions/Util.convexHull.html +0 -2
  149. package/docs/functions/Util.equal.html +0 -5
  150. package/docs/functions/Util.fiveModelIsLoaded.html +0 -2
  151. package/docs/functions/Util.generatePolygonGeometry.html +0 -2
  152. package/docs/functions/Util.getCoordsFromClient.html +0 -1
  153. package/docs/functions/Util.getCoordsFromElement.html +0 -1
  154. package/docs/functions/Util.getFrameTime.html +0 -3
  155. package/docs/functions/Util.getGeometryArea.html +0 -1
  156. package/docs/functions/Util.getGeometryInfo.html +0 -1
  157. package/docs/functions/Util.getIntersectFromRelativePosition.html +0 -1
  158. package/docs/functions/Util.getRaycasterFromFivePointer.html +0 -1
  159. package/docs/functions/Util.initialCSS3DRender.html +0 -1
  160. package/docs/functions/Util.inside.html +0 -1
  161. package/docs/functions/Util.isModelLike.html +0 -1
  162. package/docs/functions/Util.isNil.html +0 -2
  163. package/docs/functions/Util.isPanoramaLike.html +0 -1
  164. package/docs/functions/Util.lookObject.html +0 -7
  165. package/docs/functions/Util.lookPoint.html +0 -5
  166. package/docs/functions/Util.nextFrame.html +0 -1
  167. package/docs/functions/Util.notNil.html +0 -2
  168. package/docs/functions/Util.reblink.html +0 -13
  169. package/docs/functions/Util.replaceStaticPrefix.html +0 -8
  170. package/docs/functions/Util.requestAnimationFrameInterval.html +0 -5
  171. package/docs/functions/Util.sculpt.createBox.html +0 -1
  172. package/docs/functions/Util.sculpt.createCircle.html +0 -1
  173. package/docs/functions/Util.sculpt.createCylinder.html +0 -1
  174. package/docs/functions/Util.sculpt.createLine.html +0 -2
  175. package/docs/functions/Util.sculpt.createPoint.html +0 -1
  176. package/docs/functions/Util.sculpt.createPolygon.html +0 -1
  177. package/docs/functions/Util.sculpt.createPrism.html +0 -1
  178. package/docs/functions/Util.sculpt.createRectangle.html +0 -2
  179. package/docs/functions/Util.sculpt.transformUnit.html +0 -1
  180. package/docs/functions/Util.sculpt.transformUnitSquare.html +0 -1
  181. package/docs/functions/Util.tag.html +0 -1
  182. package/docs/functions/Util.triangleArea.html +0 -2
  183. package/docs/functions/Util.triangleCenter.html +0 -2
  184. package/docs/functions/Util.tweenProgress.html +0 -1
  185. package/docs/functions/Util.uuid.html +0 -2
  186. package/docs/functions/Util.waitFiveModelLoaded.html +0 -2
  187. package/docs/functions/Util.worldBounding.html +0 -1
  188. package/docs/functions/Util.worldBoundingBox.html +0 -1
  189. package/docs/functions/Util.worldBoundingSphere.html +0 -1
  190. package/docs/functions/createPolyline.html +0 -2
  191. package/docs/functions/pluginFlag.html +0 -1
  192. package/docs/functions/validatePolygon.html +0 -1
  193. package/docs/hierarchy.html +0 -1
  194. package/docs/index.html +0 -70
  195. package/docs/interfaces/AreaMakerPluginType.AnimeOptions.html +0 -4
  196. package/docs/interfaces/AreaMakerPluginType.Config.html +0 -8
  197. package/docs/interfaces/AreaMakerPluginType.EventMap.html +0 -25
  198. package/docs/interfaces/AreaMakerPluginType.Params.html +0 -4
  199. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItem.html +0 -20
  200. package/docs/interfaces/AreaMakerPluginType.ServerAreaMakerItemV1.html +0 -13
  201. package/docs/interfaces/AreaMakerPluginType.ServerDataV1.html +0 -9
  202. package/docs/interfaces/AreaMakerPluginType.ServerDataV2.html +0 -3
  203. package/docs/interfaces/AreaMakerPluginType.ShowHideOptions.html +0 -3
  204. package/docs/interfaces/AreaMakerPluginType.State.html +0 -8
  205. package/docs/interfaces/BoxAnimationConfig.html +0 -6
  206. package/docs/interfaces/CSS3DRenderPluginEventMap.html +0 -9
  207. package/docs/interfaces/CSS3DRenderPluginState.html +0 -7
  208. package/docs/interfaces/CameraMovementPluginExportType.html +0 -11
  209. package/docs/interfaces/ContentTypeMapInterface.html +0 -73
  210. package/docs/interfaces/CruisePluginTypes.Config.html +0 -7
  211. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +0 -8
  212. package/docs/interfaces/CruisePluginTypes.EventMap.html +0 -33
  213. package/docs/interfaces/CruisePluginTypes.GuildLineConfig.html +0 -6
  214. package/docs/interfaces/CruisePluginTypes.MoveAction.html +0 -16
  215. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +0 -19
  216. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +0 -20
  217. package/docs/interfaces/CruisePluginTypes.PluginData.html +0 -8
  218. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +0 -2
  219. package/docs/interfaces/CruisePluginTypes.PluginState.html +0 -15
  220. package/docs/interfaces/CurrentPanoImagePluginType.Config.html +0 -13
  221. package/docs/interfaces/CurrentPanoImagePluginType.EventMap.html +0 -15
  222. package/docs/interfaces/CurrentPanoImagePluginType.Params.html +0 -4
  223. package/docs/interfaces/CurrentPanoImagePluginType.ShowHideOptions.html +0 -3
  224. package/docs/interfaces/CurrentPanoImagePluginType.State.html +0 -7
  225. package/docs/interfaces/FloorplanBounding.html +0 -9
  226. package/docs/interfaces/FloorplanData.html +0 -7
  227. package/docs/interfaces/FloorplanEntrance.html +0 -14
  228. package/docs/interfaces/FloorplanExtraObject.html +0 -9
  229. package/docs/interfaces/FloorplanExtraObject3D.html +0 -5
  230. package/docs/interfaces/FloorplanFloorData.html +0 -9
  231. package/docs/interfaces/FloorplanImagePosition.html +0 -4
  232. package/docs/interfaces/FloorplanObserver.html +0 -8
  233. package/docs/interfaces/FloorplanOutlineItem.html +0 -6
  234. package/docs/interfaces/FloorplanPosition.html +0 -4
  235. package/docs/interfaces/FloorplanRoomItem.html +0 -24
  236. package/docs/interfaces/FloorplanRoomLabelItem.html +0 -6
  237. package/docs/interfaces/FloorplanServerBounding.html +0 -9
  238. package/docs/interfaces/FloorplanServerComputedData.html +0 -6
  239. package/docs/interfaces/FloorplanServerData.html +0 -4
  240. package/docs/interfaces/FloorplanServerDoorItem.html +0 -6
  241. package/docs/interfaces/FloorplanServerDoorPosition.html +0 -4
  242. package/docs/interfaces/FloorplanServerEntrance.html +0 -14
  243. package/docs/interfaces/FloorplanServerFloorData.html +0 -8
  244. package/docs/interfaces/FloorplanServerImagePosition.html +0 -4
  245. package/docs/interfaces/FloorplanServerObserver.html +0 -8
  246. package/docs/interfaces/FloorplanServerOutlineItem.html +0 -6
  247. package/docs/interfaces/FloorplanServerPosition.html +0 -4
  248. package/docs/interfaces/FloorplanServerRoomItem.html +0 -27
  249. package/docs/interfaces/FloorplanServerRoomLabelItem.html +0 -6
  250. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +0 -4
  251. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +0 -7
  252. package/docs/interfaces/GuideLinePluginType.EventMap.html +0 -13
  253. package/docs/interfaces/GuideLinePluginType.ExtraRouteData.html +0 -5
  254. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +0 -8
  255. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +0 -2
  256. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +0 -32
  257. package/docs/interfaces/GuideLinePluginType.GuideLineMeshStyle.html +0 -4
  258. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +0 -5
  259. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +0 -42
  260. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +0 -3
  261. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +0 -57
  262. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +0 -1
  263. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +0 -2
  264. package/docs/interfaces/GuideLinePluginType.PluginState.html +0 -7
  265. package/docs/interfaces/GuideLinePluginType.Route.html +0 -13
  266. package/docs/interfaces/HelperOffset.html +0 -4
  267. package/docs/interfaces/ImagePlaneGroup.html +0 -3
  268. package/docs/interfaces/ItemLabelPluginData.html +0 -2
  269. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +0 -7
  270. package/docs/interfaces/ItemLabelPluginParametersType.html +0 -5
  271. package/docs/interfaces/MinMax.html +0 -3
  272. package/docs/interfaces/ModelChassisCompassPluginData.html +0 -3
  273. package/docs/interfaces/ModelChassisCompassPluginExportType.html +0 -4
  274. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +0 -3
  275. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +0 -4
  276. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +0 -4
  277. package/docs/interfaces/ModelItemLabelPluginData.html +0 -2
  278. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +0 -7
  279. package/docs/interfaces/ModelItemLabelPluginParametersType.html +0 -3
  280. package/docs/interfaces/ModelMakerPluginType.BoxItemObjectData.html +0 -17
  281. package/docs/interfaces/ModelMakerPluginType.EventMap.html +0 -18
  282. package/docs/interfaces/ModelMakerPluginType.PrismItemObjectData.html +0 -23
  283. package/docs/interfaces/ModelMakerPluginType.ServerBaseItem.html +0 -11
  284. package/docs/interfaces/ModelMakerPluginType.ServerBoxItem.html +0 -10
  285. package/docs/interfaces/ModelMakerPluginType.ServerData.html +0 -3
  286. package/docs/interfaces/ModelMakerPluginType.ServerPrismItem.html +0 -10
  287. package/docs/interfaces/ModelMakerPluginType.ServerTrianglesItem.html +0 -10
  288. package/docs/interfaces/ModelMakerPluginType.State.html +0 -8
  289. package/docs/interfaces/ModelMakerPluginType.TrianglesItemObjectData.html +0 -11
  290. package/docs/interfaces/ModelRoomLabelPluginData.html +0 -2
  291. package/docs/interfaces/ModelTVVideoPluginData.html +0 -5
  292. package/docs/interfaces/ModelTVVideoPluginExportType.html +0 -4
  293. package/docs/interfaces/ModelTVVideoPluginParameterType.html +0 -2
  294. package/docs/interfaces/ModelViewPluginExportType.html +0 -8
  295. package/docs/interfaces/Object3DHelperState.html +0 -4
  296. package/docs/interfaces/ObjectHelperControllers.html +0 -5
  297. package/docs/interfaces/PaintBrushAction.html +0 -14
  298. package/docs/interfaces/PaintBrushConfigs.html +0 -8
  299. package/docs/interfaces/PaintBrushState.html +0 -6
  300. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +0 -16
  301. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +0 -1
  302. package/docs/interfaces/PanoMeasureParameterType.html +0 -20
  303. package/docs/interfaces/PanoMeasurePluginLineJson.html +0 -4
  304. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +0 -4
  305. package/docs/interfaces/PanoMeasurePluginPointJson.html +0 -3
  306. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +0 -7
  307. package/docs/interfaces/PanoRulerPluginExportType.html +0 -6
  308. package/docs/interfaces/PanoRulerPluginOptions.html +0 -3
  309. package/docs/interfaces/PanoRulerPluginParameterType.html +0 -4
  310. package/docs/interfaces/PanoRulerProPluginExportType.html +0 -5
  311. package/docs/interfaces/PanoRulerProPluginOptions.html +0 -3
  312. package/docs/interfaces/PanoRulerProPluginParameterType.html +0 -3
  313. package/docs/interfaces/PanoRulerProPluginState.html +0 -4
  314. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +0 -1
  315. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +0 -1
  316. package/docs/interfaces/PanoSpatialTagPluginData.html +0 -7
  317. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +0 -6
  318. package/docs/interfaces/PanoSpatialTagPluginExportType.html +0 -9
  319. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +0 -6
  320. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +0 -9
  321. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +0 -7
  322. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +0 -6
  323. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +0 -3
  324. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +0 -8
  325. package/docs/interfaces/PanoVideoPluginType.PluginData.html +0 -2
  326. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +0 -15
  327. package/docs/interfaces/PanoVideoPluginType.PluginState.html +0 -2
  328. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +0 -14
  329. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +0 -13
  330. package/docs/interfaces/PluginEventMap.html +0 -16
  331. package/docs/interfaces/Point.html +0 -4
  332. package/docs/interfaces/Room.html +0 -5
  333. package/docs/interfaces/RoomInfo.html +0 -3
  334. package/docs/interfaces/RoomLabel.html +0 -16
  335. package/docs/interfaces/RoomRules.html +0 -1
  336. package/docs/interfaces/Rooms.html +0 -1
  337. package/docs/interfaces/Scissor.html +0 -13
  338. package/docs/interfaces/SculptConfig.html +0 -19
  339. package/docs/interfaces/State.html +0 -7
  340. package/docs/interfaces/TagCacheInterface.html +0 -9
  341. package/docs/interfaces/TagConfig.html +0 -174
  342. package/docs/interfaces/TagGLTFObjectGroup.html +0 -3
  343. package/docs/interfaces/TagIconAnimationConfig.html +0 -7
  344. package/docs/interfaces/TagIconUrl.html +0 -22
  345. package/docs/interfaces/TagObjectGroup.html +0 -3
  346. package/docs/interfaces/TagState.html +0 -3
  347. package/docs/interfaces/TagStyle.html +0 -5
  348. package/docs/interfaces/Tags.html +0 -8
  349. package/docs/interfaces/TemporaryState.html +0 -2
  350. package/docs/interfaces/Util.AnimeInstance.html +0 -14
  351. package/docs/interfaces/Util.BlinkAnimeOptions.html +0 -21
  352. package/docs/interfaces/Util.EventHandlerConfig.html +0 -21
  353. package/docs/interfaces/Util.FiveDomEvent.html +0 -7
  354. package/docs/interfaces/Util.FiveDomEventMap.html +0 -20
  355. package/docs/interfaces/Util.LegacyMouseGroupParameter.html +0 -4
  356. package/docs/interfaces/Util.MagnifierParameter.html +0 -13
  357. package/docs/interfaces/Util.MouseGroupParameter.html +0 -4
  358. package/docs/interfaces/Util.ObjectInitialState.html +0 -9
  359. package/docs/interfaces/Util.PointIntersection.html +0 -21
  360. package/docs/interfaces/Util.PointSelectorHelperConfig.html +0 -6
  361. package/docs/interfaces/Util.ReBlinkAnimeOptions.html +0 -27
  362. package/docs/modules/AreaMakerPluginType.html +0 -17
  363. package/docs/modules/CruisePluginTypes.html +0 -14
  364. package/docs/modules/CurrentPanoImagePluginType.html +0 -6
  365. package/docs/modules/GuideLineItem.html +0 -2
  366. package/docs/modules/GuideLineModeItem.html +0 -3
  367. package/docs/modules/GuideLinePluginType.html +0 -25
  368. package/docs/modules/ModelMakerPluginType.html +0 -19
  369. package/docs/modules/PanoVideoPluginType.html +0 -8
  370. package/docs/modules/SculptData.html +0 -9
  371. package/docs/modules/SculptType.html +0 -2
  372. package/docs/modules/Util.html +0 -91
  373. package/docs/modules/Util.sculpt.html +0 -27
  374. package/docs/modules.html +0 -281
  375. package/docs/types/AddObject3DHelperConfig.html +0 -19
  376. package/docs/types/AreaMakerPluginType.AreaMakerItemEventMap.html +0 -7
  377. package/docs/types/AreaMakerPluginType.ItemRenderer.html +0 -1
  378. package/docs/types/AreaMakerPluginType.PluginData.html +0 -2
  379. package/docs/types/AreaMakerPluginType.ServerData.html +0 -2
  380. package/docs/types/ArrayPosition.html +0 -1
  381. package/docs/types/AudioAppearance.html +0 -1
  382. package/docs/types/CSS3DRenderExportType.html +0 -1
  383. package/docs/types/CSS3DRenderPluginExportType.html +0 -1
  384. package/docs/types/CSS3DRenderPluginParameterType.html +0 -1
  385. package/docs/types/ClassFunctionParameters.html +0 -1
  386. package/docs/types/Color.html +0 -1
  387. package/docs/types/ContentTypeConfigKey.html +0 -1
  388. package/docs/types/ContentTypeConfigKeySplit.html +0 -1
  389. package/docs/types/ContentTypeMap.html +0 -1
  390. package/docs/types/Create3DDomContainerReturnType.html +0 -1
  391. package/docs/types/Create3DElementReturnType.html +0 -1
  392. package/docs/types/CruisePluginExportType.html +0 -1
  393. package/docs/types/CruisePluginTypes.CruiseData.html +0 -6
  394. package/docs/types/CruisePluginTypes.MoveEffect.html +0 -1
  395. package/docs/types/CurrentPanoImagePluginExportType.html +0 -1
  396. package/docs/types/DeprecatedMediaPlaneProperty.html +0 -3
  397. package/docs/types/DeprecatedTagProperty.html +0 -3
  398. package/docs/types/Direction-1.html +0 -1
  399. package/docs/types/Direction4.html +0 -1
  400. package/docs/types/ElementRenderer.html +0 -2
  401. package/docs/types/FloorplanGuidePluginParameterType.html +0 -1
  402. package/docs/types/FloorplanGuidePluginReturnType.html +0 -1
  403. package/docs/types/FloorplanRuleLabels.html +0 -2
  404. package/docs/types/FloorplanServerRuleLabels.html +0 -1
  405. package/docs/types/GuideLinePluginExportType.html +0 -1
  406. package/docs/types/GuideLinePluginType.GuideLineItem.html +0 -2
  407. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +0 -1
  408. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +0 -1
  409. package/docs/types/GuideLinePluginType.GuideLineStyle.html +0 -2
  410. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +0 -2
  411. package/docs/types/GuideLinePluginType.PathItem.html +0 -2
  412. package/docs/types/GuideLinePluginType.PluginData.html +0 -2
  413. package/docs/types/GuideLinePluginType.RouteConfig.html +0 -4
  414. package/docs/types/HelperEventMap.html +0 -1
  415. package/docs/types/InternalHelperEventMap.html +0 -1
  416. package/docs/types/MapviewFloorplanPluginParameterType.html +0 -1
  417. package/docs/types/MapviewFloorplanPluginReturnType.html +0 -1
  418. package/docs/types/MeasureEndReason.html +0 -1
  419. package/docs/types/MeasurePluginConfig.html +0 -5
  420. package/docs/types/MeasurePluginEventMap.html +0 -1
  421. package/docs/types/MediaData.html +0 -2
  422. package/docs/types/MediaStore.html +0 -1
  423. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +0 -1
  424. package/docs/types/ModelFloorplanPluginParameterType.html +0 -1
  425. package/docs/types/ModelFloorplanPluginReturnType.html +0 -1
  426. package/docs/types/ModelId.html +0 -1
  427. package/docs/types/ModelMakerPluginType.ElementRenderer.html +0 -1
  428. package/docs/types/ModelMakerPluginType.ItemType.html +0 -2
  429. package/docs/types/ModelMakerPluginType.MarkerItem.html +0 -1
  430. package/docs/types/ModelMakerPluginType.ServerItem.html +0 -2
  431. package/docs/types/ModelRoomLabelPluginParameters.html +0 -1
  432. package/docs/types/ModelRoomLabelPluginReturnType.html +0 -1
  433. package/docs/types/MoveArgs.html +0 -2
  434. package/docs/types/MoveOpts.html +0 -2
  435. package/docs/types/Object3DHelperEventMap.html +0 -1
  436. package/docs/types/ObjectFit.html +0 -1
  437. package/docs/types/PaintBrushEventMap.html +0 -1
  438. package/docs/types/PanoCompassPluginData.html +0 -1
  439. package/docs/types/PanoCompassPluginExportType.html +0 -1
  440. package/docs/types/PanoCompassPluginParameterType.html +0 -1
  441. package/docs/types/PanoFloorplanRadarPluginParameterType.html +0 -1
  442. package/docs/types/PanoFloorplanRadarPluginReturnType.html +0 -1
  443. package/docs/types/PanoIndex.html +0 -1
  444. package/docs/types/PanoMeasurePluginEvent.html +0 -1
  445. package/docs/types/PanoMeasureReturnType.html +0 -1
  446. package/docs/types/PanoSpatialTagPluginId.html +0 -1
  447. package/docs/types/PanoTagPluginExportInterface.html +0 -1
  448. package/docs/types/PanoTagPluginParamsInterface.html +0 -1
  449. package/docs/types/PanoVideoPluginParameterType.html +0 -1
  450. package/docs/types/PanoVideoPluginReturnType.html +0 -1
  451. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +0 -2
  452. package/docs/types/PipelinePluginParameterType.html +0 -1
  453. package/docs/types/PipelinePluginReturnType.html +0 -1
  454. package/docs/types/PlaneTag.html +0 -2
  455. package/docs/types/Point2DTag.html +0 -2
  456. package/docs/types/Point3DTag.html +0 -2
  457. package/docs/types/PointTagInstance.html +0 -1
  458. package/docs/types/Position.html +0 -1
  459. package/docs/types/PositionFrom.html +0 -1
  460. package/docs/types/RotateArgs.html +0 -2
  461. package/docs/types/RotateOpts.html +0 -2
  462. package/docs/types/RuleLabelsKey.html +0 -1
  463. package/docs/types/RuleLabelsValue.html +0 -1
  464. package/docs/types/ScaleCallback.html +0 -1
  465. package/docs/types/ScalePosition.html +0 -3
  466. package/docs/types/SculptData.BoxData.html +0 -1
  467. package/docs/types/SculptData.CircleData.html +0 -1
  468. package/docs/types/SculptData.CylinderData.html +0 -1
  469. package/docs/types/SculptData.PointData.html +0 -1
  470. package/docs/types/SculptData.PolygonData.html +0 -1
  471. package/docs/types/SculptData.PolylineData.html +0 -1
  472. package/docs/types/SculptData.PrismData.html +0 -1
  473. package/docs/types/SculptData.RectangleData.html +0 -1
  474. package/docs/types/SculptType.Theme.html +0 -10
  475. package/docs/types/StickType.html +0 -1
  476. package/docs/types/Tag.html +0 -17
  477. package/docs/types/Tag2D.html +0 -2
  478. package/docs/types/Tag3D.html +0 -2
  479. package/docs/types/TagClickParams.html +0 -1
  480. package/docs/types/TagConfigByKey.html +0 -1
  481. package/docs/types/TagContentType.html +0 -1
  482. package/docs/types/TagContentTypeMapping.html +0 -1
  483. package/docs/types/TagDimensionType.html +0 -1
  484. package/docs/types/TagElement.html +0 -2
  485. package/docs/types/TagEvents.html +0 -1
  486. package/docs/types/TagGLTFObject.html +0 -1
  487. package/docs/types/TagHooks.html +0 -1
  488. package/docs/types/TagId.html +0 -1
  489. package/docs/types/TagInstance.html +0 -1
  490. package/docs/types/TagPlacement.html +0 -5
  491. package/docs/types/TagPointType.html +0 -2
  492. package/docs/types/TagRendererMap.html +0 -1
  493. package/docs/types/TopviewFloorplanPluginParameterType.html +0 -1
  494. package/docs/types/TopviewFloorplanPluginReturnType.html +0 -1
  495. package/docs/types/Util.ActionIfNoIntersection.html +0 -1
  496. package/docs/types/Util.AdherePoint.html +0 -2
  497. package/docs/types/Util.PointSelectorConfig.html +0 -1
  498. package/docs/types/Util.SupportedTarget.html +0 -2
  499. package/docs/types/Util.Target.html +0 -2
  500. package/docs/types/Util.ThreeObject.html +0 -2
  501. package/docs/types/WorkCode.html +0 -1
  502. package/docs/variables/FLOOR_TYPE_MAP.html +0 -2
  503. package/docs/variables/PLUGIN.html +0 -1
  504. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +0 -2
  505. package/docs/variables/ROOM_TYPE_MAP.html +0 -2
  506. package/docs/variables/Util.ANIME_PRESETS.html +0 -2
  507. package/docs/variables/Util.CURRENT_PANO_IMAGE_DEFAULT_IMAGE.html +0 -2
  508. package/docs/variables/Util.DEFAULT_ANIME_CONFIG.html +0 -2
  509. package/docs/variables/Util.DEFAULT_STATIC_PREFIX.html +0 -2
  510. package/docs/variables/Util.DNALOGEL_DEFAULT_ASSETS.html +0 -2
  511. package/docs/variables/Util.ENTRY_DOOR_DEFAULT_IMAGE.html +0 -2
  512. package/docs/variables/Util.FLOORPLAN_DEFAULT_IMAGE.html +0 -2
  513. package/docs/variables/Util.GUIDELINE_DEFAULT_ARROW_TEXTURE.html +0 -2
  514. package/docs/variables/Util.GUIDELINE_WHITE_ARROW_TEXTURE.html +0 -2
  515. package/docs/variables/Util.MODEL_CHASSIS_COMPASS_DEFAULT_MODEL.html +0 -2
  516. package/docs/variables/Util.MODEL_ENTRY_DOOR_GUIDE_PLUGIN_DEFAULT_MODEL.html +0 -2
  517. package/docs/variables/Util.PANO_COMPASS_DEFAULT_IMAGE.html +0 -2
  518. package/docs/variables/Util.PANO_SPATIAL_TAG_BLUR_IMAGE.html +0 -2
  519. package/docs/variables/Util.PANO_TAG_DEFAULT_LINK_ICON.html +0 -2
  520. package/docs/variables/defaultGlobalConfig.html +0 -1
  521. package/docs/variables/itemLabelPluginServerParams.html +0 -1
  522. package/docs/variables/modelItemLabelPluginServerParams.html +0 -1
  523. package/docs/variables/modelRoomLabelPluginServerParams.html +0 -1
@@ -9,23 +9,29 @@ export declare class DigitalHuman {
9
9
  items: DigitalModelPlayerItem[];
10
10
  effects: DigitalModelPlayerEffect[];
11
11
  digitalPlayground: any;
12
- private mixer;
13
- private action;
14
12
  state: {
15
13
  currentTime: number;
16
14
  currentAnimation: THREE.AnimationClip | null;
17
15
  playing: boolean;
18
16
  };
19
17
  animationFrameId: number | null;
20
- private itemMatrixMap;
21
- private trace;
22
18
  curveLine: THREE.Line;
23
19
  effectsGroup: THREE.Group;
24
20
  effectObjects: Map<string, THREE.Mesh>;
25
21
  container: THREE.Group;
22
+ private mixer;
23
+ private action;
24
+ private itemMatrixMap;
25
+ private trace;
26
26
  private processedNeedRenderKeyframeIndices;
27
+ private attachedItems;
28
+ private rightHandBone;
27
29
  constructor(model: GLTFObject, digitalPlayground: any);
28
- playAnimation(animation: THREE.AnimationClip, repeat: boolean, switchDuration: number): void;
30
+ playAnimation({ animation, repeat, switchDuration }: {
31
+ animation: THREE.AnimationClip;
32
+ repeat: boolean;
33
+ switchDuration: number;
34
+ }): void;
29
35
  pauseAnimation(): void;
30
36
  stopAnimation(): void;
31
37
  continueAnimation(): void;
@@ -39,7 +45,10 @@ export declare class DigitalHuman {
39
45
  }): Promise<boolean>;
40
46
  traceUpDate(): void;
41
47
  clearTrace(): void;
48
+ clearProcessedNeedRenderKeyframeIndices(): void;
42
49
  private hasProcessedNeedRenderForTimestamp;
43
50
  private markNeedRenderProcessedForTimestamp;
44
- clearProcessedNeedRenderKeyframeIndices(): void;
51
+ private getRightHandBone;
52
+ private updateKeyframeItems;
53
+ private detachAllKeyframeItems;
45
54
  }
@@ -1,57 +1,63 @@
1
1
  var x = Object.defineProperty;
2
- var R = (u, e, s) => e in u ? x(u, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : u[e] = s;
3
- var n = (u, e, s) => (R(u, typeof e != "symbol" ? e + "" : e, s), s);
4
- var M = (u, e, s) => new Promise((y, h) => {
5
- var r = (l) => {
2
+ var R = (y, e, t) => e in y ? x(y, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : y[e] = t;
3
+ var n = (y, e, t) => (R(y, typeof e != "symbol" ? e + "" : e, t), t);
4
+ var M = (y, e, t) => new Promise((l, o) => {
5
+ var a = (d) => {
6
6
  try {
7
- p(s.next(l));
7
+ p(t.next(d));
8
8
  } catch (F) {
9
- h(F);
9
+ o(F);
10
10
  }
11
- }, k = (l) => {
11
+ }, g = (d) => {
12
12
  try {
13
- p(s.throw(l));
13
+ p(t.throw(d));
14
14
  } catch (F) {
15
- h(F);
15
+ o(F);
16
16
  }
17
- }, p = (l) => l.done ? y(l.value) : Promise.resolve(l.value).then(r, k);
18
- p((s = s.apply(u, e)).next());
17
+ }, p = (d) => d.done ? l(d.value) : Promise.resolve(d.value).then(a, g);
18
+ p((t = t.apply(y, e)).next());
19
19
  });
20
- import * as t from "three";
20
+ import * as i from "three";
21
21
  import { DigitalStateMachine as S } from "./DigitalStateMachine.js";
22
22
  import { Trace as L } from "./Trace.js";
23
- const B = 300;
24
- class O {
25
- constructor(e, s) {
23
+ const q = 300;
24
+ class D {
25
+ constructor(e, t) {
26
26
  n(this, "model");
27
27
  n(this, "keyframesManager");
28
28
  n(this, "keyframes");
29
29
  n(this, "items");
30
30
  n(this, "effects");
31
31
  n(this, "digitalPlayground");
32
- n(this, "mixer");
33
- n(this, "action");
34
32
  n(this, "state");
35
33
  n(this, "animationFrameId");
36
- n(this, "itemMatrixMap");
37
- n(this, "trace");
38
34
  n(this, "curveLine");
39
35
  n(this, "effectsGroup");
40
36
  n(this, "effectObjects");
41
37
  n(this, "container");
38
+ n(this, "mixer");
39
+ n(this, "action");
40
+ n(this, "itemMatrixMap");
41
+ n(this, "trace");
42
42
  // 用于跟踪已处理的needRender keyframeIndex
43
43
  n(this, "processedNeedRenderKeyframeIndices", /* @__PURE__ */ new Set());
44
- this.model = e, this.model.visible = !1, this.model.mixer = null, this.mixer = new t.AnimationMixer(this.model), this.action = null, this.keyframesManager = new S(), this.keyframes = [], this.items = [], this.effects = [], this.digitalPlayground = s, this.state = {
44
+ // 跟踪已绑定到骨骼的 keyframe 道具(key: itemKey, value: item object)
45
+ n(this, "attachedItems", /* @__PURE__ */ new Map());
46
+ // 缓存 RightHand 骨骼
47
+ n(this, "rightHandBone", null);
48
+ this.model = e, this.model.visible = !1, this.model.mixer = null, this.mixer = new i.AnimationMixer(this.model), this.action = null, this.keyframesManager = new S(), this.keyframes = [], this.items = [], this.effects = [], this.digitalPlayground = t, this.state = {
45
49
  currentTime: 0,
46
50
  currentAnimation: null,
47
51
  playing: !1
48
- }, this.animationFrameId = null, this.itemMatrixMap = /* @__PURE__ */ new Map(), this.trace = new L(), this.curveLine = new t.Line(), this.curveLine.material = new t.LineBasicMaterial({ color: 14467195, linewidth: 5 }), this.effectsGroup = new t.Group(), this.effectObjects = /* @__PURE__ */ new Map(), this.container = new t.Group(), this.container.add(this.model), this.container.add(this.curveLine), this.container.add(this.effectsGroup);
52
+ }, this.animationFrameId = null, this.itemMatrixMap = /* @__PURE__ */ new Map(), this.trace = new L(), this.curveLine = new i.Line(), this.curveLine.material = new i.LineBasicMaterial({ color: 14467195, linewidth: 5 }), this.effectsGroup = new i.Group(), this.effectObjects = /* @__PURE__ */ new Map(), this.container = new i.Group(), this.container.add(this.model), this.container.add(this.curveLine), this.container.add(this.effectsGroup);
49
53
  }
50
- playAnimation(e, s, y) {
51
- const h = this.action, r = this.mixer.clipAction(e);
52
- r.reset(), s || (r.setLoop(t.LoopOnce, 1), r.clampWhenFinished = !0), h && (r.enabled = !0, r.setEffectiveTimeScale(1), r.crossFadeFrom(h, y / 1e3, !0)), r.play(), h && h !== r && setTimeout(() => {
53
- h.stop();
54
- }, y), this.action = r;
54
+ playAnimation({ animation: e, repeat: t, switchDuration: l }) {
55
+ const o = this.action;
56
+ e.tracks = e.tracks.filter((g) => g);
57
+ const a = this.mixer.clipAction(e);
58
+ a.reset(), t || (a.setLoop(i.LoopOnce, 1), a.clampWhenFinished = !0), o && (a.enabled = !0, a.setEffectiveTimeScale(1), a.crossFadeFrom(o, l / 1e3, !0)), a.play(), o && o !== a && setTimeout(() => {
59
+ o.stop();
60
+ }, l), this.action = a;
55
61
  }
56
62
  pauseAnimation() {
57
63
  this.action && (this.action.paused = !0), this.animationFrameId && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null), this.state.playing = !1;
@@ -65,93 +71,86 @@ class O {
65
71
  attachItem() {
66
72
  }
67
73
  init() {
68
- this.state.currentTime = 0, this.model.position.copy(new t.Vector3().fromArray(this.keyframes[0].position)), this.model.quaternion.copy(new t.Quaternion().fromArray(this.keyframes[0].quaternion)), this.model.visible = this.keyframes[0].visible;
74
+ this.state.currentTime = 0, this.model.position.copy(new i.Vector3().fromArray(this.keyframes[0].position)), this.model.quaternion.copy(new i.Quaternion().fromArray(this.keyframes[0].quaternion)), this.model.visible = this.keyframes[0].visible;
69
75
  }
70
76
  reset() {
71
- this.state.currentTime = 0, this.keyframes && this.keyframes.length > 0 && (this.model.position.copy(new t.Vector3().fromArray(this.keyframes[0].position)), this.model.quaternion.copy(new t.Quaternion().fromArray(this.keyframes[0].quaternion))), this.model.visible = !1, this.container.visible = !1, this.animationFrameId && cancelAnimationFrame(this.animationFrameId), this.stopAnimation(), this.clearTrace(), this.state.playing = !1;
77
+ this.state.currentTime = 0, this.keyframes && this.keyframes.length > 0 && (this.model.position.copy(new i.Vector3().fromArray(this.keyframes[0].position)), this.model.quaternion.copy(new i.Quaternion().fromArray(this.keyframes[0].quaternion))), this.model.visible = !1, this.container.visible = !1, this.animationFrameId && cancelAnimationFrame(this.animationFrameId), this.stopAnimation(), this.clearTrace(), this.detachAllKeyframeItems(), this.state.playing = !1;
72
78
  }
73
79
  play(e) {
74
80
  return M(this, null, function* () {
75
81
  this.clearProcessedNeedRenderKeyframeIndices();
76
- const { keyframes: s, items: y, effects: h } = e || {};
77
- return this.keyframes = s || this.keyframes, this.items = y || this.items, this.effects = h || this.effects, this.state.currentAnimation = null, this.state.playing = !0, new Promise((r, k) => {
82
+ const { keyframes: t, items: l, effects: o } = e || {};
83
+ return this.keyframes = t || this.keyframes, this.items = l || this.items, this.effects = o || this.effects, this.state.currentAnimation = null, this.state.playing = !0, new Promise((a, g) => {
78
84
  this.state.currentTime || this.init();
79
85
  let p = null;
80
- for (let m = 0; m < this.items.length; m++) {
81
- const c = this.digitalPlayground.getDigitalItem(this.items[m].model);
82
- if (c) {
83
- let i = null;
84
- const d = this.model.children[0].children.find((f) => f instanceof t.Bone), A = this.model.children[0].children.find((f) => f instanceof t.SkinnedMesh);
85
- if (!d || !A)
86
+ for (let c = 0; c < this.items.length; c++) {
87
+ const h = this.digitalPlayground.getDigitalItem(this.items[c].model);
88
+ if (h) {
89
+ let s = null;
90
+ const u = this.model.children[0].children.find((f) => f instanceof i.Bone), A = this.model.children[0].children.find((f) => f instanceof i.SkinnedMesh);
91
+ if (!u || !A)
86
92
  throw new Error("模型骨骼缺失");
87
93
  if (this.model.children[0].children[2].traverse((f) => {
88
- f instanceof t.Bone && f.name === "RightHand" && (i = f);
89
- }), !i)
94
+ f instanceof i.Bone && f.name === "RightHand" && (s = f);
95
+ }), !s)
90
96
  throw new Error("没有找到绑定的骨骼");
91
- i.add(c);
92
- const a = new t.Vector3(), o = new t.Quaternion(), g = new t.Vector3();
93
- new t.Matrix4().fromArray(this.items[m].initialMatrix).decompose(a, o, g), c.position.copy(a), c.quaternion.copy(o), c.scale.copy(g), c.updateMatrixWorld(!0);
97
+ s.add(h);
98
+ const w = new i.Vector3(), r = new i.Quaternion(), m = new i.Vector3();
99
+ new i.Matrix4().fromArray(this.items[c].initialMatrix).decompose(w, r, m), h.position.copy(w), h.quaternion.copy(r), h.scale.copy(m), h.updateMatrixWorld(!0);
94
100
  }
95
101
  }
96
- const l = /* @__PURE__ */ new Map(), F = new t.TextureLoader();
97
- for (let m = 0; m < this.effects.length; m++) {
98
- const c = this.effects[m];
99
- if (c.type === "frameSequence") {
100
- const i = c.keyframes;
101
- for (let d = 0; d < i.length; d++)
102
- F.load(i[d].image, (A) => {
103
- A.name = i[d].image, l.set(i[d].image, A);
102
+ const d = /* @__PURE__ */ new Map(), F = new i.TextureLoader();
103
+ for (let c = 0; c < this.effects.length; c++) {
104
+ const h = this.effects[c];
105
+ if (h.type === "frameSequence") {
106
+ const s = h.keyframes;
107
+ for (let u = 0; u < s.length; u++)
108
+ F.load(s[u].image, (A) => {
109
+ A.name = s[u].image, d.set(s[u].image, A);
104
110
  });
105
111
  }
106
112
  }
107
- const T = (m) => {
108
- var A;
109
- p === null && (p = m);
110
- const c = m - p;
111
- p = m, this.state.currentTime += c;
112
- const i = this.keyframesManager.getStateByTime(this.state.currentTime, this.keyframes, "model");
113
- this.trace.addPoint(i.translation);
114
- const d = new t.BufferGeometry().setFromPoints(this.trace.tracePoints);
115
- if (this.curveLine.geometry = d, this.model.position.copy(i.translation), this.model.quaternion.copy(i.quaternion), this.model.scale.copy(i.scale), this.model.visible = i.visible, i.isFinal) {
116
- this.model.visible = !1, this.container.visible = !1, this.stopAnimation(), this.model.needsRender = !0, r(!0), this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
113
+ const v = (c) => {
114
+ var A, w;
115
+ p === null && (p = c);
116
+ const h = c - p;
117
+ p = c, this.state.currentTime += h;
118
+ const s = this.keyframesManager.getStateByTime(this.state.currentTime, this.keyframes, "model");
119
+ this.trace.addPoint(s.translation);
120
+ const u = new i.BufferGeometry().setFromPoints(this.trace.tracePoints);
121
+ if (this.curveLine.geometry = u, this.model.position.copy(s.translation), this.model.quaternion.copy(s.quaternion), this.model.scale.copy(s.scale), this.model.visible = s.visible, s.isFinal) {
122
+ this.model.visible = !1, this.container.visible = !1, this.stopAnimation(), this.model.needsRender = !0, a(!0), this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
117
123
  return;
118
- } else if (i.animation) {
119
- const a = this.digitalPlayground.getAnimation(i.animation.url), o = i.animation.needRender;
120
- (a !== this.state.currentAnimation || o && !this.hasProcessedNeedRenderForTimestamp(i.keyframeIndex)) && (o && a === this.state.currentAnimation && this.markNeedRenderProcessedForTimestamp(i.keyframeIndex), this.state.currentAnimation = a, this.playAnimation(
121
- a,
122
- i.animation.repeat,
123
- (A = i.animation.switchDuration) != null ? A : B
124
- )), this.mixer.update(c / 1e3), i.animation.isOver === !0 && (this.action.paused = !0, this.action.time = this.state.currentAnimation.duration, this.mixer.update(0));
124
+ } else if (s.animation) {
125
+ const r = this.digitalPlayground.getAnimation(s.animation.url), m = s.animation.needRender;
126
+ (r !== this.state.currentAnimation || m && !this.hasProcessedNeedRenderForTimestamp(s.keyframeIndex)) && (m && r === this.state.currentAnimation && this.markNeedRenderProcessedForTimestamp(s.keyframeIndex), this.state.currentAnimation = r, this.playAnimation({
127
+ animation: r,
128
+ repeat: s.animation.repeat,
129
+ switchDuration: (A = s.animation.switchDuration) != null ? A : q
130
+ })), this.mixer.update(h / 1e3), s.animation.isOver === !0 && (this.action.paused = !0, this.action.time = this.state.currentAnimation.duration, this.mixer.update(0));
125
131
  }
126
- for (let a = 0; a < this.items.length; a++) {
127
- const o = this.digitalPlayground.getDigitalItem(this.items[a].model);
128
- o && (this.keyframesManager.getStateByTime(
129
- this.state.currentTime,
130
- this.items[a].keyframes,
131
- "item"
132
- ).visible === !0 ? o.visible = !0 : o.visible = !1);
132
+ this.updateKeyframeItems((w = s.animation) == null ? void 0 : w.item);
133
+ for (let r = 0; r < this.items.length; r++) {
134
+ const m = this.digitalPlayground.getDigitalItem(this.items[r].model);
135
+ m && (this.keyframesManager.getStateByTime(this.state.currentTime, this.items[r].keyframes, "item").visible === !0 ? m.visible = !0 : m.visible = !1);
133
136
  }
134
- for (let a = 0; a < this.effects.length; a++) {
135
- const o = this.effects[a];
136
- if (o.type === "frameSequence") {
137
- const g = o.type + a;
138
- if (!this.effectObjects.has(g)) {
139
- const P = new t.PlaneGeometry(1, 1), b = new t.MeshBasicMaterial({
137
+ for (let r = 0; r < this.effects.length; r++) {
138
+ const m = this.effects[r];
139
+ if (m.type === "frameSequence") {
140
+ const I = m.type + r;
141
+ if (!this.effectObjects.has(I)) {
142
+ const b = new i.PlaneGeometry(1, 1), B = new i.MeshBasicMaterial({
140
143
  transparent: !0
141
- }), w = new t.Mesh(P, b);
142
- w.rotateX(-Math.PI / 2), w.position.copy(new t.Vector3().fromArray(o.position)), this.effectObjects.set(g, w), this.effectsGroup.add(w);
144
+ }), k = new i.Mesh(b, B);
145
+ k.rotateX(-Math.PI / 2), k.position.copy(new i.Vector3().fromArray(m.position)), this.effectObjects.set(I, k), this.effectsGroup.add(k);
143
146
  }
144
- const I = this.effectObjects.get(g), f = this.keyframesManager.getStateByTime(
145
- this.state.currentTime,
146
- this.effects[a].keyframes,
147
- "effect"
148
- ), v = l.get(f.image);
149
- I.material.map = v, I.visible = f.visible;
147
+ const f = this.effectObjects.get(I), T = this.keyframesManager.getStateByTime(this.state.currentTime, this.effects[r].keyframes, "effect"), P = d.get(T.image);
148
+ f.material.map = P, f.visible = T.visible;
150
149
  }
151
150
  }
152
- this.model.needsRender = !0, this.animationFrameId = requestAnimationFrame(T);
151
+ this.model.needsRender = !0, this.animationFrameId = requestAnimationFrame(v);
153
152
  };
154
- this.animationFrameId && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null), this.animationFrameId = requestAnimationFrame(T);
153
+ this.animationFrameId && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null), this.animationFrameId = requestAnimationFrame(v);
155
154
  });
156
155
  });
157
156
  }
@@ -159,18 +158,22 @@ class O {
159
158
  traceUpDate() {
160
159
  this.trace.clear();
161
160
  for (let e = 0; e <= this.state.currentTime; e += 100) {
162
- const s = this.keyframesManager.getStateByTime(e, this.keyframes, "model");
163
- this.trace.addPoint(s.translation);
164
- const y = new t.BufferGeometry().setFromPoints(this.trace.tracePoints);
165
- this.curveLine.geometry = y;
161
+ const t = this.keyframesManager.getStateByTime(e, this.keyframes, "model");
162
+ this.trace.addPoint(t.translation);
163
+ const l = new i.BufferGeometry().setFromPoints(this.trace.tracePoints);
164
+ this.curveLine.geometry = l;
166
165
  }
167
166
  }
168
167
  // 清楚轨迹
169
168
  clearTrace() {
170
169
  this.trace.clear();
171
- const e = new t.BufferGeometry().setFromPoints(this.trace.tracePoints);
170
+ const e = new i.BufferGeometry().setFromPoints(this.trace.tracePoints);
172
171
  this.curveLine.geometry = e;
173
172
  }
173
+ // 清理已处理的keyframeIndex记录(可选,在适当的时候调用)
174
+ clearProcessedNeedRenderKeyframeIndices() {
175
+ this.processedNeedRenderKeyframeIndices.clear();
176
+ }
174
177
  // 检查指定keyframeIndex的needRender是否已经处理过
175
178
  hasProcessedNeedRenderForTimestamp(e) {
176
179
  return this.processedNeedRenderKeyframeIndices.has(e);
@@ -179,11 +182,35 @@ class O {
179
182
  markNeedRenderProcessedForTimestamp(e) {
180
183
  this.processedNeedRenderKeyframeIndices.add(e);
181
184
  }
182
- // 清理已处理的keyframeIndex记录(可选,在适当的时候调用)
183
- clearProcessedNeedRenderKeyframeIndices() {
184
- this.processedNeedRenderKeyframeIndices.clear();
185
+ // 获取并缓存 RightHand 骨骼
186
+ getRightHandBone() {
187
+ var e;
188
+ return this.rightHandBone ? this.rightHandBone : ((e = this.model.children[0].children.find((t) => t instanceof i.Bone)) == null || e.traverse((t) => {
189
+ t instanceof i.Bone && t.name === "RightHand" && (this.rightHandBone = t);
190
+ }), this.rightHandBone);
191
+ }
192
+ // 根据当前帧的 items 动态绑定/解绑道具
193
+ updateKeyframeItems(e) {
194
+ var o;
195
+ const t = (e == null ? void 0 : e.url) || null;
196
+ for (const [a, g] of this.attachedItems)
197
+ t !== a && ((o = g.parent) == null || o.remove(g), this.attachedItems.delete(a));
198
+ if (!t)
199
+ return;
200
+ const l = this.getRightHandBone();
201
+ if (l && !this.attachedItems.has(t)) {
202
+ const a = this.digitalPlayground.getDigitalItem(t);
203
+ a && (l.add(a), this.attachedItems.set(t, a));
204
+ }
205
+ }
206
+ // 解绑所有 keyframe 道具
207
+ detachAllKeyframeItems() {
208
+ var e;
209
+ for (const [, t] of this.attachedItems)
210
+ (e = t.parent) == null || e.remove(t);
211
+ this.attachedItems.clear();
185
212
  }
186
213
  }
187
214
  export {
188
- O as DigitalHuman
215
+ D as DigitalHuman
189
216
  };
@@ -4,14 +4,13 @@ import { DigitalHuman } from './DigitalHuman';
4
4
  import type { DigitalScript, DigitalChapter } from './DigitalStateMachine';
5
5
  export declare class DigitalPlayground {
6
6
  gltfLoader: GLTFLoader;
7
+ script: DigitalScript | null;
8
+ currentChapter: DigitalChapter | null;
7
9
  private digitalHumanMap;
8
10
  private digitalItemMap;
9
11
  private skeletalAnimationMap;
10
- script: DigitalScript | null;
11
- currentChapter: DigitalChapter | null;
12
12
  private debugMode;
13
13
  constructor(debugMode?: boolean);
14
- private loadGLTF;
15
14
  setScript(script: DigitalScript): void;
16
15
  loadModel(url: string, id?: string): Promise<DigitalHuman>;
17
16
  loadModels(urls: string[], ids?: string[]): Promise<DigitalHuman[]>;
@@ -20,8 +19,14 @@ export declare class DigitalPlayground {
20
19
  getAnimation(url: string): THREE.AnimationClip | null;
21
20
  getDigitalHuman(url: string, id?: string): DigitalHuman | null;
22
21
  playByChapter(chapter: DigitalChapter): Promise<any[]>;
23
- loadItems(urls: string[]): Promise<any[]>;
24
- loadItem(url: string): Promise<any>;
22
+ loadItems(urls: string[], offsets?: Map<string, {
23
+ position: number[];
24
+ rotation: number[];
25
+ }>): Promise<any[]>;
26
+ loadItem(url: string, offset?: {
27
+ position: number[];
28
+ rotation: number[];
29
+ }): Promise<any>;
25
30
  getDigitalItem(url: string): any | null;
26
31
  pause(): void;
27
32
  continue(): void;
@@ -31,4 +36,5 @@ export declare class DigitalPlayground {
31
36
  * 销毁 playground
32
37
  */
33
38
  dispose(): void;
39
+ private loadGLTF;
34
40
  }
@@ -1,127 +1,131 @@
1
- var d = Object.defineProperty;
2
- var c = (o, t, e) => t in o ? d(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
- var m = (o, t, e) => (c(o, typeof t != "symbol" ? t + "" : t, e), e);
4
- var h = (o, t, e) => new Promise((a, i) => {
5
- var s = (l) => {
1
+ var g = Object.defineProperty;
2
+ var u = (o, t, i) => t in o ? g(o, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[t] = i;
3
+ var m = (o, t, i) => (u(o, typeof t != "symbol" ? t + "" : t, i), i);
4
+ var p = (o, t, i) => new Promise((e, a) => {
5
+ var r = (l) => {
6
6
  try {
7
- n(e.next(l));
8
- } catch (p) {
9
- i(p);
7
+ s(i.next(l));
8
+ } catch (h) {
9
+ a(h);
10
10
  }
11
- }, r = (l) => {
11
+ }, n = (l) => {
12
12
  try {
13
- n(e.throw(l));
14
- } catch (p) {
15
- i(p);
13
+ s(i.throw(l));
14
+ } catch (h) {
15
+ a(h);
16
16
  }
17
- }, n = (l) => l.done ? a(l.value) : Promise.resolve(l.value).then(s, r);
18
- n((e = e.apply(o, t)).next());
17
+ }, s = (l) => l.done ? e(l.value) : Promise.resolve(l.value).then(r, n);
18
+ s((i = i.apply(o, t)).next());
19
19
  });
20
- import { GLTFLoader as g } from "@realsee/five/gltf-loader";
21
- import { DigitalHuman as u } from "./DigitalHuman.js";
22
- import { loadGltf as M } from "@realsee/five";
23
- import "three";
20
+ import * as d from "three";
21
+ import { GLTFLoader as M } from "@realsee/five/gltf-loader";
22
+ import { DigitalHuman as y } from "./DigitalHuman.js";
23
+ import { loadGltf as A } from "@realsee/five";
24
24
  import "./DigitalStateMachine.js";
25
25
  import "./Trace.js";
26
- class w {
26
+ class T {
27
27
  constructor(t = !1) {
28
28
  m(this, "gltfLoader");
29
+ m(this, "script");
30
+ m(this, "currentChapter");
29
31
  m(this, "digitalHumanMap");
30
32
  m(this, "digitalItemMap");
31
33
  m(this, "skeletalAnimationMap");
32
- m(this, "script");
33
- m(this, "currentChapter");
34
34
  m(this, "debugMode");
35
- this.gltfLoader = new g(), this.digitalHumanMap = /* @__PURE__ */ new Map(), this.digitalItemMap = /* @__PURE__ */ new Map(), this.skeletalAnimationMap = /* @__PURE__ */ new Map(), this.script = null, this.currentChapter = null, this.debugMode = t;
36
- }
37
- loadGLTF(t) {
38
- return M(t).then((e) => {
39
- const a = e == null ? void 0 : e.upAxis;
40
- return e && a === "Z" && e.scene && (e.scene.rotateX(-Math.PI / 2), e.scene.updateMatrixWorld(!0)), e;
41
- });
35
+ this.gltfLoader = new M(), this.digitalHumanMap = /* @__PURE__ */ new Map(), this.digitalItemMap = /* @__PURE__ */ new Map(), this.skeletalAnimationMap = /* @__PURE__ */ new Map(), this.script = null, this.currentChapter = null, this.debugMode = t;
42
36
  }
43
37
  setScript(t) {
44
38
  this.script = t;
45
39
  }
46
- loadModel(t, e) {
47
- return h(this, null, function* () {
48
- const a = e ? `${t}_${e}` : t;
49
- if (this.digitalHumanMap.has(a)) {
50
- const i = this.digitalHumanMap.get(a);
51
- return Promise.resolve(i);
40
+ loadModel(t, i) {
41
+ return p(this, null, function* () {
42
+ const e = i ? `${t}_${i}` : t;
43
+ if (this.digitalHumanMap.has(e)) {
44
+ const a = this.digitalHumanMap.get(e);
45
+ return Promise.resolve(a);
52
46
  } else
53
- return new Promise((i, s) => {
54
- t.endsWith(".gltf") || t.endsWith(".glb") ? this.loadGLTF(t).then((r) => {
55
- const n = r.scene, l = new u(n, this);
56
- this.digitalHumanMap.set(a, l), i(l);
57
- }) : s(new Error("不支持的模型格式"));
47
+ return new Promise((a, r) => {
48
+ t.endsWith(".gltf") || t.endsWith(".glb") ? this.loadGLTF(t).then((n) => {
49
+ const s = n.scene, l = new y(s, this);
50
+ this.digitalHumanMap.set(e, l), a(l);
51
+ }) : r(new Error("不支持的模型格式"));
58
52
  });
59
53
  });
60
54
  }
61
- loadModels(t, e) {
62
- return h(this, null, function* () {
63
- return e && e.length === t.length ? Promise.all(t.map((a, i) => this.loadModel(a, e[i]))) : Promise.all(t.map((a) => this.loadModel(a)));
55
+ loadModels(t, i) {
56
+ return p(this, null, function* () {
57
+ return i && i.length === t.length ? Promise.all(t.map((e, a) => this.loadModel(e, i[a]))) : Promise.all(t.map((e) => this.loadModel(e)));
64
58
  });
65
59
  }
66
60
  // 加载骨骼动画,暂且认为一个glb只包含一个骨骼动画
67
61
  loadAnimation(t) {
68
- return h(this, null, function* () {
62
+ return p(this, null, function* () {
69
63
  if (this.skeletalAnimationMap.has(t)) {
70
- const e = this.skeletalAnimationMap.get(t);
71
- return Promise.resolve(e);
64
+ const i = this.skeletalAnimationMap.get(t);
65
+ return Promise.resolve(i);
72
66
  } else
73
- return new Promise((e, a) => {
74
- this.loadGLTF(t).then((i) => {
75
- const r = i.animations[0];
76
- this.skeletalAnimationMap.set(t, r), e(r);
67
+ return new Promise((i, e) => {
68
+ this.loadGLTF(t).then((a) => {
69
+ const n = a.animations[0];
70
+ this.skeletalAnimationMap.set(t, n), i(n);
77
71
  });
78
72
  });
79
73
  });
80
74
  }
81
75
  loadAnimations(t) {
82
- return h(this, null, function* () {
83
- return Promise.all(t.map((e) => this.loadAnimation(e)));
76
+ return p(this, null, function* () {
77
+ return Promise.all(t.map((i) => this.loadAnimation(i)));
84
78
  });
85
79
  }
86
80
  getAnimation(t) {
87
81
  return this.skeletalAnimationMap.get(t) || null;
88
82
  }
89
- getDigitalHuman(t, e) {
90
- const a = e ? `${t}_${e}` : t;
91
- return this.digitalHumanMap.get(a) || null;
83
+ getDigitalHuman(t, i) {
84
+ const e = i ? `${t}_${i}` : t;
85
+ return this.digitalHumanMap.get(e) || null;
92
86
  }
93
87
  playByChapter(t) {
94
- return h(this, null, function* () {
88
+ return p(this, null, function* () {
95
89
  if (!t || !Array.isArray(t.players))
96
90
  throw new Error("Invalid chapter: chapter or chapter.players is undefined");
97
91
  this.currentChapter = t;
98
- const e = t.players.filter((i) => i.type === "model");
99
- this.digitalHumanMap.forEach((i) => {
100
- i.model.visible = !1, i.container.visible = !1;
92
+ const i = t.players.filter((a) => a.type === "model");
93
+ this.digitalHumanMap.forEach((a) => {
94
+ a.model.visible = !1, a.container.visible = !1;
101
95
  });
102
- const a = [];
103
- for (let i = 0; i < e.length; i++) {
104
- const s = e[i], r = `${s.model}_${s.id}`, n = this.digitalHumanMap.get(r);
105
- n && (n.model.visible = !0, n.container.visible = !0, a.push(n.play({ keyframes: s.keyframes, items: [], effects: [] })));
96
+ const e = [];
97
+ for (let a = 0; a < i.length; a++) {
98
+ const r = i[a], n = `${r.model}_${r.id}`, s = this.digitalHumanMap.get(n);
99
+ s && (s.model.visible = !0, s.container.visible = !0, e.push(s.play({ keyframes: r.keyframes, items: [], effects: [] })));
106
100
  }
107
- return Promise.all(a);
101
+ return Promise.all(e);
108
102
  });
109
103
  }
110
- loadItems(t) {
111
- return h(this, null, function* () {
112
- return Promise.all(t.map((e) => this.loadItem(e)));
104
+ loadItems(t, i) {
105
+ return p(this, null, function* () {
106
+ return Promise.all(t.map((e) => this.loadItem(e, i == null ? void 0 : i.get(e))));
113
107
  });
114
108
  }
115
- loadItem(t) {
116
- return h(this, null, function* () {
109
+ loadItem(t, i) {
110
+ return p(this, null, function* () {
117
111
  if (this.digitalItemMap.has(t)) {
118
112
  const e = this.digitalItemMap.get(t);
119
113
  return Promise.resolve(e);
120
114
  } else
121
115
  return new Promise((e, a) => {
122
- t.endsWith(".gltf") || t.endsWith(".glb") ? this.loadGLTF(t).then((i) => {
123
- const s = i.scene;
124
- this.digitalItemMap.set(t, s), e(s);
116
+ t.endsWith(".gltf") || t.endsWith(".glb") ? this.loadGLTF(t).then((r) => {
117
+ const n = r.scene;
118
+ if (i && (i != null && i.position) && (i != null && i.rotation)) {
119
+ const [s, l, h] = i.position;
120
+ n.position.set(s * 0.01, -l * 0.01, -h * 0.01);
121
+ const c = new d.Euler(
122
+ d.MathUtils.degToRad(i.rotation[0]),
123
+ d.MathUtils.degToRad(i.rotation[1]),
124
+ d.MathUtils.degToRad(i.rotation[2])
125
+ );
126
+ n.quaternion.setFromEuler(c);
127
+ }
128
+ this.digitalItemMap.set(t, n), e(n);
125
129
  }) : a(new Error("不支持的模型格式"));
126
130
  });
127
131
  });
@@ -145,8 +149,8 @@ class w {
145
149
  });
146
150
  }
147
151
  setTimelineTo(t) {
148
- this.digitalHumanMap.forEach((e) => {
149
- e.state.currentTime = t;
152
+ this.digitalHumanMap.forEach((i) => {
153
+ i.state.currentTime = t;
150
154
  });
151
155
  }
152
156
  /**
@@ -157,7 +161,13 @@ class w {
157
161
  t.reset();
158
162
  }), this.digitalHumanMap.clear(), this.digitalItemMap.clear(), this.skeletalAnimationMap.clear();
159
163
  }
164
+ loadGLTF(t) {
165
+ return A(t).then((i) => {
166
+ const e = i == null ? void 0 : i.upAxis;
167
+ return i && e === "Z" && i.scene && (i.scene.rotateX(-Math.PI / 2), i.scene.updateMatrixWorld(!0)), i;
168
+ });
169
+ }
160
170
  }
161
171
  export {
162
- w as DigitalPlayground
172
+ T as DigitalPlayground
163
173
  };
@@ -78,6 +78,13 @@ interface DigitalModelKeyframe {
78
78
  repeat: boolean;
79
79
  isOver?: boolean;
80
80
  switchDuration?: number;
81
+ duration?: number;
82
+ item?: {
83
+ url: string;
84
+ position?: number[];
85
+ name?: string;
86
+ rotation?: number[];
87
+ };
81
88
  };
82
89
  position: number[];
83
90
  interpolationType?: 'linear' | 'parabola';