@realsee/dnalogel 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (271) hide show
  1. package/README.md +94 -0
  2. package/TERMS.txt +56 -0
  3. package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +44 -0
  4. package/components/ARVideoFigure/ARVideoFigureMesh.js +347 -0
  5. package/components/ARVideoFigure/ARVideoFigureScene.d.ts +11 -0
  6. package/components/ARVideoFigure/ARVideoFigureScene.js +74 -0
  7. package/components/ARVideoFigure/ImgBgTransparent.d.ts +16 -0
  8. package/components/ARVideoFigure/ImgBgTransparent.js +49 -0
  9. package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +30 -0
  10. package/components/ARVideoFigure/ImgBgTransparentMesh.js +173 -0
  11. package/components/ARVideoFigure/fragmentShader.d.ts +5 -0
  12. package/components/ARVideoFigure/fragmentShader.js +16 -0
  13. package/components/ARVideoFigure/index.d.ts +15 -0
  14. package/components/ARVideoFigure/index.js +64 -0
  15. package/components/ARVideoFigure/vertexShader.d.ts +1 -0
  16. package/components/ARVideoFigure/vertexShader.js +8 -0
  17. package/components/GlassFilters/index.d.ts +32 -0
  18. package/components/GlassFilters/index.js +54 -0
  19. package/components/ModelView/ModelViewController.d.ts +18 -0
  20. package/components/ModelView/ModelViewController.js +147 -0
  21. package/components/ModelView/index.d.ts +10 -0
  22. package/components/ModelView/index.js +22 -0
  23. package/components/PBRView/index.d.ts +14 -0
  24. package/components/PBRView/index.js +31 -0
  25. package/components/PaintBrush/index.d.ts +16 -0
  26. package/components/PaintBrush/index.js +33 -0
  27. package/components/PanoTag/index.d.ts +4 -0
  28. package/components/PanoTag/index.js +11 -0
  29. package/custom.d.js +3 -0
  30. package/data/1aGKl9JmrlXMXx8d.d.ts +104 -0
  31. package/data/1aGKl9JmrlXMXx8d.js +535 -0
  32. package/data/6gyq3v1verxD7JO1.d.ts +104 -0
  33. package/data/6gyq3v1verxD7JO1.js +460 -0
  34. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +84 -0
  35. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +598 -0
  36. package/data/PrXel3aqGbp34JQn.d.ts +389 -0
  37. package/data/PrXel3aqGbp34JQn.js +4639 -0
  38. package/data/YdoNP9K4rwQDwjJr.d.ts +83 -0
  39. package/data/YdoNP9K4rwQDwjJr.js +1451 -0
  40. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +86 -0
  41. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +709 -0
  42. package/data/oPzy3ApbjjpD8YdR.d.ts +83 -0
  43. package/data/oPzy3ApbjjpD8YdR.js +281 -0
  44. package/data/qjAxMG4XbPn96wKG.d.ts +104 -0
  45. package/data/qjAxMG4XbPn96wKG.js +635 -0
  46. package/data/rXel3aPQRRBD4JQn.d.ts +86 -0
  47. package/data/rXel3aPQRRBD4JQn.js +620 -0
  48. package/data/vLykj3NWrllMrG06.d.ts +89 -0
  49. package/data/vLykj3NWrllMrG06.js +2532 -0
  50. package/data/wYnRjQ4KZoV1yPoG.d.ts +114 -0
  51. package/data/wYnRjQ4KZoV1yPoG.js +512 -0
  52. package/data/wz0QV9KA4ugyo9ME.d.ts +39 -0
  53. package/data/wz0QV9KA4ugyo9ME.js +134 -0
  54. package/examples/FiveStateController/index.js +140 -0
  55. package/examples/VRHouse/Mobile.js +22 -0
  56. package/examples/VRHouse/PC.js +22 -0
  57. package/examples/VRHouse/index.js +22 -0
  58. package/index.d.ts +15 -0
  59. package/index.js +43 -0
  60. package/package.json +19 -0
  61. package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +12 -0
  62. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +113 -0
  63. package/plugins/CSS3DRenderPlugin/index.d.ts +49 -0
  64. package/plugins/CSS3DRenderPlugin/index.js +220 -0
  65. package/plugins/CameraMovementPlugin/index.d.ts +7 -0
  66. package/plugins/CameraMovementPlugin/index.js +338 -0
  67. package/plugins/CameraMovementPlugin/typing.d.ts +68 -0
  68. package/plugins/CameraMovementPlugin/typing.js +35 -0
  69. package/plugins/ModelChassisCompassPlugin/index.d.ts +15 -0
  70. package/plugins/ModelChassisCompassPlugin/index.js +156 -0
  71. package/plugins/ModelEntryDoorGuidePlugin/index.d.ts +10 -0
  72. package/plugins/ModelEntryDoorGuidePlugin/index.js +16 -0
  73. package/plugins/ModelTVVideoPlugin/index.d.ts +21 -0
  74. package/plugins/ModelTVVideoPlugin/index.js +313 -0
  75. package/plugins/ModelViewPlugin/index.d.ts +17 -0
  76. package/plugins/ModelViewPlugin/index.js +199 -0
  77. package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +48 -0
  78. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +9 -0
  79. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +113 -0
  80. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +11 -0
  81. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +25 -0
  82. package/plugins/PanoCursorRaycasterPlugin/index.d.ts +49 -0
  83. package/plugins/PanoCursorRaycasterPlugin/index.js +119 -0
  84. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +5 -0
  85. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +25 -0
  86. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +3 -0
  87. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +34 -0
  88. package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.d.ts +7 -0
  89. package/plugins/PanoCursorRaycasterPlugin/utils/vecror3.js +18 -0
  90. package/plugins/PanoDoorLabelPlugin/index.d.ts +4 -0
  91. package/plugins/PanoDoorLabelPlugin/index.js +12 -0
  92. package/plugins/PanoIRobotPlugin/index.d.ts +10 -0
  93. package/plugins/PanoIRobotPlugin/index.js +16 -0
  94. package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +3 -0
  95. package/plugins/PanoRulerPlugin/data/roomInfo.js +49 -0
  96. package/plugins/PanoRulerPlugin/data/roomRules.d.ts +3 -0
  97. package/plugins/PanoRulerPlugin/data/roomRules.js +233 -0
  98. package/plugins/PanoRulerPlugin/index.d.ts +27 -0
  99. package/plugins/PanoRulerPlugin/index.js +589 -0
  100. package/plugins/PanoRulerPlugin/typings.d.ts +21 -0
  101. package/plugins/PanoRulerPlugin/typings.js +5 -0
  102. package/plugins/PanoTVVideoPlugin/index.d.ts +24 -0
  103. package/plugins/PanoTVVideoPlugin/index.js +351 -0
  104. package/plugins/TreasurePlugin/Controller.d.ts +32 -0
  105. package/plugins/TreasurePlugin/Controller.js +175 -0
  106. package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +23 -0
  107. package/plugins/TreasurePlugin/TreasureFaceAnime.js +128 -0
  108. package/plugins/TreasurePlugin/TreasureObject.d.ts +35 -0
  109. package/plugins/TreasurePlugin/TreasureObject.js +186 -0
  110. package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +23 -0
  111. package/plugins/TreasurePlugin/TreasureOpenAnime.js +103 -0
  112. package/plugins/TreasurePlugin/constants.d.ts +12 -0
  113. package/plugins/TreasurePlugin/constants.js +30 -0
  114. package/plugins/TreasurePlugin/index.d.ts +11 -0
  115. package/plugins/TreasurePlugin/index.js +16 -0
  116. package/plugins/TreasurePlugin/treasureDataMap.d.ts +7 -0
  117. package/plugins/TreasurePlugin/treasureDataMap.js +20 -0
  118. package/plugins/TreasurePlugin/typings.d.ts +2 -0
  119. package/plugins/TreasurePlugin/typings.js +5 -0
  120. package/plugins/TreasurePlugin/utils/loadTreasureTextures.d.ts +7 -0
  121. package/plugins/TreasurePlugin/utils/loadTreasureTextures.js +115 -0
  122. package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  123. package/plugins/floorplan/Assets/floorplanExtraObject.js +8 -0
  124. package/plugins/floorplan/ModelFloorplanPlugin/Controller.d.ts +100 -0
  125. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +643 -0
  126. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +13 -0
  127. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +58 -0
  128. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +5 -0
  129. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +69 -0
  130. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +10 -0
  131. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +105 -0
  132. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +13 -0
  133. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +95 -0
  134. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +13 -0
  135. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +48 -0
  136. package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +20 -0
  137. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +66 -0
  138. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts +1 -0
  139. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +14 -0
  140. package/plugins/floorplan/ModelFloorplanPlugin/index.d.ts +9 -0
  141. package/plugins/floorplan/ModelFloorplanPlugin/index.js +18 -0
  142. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +23 -0
  143. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +5 -0
  144. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +15 -0
  145. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +31 -0
  146. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +14 -0
  147. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +162 -0
  148. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +13 -0
  149. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +91 -0
  150. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +3 -0
  151. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +35 -0
  152. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +5 -0
  153. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +50 -0
  154. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +9 -0
  155. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +102 -0
  156. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +11 -0
  157. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +42 -0
  158. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +17 -0
  159. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +75 -0
  160. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +2 -0
  161. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +13 -0
  162. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +33 -0
  163. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +214 -0
  164. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.d.ts +8 -0
  165. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +18 -0
  166. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.d.ts +55 -0
  167. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +267 -0
  168. package/plugins/floorplan/TopviewFloorplanPlugin/index.d.ts +5 -0
  169. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +16 -0
  170. package/plugins/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  171. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +14 -0
  172. package/plugins/floorplan/components/FloorplanImage.d.ts +7 -0
  173. package/plugins/floorplan/components/FloorplanImage.js +76 -0
  174. package/plugins/floorplan/typings/floorplanData.d.ts +127 -0
  175. package/plugins/floorplan/typings/floorplanData.js +5 -0
  176. package/plugins/floorplan/typings/floorplanServerData.d.ts +125 -0
  177. package/plugins/floorplan/typings/floorplanServerData.js +380 -0
  178. package/plugins/floorplan/utils/formatData.d.ts +5 -0
  179. package/plugins/floorplan/utils/formatData.js +220 -0
  180. package/plugins/floorplan/utils/formatPosition.d.ts +37 -0
  181. package/plugins/floorplan/utils/formatPosition.js +87 -0
  182. package/shared-utils/Preloader.d.ts +6 -0
  183. package/shared-utils/Preloader.js +51 -0
  184. package/shared-utils/Subscribe.d.ts +45 -0
  185. package/shared-utils/Subscribe.js +210 -0
  186. package/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  187. package/shared-utils/animationFrame/BetterTween.js +102 -0
  188. package/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  189. package/shared-utils/animationFrame/calculateProgress.js +38 -0
  190. package/shared-utils/animationFrame/formatRad.d.ts +15 -0
  191. package/shared-utils/animationFrame/formatRad.js +34 -0
  192. package/shared-utils/animationFrame/index.d.ts +15 -0
  193. package/shared-utils/animationFrame/index.js +69 -0
  194. package/shared-utils/animationFrame/tween.d.ts +75 -0
  195. package/shared-utils/animationFrame/tween.js +76 -0
  196. package/shared-utils/changeModelCanvansOpacity.d.ts +2 -0
  197. package/shared-utils/changeModelCanvansOpacity.js +24 -0
  198. package/shared-utils/createFiveContainer.d.ts +10 -0
  199. package/shared-utils/createFiveContainer.js +165 -0
  200. package/shared-utils/createLine/index.d.ts +3 -0
  201. package/shared-utils/createLine/index.js +29 -0
  202. package/shared-utils/debounce.d.ts +6 -0
  203. package/shared-utils/debounce.js +26 -0
  204. package/shared-utils/equal.d.ts +11 -0
  205. package/shared-utils/equal.js +96 -0
  206. package/shared-utils/filter.d.ts +27 -0
  207. package/shared-utils/filter.js +93 -0
  208. package/shared-utils/five/changeMode.d.ts +2 -0
  209. package/shared-utils/five/changeMode.js +86 -0
  210. package/shared-utils/five/useFivePlugin.d.ts +1 -0
  211. package/shared-utils/five/useFivePlugin.js +15 -0
  212. package/shared-utils/formatRad.d.ts +7 -0
  213. package/shared-utils/formatRad.js +16 -0
  214. package/shared-utils/getPxmm.d.ts +6 -0
  215. package/shared-utils/getPxmm.js +37 -0
  216. package/shared-utils/getRandomColor.d.ts +1 -0
  217. package/shared-utils/getRandomColor.js +13 -0
  218. package/shared-utils/isTruelyObject.d.ts +18 -0
  219. package/shared-utils/isTruelyObject.js +27 -0
  220. package/shared-utils/math/evenNumber.d.ts +1 -0
  221. package/shared-utils/math/evenNumber.js +11 -0
  222. package/shared-utils/math/planimetry.d.ts +116 -0
  223. package/shared-utils/math/planimetry.js +342 -0
  224. package/shared-utils/math/rad2Deg.d.ts +1 -0
  225. package/shared-utils/math/rad2Deg.js +10 -0
  226. package/shared-utils/nearlyEqual.d.ts +7 -0
  227. package/shared-utils/nearlyEqual.js +17 -0
  228. package/shared-utils/nextFrame.d.ts +1 -0
  229. package/shared-utils/nextFrame.js +13 -0
  230. package/shared-utils/noop.d.ts +5 -0
  231. package/shared-utils/noop.js +17 -0
  232. package/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  233. package/shared-utils/object3d2LocalMatrix.js +73 -0
  234. package/shared-utils/px2rem.d.ts +1 -0
  235. package/shared-utils/px2rem.js +12 -0
  236. package/shared-utils/tap.d.ts +8 -0
  237. package/shared-utils/tap.js +19 -0
  238. package/shared-utils/three/centerPoint.d.ts +2 -0
  239. package/shared-utils/three/centerPoint.js +12 -0
  240. package/shared-utils/three/getNormal.d.ts +2 -0
  241. package/shared-utils/three/getNormal.js +13 -0
  242. package/shared-utils/three/loadFbxObj.d.ts +3 -0
  243. package/shared-utils/three/loadFbxObj.js +42 -0
  244. package/shared-utils/three/loadTexture.d.ts +2 -0
  245. package/shared-utils/three/loadTexture.js +38 -0
  246. package/shared-utils/three/vecror3.d.ts +7 -0
  247. package/shared-utils/three/vecror3.js +18 -0
  248. package/shared-utils/throttle.d.ts +7 -0
  249. package/shared-utils/throttle.js +25 -0
  250. package/shared-utils/to.d.ts +9 -0
  251. package/shared-utils/to.js +25 -0
  252. package/shared-utils/useDebounce.d.ts +8 -0
  253. package/shared-utils/useDebounce.js +43 -0
  254. package/shared-utils/useThrottle.d.ts +8 -0
  255. package/shared-utils/useThrottle.js +41 -0
  256. package/shared-utils/uuid.d.ts +4 -0
  257. package/shared-utils/uuid.js +20 -0
  258. package/shared-utils/vectorTocoordinates.d.ts +7 -0
  259. package/shared-utils/vectorTocoordinates.js +16 -0
  260. package/typedoc/components.d.ts +6 -0
  261. package/typedoc/components.js +5 -0
  262. package/typedoc/plugins.d.ts +17 -0
  263. package/typedoc/plugins.js +113 -0
  264. package/typedoc/shared-utils.d.ts +3 -0
  265. package/typedoc/shared-utils.js +5 -0
  266. package/typedoc/typings.d.ts +3 -0
  267. package/typedoc/typings.js +5 -0
  268. package/typings/math.type.d.ts +44 -0
  269. package/typings/math.type.js +5 -0
  270. package/typings/utils.type.d.ts +2 -0
  271. package/typings/utils.type.js +5 -0
