@realsee/dnalogel 0.1.1 → 0.1.5

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 (201) hide show
  1. package/components/ARVideoFigure/ARVideoFigureMesh.js +56 -32
  2. package/components/ARVideoFigure/ARVideoFigureScene.js +30 -19
  3. package/components/ARVideoFigure/ImgBgTransparent.js +22 -6
  4. package/components/ARVideoFigure/ImgBgTransparentMesh.js +40 -30
  5. package/components/ARVideoFigure/fragmentShader.js +2 -0
  6. package/components/ARVideoFigure/index.js +22 -6
  7. package/components/ARVideoFigure/vertexShader.js +2 -0
  8. package/components/GlassFilters/index.js +25 -1
  9. package/components/ModelView/ModelViewController.js +39 -29
  10. package/components/ModelView/index.js +4 -2
  11. package/components/PBRView/index.js +15 -1
  12. package/components/PaintBrush/index.js +15 -1
  13. package/components/PanoTag/index.js +2 -0
  14. package/data/1aGKl9JmrlXMXx8d.js +2 -0
  15. package/data/54djM0oR6ky3Ey8e.d.ts +55 -0
  16. package/data/54djM0oR6ky3Ey8e.js +350 -0
  17. package/data/6gyq3v1verxD7JO1.js +2 -0
  18. package/data/8054djM0oR6ky3Ey8e.d.ts +55 -0
  19. package/data/8054djM0oR6ky3Ey8e.js +350 -0
  20. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +2 -0
  21. package/data/PrXel3aqGbp34JQn.js +2 -0
  22. package/data/XJ6NMLWnkAY3Rdx8.d.ts +843 -0
  23. package/data/XJ6NMLWnkAY3Rdx8.js +7989 -0
  24. package/data/YdoNP9K4rwQDwjJr.js +2 -0
  25. package/data/ZLvK29zj4L29Jowd.d.ts +55 -0
  26. package/data/ZLvK29zj4L29Jowd.js +372 -0
  27. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +2 -0
  28. package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +5 -0
  29. package/data/extrude-walls/ZLvK29zj4L29Jowd.js +14 -0
  30. package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +5 -0
  31. package/data/extrude-walls/lo024DEgzanMj5BE.js +14 -0
  32. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +85 -0
  33. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +511 -0
  34. package/data/lo024DEgzanMj5BE.d.ts +55 -0
  35. package/data/lo024DEgzanMj5BE.js +966 -0
  36. package/data/oPzy3ApbjjpD8YdR.js +2 -0
  37. package/data/qjAxMG4XbPn96wKG.js +2 -0
  38. package/data/rXel3aPQRRBD4JQn.js +2 -0
  39. package/data/vLykj3NWrllMrG06.d.ts +2 -0
  40. package/data/vLykj3NWrllMrG06.js +199 -2
  41. package/data/wz0QV9KA4ugyo9ME.js +2 -0
  42. package/data/zxMawr9raSg8LYjG.d.ts +53 -0
  43. package/data/zxMawr9raSg8LYjG.js +590 -0
  44. package/examples/FiveStateController/index.js +9 -15
  45. package/examples/VRHouse/Mobile.js +15 -1
  46. package/examples/VRHouse/PC.js +15 -1
  47. package/examples/VRHouse/index.js +15 -1
  48. package/index.js +4 -2
  49. package/package.json +8 -5
  50. package/plugins/AutoPreloadPlugin/index.d.ts +23 -0
  51. package/plugins/AutoPreloadPlugin/index.js +111 -0
  52. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +24 -16
  53. package/plugins/CSS3DRenderPlugin/index.d.ts +11 -11
  54. package/plugins/CSS3DRenderPlugin/index.js +200 -122
  55. package/plugins/CameraMovementPlugin/index.js +33 -9
  56. package/plugins/CameraMovementPlugin/typing.js +2 -0
  57. package/plugins/ModelChassisCompassPlugin/index.d.ts +7 -3
  58. package/plugins/ModelChassisCompassPlugin/index.js +34 -33
  59. package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +13 -1
  60. package/plugins/ModelEntryDoorGuidePlugin/index.js +230 -2
  61. package/plugins/ModelExtrudeWallsPlugin/index.d.ts +16 -0
  62. package/plugins/ModelExtrudeWallsPlugin/index.js +252 -0
  63. package/plugins/ModelRoomLabelPlugin/Controller.d.ts +35 -0
  64. package/plugins/ModelRoomLabelPlugin/Controller.js +153 -0
  65. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +8 -0
  66. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +66 -0
  67. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +7 -0
  68. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +159 -0
  69. package/plugins/ModelRoomLabelPlugin/index.d.ts +8 -0
  70. package/plugins/ModelRoomLabelPlugin/index.js +18 -0
  71. package/plugins/ModelRoomLabelPlugin/typings.d.ts +35 -0
  72. package/plugins/ModelRoomLabelPlugin/typings.js +7 -0
  73. package/plugins/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  74. package/plugins/ModelRoomLabelPlugin/utils/parseData.js +35 -0
  75. package/plugins/ModelTVVideoPlugin/index.js +100 -16
  76. package/plugins/ModelViewPlugin/index.js +25 -1
  77. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +29 -25
  78. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +15 -1
  79. package/plugins/PanoCursorRaycasterPlugin/index.js +13 -6
  80. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +4 -2
  81. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +15 -1
  82. package/plugins/PanoDoorLabelPlugin/index.js +2 -0
  83. package/plugins/PanoIRobotPlugin/index.js +2 -0
  84. package/plugins/PanoMaskSelectorPlugin/compare.d.ts +1 -0
  85. package/plugins/PanoMaskSelectorPlugin/compare.js +17 -0
  86. package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +7 -0
  87. package/plugins/PanoMaskSelectorPlugin/createBox.js +79 -0
  88. package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +3 -0
  89. package/plugins/PanoMaskSelectorPlugin/createTextures.js +45 -0
  90. package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +1 -0
  91. package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +10 -0
  92. package/plugins/PanoMaskSelectorPlugin/index.d.ts +49 -0
  93. package/plugins/PanoMaskSelectorPlugin/index.js +348 -0
  94. package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +1 -0
  95. package/plugins/PanoMaskSelectorPlugin/vertexShader.js +10 -0
  96. package/plugins/PanoRulerPlugin/data/roomInfo.js +2 -0
  97. package/plugins/PanoRulerPlugin/data/roomRules.js +2 -0
  98. package/plugins/PanoRulerPlugin/index.js +68 -20
  99. package/plugins/PanoRulerPlugin/typings.js +2 -0
  100. package/plugins/PanoTVVideoPlugin/index.js +88 -12
  101. package/plugins/TreasurePlugin/Controller.d.ts +15 -7
  102. package/plugins/TreasurePlugin/Controller.js +99 -60
  103. package/plugins/TreasurePlugin/TreasureFaceAnime.js +36 -21
  104. package/plugins/TreasurePlugin/TreasureObject.d.ts +12 -2
  105. package/plugins/TreasurePlugin/TreasureObject.js +243 -117
  106. package/plugins/TreasurePlugin/TreasureOpenAnime.js +38 -19
  107. package/plugins/TreasurePlugin/constants.js +2 -0
  108. package/plugins/TreasurePlugin/index.js +2 -0
  109. package/plugins/TreasurePlugin/typings.js +2 -0
  110. package/plugins/floorplan/Assets/floorplanExtraObject.js +2 -0
  111. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +71 -88
  112. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +25 -5
  113. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +19 -4
  114. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +28 -4
  115. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +28 -5
  116. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +20 -6
  117. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +30 -8
  118. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +2 -0
  119. package/plugins/floorplan/ModelFloorplanPlugin/index.js +4 -2
  120. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +2 -0
  121. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +2 -0
  122. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +14 -22
  123. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +25 -3
  124. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +6 -2
  125. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +19 -3
  126. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +28 -4
  127. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +22 -6
  128. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +29 -19
  129. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +2 -0
  130. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +44 -47
  131. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +4 -2
  132. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +50 -55
  133. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +2 -0
  134. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +2 -0
  135. package/plugins/floorplan/components/FloorplanImage.js +15 -1
  136. package/plugins/floorplan/typings/floorplanData.js +2 -0
  137. package/plugins/floorplan/typings/floorplanServerData.js +2 -0
  138. package/plugins/floorplan/utils/formatData.js +28 -10
  139. package/plugins/floorplan/utils/formatPosition.d.ts +4 -4
  140. package/plugins/floorplan/utils/formatPosition.js +10 -8
  141. package/shared-utils/Preloader.js +6 -0
  142. package/shared-utils/Subscribe.js +36 -16
  143. package/shared-utils/animationFrame/BetterTween.js +28 -27
  144. package/shared-utils/animationFrame/calculateProgress.js +2 -0
  145. package/shared-utils/animationFrame/formatRad.js +2 -0
  146. package/shared-utils/animationFrame/index.js +12 -0
  147. package/shared-utils/animationFrame/tween.js +17 -1
  148. package/shared-utils/changeModelCanvansOpacity.js +14 -0
  149. package/shared-utils/createCanvasTextTexture.d.ts +8 -0
  150. package/shared-utils/createCanvasTextTexture.js +31 -0
  151. package/shared-utils/createFiveContainer.js +23 -17
  152. package/shared-utils/createLine/index.js +15 -1
  153. package/shared-utils/debounce.js +4 -0
  154. package/shared-utils/equal.js +15 -4
  155. package/shared-utils/filter.js +36 -2
  156. package/shared-utils/five/changeMode.js +13 -17
  157. package/shared-utils/five/useFivePlugin.js +2 -0
  158. package/shared-utils/formatRad.js +2 -0
  159. package/shared-utils/getPxmm.js +15 -1
  160. package/shared-utils/getRandomColor.js +10 -0
  161. package/shared-utils/isNil.js +2 -0
  162. package/shared-utils/isTruelyObject.js +4 -0
  163. package/shared-utils/math/evenNumber.js +2 -0
  164. package/shared-utils/math/planimetry.js +10 -0
  165. package/shared-utils/math/rad2Deg.js +2 -0
  166. package/shared-utils/nearlyEqual.js +2 -0
  167. package/shared-utils/nextFrame.js +2 -0
  168. package/shared-utils/noop.js +2 -0
  169. package/shared-utils/object3d2LocalMatrix.js +20 -14
  170. package/shared-utils/px2rem.js +10 -0
  171. package/shared-utils/tap.js +2 -0
  172. package/shared-utils/three/centerPoint.js +2 -0
  173. package/shared-utils/three/getExtraModelLoader.js +14 -0
  174. package/shared-utils/three/getNormal.js +4 -0
  175. package/shared-utils/three/getTextureLoader.js +16 -0
  176. package/shared-utils/three/loadFbxObj.js +13 -5
  177. package/shared-utils/three/loadTexture.js +13 -5
  178. package/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  179. package/shared-utils/three/{vecror3.js → transformPositionToVector3.js} +4 -2
  180. package/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  181. package/shared-utils/three/transfromToMeshBasicMaterial.js +33 -0
  182. package/shared-utils/throttle.js +4 -0
  183. package/shared-utils/to.js +8 -4
  184. package/shared-utils/useDebounce.js +6 -0
  185. package/shared-utils/useThrottle.js +6 -0
  186. package/shared-utils/uuid.js +8 -0
  187. package/shared-utils/vectorTocoordinates.js +2 -0
  188. package/typedoc/components.js +2 -0
  189. package/typedoc/plugins.d.ts +2 -0
  190. package/typedoc/plugins.js +41 -1
  191. package/typedoc/shared-utils.js +2 -0
  192. package/typedoc/typings.d.ts +1 -1
  193. package/typedoc/typings.js +2 -0
  194. package/typings/math.type.d.ts +2 -2
  195. package/typings/math.type.js +2 -0
  196. package/typings/utils.type.js +2 -0
  197. package/data/wYnRjQ4KZoV1yPoG.d.ts +0 -114
  198. package/data/wYnRjQ4KZoV1yPoG.js +0 -512
  199. package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.d.ts +0 -7
  200. package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.js +0 -18
  201. package/shared-utils/three/vecror3.d.ts +0 -7
