@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,102 @@
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.BetterTween = void 0;
9
+ exports.tweenProgress = tweenProgress;
10
+
11
+ var _tween = _interopRequireDefault(require("@tweenjs/tween.js"));
12
+
13
+ var _ = require(".");
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
+
17
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
+
19
+ 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); }
20
+
21
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
22
+
23
+ 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); }; }
24
+
25
+ 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); }
26
+
27
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
28
+
29
+ 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; } }
30
+
31
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
32
+
33
+ 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; }
34
+
35
+ var BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
36
+ _inherits(BetterTween, _TWEEN$Tween);
37
+
38
+ var _super = _createSuper(BetterTween);
39
+
40
+ function BetterTween() {
41
+ var _this;
42
+
43
+ _classCallCheck(this, BetterTween);
44
+
45
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
46
+ args[_key] = arguments[_key];
47
+ }
48
+
49
+ _this = _super.call.apply(_super, [this].concat(args));
50
+
51
+ _defineProperty(_assertThisInitialized(_this), "disposeMethods", []);
52
+
53
+ _defineProperty(_assertThisInitialized(_this), "onDispose", function (callback) {
54
+ _this.disposeMethods.push(callback);
55
+
56
+ return _assertThisInitialized(_this);
57
+ });
58
+
59
+ _defineProperty(_assertThisInitialized(_this), "play", function () {
60
+ _this.start(0);
61
+
62
+ _this.animationFrameDisposer = (0, _.requestAnimationFrameInterval)(function (time) {
63
+ return _this.update(time);
64
+ });
65
+ return _assertThisInitialized(_this);
66
+ });
67
+
68
+ _defineProperty(_assertThisInitialized(_this), "dispose", function () {
69
+ var _this$animationFrameD, _this2;
70
+
71
+ _this.stop();
72
+
73
+ (_this$animationFrameD = (_this2 = _this).animationFrameDisposer) === null || _this$animationFrameD === void 0 ? void 0 : _this$animationFrameD.call(_this2);
74
+
75
+ _this.disposeMethods.forEach(function (fn) {
76
+ return fn();
77
+ });
78
+
79
+ _this.disposeMethods = [];
80
+
81
+ _tween["default"].remove(_assertThisInitialized(_this));
82
+ });
83
+
84
+ return _this;
85
+ }
86
+
87
+ return BetterTween;
88
+ }(_tween["default"].Tween);
89
+
90
+ exports.BetterTween = BetterTween;
91
+
92
+ function tweenProgress(duration) {
93
+ var easing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _tween["default"].Easing.Linear.None;
94
+ var tween = new BetterTween({
95
+ progress: 0
96
+ }).to({
97
+ progress: 1
98
+ });
99
+ if (duration !== undefined) tween.duration(duration);
100
+ if (easing !== undefined) tween.easing(easing);
101
+ return tween;
102
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 线性过程插值
3
+ */
4
+ export declare function progressNumber(from: number, to: number, pst: number): number;
5
+ /**
6
+ * 弧度过程插值值,会取锐角进行插值
7
+ */
8
+ export declare function progressRad(from: number, to: number, pst: number): number;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.progressNumber = progressNumber;
7
+ exports.progressRad = progressRad;
8
+
9
+ var _formatRad = require("./formatRad");
10
+
11
+ var PI = Math.PI;
12
+ var PI_2 = PI * 2;
13
+ /**
14
+ * 线性过程插值
15
+ */
16
+
17
+ function progressNumber(from, to, pst) {
18
+ return from + (to - from) * pst;
19
+ }
20
+ /**
21
+ * 弧度过程插值值,会取锐角进行插值
22
+ */
23
+
24
+
25
+ function progressRad(from, to, pst) {
26
+ from = (0, _formatRad.formatRad)(from);
27
+ to = (0, _formatRad.formatRad)(to);
28
+
29
+ if (to - from > PI) {
30
+ return (0, _formatRad.formatRad)(progressNumber(from + PI_2, to, pst));
31
+ }
32
+
33
+ if (from - to > PI) {
34
+ return (0, _formatRad.formatRad)(progressNumber(from - PI_2, to, pst));
35
+ }
36
+
37
+ return progressNumber(from, to, pst);
38
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
3
+ * @param rad 弧度值
4
+ */
5
+ export declare function formatLongitude(rad: number): number;
6
+ /**
7
+ * 把一个任意角度的弧度值转换为一个 [-2PI, 2PI] 的弧度值
8
+ * @param rad 弧度值
9
+ */
10
+ export declare function formatLatitude(rad: number): number;
11
+ /**
12
+ * 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
13
+ * @param rad 弧度值
14
+ */
15
+ export declare const formatRad: typeof formatLongitude;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatLatitude = formatLatitude;
7
+ exports.formatLongitude = formatLongitude;
8
+ exports.formatRad = void 0;
9
+ var PI_2 = Math.PI * 2;
10
+ /**
11
+ * 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
12
+ * @param rad 弧度值
13
+ */
14
+
15
+ function formatLongitude(rad) {
16
+ return (rad % PI_2 + PI_2) % PI_2;
17
+ }
18
+ /**
19
+ * 把一个任意角度的弧度值转换为一个 [-2PI, 2PI] 的弧度值
20
+ * @param rad 弧度值
21
+ */
22
+
23
+
24
+ function formatLatitude(rad) {
25
+ return rad % PI_2;
26
+ }
27
+ /**
28
+ * 把一个任意角度的弧度值转换为一个 [0, 2PI] 的弧度值
29
+ * @param rad 弧度值
30
+ */
31
+
32
+
33
+ var formatRad = formatLongitude;
34
+ exports.formatRad = formatRad;
@@ -0,0 +1,15 @@
1
+ declare const _requestAnimationFrame: ((callback: FrameRequestCallback) => number) & typeof requestAnimationFrame;
2
+ export default _requestAnimationFrame;
3
+ export declare function nextFrame(fn: FrameRequestCallback, delay?: number): void;
4
+ /**
5
+ * 在每个 AnimationFrame 中调用传入的函数
6
+ * @param callback 每次 AnimationFrame 中调用的函数
7
+ * @param frame 每秒运行多少次
8
+ * @returns 返回一个函数,调用可以停止 AnimationFrameLoop
9
+ */
10
+ export declare function requestAnimationFrameInterval(callback?: (time: number) => any, frame?: number): () => void;
11
+ /**
12
+ * 获取两个 AnimationFrame 间隔的时间
13
+ * @returns 返回一个 Promise,resolve 的结果是两个 AnimationFrame 间隔的时间
14
+ */
15
+ export declare function getFrameTime(): Promise<unknown>;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ exports.getFrameTime = getFrameTime;
8
+ exports.nextFrame = nextFrame;
9
+ exports.requestAnimationFrameInterval = requestAnimationFrameInterval;
10
+
11
+ var _requestAnimationFrame = window.requestAnimationFrame || function (fn) {
12
+ return setTimeout(fn, 16);
13
+ };
14
+
15
+ var _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
16
+
17
+ var _default = _requestAnimationFrame;
18
+ exports["default"] = _default;
19
+
20
+ function nextFrame(fn) {
21
+ var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
22
+ if (delay <= 0) _requestAnimationFrame(fn);else _requestAnimationFrame(function () {
23
+ return nextFrame(fn, delay - 1);
24
+ });
25
+ }
26
+ /**
27
+ * 在每个 AnimationFrame 中调用传入的函数
28
+ * @param callback 每次 AnimationFrame 中调用的函数
29
+ * @param frame 每秒运行多少次
30
+ * @returns 返回一个函数,调用可以停止 AnimationFrameLoop
31
+ */
32
+
33
+
34
+ function requestAnimationFrameInterval(callback) {
35
+ var frame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
36
+ var index = -1;
37
+ var oldTime = 0;
38
+ var startTime = -1;
39
+ var minDeltaTime = 1000 / frame;
40
+
41
+ function loop(time) {
42
+ startTime === -1 && (startTime = time);
43
+ index = _requestAnimationFrame(loop);
44
+ var deltaTime = time - oldTime;
45
+ if (deltaTime < minDeltaTime) return;
46
+ oldTime = time;
47
+ callback && callback(time - startTime);
48
+ }
49
+
50
+ index = _requestAnimationFrame(loop);
51
+ return function stop() {
52
+ _cancelAnimationFrame(index);
53
+ };
54
+ }
55
+ /**
56
+ * 获取两个 AnimationFrame 间隔的时间
57
+ * @returns 返回一个 Promise,resolve 的结果是两个 AnimationFrame 间隔的时间
58
+ */
59
+
60
+
61
+ function getFrameTime() {
62
+ var start = Date.now();
63
+ return new Promise(function (resolve) {
64
+ _requestAnimationFrame(function () {
65
+ resolve(Date.now() - start);
66
+ });
67
+ });
68
+ } // export { Easing } from './tween'
69
+ // export { default as tween } from './tween'
@@ -0,0 +1,75 @@
1
+ import * as TWEEN from '@tweenjs/tween.js';
2
+ export declare const Easing: {
3
+ Linear: {
4
+ None: (amount: number) => number;
5
+ };
6
+ Quadratic: {
7
+ In: (amount: number) => number;
8
+ Out: (amount: number) => number;
9
+ InOut: (amount: number) => number;
10
+ };
11
+ Cubic: {
12
+ In: (amount: number) => number;
13
+ Out: (amount: number) => number;
14
+ InOut: (amount: number) => number;
15
+ };
16
+ Quartic: {
17
+ In: (amount: number) => number;
18
+ Out: (amount: number) => number;
19
+ InOut: (amount: number) => number;
20
+ };
21
+ Quintic: {
22
+ In: (amount: number) => number;
23
+ Out: (amount: number) => number;
24
+ InOut: (amount: number) => number;
25
+ };
26
+ Sinusoidal: {
27
+ In: (amount: number) => number;
28
+ Out: (amount: number) => number;
29
+ InOut: (amount: number) => number;
30
+ };
31
+ Exponential: {
32
+ In: (amount: number) => number;
33
+ Out: (amount: number) => number;
34
+ InOut: (amount: number) => number;
35
+ };
36
+ Circular: {
37
+ In: (amount: number) => number;
38
+ Out: (amount: number) => number;
39
+ InOut: (amount: number) => number;
40
+ };
41
+ Elastic: {
42
+ In: (amount: number) => number;
43
+ Out: (amount: number) => number;
44
+ InOut: (amount: number) => number;
45
+ };
46
+ Back: {
47
+ In: (amount: number) => number;
48
+ Out: (amount: number) => number;
49
+ InOut: (amount: number) => number;
50
+ };
51
+ Bounce: {
52
+ In: (amount: number) => number;
53
+ Out: (amount: number) => number;
54
+ InOut: (amount: number) => number;
55
+ };
56
+ };
57
+ interface ITween<T> extends TWEEN.Tween<T> {
58
+ onDestroy: (fn: () => void) => TWEEN.Tween<T>;
59
+ destroy: () => void;
60
+ }
61
+ /**
62
+ * 对象变化的补间动画
63
+ * 1. 应用 requestAnimationFrameInterval 做 update
64
+ * 2. 在原生 tween 上新增 destroy 方法和 onDestroy 监听
65
+ * DOC: https://github.com/tweenjs/tween.js
66
+ * @param from 对象起始状态
67
+ * @param to 对象末尾状态
68
+ * @param duration 经历时间(s)
69
+ * @param easing 过程动画,默认是 Easing.Linear.None
70
+ */
71
+ export default function tween<T>(from: T, to: T, duration: number, easing?: (amount: number) => number): ITween<T>;
72
+ export declare function tweenProgress(duration: number, easing: typeof Easing.Linear.None): ITween<{
73
+ progress: number;
74
+ }>;
75
+ export {};
@@ -0,0 +1,76 @@
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.Easing = void 0;
9
+ exports["default"] = tween;
10
+ exports.tweenProgress = tweenProgress;
11
+
12
+ var TWEEN = _interopRequireWildcard(require("@tweenjs/tween.js"));
13
+
14
+ var _index = require("./index");
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
+ var Easing = TWEEN.Easing;
21
+ exports.Easing = Easing;
22
+
23
+ /**
24
+ * 对象变化的补间动画
25
+ * 1. 应用 requestAnimationFrameInterval 做 update
26
+ * 2. 在原生 tween 上新增 destroy 方法和 onDestroy 监听
27
+ * DOC: https://github.com/tweenjs/tween.js
28
+ * @param from 对象起始状态
29
+ * @param to 对象末尾状态
30
+ * @param duration 经历时间(s)
31
+ * @param easing 过程动画,默认是 Easing.Linear.None
32
+ */
33
+ function tween(from, to, duration) {
34
+ var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Easing.Linear.None;
35
+ var tween = new TWEEN.Tween(from).to(to, duration).easing(easing); // 这里注意一下,因为 requestAnimationFrameInterval 给的时间是从 0 开始的,tween 动画也从 0 开始
36
+
37
+ (0, _index.nextFrame)(function () {
38
+ return tween.start(0);
39
+ });
40
+ var cancelAnimationFrame = (0, _index.requestAnimationFrameInterval)(function (time) {
41
+ if (tween.update(time) === false) cancelAnimationFrame();
42
+ });
43
+ var destroyMethods = [];
44
+
45
+ tween.onDestroy = function (fn) {
46
+ destroyMethods.push(fn);
47
+ return tween;
48
+ };
49
+
50
+ tween.destroy = function () {
51
+ this.stop();
52
+ Object.assign(tween, {
53
+ _onStartCallback: null,
54
+ _onUpdateCallback: null,
55
+ _onCompleteCallback: null,
56
+ _onStopCallbackL: null
57
+ });
58
+ var destroyMethod;
59
+
60
+ while (destroyMethod = destroyMethods.shift()) {
61
+ destroyMethod();
62
+ }
63
+
64
+ cancelAnimationFrame();
65
+ };
66
+
67
+ return tween;
68
+ }
69
+
70
+ function tweenProgress(duration, easing) {
71
+ return tween({
72
+ progress: 0
73
+ }, {
74
+ progress: 1
75
+ }, duration, easing);
76
+ }
@@ -0,0 +1,2 @@
1
+ import type { Five } from '@realsee/five';
2
+ export default function changeModelCanvansOpacity(five: Five, opacity: number, duration?: number): void;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = changeModelCanvansOpacity;
7
+
8
+ function changeModelCanvansOpacity(five, opacity) {
9
+ var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
10
+ var fiveEle = five.getElement();
11
+ if (!fiveEle) return;
12
+ fiveEle.style.opacity = opacity + '';
13
+ fiveEle.style.transition = duration === 0 ? 'none' : "opacity ".concat(duration, "ms linear");
14
+ if (duration === 0) return;
15
+ Promise.race([new Promise(function (res) {
16
+ return fiveEle.addEventListener('transitionend', res, {
17
+ once: true
18
+ });
19
+ }), new Promise(function (res) {
20
+ return setTimeout(res, duration);
21
+ })]).then(function () {
22
+ fiveEle.style.transition = 'none';
23
+ });
24
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { FiveInitArgs } from '@realsee/five';
3
+ import { FiveProviderPropTypes } from '@realsee/five/react';
4
+ /**
5
+ * 创建一个Five App 容器:附带 Five 相关的 React Context & Hooks。
6
+ *
7
+ * @param workJson
8
+ * @returns
9
+ */
10
+ export default function createFiveContainer(workJson: Record<string, any>, fiveInitArgs?: FiveInitArgs, withOpt?: boolean, initialState?: FiveProviderPropTypes['initialState']): React.FC<{}>;
@@ -0,0 +1,165 @@
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"] = createFiveContainer;
9
+
10
+ var React = _interopRequireWildcard(require("react"));
11
+
12
+ var _five = require("@realsee/five");
13
+
14
+ var _react2 = require("@realsee/five/react");
15
+
16
+ var THREE = _interopRequireWildcard(require("three"));
17
+
18
+ var _classnames = _interopRequireDefault(require("classnames"));
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
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); }
23
+
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; }
25
+
26
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
+
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."); }
29
+
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); }
31
+
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; }
33
+
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; }
35
+
36
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
+
38
+ /**
39
+ * 创建一个Five App 容器:附带 Five 相关的 React Context & Hooks。
40
+ *
41
+ * @param workJson
42
+ * @returns
43
+ */
44
+ function createFiveContainer(workJson) {
45
+ var fiveInitArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46
+ var withOpt = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
47
+ var initialState = arguments.length > 3 ? arguments[3] : undefined;
48
+ var work = (0, _five.parseWork)(workJson);
49
+ var defaultInitArgs = {
50
+ imageOptions: {
51
+ size: 2048
52
+ },
53
+ textureOptions: {
54
+ size: 512
55
+ },
56
+ onlyRenderIfNeeds: true
57
+ };
58
+ var FiveProvider = (0, _react2.createFiveProvider)(Object.assign(defaultInitArgs, fiveInitArgs));
59
+
60
+ var FiveContainer = function FiveContainer(props) {
61
+ var _React$useState = React.useState({
62
+ width: 200,
63
+ height: 540
64
+ }),
65
+ _React$useState2 = _slicedToArray(_React$useState, 2),
66
+ wh = _React$useState2[0],
67
+ setWH = _React$useState2[1];
68
+
69
+ var ref = React.useRef(null);
70
+ var fixedHeightRef = React.useRef(false);
71
+ var resizeObserverRef = React.useRef(new ResizeObserver(function (entries) {
72
+ var entry = entries[0];
73
+ var width = entry.contentRect.width;
74
+ var height = fixedHeightRef.current ? wh.height : entry.contentRect.height;
75
+ if (!ref.current) return;
76
+ if (!resizeObserverRef.current) return;
77
+ setWH({
78
+ width: width,
79
+ height: height
80
+ });
81
+ }));
82
+ React.useEffect(function () {
83
+ if (!ref.current) return;
84
+ if (!resizeObserverRef.current) return;
85
+ var rootNd = document.querySelector('#root');
86
+
87
+ if (rootNd && rootNd.getAttribute('hidden') === 'true') {
88
+ fixedHeightRef.current = true;
89
+ }
90
+
91
+ resizeObserverRef.current.observe(ref.current);
92
+ }, []);
93
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FiveProvider, {
94
+ initialState: initialState,
95
+ initialWork: work,
96
+ ref: function ref(_ref) {
97
+ return Object.assign(window, {
98
+ $five: _ref === null || _ref === void 0 ? void 0 : _ref.five,
99
+ $Five: _five.Five,
100
+ $THREE: THREE
101
+ });
102
+ }
103
+ }, /*#__PURE__*/React.createElement("div", {
104
+ ref: ref,
105
+ style: {
106
+ width: '100%',
107
+ height: '100%',
108
+ position: 'relative'
109
+ }
110
+ }, /*#__PURE__*/React.createElement(_react2.FiveCanvas, {
111
+ width: wh.width,
112
+ height: wh.height
113
+ }), /*#__PURE__*/React.createElement("div", {
114
+ style: {
115
+ position: 'absolute',
116
+ left: 0,
117
+ top: 0,
118
+ width: '100%',
119
+ height: '100%',
120
+ pointerEvents: 'none',
121
+ overflow: 'hidden'
122
+ }
123
+ }, props.children), withOpt && /*#__PURE__*/React.createElement(FiveOpt, null))));
124
+ };
125
+
126
+ return FiveContainer;
127
+ }
128
+
129
+ function FiveOpt() {
130
+ var _useFiveState = (0, _react2.useFiveState)(),
131
+ _useFiveState2 = _slicedToArray(_useFiveState, 2),
132
+ fiveState = _useFiveState2[0],
133
+ setFiveState = _useFiveState2[1];
134
+
135
+ return /*#__PURE__*/React.createElement("div", {
136
+ className: "five-opt",
137
+ style: {
138
+ position: 'absolute',
139
+ bottom: '36px',
140
+ right: '24px',
141
+ display: 'flex',
142
+ flexDirection: 'column',
143
+ pointerEvents: 'all',
144
+ overflow: 'hidden'
145
+ }
146
+ }, /*#__PURE__*/React.createElement("button", {
147
+ className: (0, _classnames["default"])('pure-button pure-button-primary', {
148
+ 'pure-button-disabled': fiveState.mode === _five.Five.Mode.Panorama
149
+ }),
150
+ onClick: function onClick() {
151
+ return setFiveState({
152
+ mode: _five.Five.Mode.Panorama
153
+ });
154
+ }
155
+ }, "\u5168\u666F\u6A21\u5F0F"), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("button", {
156
+ className: (0, _classnames["default"])('pure-button pure-button-primary', {
157
+ 'pure-button-disabled': fiveState.mode === _five.Five.Mode.Floorplan
158
+ }),
159
+ onClick: function onClick() {
160
+ return setFiveState({
161
+ mode: _five.Five.Mode.Floorplan
162
+ });
163
+ }
164
+ }, "\u4E09\u7EF4\u6A21\u5F0F"));
165
+ }
@@ -0,0 +1,3 @@
1
+ import { Vector3 } from 'three';
2
+ import { Line } from '@realsee/five/line';
3
+ export default function createLine(point1: Vector3, point2: Vector3, color?: Vector3, dashed?: boolean): Line;