@anov/3d-ability 0.0.142 → 0.0.143

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 (256) hide show
  1. package/dist/business/Animation/motion/index.js +56 -35
  2. package/dist/business/Animation/motion/index.js.map +1 -1
  3. package/dist/business/Animation/type.js +2 -2
  4. package/dist/business/Area/Fence/FenceBase.js +187 -146
  5. package/dist/business/Area/Fence/FenceBase.js.map +1 -1
  6. package/dist/business/Area/Fence/fence_base_01.js +112 -120
  7. package/dist/business/Area/Fence/fence_base_01.js.map +1 -1
  8. package/dist/business/Area/Fence/fence_feeting_01.js +130 -218
  9. package/dist/business/Area/Fence/fence_feeting_01.js.map +1 -1
  10. package/dist/business/Area/Fence/fence_roll_01.js +130 -140
  11. package/dist/business/Area/Fence/fence_roll_01.js.map +1 -1
  12. package/dist/business/Area/FillArea/FillAreaBase.js +126 -87
  13. package/dist/business/Area/FillArea/FillAreaBase.js.map +1 -1
  14. package/dist/business/Area/FillArea/fillArea_face_01.js +98 -72
  15. package/dist/business/Area/FillArea/fillArea_face_01.js.map +1 -1
  16. package/dist/business/Area/FillArea/fillArea_line_01.js +94 -66
  17. package/dist/business/Area/FillArea/fillArea_line_01.js.map +1 -1
  18. package/dist/business/Area/index.js +483 -267
  19. package/dist/business/Area/index.js.map +1 -1
  20. package/dist/business/Area/tool.js +26 -14
  21. package/dist/business/Area/tool.js.map +1 -1
  22. package/dist/business/Base/ObjectLayer.js +46 -21
  23. package/dist/business/Base/ObjectLayer.js.map +1 -1
  24. package/dist/business/Batch/index.js +234 -189
  25. package/dist/business/Batch/index.js.map +1 -1
  26. package/dist/business/Box/index.js +81 -52
  27. package/dist/business/Box/index.js.map +1 -1
  28. package/dist/business/Cylinder/index.js +79 -51
  29. package/dist/business/Cylinder/index.js.map +1 -1
  30. package/dist/business/Flyline/bubble/CircleBubble.js +9 -1
  31. package/dist/business/Flyline/bubble/CircleBubble.js.map +1 -1
  32. package/dist/business/Flyline/bubble/index.js +21 -7
  33. package/dist/business/Flyline/bubble/index.js.map +1 -1
  34. package/dist/business/Flyline/index.js +162 -96
  35. package/dist/business/Flyline/index.js.map +1 -1
  36. package/dist/business/Flyline/line/ArcLine.js +291 -208
  37. package/dist/business/Flyline/line/ArcLine.js.map +1 -1
  38. package/dist/business/Flyline/line/index.js +22 -8
  39. package/dist/business/Flyline/line/index.js.map +1 -1
  40. package/dist/business/HeatMap/HeatMap.js +467 -380
  41. package/dist/business/HeatMap/HeatMap.js.map +1 -1
  42. package/dist/business/HeatMap/core.js +525 -405
  43. package/dist/business/HeatMap/core.js.map +1 -1
  44. package/dist/business/HeatMap/shader.js +3 -69
  45. package/dist/business/HeatMap/shader.js.map +1 -1
  46. package/dist/business/InfoPanel/index.js +242 -201
  47. package/dist/business/InfoPanel/index.js.map +1 -1
  48. package/dist/business/Line/index.js +88 -55
  49. package/dist/business/Line/index.js.map +1 -1
  50. package/dist/business/Mark/KeyframeAnimation.js +176 -145
  51. package/dist/business/Mark/KeyframeAnimation.js.map +1 -1
  52. package/dist/business/Mark/index.js +294 -196
  53. package/dist/business/Mark/index.js.map +1 -1
  54. package/dist/business/Mark/shader/tanhao.js +3 -36
  55. package/dist/business/Mark/shader/tanhao.js.map +1 -1
  56. package/dist/business/Mark/type.js +1 -1
  57. package/dist/business/MaterialSwitch/MaterialSwitchSystem.js +551 -377
  58. package/dist/business/MaterialSwitch/MaterialSwitchSystem.js.map +1 -1
  59. package/dist/business/MaterialSwitch/inject.js +58 -92
  60. package/dist/business/MaterialSwitch/inject.js.map +1 -1
  61. package/dist/business/MaterialSwitch/shader/finalFade.js +2 -74
  62. package/dist/business/MaterialSwitch/shader/finalFade.js.map +1 -1
  63. package/dist/business/MaterialSwitch/shader/ground.js +16 -95
  64. package/dist/business/MaterialSwitch/shader/ground.js.map +1 -1
  65. package/dist/business/MaterialSwitch/shader/groundBase64.js +3 -9
  66. package/dist/business/MaterialSwitch/shader/groundBase64.js.map +1 -1
  67. package/dist/business/MaterialSwitch/shader/realFade.js +9 -48
  68. package/dist/business/MaterialSwitch/shader/realFade.js.map +1 -1
  69. package/dist/business/Plane/index.js +78 -51
  70. package/dist/business/Plane/index.js.map +1 -1
  71. package/dist/business/Poi/index.js +336 -248
  72. package/dist/business/Poi/index.js.map +1 -1
  73. package/dist/business/Poi/link/Cylinder.js +89 -56
  74. package/dist/business/Poi/link/Cylinder.js.map +1 -1
  75. package/dist/business/Poi/link/Pyramid.js +165 -104
  76. package/dist/business/Poi/link/Pyramid.js.map +1 -1
  77. package/dist/business/Poi/link/index.js +114 -54
  78. package/dist/business/Poi/link/index.js.map +1 -1
  79. package/dist/business/Poi/panel/index.js +373 -315
  80. package/dist/business/Poi/panel/index.js.map +1 -1
  81. package/dist/business/Poi/panel/utils.js +10 -5
  82. package/dist/business/Poi/panel/utils.js.map +1 -1
  83. package/dist/business/Poi/particle/DoubleCircle.js +107 -71
  84. package/dist/business/Poi/particle/DoubleCircle.js.map +1 -1
  85. package/dist/business/Poi/particle/DynamicCircle.js +111 -75
  86. package/dist/business/Poi/particle/DynamicCircle.js.map +1 -1
  87. package/dist/business/Poi/particle/SingleCircle.js +98 -62
  88. package/dist/business/Poi/particle/SingleCircle.js.map +1 -1
  89. package/dist/business/Poi/particle/index.js +117 -49
  90. package/dist/business/Poi/particle/index.js.map +1 -1
  91. package/dist/business/Poi/shader/circle.js +3 -31
  92. package/dist/business/Poi/shader/circle.js.map +1 -1
  93. package/dist/business/Poi/shader/cylinder.js +3 -37
  94. package/dist/business/Poi/shader/cylinder.js.map +1 -1
  95. package/dist/business/Poi/shader/doubleCircle.js +3 -55
  96. package/dist/business/Poi/shader/doubleCircle.js.map +1 -1
  97. package/dist/business/Poi/shader/dynamicCircle.js +3 -67
  98. package/dist/business/Poi/shader/dynamicCircle.js.map +1 -1
  99. package/dist/business/Poi/title/Border.js +27 -7
  100. package/dist/business/Poi/title/Border.js.map +1 -1
  101. package/dist/business/Poi/title/Ellipse.js +27 -7
  102. package/dist/business/Poi/title/Ellipse.js.map +1 -1
  103. package/dist/business/Poi/title/index.js +292 -208
  104. package/dist/business/Poi/title/index.js.map +1 -1
  105. package/dist/business/Poi/tools.js +17 -18
  106. package/dist/business/Poi/tools.js.map +1 -1
  107. package/dist/business/Sphere/index.js +72 -47
  108. package/dist/business/Sphere/index.js.map +1 -1
  109. package/dist/business/Spline/index.js +245 -190
  110. package/dist/business/Spline/index.js.map +1 -1
  111. package/dist/business/SplitBuilding/index.js +536 -327
  112. package/dist/business/SplitBuilding/index.js.map +1 -1
  113. package/dist/business/SplitBuilding/type.js +2 -2
  114. package/dist/business/TrafficComponents/RealismTraffic/RealismTraffic.js +275 -218
  115. package/dist/business/TrafficComponents/RealismTraffic/RealismTraffic.js.map +1 -1
  116. package/dist/business/TrafficComponents/StreamerTraffic/StreamerTraffic.js +177 -132
  117. package/dist/business/TrafficComponents/StreamerTraffic/StreamerTraffic.js.map +1 -1
  118. package/dist/business/TrafficComponents/StreamerTraffic/fragmentShader.js +1 -51
  119. package/dist/business/TrafficComponents/StreamerTraffic/fragmentShader.js.map +1 -1
  120. package/dist/business/TrafficComponents/StreamerTraffic/vertexShader.js +1 -6
  121. package/dist/business/TrafficComponents/StreamerTraffic/vertexShader.js.map +1 -1
  122. package/dist/business/TrafficComponents/base.js +55 -32
  123. package/dist/business/TrafficComponents/base.js.map +1 -1
  124. package/dist/business/TrafficComponents/utils.js +24 -25
  125. package/dist/business/TrafficComponents/utils.js.map +1 -1
  126. package/dist/business/Utils/Curve.js +56 -40
  127. package/dist/business/Utils/Curve.js.map +1 -1
  128. package/dist/business/Utils/constant.js +1 -1
  129. package/dist/business/Utils/constant.js.map +1 -1
  130. package/dist/business/Utils/defineProps.js +14 -13
  131. package/dist/business/Utils/defineProps.js.map +1 -1
  132. package/dist/business/Utils/round-curve.js +153 -127
  133. package/dist/business/Utils/round-curve.js.map +1 -1
  134. package/dist/business/VideoPanel/index.js +319 -258
  135. package/dist/business/VideoPanel/index.js.map +1 -1
  136. package/dist/business/Water/index.js +108 -78
  137. package/dist/business/Water/index.js.map +1 -1
  138. package/dist/business/Water/types.js +1 -1
  139. package/dist/business/Water/types.js.map +1 -1
  140. package/dist/core/Camera/PerspectiveCamera/CameraExpand.js +449 -383
  141. package/dist/core/Camera/PerspectiveCamera/CameraExpand.js.map +1 -1
  142. package/dist/core/Camera/PerspectiveCamera/FollowOrbitControls.js +142 -107
  143. package/dist/core/Camera/PerspectiveCamera/FollowOrbitControls.js.map +1 -1
  144. package/dist/core/Controls/FirstViewControl/index.js +96 -84
  145. package/dist/core/Controls/FirstViewControl/index.js.map +1 -1
  146. package/dist/core/Controls/ThirdViewControl/action/input.js +98 -77
  147. package/dist/core/Controls/ThirdViewControl/action/input.js.map +1 -1
  148. package/dist/core/Controls/ThirdViewControl/config/constants.js +1 -1
  149. package/dist/core/Controls/ThirdViewControl/config/constants.js.map +1 -1
  150. package/dist/core/Controls/ThirdViewControl/index.js +28 -19
  151. package/dist/core/Controls/ThirdViewControl/index.js.map +1 -1
  152. package/dist/core/Controls/ThirdViewControl/player/animation.js +155 -126
  153. package/dist/core/Controls/ThirdViewControl/player/animation.js.map +1 -1
  154. package/dist/core/Controls/ThirdViewControl/player/camera.js +63 -47
  155. package/dist/core/Controls/ThirdViewControl/player/camera.js.map +1 -1
  156. package/dist/core/Controls/ThirdViewControl/player/control.js +49 -39
  157. package/dist/core/Controls/ThirdViewControl/player/control.js.map +1 -1
  158. package/dist/core/Controls/ThirdViewControl/player.js +91 -66
  159. package/dist/core/Controls/ThirdViewControl/player.js.map +1 -1
  160. package/dist/core/Controls/base.js +30 -14
  161. package/dist/core/Controls/base.js.map +1 -1
  162. package/dist/core/Curve/RoundedCornersCurve/RoundedCornersCurve.js +131 -92
  163. package/dist/core/Curve/RoundedCornersCurve/RoundedCornersCurve.js.map +1 -1
  164. package/dist/core/Debug/PerformanceInfo/Performance.js +47 -22
  165. package/dist/core/Debug/PerformanceInfo/Performance.js.map +1 -1
  166. package/dist/core/Light/PointLight/PointLightExt.js +21 -4
  167. package/dist/core/Light/PointLight/PointLightExt.js.map +1 -1
  168. package/dist/core/Material/FinirMaterial/FinirMaterial.js +57 -37
  169. package/dist/core/Material/FinirMaterial/FinirMaterial.js.map +1 -1
  170. package/dist/core/Material/PristineGridMaterial/PristineGridMaterial.js +153 -116
  171. package/dist/core/Material/PristineGridMaterial/PristineGridMaterial.js.map +1 -1
  172. package/dist/core/Material/PristineGridMaterial/shader/fragment.js +1 -95
  173. package/dist/core/Material/PristineGridMaterial/shader/fragment.js.map +1 -1
  174. package/dist/core/Material/PristineGridMaterial/shader/vertex.js +1 -26
  175. package/dist/core/Material/PristineGridMaterial/shader/vertex.js.map +1 -1
  176. package/dist/core/Material/SurfaceMaterial/index.js +172 -76
  177. package/dist/core/Material/SurfaceMaterial/index.js.map +1 -1
  178. package/dist/core/Material/decorators.js +11 -6
  179. package/dist/core/Material/decorators.js.map +1 -1
  180. package/dist/core/PostEffects/addACESFilmicToneMappingPass.js +12 -16
  181. package/dist/core/PostEffects/addACESFilmicToneMappingPass.js.map +1 -1
  182. package/dist/core/PostEffects/addBrightnessContrastPass.js +13 -17
  183. package/dist/core/PostEffects/addBrightnessContrastPass.js.map +1 -1
  184. package/dist/core/PostEffects/bloomPass.js +10 -17
  185. package/dist/core/PostEffects/bloomPass.js.map +1 -1
  186. package/dist/core/PostEffects/bloomSelect.js +43 -60
  187. package/dist/core/PostEffects/bloomSelect.js.map +1 -1
  188. package/dist/core/PostEffects/colorifyPass.js +13 -17
  189. package/dist/core/PostEffects/colorifyPass.js.map +1 -1
  190. package/dist/core/PostEffects/index.js +22 -28
  191. package/dist/core/PostEffects/index.js.map +1 -1
  192. package/dist/core/PostEffects/outlinePass.js +50 -37
  193. package/dist/core/PostEffects/outlinePass.js.map +1 -1
  194. package/dist/core/PostEffects/postprocessing.js +12 -14
  195. package/dist/core/PostEffects/postprocessing.js.map +1 -1
  196. package/dist/core/PostEffects/saoPass.js +10 -15
  197. package/dist/core/PostEffects/saoPass.js.map +1 -1
  198. package/dist/core/PostEffects/shader/colorify.js +3 -22
  199. package/dist/core/PostEffects/shader/colorify.js.map +1 -1
  200. package/dist/core/PostEffects/shader/gammaCorrectionShader.js +3 -27
  201. package/dist/core/PostEffects/shader/gammaCorrectionShader.js.map +1 -1
  202. package/dist/core/PostEffects/shader/mapping.js +3 -66
  203. package/dist/core/PostEffects/shader/mapping.js.map +1 -1
  204. package/dist/core/PostEffects/shader/thermalMaging.js +3 -28
  205. package/dist/core/PostEffects/shader/thermalMaging.js.map +1 -1
  206. package/dist/core/SceneEffect/grow/grow.js +101 -85
  207. package/dist/core/SceneEffect/grow/grow.js.map +1 -1
  208. package/dist/core/SceneEffect/grow/style_down.js +77 -60
  209. package/dist/core/SceneEffect/grow/style_down.js.map +1 -1
  210. package/dist/core/SceneEffect/grow/style_up.js +81 -64
  211. package/dist/core/SceneEffect/grow/style_up.js.map +1 -1
  212. package/dist/core/SceneEffect/grow/type.js +2 -2
  213. package/dist/core/SceneEffect/grow/type.js.map +1 -1
  214. package/dist/core/WeatherSystem/DynamicWeatherSystem.js +76 -51
  215. package/dist/core/WeatherSystem/DynamicWeatherSystem.js.map +1 -1
  216. package/dist/core/WeatherSystem/hdr/index.js +105 -69
  217. package/dist/core/WeatherSystem/hdr/index.js.map +1 -1
  218. package/dist/core/WeatherSystem/index.js +124 -77
  219. package/dist/core/WeatherSystem/index.js.map +1 -1
  220. package/dist/core/WeatherSystem/objects/fog/index.js +80 -52
  221. package/dist/core/WeatherSystem/objects/fog/index.js.map +1 -1
  222. package/dist/core/WeatherSystem/objects/rain/index.js +84 -72
  223. package/dist/core/WeatherSystem/objects/rain/index.js.map +1 -1
  224. package/dist/core/WeatherSystem/objects/rain/lineRain.js +118 -88
  225. package/dist/core/WeatherSystem/objects/rain/lineRain.js.map +1 -1
  226. package/dist/core/WeatherSystem/objects/rain/plane.js +146 -116
  227. package/dist/core/WeatherSystem/objects/rain/plane.js.map +1 -1
  228. package/dist/core/WeatherSystem/objects/rain/point.js +148 -100
  229. package/dist/core/WeatherSystem/objects/rain/point.js.map +1 -1
  230. package/dist/core/WeatherSystem/objects/sky/cloud.js +104 -71
  231. package/dist/core/WeatherSystem/objects/sky/cloud.js.map +1 -1
  232. package/dist/core/WeatherSystem/objects/sky/index.js +84 -66
  233. package/dist/core/WeatherSystem/objects/sky/index.js.map +1 -1
  234. package/dist/core/WeatherSystem/objects/sky/outline.js +45 -25
  235. package/dist/core/WeatherSystem/objects/sky/outline.js.map +1 -1
  236. package/dist/core/WeatherSystem/shaders/cloud.js +3 -74
  237. package/dist/core/WeatherSystem/shaders/cloud.js.map +1 -1
  238. package/dist/core/WeatherSystem/shaders/fog.js +3 -103
  239. package/dist/core/WeatherSystem/shaders/fog.js.map +1 -1
  240. package/dist/core/WeatherSystem/shaders/rain.js +7 -206
  241. package/dist/core/WeatherSystem/shaders/rain.js.map +1 -1
  242. package/dist/core/WeatherSystem/shaders/sky.js +3 -87
  243. package/dist/core/WeatherSystem/shaders/sky.js.map +1 -1
  244. package/dist/core/WeatherSystem/sky/index.js +135 -104
  245. package/dist/core/WeatherSystem/sky/index.js.map +1 -1
  246. package/dist/core/WeatherSystem/utils/constant.js +38 -44
  247. package/dist/core/WeatherSystem/utils/constant.js.map +1 -1
  248. package/dist/core/WeatherSystem/utils/math.js +25 -18
  249. package/dist/core/WeatherSystem/utils/math.js.map +1 -1
  250. package/dist/core/WeatherSystem/utils/type.js +1 -1
  251. package/dist/core/WeatherSystem/utils/type.js.map +1 -1
  252. package/dist/core/WeatherSystem/weather/index.js +141 -96
  253. package/dist/core/WeatherSystem/weather/index.js.map +1 -1
  254. package/dist/utils/index.js +1 -1
  255. package/dist/utils/index.js.map +1 -1
  256. package/package.json +3 -3