@@ -1,65 +1,79 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ require("core-js/modules/es.reflect.construct.js");
4
+
5
+ require("core-js/modules/es.array.iterator.js");
6
+
7
+ require("core-js/modules/es.string.iterator.js");
8
+
9
+ require("core-js/modules/es.weak-map.js");
10
+
11
+ require("core-js/modules/web.dom-collections.iterator.js");
12
+
13
+ require("core-js/modules/es.object.define-property.js");
14
+
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+
17
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
18
+
19
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
20
 
5
21
  Object.defineProperty(exports, "__esModule", {
6
22
  value: true
7
23
  });
8
24
  exports.TreasureObject = void 0;
9
25
 
10
- var THREE = _interopRequireWildcard(require("three"));
11
-
12
- var _TreasureFaceAnime = require("./TreasureFaceAnime");
26
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
27
 
14
- var _TreasureOpenAnime = require("./TreasureOpenAnime");
28
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
29
 
16
- var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
30
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
17
31
 
18
- var _to = _interopRequireDefault(require("../../shared-utils/to"));
32
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
19
33
 
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
34
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
21
35
 
22
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
36
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
23
37
 
24
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
38
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
25
39
 
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
40
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
27
41
 
28
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
42
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
29
43
 
30
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
44
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
31
45
 
