@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,29 @@
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["default"] = createLine;
9
+
10
+ var THREE = _interopRequireWildcard(require("three"));
11
+
12
+ var _line = require("@realsee/five/line");
13
+
14
+ 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); }
15
+
16
+ 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; }
17
+
18
+ function createLine(point1, point2) {
19
+ var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new THREE.Vector3(1, 1, 1);
20
+ var dashed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
21
+ var line = new _line.Line(point1, point2);
22
+ line.setMaterial({
23
+ dashed: dashed,
24
+ color: color,
25
+ linewidth: 1
26
+ });
27
+ line.remove(line.points);
28
+ return line;
29
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 创建一个防抖动函数,该函数会在 wait 毫秒后调用 func 方法
3
+ * @param func - 要防抖动的函数
4
+ * @param [wait=0] - 需要延迟的毫秒数
5
+ */
6
+ export default function debounce<T extends (...args: any) => any>(func: T, wait?: number): (...args: Parameters<T>) => void;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = debounce;
7
+
8
+ /**
9
+ * 创建一个防抖动函数,该函数会在 wait 毫秒后调用 func 方法
10
+ * @param func - 要防抖动的函数
11
+ * @param [wait=0] - 需要延迟的毫秒数
12
+ */
13
+ function debounce(func) {
14
+ var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
15
+ var last;
16
+ return function () {
17
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
18
+ args[_key] = arguments[_key];
19
+ }
20
+
21
+ clearTimeout(last);
22
+ last = setTimeout(function () {
23
+ func.apply(void 0, args);
24
+ }, wait);
25
+ };
26
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 对象比较
3
+ * @param {*} value 第一个比较的值
4
+ * @param {*} other 第二个比较的值
5
+ * @param {Object} options 可选参数,可选项包括:<br />
6
+ * deep {Boolean} 是否深比较<br />
7
+ * @returns {boolean} 是否相等
8
+ */
9
+ export default function equal(value: any, other: any, opt?: {
10
+ deep: boolean;
11
+ }): boolean;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = equal;
7
+
8
+ var _isTruelyObject = _interopRequireDefault(require("./isTruelyObject"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ 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); }
13
+
14
+ function baseIsEqual(value, other) {
15
+ if (value === other) return true;
16
+ if (_typeof(value) !== _typeof(other)) return false;
17
+ if (Number.isNaN(value) && Number.isNaN(other)) return true;
18
+ return false;
19
+ }
20
+
21
+ function objEqualShallow(value, other) {
22
+ var valueProps = Object.getOwnPropertyNames(value);
23
+ var otherProps = Object.getOwnPropertyNames(other);
24
+ if (valueProps.length !== otherProps.length) return false;
25
+
26
+ for (var i = 0, len = valueProps.length; i < len; i++) {
27
+ var propName = valueProps[i];
28
+ if (!baseIsEqual(value[propName], other[propName])) return false;
29
+ }
30
+
31
+ return true;
32
+ }
33
+
34
+ function arrayEqualShallow(value, other) {
35
+ if (value.length !== other.length) return false;
36
+
37
+ for (var i = 0, len = value.length; i < len; i++) {
38
+ if (!baseIsEqual(value[i], other[i])) return false;
39
+ }
40
+
41
+ return true;
42
+ }
43
+
44
+ function isShallowEqual(value, other) {
45
+ if (baseIsEqual(value, other)) return true;
46
+ if ((0, _isTruelyObject["default"])(value) && (0, _isTruelyObject["default"])(other)) return objEqualShallow(value, other);
47
+ if (Array.isArray(value) && Array.isArray(other)) return arrayEqualShallow(value, other);
48
+ return false;
49
+ }
50
+
51
+ function isDeepEqual(value, other) {
52
+ if (baseIsEqual(value, other)) return true;
53
+ if ((0, _isTruelyObject["default"])(value) && (0, _isTruelyObject["default"])(other)) return objEqualDeep(value, other);
54
+ if (Array.isArray(value) && Array.isArray(other)) return arrayEqualDeep(value, other);
55
+ return false;
56
+ }
57
+
58
+ function arrayEqualDeep(value, other) {
59
+ if (value.length !== other.length) return false;
60
+
61
+ for (var i = 0, len = value.length; i < len; i++) {
62
+ if (!isDeepEqual(value[i], other[i])) return false;
63
+ }
64
+
65
+ return true;
66
+ }
67
+
68
+ function objEqualDeep(value, other) {
69
+ var valueProps = Object.getOwnPropertyNames(value);
70
+ var otherProps = Object.getOwnPropertyNames(other);
71
+ if (valueProps.length !== otherProps.length) return false;
72
+
73
+ for (var i = 0, len = valueProps.length; i < len; i++) {
74
+ var propName = valueProps[i];
75
+ if (!isDeepEqual(value[propName], other[propName])) return false;
76
+ }
77
+
78
+ return true;
79
+ }
80
+ /**
81
+ * 对象比较
82
+ * @param {*} value 第一个比较的值
83
+ * @param {*} other 第二个比较的值
84
+ * @param {Object} options 可选参数,可选项包括:<br />
85
+ * deep {Boolean} 是否深比较<br />
86
+ * @returns {boolean} 是否相等
87
+ */
88
+
89
+
90
+ function equal(value, other) {
91
+ var opt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
92
+ deep: false
93
+ };
94
+ if (!opt.deep) return isShallowEqual(value, other);
95
+ return isDeepEqual(value, other);
96
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 对象属性筛选函数。
3
+ * 基于已有对象生成一个满足条件(属性)新的对象。
4
+ * @param {object} object
5
+ * @param {Function} check
6
+ */
7
+ export declare function filter<T, K extends keyof T>(object: T, check: (key: K, value: T[K]) => boolean): Record<K, T[K]>;
8
+ /**
9
+ * 对象镜子函数。
10
+ * 生成一个"镜子"对象:对象的属性名与其值相同。
11
+ * @param {string[]} strings 对象属性
12
+ */
13
+ export declare function mirror(strings: string[]): Record<string, string>;
14
+ /**
15
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
16
+ * @param object
17
+ * @param props 排除的属性
18
+ * @return
19
+ */
20
+ export declare function omit<T, K extends keyof T>(object: T, props: Extract<K[], string[]>): Omit<T, K>;
21
+ /**
22
+ * 筛选需要的对象字段:实现从一个对象中选择某些指定属性生成新的对象(与`omit()`功能相反)。
23
+ * @param {object} object
24
+ * @param {string[]} props
25
+ * @return {object}
26
+ */
27
+ export declare function pick<T, K extends keyof T>(object: T, props: K[]): Pick<T, K>;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.filter = filter;
7
+ exports.mirror = mirror;
8
+ exports.omit = omit;
9
+ exports.pick = pick;
10
+
11
+ var _tap = _interopRequireDefault(require("./tap"));
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
+
15
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
16
+
17
+ 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); }
18
+
19
+ 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; }
20
+
21
+ /**
22
+ * 对象属性筛选函数。
23
+ * 基于已有对象生成一个满足条件(属性)新的对象。
24
+ * @param {object} object
25
+ * @param {Function} check
26
+ */
27
+ function filter(object, check) {
28
+ return (0, _tap["default"])({}, function (result) {
29
+ Object.keys(object).forEach(function (key) {
30
+ var _key = key;
31
+
32
+ if (check(_key, object[_key])) {
33
+ result[_key] = object[_key];
34
+ }
35
+ });
36
+ });
37
+ }
38
+ /**
39
+ * 对象镜子函数。
40
+ * 生成一个"镜子"对象:对象的属性名与其值相同。
41
+ * @param {string[]} strings 对象属性
42
+ */
43
+
44
+
45
+ function mirror(strings) {
46
+ return (0, _tap["default"])({}, function (result) {
47
+ var _iterator = _createForOfIteratorHelper(strings),
48
+ _step;
49
+
50
+ try {
51
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
52
+ var string = _step.value;
53
+ result[string] = string;
54
+ }
55
+ } catch (err) {
56
+ _iterator.e(err);
57
+ } finally {
58
+ _iterator.f();
59
+ }
60
+ });
61
+ }
62
+ /**
63
+ * 过滤掉不需要的对象字段函数:实现从一个对象中排除某些指定属性后生成的新对象。
64
+ * @param object
65
+ * @param props 排除的属性
66
+ * @return
67
+ */
68
+
69
+
70
+ function omit(object, props) {
71
+ return (0, _tap["default"])({}, function (result) {
72
+ for (var name in object) {
73
+ if (props.indexOf(name) !== -1) continue;
74
+ result[name] = object[name];
75
+ }
76
+ });
77
+ }
78
+ /**
79
+ * 筛选需要的对象字段:实现从一个对象中选择某些指定属性生成新的对象(与`omit()`功能相反)。
80
+ * @param {object} object
81
+ * @param {string[]} props
82
+ * @return {object}
83
+ */
84
+
85
+
86
+ function pick(object, props) {
87
+ // eslint-disable-next-line no-return-assign
88
+ return (0, _tap["default"])({}, function (result) {
89
+ return props.forEach(function (prop) {
90
+ return result[prop] = object[prop];
91
+ });
92
+ });
93
+ }
@@ -0,0 +1,2 @@
1
+ import type { Five } from '@realsee/five';
2
+ export default function changeMode(five: Five, ...changeModeParams: Parameters<Five['changeMode']>): Promise<void>;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = changeMode;
7
+
8
+ var _to = _interopRequireDefault(require("../to"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+
14
+ 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."); }
15
+
16
+ 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); }
17
+
18
+ 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; }
19
+
20
+ 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; }
21
+
22
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
+
24
+ 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); } }
25
+
26
+ 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); }); }; }
27
+
28
+ function changeMode(_x) {
29
+ return _changeMode.apply(this, arguments);
30
+ }
31
+
32
+ function _changeMode() {
33
+ _changeMode = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(five) {
34
+ var _len,
35
+ changeModeParams,
36
+ _key,
37
+ _yield$to,
38
+ _yield$to2,
39
+ changeModeError,
40
+ _args = arguments;
41
+
42
+ return regeneratorRuntime.wrap(function _callee$(_context) {
43
+ while (1) {
44
+ switch (_context.prev = _context.next) {
45
+ case 0:
46
+ for (_len = _args.length, changeModeParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
47
+ changeModeParams[_key - 1] = _args[_key];
48
+ }
49
+
50
+ _context.next = 3;
51
+ return (0, _to["default"])(five.changeMode.apply(five, changeModeParams));
52
+
53
+ case 3:
54
+ _yield$to = _context.sent;
55
+ _yield$to2 = _slicedToArray(_yield$to, 1);
56
+ changeModeError = _yield$to2[0];
57
+
58
+ if (!changeModeError) {
59
+ _context.next = 8;
60
+ break;
61
+ }
62
+
63
+ throw changeModeError;
64
+
65
+ case 8:
66
+ _context.next = 10;
67
+ return new Promise(function (reslove, reject) {
68
+ five.once('initAnimationEnded', reslove);
69
+
70
+ var handleModeChange = function handleModeChange(mode) {
71
+ if (mode !== changeModeParams[0]) reject('changeMode 被中断');
72
+ five.off('modeChange', handleModeChange);
73
+ };
74
+
75
+ five.on('modeChange', handleModeChange);
76
+ });
77
+
78
+ case 10:
79
+ case "end":
80
+ return _context.stop();
81
+ }
82
+ }
83
+ }, _callee);
84
+ }));
85
+ return _changeMode.apply(this, arguments);
86
+ }
@@ -0,0 +1 @@
1
+ export declare function useFivePlugin<T extends (...args: any) => any>(name: string): ReturnType<T>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useFivePlugin = useFivePlugin;
7
+
8
+ var _react = require("@realsee/five/react");
9
+
10
+ function useFivePlugin(name) {
11
+ var five = (0, _react.unsafe__useFiveInstance)();
12
+ var plugin = five.plugins[name];
13
+ if (!plugin) throw new Error("can not find plugin \"".concat(name, "\""));
14
+ return plugin;
15
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 将弧度转成 0 - 2PI 中的值
3
+ * @param rad - 任意弧度值
4
+ * @return 0 - 2PI 的数值
5
+ */
6
+ declare function formatRad(rad: number): number;
7
+ export { formatRad };
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatRad = formatRad;
7
+ var PI_2 = Math.PI * 2;
8
+ /**
9
+ * 将弧度转成 0 - 2PI 中的值
10
+ * @param rad - 任意弧度值
11
+ * @return 0 - 2PI 的数值
12
+ */
13
+
14
+ function formatRad(rad) {
15
+ return (rad % PI_2 + PI_2) % PI_2;
16
+ }
@@ -0,0 +1,6 @@
1
+ import type { Five } from '@realsee/five';
2
+ /**
3
+ * 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
4
+ * @param five five
5
+ */
6
+ export default function getPxmm(five: Five, container: Element): number;
@@ -0,0 +1,37 @@
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["default"] = getPxmm;
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
+ /**
17
+ * 获取「在俯视图」状态下,模型 mm 与屏幕像素 px 的对应关系,即每 mm 对应多少 px
18
+ * @param five five
19
+ */
20
+ function getPxmm(five, container) {
21
+ var boundingCenter = new THREE.Vector3(0, 0, 0);
22
+ five.model.bounding.getCenter(boundingCenter);
23
+ var boundingCenterY = boundingCenter.y;
24
+
25
+ var _five$getCurrentState = five.getCurrentState(),
26
+ longitude = _five$getCurrentState.longitude; // 因为模型可能经过旋转,所以屏幕水平方向上的 1m 对应 X 轴距离需要转换
27
+
28
+
29
+ var X = 1 / Math.abs(Math.cos(longitude)); // 模型绕 (boundingCenterX, boundingCenterY, boundingCenterZ) 旋转
30
+
31
+ var originPosition = new THREE.Vector3(0, boundingCenterY, 0);
32
+ var originPositionXUnit = new THREE.Vector3(X, boundingCenterY, 0);
33
+ var mouse = originPosition.project(five.camera);
34
+ var xUnitMouse = originPositionXUnit.project(five.camera);
35
+ var pxmm = Math.abs((xUnitMouse.x - mouse.x) / 1000) * (container.getBoundingClientRect().width / 2);
36
+ return pxmm;
37
+ }
@@ -0,0 +1 @@
1
+ export default function getRandomColor(): string;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = getRandomColor;
7
+
8
+ function getRandomColor() {
9
+ var color = '#' + '0123456789abcdef'.split('').map(function (v, i, a) {
10
+ return i > 5 ? null : a[Math.floor(Math.random() * 16)];
11
+ }).join('');
12
+ return color;
13
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 检查一个值是否是狭义上的对象
3
+ * @param {any} value 要检查的值
4
+ *
5
+ * isTruelyObject({})
6
+ * // => true
7
+ *
8
+ * isObjectLike([1, 2, 3])
9
+ * // => false
10
+ *
11
+ * isObjectLike(Function)
12
+ * // => false
13
+ *
14
+ * isObjectLike(null)
15
+ * // => false
16
+ *
17
+ */
18
+ export default function isTruelyObject(value: any): boolean;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = isTruelyObject;
7
+
8
+ /**
9
+ * 检查一个值是否是狭义上的对象
10
+ * @param {any} value 要检查的值
11
+ *
12
+ * isTruelyObject({})
13
+ * // => true
14
+ *
15
+ * isObjectLike([1, 2, 3])
16
+ * // => false
17
+ *
18
+ * isObjectLike(Function)
19
+ * // => false
20
+ *
21
+ * isObjectLike(null)
22
+ * // => false
23
+ *
24
+ */
25
+ function isTruelyObject(value) {
26
+ return Object.prototype.toString.call(value) === '[object Object]';
27
+ }
@@ -0,0 +1 @@
1
+ export default function evenNumber(num: number): number;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = evenNumber;
7
+
8
+ function evenNumber(num) {
9
+ var roundNum = Math.round(num);
10
+ return roundNum % 2 === 0 ? roundNum : roundNum + 1;
11
+ }