@@ -0,0 +1,128 @@
1
+ "use strict";
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); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TreasureFaceAnime = void 0;
9
+
10
+ var THREE = _interopRequireWildcard(require("three"));
11
+
12
+ 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); }
13
+
14
+ 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; }
15
+
16
+ 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); } }
17
+
18
+ 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); }); }; }
19
+
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
+ var TreasureFaceAnime = /*#__PURE__*/function () {
29
+ function TreasureFaceAnime(param) {
30
+ var _this = this;
31
+
32
+ _classCallCheck(this, TreasureFaceAnime);
33
+
34
+ _defineProperty(this, "paused", true);
35
+
36
+ _defineProperty(this, "faceAnimeStep", 0);
37
+
38
+ _defineProperty(this, "play", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
39
+ var faceMaterial, faceTextures;
40
+ return regeneratorRuntime.wrap(function _callee$(_context) {
41
+ while (1) {
42
+ switch (_context.prev = _context.next) {
43
+ case 0:
44
+ if (_this.paused) {
45
+ _context.next = 2;
46
+ break;
47
+ }
48
+
49
+ return _context.abrupt("return", true);
50
+
51
+ case 2:
52
+ _this.paused = false;
53
+
54
+ _this.clearTimer();
55
+
56
+ faceMaterial = _this.faceMesh.material;
57
+ _context.next = 7;
58
+ return _this.faceTexturesPromise;
59
+
60
+ case 7:
61
+ faceTextures = _context.sent;
62
+
63
+ if (!_this.paused) {
64
+ _context.next = 10;
65
+ break;
66
+ }
67
+
68
+ return _context.abrupt("return", false);
69
+
70
+ case 10:
71
+ _this.faceAnimeTimer = setInterval(function () {
72
+ _this.faceAnimeStep = (_this.faceAnimeStep + 1) % faceTextures.length;
73
+ var texture = faceTextures[_this.faceAnimeStep];
74
+ texture.encoding = THREE.sRGBEncoding;
75
+ faceMaterial.map = texture;
76
+ _this.five.needsRender = true;
77
+ }, 300);
78
+ return _context.abrupt("return", true);
79
+
80
+ case 12:
81
+ case "end":
82
+ return _context.stop();
83
+ }
84
+ }
85
+ }, _callee);
86
+ })));
87
+
88
+ this.five = param.five;
89
+ this.treasureGroup = param.treasureGroup;
90
+ this.faceTexturesPromise = param.faceTexturesPromise;
91
+ this.faceMesh = this.treasureGroup.getObjectByName('face');
92
+ var initialFaceTexture = this.faceMesh.material.map;
93
+ if (!initialFaceTexture) throw new Error('初始化失败,不能从模型文件中找到对应的动画贴图');
94
+ this.initialFaceTexture = initialFaceTexture;
95
+ this.initialFaceTexture.encoding = THREE.sRGBEncoding;
96
+ }
97
+
98
+ _createClass(TreasureFaceAnime, [{
99
+ key: "pause",
100
+ value: function pause() {
101
+ this.paused = true;
102
+ this.clearTimer();
103
+ return true;
104
+ }
105
+ }, {
106
+ key: "dispose",
107
+ value: function dispose() {
108
+ this.pause();
109
+ }
110
+ }, {
111
+ key: "setToInitialState",
112
+ value: function setToInitialState() {
113
+ this.faceMesh.material.map = this.initialFaceTexture;
114
+ this.faceAnimeStep = 0;
115
+ this.five.needsRender = true;
116
+ }
117
+ }, {
118
+ key: "clearTimer",
119
+ value: function clearTimer() {
120
+ this.faceAnimeTimer && clearInterval(this.faceAnimeTimer);
121
+ this.faceAnimeTimer = void 0;
122
+ }
123
+ }]);
124
+
125
+ return TreasureFaceAnime;
126
+ }();
127
+
128
+ exports.TreasureFaceAnime = TreasureFaceAnime;
@@ -0,0 +1,35 @@
1
+ import * as THREE from 'three';
2
+ import { Five } from '@realsee/five';
3
+ /** 宝箱实例
4
+ * @description
5
+ * 点击宝箱可以打开宝箱
6
+ * @description
7
+ * 在宝箱未打开时,靠近宝箱或点击宝箱,宝箱会转动到朝向用户的方向
8
+ */
9
+ export interface TreasureObjectParam {
10
+ id: string;
11
+ five: Five;
12
+ fbxGroup: THREE.Group;
13
+ position: THREE.Vector3;
14
+ baseTexture: THREE.Texture;
15
+ faceTexturesPromise: Promise<THREE.Texture[]>;
16
+ clickCallback?: (id: string) => unknown;
17
+ }
18
+ export declare class TreasureObject extends THREE.Object3D {
19
+ readonly treasureID: string;
20
+ readonly name = "treasureObject";
21
+ protected opened: boolean;
22
+ private five;
23
+ private texture;
24
+ private modelGroup;
25
+ private faceAnime;
26
+ private openAnime;
27
+ private clickCallback?;
28
+ constructor(params: TreasureObjectParam);
29
+ dispose(): void;
30
+ rotateToCamera(): void;
31
+ private open;
32
+ private init;
33
+ private onFiveWantsTapGesture;
34
+ private onFivePanoArrived;
35
+ }
@@ -0,0 +1,186 @@
1
+ "use strict";
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); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TreasureObject = void 0;
9
+
10
+ var THREE = _interopRequireWildcard(require("three"));
11
+
12
+ var _TreasureFaceAnime = require("./TreasureFaceAnime");
13
+
14
+ var _TreasureOpenAnime = require("./TreasureOpenAnime");
15
+
16
+ var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
17
+
18
+ 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); }
19
+
20
+ 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; }
21
+
22
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
+
24
+ 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); } }
25
+
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
27
+
28
+ 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); }
29
+
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
+
32
+ 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); }; }
33
+
34
+ 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); }
35
+
36
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
+
38
+ 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; } }
39
+
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
+
42
+ 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; }
43
+
44
+ function copyMaterial(orginMatrial) {
45
+ var material = new THREE.MeshBasicMaterial({
46
+ map: orginMatrial.map,
47
+ opacity: orginMatrial.opacity,
48
+ transparent: orginMatrial.transparent
49
+ });
50
+ return material;
51
+ }
52
+ /** 宝箱实例
53
+ * @description
54
+ * 点击宝箱可以打开宝箱
55
+ * @description
56
+ * 在宝箱未打开时,靠近宝箱或点击宝箱,宝箱会转动到朝向用户的方向
57
+ */
58
+
59
+
60
+ var TreasureObject = /*#__PURE__*/function (_THREE$Object3D) {
61
+ _inherits(TreasureObject, _THREE$Object3D);
62
+
63
+ var _super = _createSuper(TreasureObject);
64
+
65
+ function TreasureObject(params) {
66
+ var _this;
67
+
68
+ _classCallCheck(this, TreasureObject);
69
+
70
+ _this = _super.call(this);
71
+
72
+ _defineProperty(_assertThisInitialized(_this), "name", 'treasureObject');
73
+
74
+ _defineProperty(_assertThisInitialized(_this), "opened", false);
75
+
76
+ _defineProperty(_assertThisInitialized(_this), "onFiveWantsTapGesture", function (raycaster) {
77
+ var _this$clickCallback, _this2;
78
+
79
+ var intersects = raycaster.intersectObject(_this.modelGroup, true);
80
+ var isClickTreasure = !!intersects && intersects.length > 0;
81
+ if (!isClickTreasure) return;
82
+ (_this$clickCallback = (_this2 = _this).clickCallback) === null || _this$clickCallback === void 0 ? void 0 : _this$clickCallback.call(_this2, _this.treasureID);
83
+
84
+ _this.rotateToCamera();
85
+
86
+ _this.open();
87
+
88
+ return false;
89
+ });
90
+
91
+ _defineProperty(_assertThisInitialized(_this), "onFivePanoArrived", function () {
92
+ if (_this.position.distanceTo(_this.five.camera.position) < 3) _this.rotateToCamera();
93
+ });
94
+
95
+ _this.five = params.five;
96
+ _this.treasureID = params.id;
97
+
98
+ _this.position.copy(params.position);
99
+
100
+ _this.texture = params.baseTexture;
101
+ _this.modelGroup = params.fbxGroup.clone();
102
+ _this.clickCallback = params.clickCallback;
103
+ _this.faceAnime = new _TreasureFaceAnime.TreasureFaceAnime({
104
+ five: params.five,
105
+ faceTexturesPromise: params.faceTexturesPromise,
106
+ treasureGroup: _this.modelGroup
107
+ });
108
+ _this.openAnime = new _TreasureOpenAnime.TreasurePluginOpenAnime({
109
+ five: params.five,
110
+ treasureGroup: _this.modelGroup,
111
+ animationClip: params.fbxGroup.animations[0]
112
+ });
113
+
114
+ _this.init();
115
+
116
+ _this.faceAnime.play();
117
+
118
+ _this.five.on('panoArrived', _this.onFivePanoArrived);
119
+
120
+ _this.five.on('wantsTapGesture', _this.onFiveWantsTapGesture);
121
+
122
+ return _this;
123
+ }
124
+
125
+ _createClass(TreasureObject, [{
126
+ key: "dispose",
127
+ value: function dispose() {
128
+ this.faceAnime.dispose();
129
+ this.openAnime.dispose();
130
+ this.five.off('panoArrived', this.onFivePanoArrived);
131
+ this.five.off('wantsTapGesture', this.onFiveWantsTapGesture);
132
+ }
133
+ }, {
134
+ key: "rotateToCamera",
135
+ value: function rotateToCamera() {
136
+ var _this3 = this;
137
+
138
+ if (this.opened) return; // 宝箱朝向
139
+
140
+ var treasureDirection = this.getWorldDirection(new THREE.Vector3()).setY(0); // 宝箱到相机位置的朝向
141
+
142
+ var toCameraDirection = this.five.camera.position.clone().sub(this.position).setY(0); // 旋转方向「从左到右还是从右到左」
143
+
144
+ var rotateDirection = treasureDirection.clone().cross(toCameraDirection).y > 0 ? 1 : -1; // 宝箱从当前朝向转到「朝向相机」相差的角度,需要考虑方向
145
+
146
+ var deltaRadY = treasureDirection.clone().angleTo(toCameraDirection); // 1s 旋转的弧度
147
+
148
+ var speed = 8;
149
+ var duration = Math.ceil(deltaRadY / speed * 1000);
150
+ var rotationStartY = this.rotation.y;
151
+ (0, _BetterTween.tweenProgress)(duration).onUpdate(function (_ref) {
152
+ var progress = _ref.progress;
153
+ _this3.rotation.y = rotationStartY + progress * deltaRadY * rotateDirection;
154
+ }).play();
155
+ }
156
+ }, {
157
+ key: "open",
158
+ value: function open() {
159
+ if (this.opened) return false;
160
+ this.opened = true;
161
+ this.faceAnime.pause();
162
+ this.faceAnime.setToInitialState();
163
+ this.openAnime.play();
164
+ return true;
165
+ }
166
+ }, {
167
+ key: "init",
168
+ value: function init() {
169
+ var group = this.modelGroup;
170
+ group.traverse(function (obj) {
171
+ if (!(obj instanceof THREE.Mesh)) return;
172
+ obj.material = copyMaterial(obj.material);
173
+ if (obj.material.map) obj.material.map.encoding = THREE.sRGBEncoding;
174
+ obj.renderOrder = 2;
175
+ });
176
+ this.texture.encoding = THREE.sRGBEncoding;
177
+ group.getObjectByName('box').material.map = this.texture;
178
+ group.getObjectByName('box2').material.map = this.texture;
179
+ this.add(group);
180
+ }
181
+ }]);
182
+
183
+ return TreasureObject;
184
+ }(THREE.Object3D);
185
+
186
+ exports.TreasureObject = TreasureObject;
@@ -0,0 +1,23 @@
1
+ import * as THREE from 'three';
2
+ import { Five } from '@realsee/five';
3
+ export interface TreasureOpenAnimeParam {
4
+ five: Five;
5
+ treasureGroup: THREE.Group;
6
+ animationClip: THREE.AnimationClip;
7
+ }
8
+ /** 打开宝箱的动画实例
9
+ * @description
10
+ * 因为宝箱没有关闭的场景,对于一个宝箱来讲,打开后,要么销毁,要么保留当时的状态。所以不做关闭方面的兼容处理
11
+ */
12
+ export declare class TreasurePluginOpenAnime {
13
+ private five;
14
+ private hasPlayed;
15
+ private clock;
16
+ private treasureGroup;
17
+ private animationDispose?;
18
+ private action;
19
+ constructor(param: TreasureOpenAnimeParam);
20
+ dispose(): void;
21
+ play(): boolean;
22
+ private onPlayFinished;
23
+ }
@@ -0,0 +1,103 @@
1
+ "use strict";
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); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.TreasurePluginOpenAnime = void 0;
9
+
10
+ var THREE = _interopRequireWildcard(require("three"));
11
+
12
+ var _BetterTween = require("../../shared-utils/animationFrame/BetterTween");
13
+
14
+ var _animationFrame = require("../../shared-utils/animationFrame");
15
+
16
+ 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); }
17
+
18
+ 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
+
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
+ /** 打开宝箱的动画实例
29
+ * @description
30
+ * 因为宝箱没有关闭的场景,对于一个宝箱来讲,打开后,要么销毁,要么保留当时的状态。所以不做关闭方面的兼容处理
31
+ */
32
+ var TreasurePluginOpenAnime = /*#__PURE__*/function () {
33
+ function TreasurePluginOpenAnime(param) {
34
+ var _this = this;
35
+
36
+ _classCallCheck(this, TreasurePluginOpenAnime);
37
+
38
+ _defineProperty(this, "hasPlayed", false);
39
+
40
+ _defineProperty(this, "clock", new THREE.Clock());
41
+
42
+ _defineProperty(this, "onPlayFinished", function () {
43
+ var _this$animationDispos;
44
+
45
+ // 销毁打开盒子动画的定时任务
46
+ (_this$animationDispos = _this.animationDispose) === null || _this$animationDispos === void 0 ? void 0 : _this$animationDispos.call(_this); // 选出模型中的飘带
47
+
48
+ var hideObjects = _this.treasureGroup.children.filter(function (obj) {
49
+ return obj.name.indexOf('Plane') === 0 || obj.name.indexOf('coin') === 0;
50
+ }); // 使飘带消失
51
+
52
+
53
+ (0, _BetterTween.tweenProgress)(300).onUpdate(function (_ref) {
54
+ var progress = _ref.progress;
55
+ var opacity = 1 - progress;
56
+ hideObjects.forEach(function (obj) {
57
+ obj.material.opacity = opacity;
58
+ });
59
+ _this.five.needsRender = true;
60
+ }).play();
61
+ });
62
+
63
+ this.five = param.five;
64
+ this.treasureGroup = param.treasureGroup;
65
+ var mixer = new THREE.AnimationMixer(this.treasureGroup);
66
+ this.action = mixer.clipAction(param.animationClip);
67
+ this.action.setLoop(THREE.LoopOnce, 1);
68
+ this.action.clampWhenFinished = true;
69
+ }
70
+
71
+ _createClass(TreasurePluginOpenAnime, [{
72
+ key: "dispose",
73
+ value: function dispose() {
74
+ var _this$animationDispos2;
75
+
76
+ (_this$animationDispos2 = this.animationDispose) === null || _this$animationDispos2 === void 0 ? void 0 : _this$animationDispos2.call(this);
77
+ this.clock.stop();
78
+ }
79
+ }, {
80
+ key: "play",
81
+ value: function play() {
82
+ var _this2 = this;
83
+
84
+ if (this.hasPlayed) return false;
85
+ this.hasPlayed = true;
86
+ this.action.play();
87
+ var mixer = this.action.getMixer();
88
+ this.animationDispose = (0, _animationFrame.requestAnimationFrameInterval)(function () {
89
+ var deltaTime = _this2.clock.getDelta();
90
+
91
+ mixer.update(deltaTime);
92
+ _this2.five.needsRender = true;
93
+ }); // 小人出现的动画完成之后需要隐藏飘带
94
+
95
+ mixer.addEventListener('finished', this.onPlayFinished);
96
+ return true;
97
+ }
98
+ }]);
99
+
100
+ return TreasurePluginOpenAnime;
101
+ }();
102
+
103
+ exports.TreasurePluginOpenAnime = TreasurePluginOpenAnime;
@@ -0,0 +1,12 @@
1
+ /** CDN 资源 Base URL */
2
+ export declare const TREASURE_BASE_URL = "//vrlab-public.ljcdn.com/release/static/image/release/baoxiang_xiaobei/1/";
3
+ /** FBX 文件地址,注意 FBX 文件中写入了默认贴图地址 */
4
+ export declare const TREASURE_FBX_URL: string;
5
+ /** 宝箱脸部的动画贴图 */
6
+ export declare const TREASURE_FACE_ANIMATION_URLS: string[];
7
+ /** 宝箱类型 */
8
+ export declare enum TreasureType {
9
+ TreasureType1 = 0,
10
+ TreasureType2 = 1
11
+ }
12
+ export declare const DEFAULT_TREASURE_TYPE: TreasureType;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TreasureType = exports.TREASURE_FBX_URL = exports.TREASURE_FACE_ANIMATION_URLS = exports.TREASURE_BASE_URL = exports.DEFAULT_TREASURE_TYPE = void 0;
7
+
8
+ /** CDN 资源 Base URL */
9
+ var TREASURE_BASE_URL = '//vrlab-public.ljcdn.com/release/static/image/release/baoxiang_xiaobei/1/';
10
+ /** FBX 文件地址,注意 FBX 文件中写入了默认贴图地址 */
11
+
12
+ exports.TREASURE_BASE_URL = TREASURE_BASE_URL;
13
+ var TREASURE_FBX_URL = TREASURE_BASE_URL + 'baoxiang_xiaobei.fbx';
14
+ /** 宝箱脸部的动画贴图 */
15
+
16
+ exports.TREASURE_FBX_URL = TREASURE_FBX_URL;
17
+ var TREASURE_FACE_ANIMATION_URLS = [TREASURE_BASE_URL + 'faces/1.png', TREASURE_BASE_URL + 'faces/2.png', TREASURE_BASE_URL + 'faces/3.png', TREASURE_BASE_URL + 'faces/4.png', TREASURE_BASE_URL + 'faces/5.png'];
18
+ /** 宝箱类型 */
19
+
20
+ exports.TREASURE_FACE_ANIMATION_URLS = TREASURE_FACE_ANIMATION_URLS;
21
+ var TreasureType;
22
+ exports.TreasureType = TreasureType;
23
+
24
+ (function (TreasureType) {
25
+ TreasureType[TreasureType["TreasureType1"] = 0] = "TreasureType1";
26
+ TreasureType[TreasureType["TreasureType2"] = 1] = "TreasureType2";
27
+ })(TreasureType || (exports.TreasureType = TreasureType = {}));
28
+
29
+ var DEFAULT_TREASURE_TYPE = TreasureType.TreasureType1;
30
+ exports.DEFAULT_TREASURE_TYPE = DEFAULT_TREASURE_TYPE;
@@ -0,0 +1,11 @@
1
+ import { FivePlugin } from '@realsee/five';
2
+ import { TreasurePluginController, TreasurePluginParameterType } from './Controller';
3
+ export declare const TreasurePlugin: FivePlugin<TreasurePluginParameterType, TreasurePluginReturnType>;
4
+ export default TreasurePlugin;
5
+ export declare type TreasurePluginReturnType = TreasurePluginController;
6
+ export type { TreasureType } from './constants';
7
+ export type { TreasurePluginItemData, TreasurePluginData } from './Controller';
8
+ export type { TreasurePluginController, TreasurePluginParameterType, TreasurePluginEvents } from './Controller';
9
+ export type { TreasureObject, TreasureObjectParam } from './TreasureObject';
10
+ export type { TreasureFaceAnime, TreasureFaceAnimeParam } from './TreasureFaceAnime';
11
+ export type { TreasurePluginOpenAnime, TreasureOpenAnimeParam } from './TreasureOpenAnime';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.TreasurePlugin = void 0;
7
+
8
+ var _Controller = require("./Controller");
9
+
10
+ var TreasurePlugin = function TreasurePlugin(five) {
11
+ return new _Controller.TreasurePluginController(five);
12
+ };
13
+
14
+ exports.TreasurePlugin = TreasurePlugin;
15
+ var _default = TreasurePlugin;
16
+ exports["default"] = _default;
@@ -0,0 +1,7 @@
1
+ import { TreasureType } from './constants';
2
+ export interface TreasureMapItem {
3
+ type: TreasureType;
4
+ textureUrl: string;
5
+ }
6
+ /** 不同宝箱类型对应的数据 */
7
+ export declare const treasureDataMap: Map<TreasureType, TreasureMapItem>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.treasureDataMap = void 0;
7
+
8
+ var _constants = require("./constants");
9
+
10
+ /** 不同宝箱类型对应的数据 */
11
+ var treasureDataMap = new Map();
12
+ exports.treasureDataMap = treasureDataMap;
13
+ treasureDataMap.set(_constants.TreasureType.TreasureType1, {
14
+ type: _constants.TreasureType.TreasureType1,
15
+ textureUrl: _constants.TREASURE_BASE_URL + 'box_Base_Color.png'
16
+ });
17
+ treasureDataMap.set(_constants.TreasureType.TreasureType2, {
18
+ type: _constants.TreasureType.TreasureType2,
19
+ textureUrl: _constants.TREASURE_BASE_URL + 'box_Base_Color_red.png'
20
+ });
@@ -0,0 +1,2 @@
1
+ import * as THREE from 'three';
2
+ export declare type TreasurePluginBasicMesh = THREE.Mesh<THREE.BufferGeometry, THREE.MeshBasicMaterial>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,7 @@
1
+ import { TreasurePluginData } from '../Controller';
2
+ import { Group, Texture } from 'three';
3
+ import { TreasureMapItem } from '../treasureDataMap';
4
+ export declare function loadTreasureTextures(data: TreasurePluginData, baseFbxObjPromise: Promise<Group>): Promise<{
5
+ treasureMapItem: TreasureMapItem;
6
+ texture: Texture;
7
+ }[]>;