32
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
46
+ require("core-js/modules/es.array.map.js");
33
47
 
34
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
48
+ require("core-js/modules/es.object.to-string.js");
35
49
 
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
50
+ require("core-js/modules/es.promise.js");
37
51
 
38
- 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); } }
52
+ require("core-js/modules/es.array.for-each.js");
39
53
 
40
- 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); }); }; }
54
+ require("core-js/modules/web.dom-collections.for-each.js");
41
55
 
42
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
56
+ require("core-js/modules/es.string.sub.js");
43
57
 
44
- 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, descriptor.key, descriptor); } }
58
+ var THREE = _interopRequireWildcard(require("three"));
45
59
 
46
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
60
+ var TWEEN = _interopRequireWildcard(require("@tweenjs/tween.js"));
47
61
 
48
- 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }
62
+ var _TreasureFaceAnime = require("./TreasureFaceAnime");
49
63
 
50
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
64
+ var _TreasureOpenAnime = require("./TreasureOpenAnime");
51
65
 
52
- 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); }; }
66
+ var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
53
67
 
54
- 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); }
68
+ var _to = _interopRequireDefault(require("../../shared-utils/to"));
55
69
 
56
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
70
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
57
71
 
58
- 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; } }
72
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
59
73
 
60
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
74
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
61
75
 