@@ -1,10 +1,22 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
1
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
5
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
6
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
7
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
10
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
11
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
14
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
15
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
16
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5
17
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
7
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
19
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
20
  import { Box3, Color, Group, LoaderModule, MeshBasicMaterial, ShaderMaterial } from '@anov/3d-core';
9
21
  import _ from 'lodash';
10
22
  import { StrategyManage as BubbleStrategy } from "../Poi/particle/index";
@@ -13,7 +25,7 @@ import { SOURCE_BASE_PATH } from "../Utils/constant";
13
25
  import { ELevel } from "./type";
14
26
  import { EMarkAnimationType, KeyframeAnimation } from "./KeyframeAnimation";
15
27
  import TanhaoShader from "./shader/tanhao";
16
- const DEFAULT_OPTION = {
28
+ var DEFAULT_OPTION = {
17
29
  uri: '',
18
30
  // 统一资源标识符,既可以是code也是可以资源路径
19
31
  level: 0,
@@ -30,211 +42,297 @@ const DEFAULT_OPTION = {
30
42
  color: ''
31
43
  }
32
44
  };
33
- const COLORS = ['#538FFF', '#FFA753', '#FF6353'];
34
- const MODEL_URI = `${SOURCE_BASE_PATH}/models/mark.glb`;
35
- const load = new LoaderModule();
36
- class Mark extends ObjectLayer {
37
- get ready() {
38
- return this._readyPromise;
39
- }
40
- get uri() {
41
- return this._uri;
42
- }
43
- set uri(value) {
44
- this._uri = value;
45
- }
46
- get animation() {
47
- return this._animation;
48
- }
49
- get level() {
50
- return this._level;
51
- }
52
- set level(value) {
53
- if (this._level === value) return;
54
- this._level = Math.max(0, Math.min(value, 3));
55
- this.setMeshLevel();
56
- this.bubble.color = this.getColor();
57
- }
58
- get bubble() {
59
- return this._bubble;
60
- }
61
- set bubble(value) {
62
- this._bubble = value;
63
- }
64
- constructor(option) {
65
- super();
66
- _defineProperty(this, "_uri", void 0);
67
- _defineProperty(this, "_level", void 0);
68
- _defineProperty(this, "_animation", void 0);
69
- _defineProperty(this, "_bubble", void 0);
70
- _defineProperty(this, "_readyPromise", void 0);
71
- _defineProperty(this, "_mesh", void 0);
72
- _defineProperty(this, "_markMesh", void 0);
73
- _defineProperty(this, "_bubbleMesh", void 0);
45
+ var COLORS = ['#538FFF', '#FFA753', '#FF6353'];
46
+ var MODEL_URI = "".concat(SOURCE_BASE_PATH, "/models/mark.glb");
47
+ var load = new LoaderModule();
48
+ var Mark = /*#__PURE__*/function (_ObjectLayer) {
49
+ _inherits(Mark, _ObjectLayer);
50
+ var _super = _createSuper(Mark);
51
+ function Mark(option) {
52
+ var _this;
53
+ _classCallCheck(this, Mark);
54
+ _this = _super.call(this);
55
+ _defineProperty(_assertThisInitialized(_this), "_uri", void 0);
56
+ _defineProperty(_assertThisInitialized(_this), "_level", void 0);
57
+ _defineProperty(_assertThisInitialized(_this), "_animation", void 0);
58
+ _defineProperty(_assertThisInitialized(_this), "_bubble", void 0);
59
+ _defineProperty(_assertThisInitialized(_this), "_readyPromise", void 0);
60
+ _defineProperty(_assertThisInitialized(_this), "_mesh", void 0);
61
+ _defineProperty(_assertThisInitialized(_this), "_markMesh", void 0);
62
+ _defineProperty(_assertThisInitialized(_this), "_bubbleMesh", void 0);
74
63
  // 动画相关参数
75
- _defineProperty(this, "_animationController", void 0);
76
- const param = _.mergeWith(_.cloneDeep(DEFAULT_OPTION), option, this.arrayMergeCustomizer);
77
- const {
78
- uri,
79
- animation,
80
- level = ELevel.Low,
81
- bubble
82
- } = param;
83
- this._uri = uri;
84
- this._animation = animation;
85
- this._level = Math.max(0, Math.min(level, 3));
86
- this._bubble = bubble;
87
- if (!bubble.color) this._bubble.color = this.getColor();
88
- this._readyPromise = this.init();
64
+ _defineProperty(_assertThisInitialized(_this), "_animationController", void 0);
65
+ var param = _.mergeWith(_.cloneDeep(DEFAULT_OPTION), option, _this.arrayMergeCustomizer);
66
+ var uri = param.uri,
67
+ animation = param.animation,
68
+ _param$level = param.level,
69
+ level = _param$level === void 0 ? ELevel.Low : _param$level,
70
+ bubble = param.bubble;
71
+ _this._uri = uri;
72
+ _this._animation = animation;
73
+ _this._level = Math.max(0, Math.min(level, 3));
74
+ _this._bubble = bubble;
75
+ if (!bubble.color) _this._bubble.color = _this.getColor();
76
+ _this._readyPromise = _this.init();
77
+ return _this;
89
78
  }
90
79
 
91
80
  // 动画设置
92
- init() {
93
- var _this = this;
94
- return _asyncToGenerator(function* () {
95
- const group = new Group();
96
- _this._markMesh = yield _this.loadModel(MODEL_URI);
97
- group.add(_this._markMesh);
81
+ _createClass(Mark, [{
82
+ key: "ready",
83
+ get: function get() {
84
+ return this._readyPromise;
85
+ }
86
+ }, {
87
+ key: "uri",
88
+ get: function get() {
89
+ return this._uri;
90
+ },
91
+ set: function set(value) {
92
+ this._uri = value;
93
+ }
94
+ }, {
95
+ key: "animation",
96
+ get: function get() {
97
+ return this._animation;
98
+ }
99
+ }, {
100
+ key: "level",
101
+ get: function get() {
102
+ return this._level;
103
+ },
104
+ set: function set(value) {
105
+ if (this._level === value) return;
106
+ this._level = Math.max(0, Math.min(value, 3));
107
+ this.setMeshLevel();
108
+ this.bubble.color = this.getColor();
109
+ }
110
+ }, {
111
+ key: "bubble",
112
+ get: function get() {
113
+ return this._bubble;
114
+ },
115
+ set: function set(value) {
116
+ this._bubble = value;
117
+ }
118
+ }, {
119
+ key: "init",
120
+ value: function () {
121
+ var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
122
+ var _this2 = this;
123
+ var group, BubbleClass;
124
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
125
+ while (1) switch (_context.prev = _context.next) {
126
+ case 0:
127
+ group = new Group();
128
+ _context.next = 3;
129
+ return this.loadModel(MODEL_URI);
130
+ case 3:
131
+ this._markMesh = _context.sent;
132
+ group.add(this._markMesh);
98
133
 
99
- // 气泡
100
- const BubbleClass = yield BubbleStrategy.dynamicCircle();
101
- _this._bubbleMesh = new BubbleClass(_objectSpread({
102
- radius: 0.5
103
- }, _this.bubble));
104
- group.add(_this._bubbleMesh);
105
- _this._mesh = group;
106
- _this.add(_this._mesh);
107
- _this.setMeshLevel();
108
- _this.setModelPosition();
109
- _this._animationController = new KeyframeAnimation(_this._markMesh, _this._animation);
110
- _this._bubble = _this.createProxy(_this._bubble, _this._bubbleMesh);
111
- _this._animation = _this.createProxy(_this._animation, null, (key, value) => {
112
- _this._animationController[key] = value;
134
+ // 气泡
135
+ _context.next = 7;
136
+ return BubbleStrategy.dynamicCircle();
137
+ case 7:
138
+ BubbleClass = _context.sent;
139
+ this._bubbleMesh = new BubbleClass(_objectSpread({
140
+ radius: 0.5
141
+ }, this.bubble));
142
+ group.add(this._bubbleMesh);
143
+ this._mesh = group;
144
+ this.add(this._mesh);
145
+ this.setMeshLevel();
146
+ this.setModelPosition();
147
+ this._animationController = new KeyframeAnimation(this._markMesh, this._animation);
148
+ this._bubble = this.createProxy(this._bubble, this._bubbleMesh);
149
+ this._animation = this.createProxy(this._animation, null, function (key, value) {
150
+ _this2._animationController[key] = value;
151
+ });
152
+ return _context.abrupt("return", true);
153
+ case 18:
154
+ case "end":
155
+ return _context.stop();
156
+ }
157
+ }, _callee, this);
158
+ }));
159
+ function init() {
160
+ return _init.apply(this, arguments);
161
+ }
162
+ return init;
163
+ }()
164
+ }, {
165
+ key: "setModelPosition",
166
+ value: function setModelPosition() {
167
+ if (this.bubble.visible !== false) {
168
+ var _this$getBoxSize = this.getBoxSize(this._markMesh),
169
+ height = _this$getBoxSize.height;
170
+ this._markMesh.position.setY(height * 0.5);
171
+ } else {
172
+ this._markMesh.position.setY(0);
173
+ }
174
+ }
175
+ }, {
176
+ key: "loadModel",
177
+ value: function loadModel(uri) {
178
+ return new Promise(function (resolve, reject) {
179
+ load.loadGLTF({
180
+ url: uri,
181
+ autoBackward: false,
182
+ isCache: true,
183
+ draco: true,
184
+ onLoad: function onLoad(gltf) {
185
+ resolve(gltf.scene);
186
+ },
187
+ onError: function onError() {
188
+ // eslint-disable-next-line prefer-promise-reject-errors
189
+ reject(null);
190
+ }
191
+ });
113
192
  });
114
- return true;
115
- })();
116
- }
117
- setModelPosition() {
118
- if (this.bubble.visible !== false) {
119
- const {
120
- height
121
- } = this.getBoxSize(this._markMesh);
122
- this._markMesh.position.setY(height * 0.5);
123
- } else {
124
- this._markMesh.position.setY(0);
125
193
  }
126
- }
127
- loadModel(uri) {
128
- return new Promise((resolve, reject) => {
129
- load.loadGLTF({
130
- url: uri,
131
- autoBackward: false,
132
- isCache: true,
133
- draco: true,
134
- onLoad: gltf => {
135
- resolve(gltf.scene);
194
+ }, {
195
+ key: "setMeshLevel",
196
+ value: function setMeshLevel() {
197
+ var vertexShader = TanhaoShader.vertexShader,
198
+ fragmentShader = TanhaoShader.fragmentShader;
199
+ var panelMaterial = new ShaderMaterial({
200
+ uniforms: {
201
+ color: {
202
+ value: new Color(this.getColor())
203
+ }
136
204
  },
137
- onError: () => {
138
- // eslint-disable-next-line prefer-promise-reject-errors
139
- reject(null);
140
- }
205
+ vertexShader: vertexShader,
206
+ fragmentShader: fragmentShader,
207
+ transparent: true,
208
+ // 设置材质双面渲染,确保从正反两面都能正确显示
209
+ side: 2,
210
+ // 关闭深度测试
211
+ depthTest: true,
212
+ depthWrite: false
141
213
  });
142
- });
143
- }
144
- setMeshLevel() {
145
- const {
146
- vertexShader,
147
- fragmentShader
148
- } = TanhaoShader;
149
- const panelMaterial = new ShaderMaterial({
150
- uniforms: {
151
- color: {
152
- value: new Color(this.getColor())
214
+ var borderMaterial = new MeshBasicMaterial({
215
+ color: this.getColor()
216
+ });
217
+ this._markMesh.traverse(function (object) {
218
+ if (object.type === 'Mesh') {
219
+ var mesh = object;
220
+ if (mesh.name === 'Mesh')
221
+ // TODO:等确定命名规范
222
+ mesh.material = borderMaterial;
223
+ if (mesh.name === 'Mesh_1') mesh.material = panelMaterial;
224
+ // // 处理材质数组
225
+ // if (Array.isArray(mesh.material)) {
226
+ // // 如果是多材质对象
227
+ // (mesh.material as Material[]).forEach((material) => {
228
+ // (material as MeshBasicMaterial).color.set(this.getColor())
229
+ // })
230
+ // }
231
+ // else {
232
+ // // 单一材质
233
+ // (mesh.material as MeshBasicMaterial).color.set(this.getColor())
234
+ // }
153
235
  }
154
- },
155
- vertexShader,
156
- fragmentShader,
157
- transparent: true,
158
- // 设置材质双面渲染,确保从正反两面都能正确显示
159
- side: 2,
160
- // 关闭深度测试
161
- depthTest: true,
162
- depthWrite: false
163
- });
164
- const borderMaterial = new MeshBasicMaterial({
165
- color: this.getColor()
166
- });
167
- this._markMesh.traverse(object => {
168
- if (object.type === 'Mesh') {
169
- const mesh = object;
170
- if (mesh.name === 'Mesh')
171
- // TODO:等确定命名规范
172
- mesh.material = borderMaterial;
173
- if (mesh.name === 'Mesh_1') mesh.material = panelMaterial;
174
- // // 处理材质数组
175
- // if (Array.isArray(mesh.material)) {
176
- // // 如果是多材质对象
177
- // (mesh.material as Material[]).forEach((material) => {
178
- // (material as MeshBasicMaterial).color.set(this.getColor())
179
- // })
180
- // }
181
- // else {
182
- // // 单一材质
183
- // (mesh.material as MeshBasicMaterial).color.set(this.getColor())
184
- // }
185
- }
186
- });
187
- }
188
- getColor() {
189
- return COLORS[this.level];
190
- }
191
-
192
- // 更新动画混合器
193
- update(delta) {
194
- var _this2 = this;
195
- return _asyncToGenerator(function* () {
196
- var _this2$_animationCont;
197
- yield _this2.ready;
198
- (_this2$_animationCont = _this2._animationController) === null || _this2$_animationCont === void 0 || _this2$_animationCont.update(delta);
199
- })();
200
- }
201
-
202
- // 播放动画
203
- play(type) {
204
- var _this3 = this;
205
- return _asyncToGenerator(function* () {
206
- yield _this3.ready;
207
- _this3._animationController.play(type);
208
- })();
209
- }
236
+ });
237
+ }
238
+ }, {
239
+ key: "getColor",
240
+ value: function getColor() {
241
+ return COLORS[this.level];
242
+ }
210
243
 
211
- // 播放动画
212
- stop(type) {
213
- var _this4 = this;
214
- return _asyncToGenerator(function* () {
215
- yield _this4.ready;
216
- _this4._animationController.stop(type);
217
- })();
218
- }
219
- getBoxSize(mesh) {
220
- // mesh.updateWorldMatrix(true, true)
221
- const {
222
- max,
223
- min
224
- } = new Box3().setFromObject(mesh);
225
- return {
226
- width: max.x - min.x,
227
- height: max.y - min.y
228
- };
229
- }
244
+ // 更新动画混合器
245
+ }, {
246
+ key: "update",
247
+ value: function () {
248
+ var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(delta) {
249
+ var _this$_animationContr;
250
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
251
+ while (1) switch (_context2.prev = _context2.next) {
252
+ case 0:
253
+ _context2.next = 2;
254
+ return this.ready;
255
+ case 2:
256
+ (_this$_animationContr = this._animationController) === null || _this$_animationContr === void 0 || _this$_animationContr.update(delta);
257
+ case 3:
258
+ case "end":
259
+ return _context2.stop();
260
+ }
261
+ }, _callee2, this);
262
+ }));
263
+ function update(_x) {
264
+ return _update.apply(this, arguments);
265
+ }
266
+ return update;
267
+ }() // 播放动画
268
+ }, {
269
+ key: "play",
270
+ value: function () {
271
+ var _play = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(type) {
272
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
273
+ while (1) switch (_context3.prev = _context3.next) {
274
+ case 0:
275
+ _context3.next = 2;
276
+ return this.ready;
277
+ case 2:
278
+ this._animationController.play(type);
279
+ case 3:
280
+ case "end":
281
+ return _context3.stop();
282
+ }
283
+ }, _callee3, this);
284
+ }));
285
+ function play(_x2) {
286
+ return _play.apply(this, arguments);
287
+ }
288
+ return play;
289
+ }() // 播放动画
290
+ }, {
291
+ key: "stop",
292
+ value: function () {
293
+ var _stop = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(type) {
294
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
295
+ while (1) switch (_context4.prev = _context4.next) {
296
+ case 0:
297
+ _context4.next = 2;
298
+ return this.ready;
299
+ case 2:
300
+ this._animationController.stop(type);
301
+ case 3:
302
+ case "end":
303
+ return _context4.stop();
304
+ }
305
+ }, _callee4, this);
306
+ }));
307
+ function stop(_x3) {
308
+ return _stop.apply(this, arguments);
309
+ }
310
+ return stop;
311
+ }()
312
+ }, {
313
+ key: "getBoxSize",
314
+ value: function getBoxSize(mesh) {
315
+ // mesh.updateWorldMatrix(true, true)
316
+ var _Box3$setFromObject = new Box3().setFromObject(mesh),
317
+ max = _Box3$setFromObject.max,
318
+ min = _Box3$setFromObject.min;
319
+ return {
320
+ width: max.x - min.x,
321
+ height: max.y - min.y
322
+ };
323
+ }
230
324
 
231
- // 销毁资源
232
- dispose() {
233
- if (this._animationController) {
234
- this._animationController.destroy();
235
- this._animationController = null;
325
+ // 销毁资源
326
+ }, {
327
+ key: "dispose",
328
+ value: function dispose() {
329
+ if (this._animationController) {
330
+ this._animationController.destroy();
331
+ this._animationController = null;
332
+ }
236
333
  }
237
- }
238
- }
334
+ }]);
335
+ return Mark;
336
+ }(ObjectLayer);
239
337
  export { Mark, EMarkAnimationType };
240
338
  //# sourceMappingURL=index.js.map