62
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
76
+ 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; } }
63
77
 
64
78
  function copyMaterial(orginMatrial) {
65
79
  var material = new THREE.MeshBasicMaterial({
@@ -71,25 +85,25 @@ function copyMaterial(orginMatrial) {
71
85
  }
72
86
 
73
87
  var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
74
- _inherits(TreasureObject, _THREE$Object3D);
88
+ (0, _inherits2["default"])(TreasureObject, _THREE$Object3D);
75
89
 
76
90
  var _super = _createSuper(TreasureObject);
77
91
 
78
92
  function TreasureObject(params) {
79
93
  var _this;
80
94
 
81
- _classCallCheck(this, TreasureObject);
82
-
95
+ (0, _classCallCheck2["default"])(this, TreasureObject);
83
96
  _this = _super.call(this);
84
-
85
- _defineProperty(_assertThisInitialized(_this), "name", 'treasureObject');
86
-
87
- _defineProperty(_assertThisInitialized(_this), "opened", false);
88
-
89
- _defineProperty(_assertThisInitialized(_this), "onFiveWantsTapGesture", function (raycaster) {
97
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "name", 'treasureObject');
98
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "opened", false);
99
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "modelGroupPromise", Promise.resolve({
100
+ modelGroup: new THREE.Group(),
101
+ originGroup: new THREE.Group()
102
+ }));
103
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFiveWantsTapGesture", function (raycaster) {
90
104
  var _this$params$clickCal, _this$params;
91
105
 
92
- var intersects = raycaster.intersectObject(_assertThisInitialized(_this), true);
106
+ var intersects = raycaster.intersectObject((0, _assertThisInitialized2["default"])(_this), true);
93
107
  var isClickTreasure = !!intersects && intersects.length > 0;
94
108
  if (!isClickTreasure) return;
95
109
  (_this$params$clickCal = (_this$params = _this.params).clickCallback) === null || _this$params$clickCal === void 0 ? void 0 : _this$params$clickCal.call(_this$params, _this.treasureID);
@@ -100,11 +114,9 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
100
114
 
101
115
  return false;
102
116
  });
103
-
104
- _defineProperty(_assertThisInitialized(_this), "onFivePanoArrived", function () {
117
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onFivePanoArrived", function () {
105
118
  if (_this.position.distanceTo(_this.five.camera.position) < 3) _this.rotateToCamera();
106
119
  });
107
-
108
120
  _this.params = params;
109
121
  _this.five = params.five;
110
122
  _this.treasureID = params.id;
@@ -117,12 +129,158 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
117
129
 
118
130
  return _this;
119
131
  }
120
- /** 销毁当前宝箱实例
121
- * @description 注意 dispose 并不会销毁所使用的贴图,因为贴图会有共用关系,需要在最外层销毁
122
- */
123
132
 
133
+ (0, _createClass2["default"])(TreasureObject, [{
134
+ key: "load",
135
+ value: function () {
136
+ var _load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
137
+ var _this2 = this;
138
+
139
+ var _yield$this$modelGrou, modelGroup, originGroup;
124
140
 
125
- _createClass(TreasureObject, [{
141
+ return _regenerator["default"].wrap(function _callee$(_context) {
142
+ while (1) {
143
+ switch (_context.prev = _context.next) {
144
+ case 0:
145
+ this.modelGroupPromise = this.getModelPromise();
146
+ _context.next = 3;
147
+ return this.modelGroupPromise;
148
+
149
+ case 3:
150
+ _yield$this$modelGrou = _context.sent;
151
+ modelGroup = _yield$this$modelGrou.modelGroup;
152
+ originGroup = _yield$this$modelGrou.originGroup;
153
+ this.add(modelGroup); // ========== openAnime ==========
154
+
155
+ this.openAnime = new _TreasureOpenAnime.TreasurePluginOpenAnime({
156
+ five: this.five,
157
+ treasureGroup: modelGroup,
158
+ onComplete: function onComplete() {
159
+ var _this2$params$onOpenA, _this2$params;
160
+
161
+ return (_this2$params$onOpenA = (_this2$params = _this2.params).onOpenAnimationEnded) === null || _this2$params$onOpenA === void 0 ? void 0 : _this2$params$onOpenA.call(_this2$params, _this2.treasureID);
162
+ },
163
+ animationClip: originGroup.animations[0]
164
+ }); // ========== faceAnime ==========
165
+
166
+ this.faceAnime = new _TreasureFaceAnime.TreasureFaceAnime({
167
+ five: this.five,
168
+ treasureGroup: modelGroup,
169
+ loadTexture: this.params.loadTexture,
170
+ textureUrls: this.params.config.faceAnimeTextureUrls
171
+ });
172
+ this.faceAnime.play(); // ========== addEventListener ==========
173
+
174
+ this.five.on('panoArrived', this.onFivePanoArrived);
175
+ this.five.on('wantsTapGesture', this.onFiveWantsTapGesture);
176
+ this.five.needsRender = true;
177
+ return _context.abrupt("return", this);
178
+
179
+ case 14:
180
+ case "end":
181
+ return _context.stop();
182
+ }
183
+ }
184
+ }, _callee, this);
185
+ }));
186
+
187
+ function load() {
188
+ return _load.apply(this, arguments);
189
+ }
190
+
191
+ return load;
192
+ }()
193
+ }, {
194
+ key: "show",
195
+ value: function () {
196
+ var _show = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(params) {
197
+ var _params$duration,
198
+ _this3 = this;
199
+
200
+ var _yield$this$modelGrou2, modelGroup;
201
+
202
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
203
+ while (1) {
204
+ switch (_context2.prev = _context2.next) {
205
+ case 0:
206
+ _context2.next = 2;
207
+ return this.modelGroupPromise;
208
+
209
+ case 2:
210
+ _yield$this$modelGrou2 = _context2.sent;
211
+ modelGroup = _yield$this$modelGrou2.modelGroup;
212
+ (0, _BetterTween.tweenProgress)().duration((_params$duration = params === null || params === void 0 ? void 0 : params.duration) !== null && _params$duration !== void 0 ? _params$duration : 300).easing(TWEEN.Easing.Quadratic.InOut).onUpdate(function (_ref) {
213
+ var progress = _ref.progress;
214
+ modelGroup.children.forEach(function (child) {
215
+ var obj = child;
216
+ obj.material && (obj.material.opacity = progress);
217
+ _this3.five.needsRender = true;
218
+ });
219
+ }).play();
220
+ return _context2.abrupt("return", true);
221
+
222
+ case 6:
223
+ case "end":
224
+ return _context2.stop();
225
+ }
226
+ }
227
+ }, _callee2, this);
228
+ }));
229
+
230
+ function show(_x) {
231
+ return _show.apply(this, arguments);
232
+ }
233
+
234
+ return show;
235
+ }()
236
+ }, {
237
+ key: "hide",
238
+ value: function () {
239
+ var _hide = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params) {
240
+ var _params$duration2,
241
+ _this4 = this;
242
+
243
+ var _yield$this$modelGrou3, modelGroup;
244
+
245
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
246
+ while (1) {
247
+ switch (_context3.prev = _context3.next) {
248
+ case 0:
249
+ _context3.next = 2;
250
+ return this.modelGroupPromise;
251
+
252
+ case 2:
253
+ _yield$this$modelGrou3 = _context3.sent;
254
+ modelGroup = _yield$this$modelGrou3.modelGroup;
255
+ (0, _BetterTween.tweenProgress)().duration((_params$duration2 = params === null || params === void 0 ? void 0 : params.duration) !== null && _params$duration2 !== void 0 ? _params$duration2 : 300).easing(TWEEN.Easing.Quadratic.InOut).onUpdate(function (_ref2) {
256
+ var progress = _ref2.progress;
257
+ modelGroup.children.forEach(function (child) {
258
+ var obj = child;
259
+ obj.material && (obj.material.opacity = 1 - progress);
260
+ _this4.five.needsRender = true;
261
+ });
262
+ }).play();
263
+ return _context3.abrupt("return", true);
264
+
265
+ case 6:
266
+ case "end":
267
+ return _context3.stop();
268
+ }
269
+ }
270
+ }, _callee3, this);
271
+ }));
272
+
273
+ function hide(_x2) {
274
+ return _hide.apply(this, arguments);
275
+ }
276
+
277
+ return hide;
278
+ }()
279
+ /** 销毁当前宝箱实例
280
+ * @description 注意 dispose 并不会销毁所使用的贴图,因为贴图会有共用关系,需要在最外层销毁
281
+ */
282
+
283
+ }, {
126
284
  key: "dispose",
127
285
  value: function dispose() {
128
286
  var _this$faceAnime, _this$openAnime;
@@ -132,10 +290,12 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
132
290
  this.five.off('panoArrived', this.onFivePanoArrived);
133
291
  this.five.off('wantsTapGesture', this.onFiveWantsTapGesture);
134
292
  }
293
+ /** 旋转宝箱朝向用户 */
294
+
135
295
  }, {
136
296
  key: "rotateToCamera",
137
297
  value: function rotateToCamera() {
138
- var _this2 = this;
298
+ var _this5 = this;
139
299
 
140
300
  if (this.opened) return; // 宝箱朝向
141
301
 
@@ -150,11 +310,13 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
150
310
  var speed = 8;
151
311
  var duration = Math.ceil(deltaRadY / speed * 1000);
152
312
  var rotationStartY = this.rotation.y;
153
- (0, _BetterTween.tweenProgress)(duration).onUpdate(function (_ref) {
154
- var progress = _ref.progress;
155
- _this2.rotation.y = rotationStartY + progress * deltaRadY * rotateDirection;
313
+ (0, _BetterTween.tweenProgress)(duration).onUpdate(function (_ref3) {
314
+ var progress = _ref3.progress;
315
+ _this5.rotation.y = rotationStartY + progress * deltaRadY * rotateDirection;
156
316
  }).play();
157
317
  }
318
+ /** 打开宝箱 */
319
+
158
320
  }, {
159
321
  key: "open",
160
322
  value: function open() {
@@ -169,36 +331,22 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
169
331
  return true;
170
332
  }
171
333
  }, {
172
- key: "load",
334
+ key: "getModelPromise",
173
335
  value: function () {
174
- var _load = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
175
- var _this3 = this;
176
-
177
- var _yield$to, _yield$to2, loadError, orginModelGroup, group, _yield$to3, _yield$to4, boxTextureError, boxTexture;
336
+ var _getModelPromise = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
337
+ var originGroup, modelGroup, _yield$to, _yield$to2, boxTextureError, boxTexture;
178
338
 
179
- return regeneratorRuntime.wrap(function _callee$(_context) {
339
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
180
340
  while (1) {
181
- switch (_context.prev = _context.next) {
341
+ switch (_context4.prev = _context4.next) {
182
342
  case 0:
183
- _context.next = 2;
184
- return (0, _to["default"])(this.params.loadModelGroup(this.params.config.objectUrl));
343
+ _context4.next = 2;
344
+ return this.params.loadModelGroup(this.params.config.objectUrl);
185
345
 
186
346
  case 2:
187
- _yield$to = _context.sent;
188
- _yield$to2 = _slicedToArray(_yield$to, 2);
189
- loadError = _yield$to2[0];
190
- orginModelGroup = _yield$to2[1];
191
-
192
- if (!(loadError || !orginModelGroup)) {
193
- _context.next = 8;
194
- break;
195
- }
196
-
197
- throw loadError;
198
-
199
- case 8:
200
- group = orginModelGroup.clone();
201
- group.traverse(function (obj) {
347
+ originGroup = _context4.sent;
348
+ modelGroup = originGroup.clone();
349
+ modelGroup.traverse(function (obj) {
202
350
  if (!(obj instanceof THREE.Mesh)) return;
203
351
  obj.material = copyMaterial(obj.material);
204
352
  if (obj.material.map) obj.material.map.encoding = THREE.sRGBEncoding;
@@ -206,74 +354,52 @@ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
206
354
  });
207
355
 
208
356
  if (!this.params.config.boxTextureUrl) {
209
- _context.next = 22;
357
+ _context4.next = 17;
210
358
  break;
211
359
  }
212
360
 
213
- _context.next = 13;
361
+ _context4.next = 8;
214
362
  return (0, _to["default"])(this.params.loadTexture(this.params.config.boxTextureUrl));
215
363
 
216
- case 13:
217
- _yield$to3 = _context.sent;
218
- _yield$to4 = _slicedToArray(_yield$to3, 2);
219
- boxTextureError = _yield$to4[0];
220
- boxTexture = _yield$to4[1];
364
+ case 8:
365
+ _yield$to = _context4.sent;
366
+ _yield$to2 = (0, _slicedToArray2["default"])(_yield$to, 2);
367
+ boxTextureError = _yield$to2[0];
368
+ boxTexture = _yield$to2[1];
221
369
 
222
370
  if (!(boxTextureError || !boxTexture)) {
223
- _context.next = 19;
371
+ _context4.next = 14;
224
372
  break;
225
373
  }
226
374
 
227
375
  throw new Error('加载盒子贴图失败');
228
376
 
229
- case 19:
377
+ case 14:
230
378
  boxTexture.encoding = THREE.sRGBEncoding;
231
- group.getObjectByName('box').material.map = boxTexture;
232
- group.getObjectByName('box2').material.map = boxTexture;
233
-
234
- case 22:
235
- this.add(group); // ========== openAnime ==========
379
+ modelGroup.getObjectByName('box').material.map = boxTexture;
380
+ modelGroup.getObjectByName('box2').material.map = boxTexture;
236
381
 
237
- this.openAnime = new _TreasureOpenAnime.TreasurePluginOpenAnime({
238
- five: this.five,
239
- treasureGroup: group,
240
- onComplete: function onComplete() {
241
- var _this3$params$onOpenA, _this3$params;
242
-
243
- return (_this3$params$onOpenA = (_this3$params = _this3.params).onOpenAnimationEnded) === null || _this3$params$onOpenA === void 0 ? void 0 : _this3$params$onOpenA.call(_this3$params, _this3.treasureID);
244
- },
245
- animationClip: orginModelGroup.animations[0]
246
- }); // ========== faceAnime ==========
247
-
248
- this.faceAnime = new _TreasureFaceAnime.TreasureFaceAnime({
249
- five: this.five,
250
- treasureGroup: group,
251
- loadTexture: this.params.loadTexture,
252
- textureUrls: this.params.config.faceAnimeTextureUrls
382
+ case 17:
383
+ return _context4.abrupt("return", {
384
+ modelGroup: modelGroup,
385
+ originGroup: originGroup
253
386
  });
254
- this.faceAnime.play(); // ========== addEventListener ==========
255
387
 
256
- this.five.on('panoArrived', this.onFivePanoArrived);
257
- this.five.on('wantsTapGesture', this.onFiveWantsTapGesture);
258
- this.five.needsRender = true;
259
- return _context.abrupt("return", this);
260
-
261
- case 30:
388
+ case 18:
262
389
  case "end":
263
- return _context.stop();
390
+ return _context4.stop();
264
391
  }
265
392
  }
266
- }, _callee, this);
393
+ }, _callee4, this);
267
394
  }));
268
395
 
269
- function load() {
270
- return _load.apply(this, arguments);
396
+ function getModelPromise() {
397
+ return _getModelPromise.apply(this, arguments);
271
398
  }
272
399
 
273
- return load;
400
+ return getModelPromise;
274
401
  }()
275
402
  }]);
276
-
277
403
  return TreasureObject;
278
404
  }(THREE.Object3D);
279
405
 
@@ -1,12 +1,44 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ require("core-js/modules/es.array.iterator.js");
4
+
5
+ require("core-js/modules/es.object.to-string.js");
6
+
7
+ require("core-js/modules/es.string.iterator.js");
8
+
9
+ require("core-js/modules/es.weak-map.js");
10
+
11
+ require("core-js/modules/web.dom-collections.iterator.js");
12
+
13
+ require("core-js/modules/es.object.define-property.js");
14
+
15
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
16
+
17
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
18
+
19
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
20
 
5
21
  Object.defineProperty(exports, "__esModule", {
6
22
  value: true
7
23
  });
8
24
  exports.TreasurePluginOpenAnime = void 0;
9
25
 
26
+ require("core-js/modules/es.array.filter.js");
27
+
28
+ require("core-js/modules/es.array.index-of.js");
29
+
30
+ require("core-js/modules/es.function.name.js");
31
+
32
+ require("core-js/modules/es.array.for-each.js");
33
+
34
+ require("core-js/modules/web.dom-collections.for-each.js");
35
+
36
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
37
+
38
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
39
+
40
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
41
+
10
42
  var THREE = _interopRequireWildcard(require("three"));
11
43
 
12
44
  var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
@@ -17,14 +49,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
49
 
18
50
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
51
 
20
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
-
22
- 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, descriptor.key, descriptor); } }
23
-
24
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
-
26
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
-
28
52
  /** 打开宝箱的动画实例
29
53
  * @description
30
54
  * 因为宝箱没有关闭的场景,对于一个宝箱来讲,打开后,要么销毁,要么保留当时的状态。所以不做关闭方面的兼容处理
@@ -33,13 +57,10 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
33
57
  function TreasurePluginOpenAnime(params) {
34
58
  var _this = this;
35
59
 
36
- _classCallCheck(this, TreasurePluginOpenAnime);
37
-
38
- _defineProperty(this, "hasPlayed", false);
39
-
40
- _defineProperty(this, "clock", new THREE.Clock());
41
-
42
- _defineProperty(this, "onPlayFinished", function () {
60
+ (0, _classCallCheck2["default"])(this, TreasurePluginOpenAnime);
61
+ (0, _defineProperty2["default"])(this, "hasPlayed", false);
62
+ (0, _defineProperty2["default"])(this, "clock", new THREE.Clock());
63
+ (0, _defineProperty2["default"])(this, "onPlayFinished", function () {
43
64
  var _this$animationDispos;
44
65
 
45
66
  // 销毁打开盒子动画的定时任务
@@ -63,7 +84,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
63
84
  return (_this$params$onComple = (_this$params = _this.params).onComplete) === null || _this$params$onComple === void 0 ? void 0 : _this$params$onComple.call(_this$params);
64
85
  });
65
86
  });
66
-
67
87
  this.five = params.five;
68
88
  this.params = params;
69
89
  this.treasureGroup = params.treasureGroup;
@@ -73,7 +93,7 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
73
93
  this.action.clampWhenFinished = true;
74
94
  }
75
95
 
76
- _createClass(TreasurePluginOpenAnime, [{
96
+ (0, _createClass2["default"])(TreasurePluginOpenAnime, [{
77
97
  key: "dispose",
78
98
  value: function dispose() {
79
99
  var _this$animationDispos2;
@@ -101,7 +121,6 @@ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
101
121
  return true;
102
122
  }
103
123
  }]);
104
-
105
124
  return TreasurePluginOpenAnime;
106
125
  }();
107
126
 
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.object.define-property.js");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.object.define-property.js");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.object.define-property.js");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ require("core-js/modules/es.object.define-property.js");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });