@aibee/owlly 1.0.26 → 1.0.29

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 (359) hide show
  1. package/lib/external/lines/line-geometry.d.ts +9 -0
  2. package/lib/external/lines/line-geometry.js +51 -0
  3. package/lib/external/lines/line-material.d.ts +10 -0
  4. package/lib/external/lines/line-material.js +376 -0
  5. package/lib/external/lines/line-segments-2.d.ts +7 -0
  6. package/lib/external/lines/line-segments-2.js +143 -0
  7. package/lib/external/lines/line-segments-geometry.d.ts +15 -0
  8. package/lib/external/lines/line-segments-geometry.js +140 -0
  9. package/lib/external/loaders/gltf-loader.d.ts +77 -0
  10. package/lib/external/loaders/gltf-loader.js +2318 -0
  11. package/lib/external/orbit-controls.d.ts +44 -0
  12. package/lib/external/orbit-controls.js +745 -0
  13. package/lib/external/renderers/css-2d-renderer.d.ts +16 -0
  14. package/lib/external/renderers/css-2d-renderer.js +121 -0
  15. package/lib/external/renderers/css-3d-renderer.d.ts +18 -0
  16. package/lib/external/renderers/css-3d-renderer.js +138 -0
  17. package/lib/external/transform-controls.d.ts +106 -0
  18. package/lib/external/transform-controls.js +1112 -0
  19. package/lib/owlly/controller/aerial-element-controller.d.ts +65 -0
  20. package/lib/owlly/controller/aerial-element-controller.js +235 -0
  21. package/lib/owlly/controller/basic-controller.d.ts +324 -0
  22. package/lib/owlly/controller/basic-controller.js +1238 -0
  23. package/lib/owlly/controller/camera-controller.d.ts +37 -0
  24. package/lib/owlly/controller/camera-controller.js +137 -0
  25. package/lib/owlly/controller/controller.d.ts +61 -0
  26. package/lib/owlly/controller/controller.js +23 -0
  27. package/lib/owlly/controller/index.d.ts +2 -0
  28. package/lib/owlly/controller/index.js +13 -0
  29. package/lib/owlly/controller/mouse-indicator-controller.d.ts +34 -0
  30. package/lib/owlly/controller/mouse-indicator-controller.js +118 -0
  31. package/lib/owlly/controller/orbit-control.d.ts +147 -0
  32. package/lib/owlly/controller/orbit-control.js +264 -0
  33. package/lib/owlly/controller/panorama-adjust-controller.d.ts +45 -0
  34. package/lib/owlly/controller/panorama-adjust-controller.js +157 -0
  35. package/lib/owlly/controller/panorama-controller.d.ts +441 -0
  36. package/lib/owlly/controller/panorama-controller.js +1943 -0
  37. package/lib/owlly/controller/panorama-transform-controller.d.ts +66 -0
  38. package/lib/owlly/controller/panorama-transform-controller.js +136 -0
  39. package/lib/owlly/controller/plane-controller.d.ts +43 -0
  40. package/lib/owlly/controller/plane-controller.js +173 -0
  41. package/lib/owlly/controller/texture-controller.d.ts +181 -0
  42. package/lib/owlly/controller/texture-controller.js +875 -0
  43. package/lib/owlly/controller/tile-panorama-controller.d.ts +308 -0
  44. package/lib/owlly/controller/tile-panorama-controller.js +1353 -0
  45. package/lib/owlly/controller/transform-controller.d.ts +106 -0
  46. package/lib/owlly/controller/transform-controller.js +545 -0
  47. package/lib/owlly/element/bottom-nav-element.d.ts +65 -0
  48. package/lib/owlly/element/bottom-nav-element.js +257 -0
  49. package/lib/owlly/element/camera.d.ts +82 -0
  50. package/lib/owlly/element/camera.js +283 -0
  51. package/lib/owlly/element/dom-2d-element.d.ts +35 -0
  52. package/lib/owlly/element/dom-2d-element.js +48 -0
  53. package/lib/owlly/element/dom-3d-element.d.ts +27 -0
  54. package/lib/owlly/element/dom-3d-element.js +33 -0
  55. package/lib/owlly/element/dom-label-2d.d.ts +116 -0
  56. package/lib/owlly/element/dom-label-2d.js +382 -0
  57. package/lib/owlly/element/element.d.ts +53 -0
  58. package/lib/owlly/element/element.js +75 -0
  59. package/lib/owlly/element/floor-model.d.ts +83 -0
  60. package/lib/owlly/element/floor-model.js +227 -0
  61. package/lib/owlly/element/gif-kit/Gif.d.ts +96 -0
  62. package/lib/owlly/element/gif-kit/Gif.js +432 -0
  63. package/lib/owlly/element/gif-kit/GifColor.d.ts +21 -0
  64. package/lib/owlly/element/gif-kit/GifColor.js +37 -0
  65. package/lib/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.d.ts +20 -0
  66. package/lib/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.js +50 -0
  67. package/lib/owlly/element/gif-kit/GifFrame.d.ts +31 -0
  68. package/lib/owlly/element/gif-kit/GifFrame.js +96 -0
  69. package/lib/owlly/element/gif-kit/GifImage.d.ts +23 -0
  70. package/lib/owlly/element/gif-kit/GifImage.js +7 -0
  71. package/lib/owlly/element/gif-kit/GifParser.d.ts +17 -0
  72. package/lib/owlly/element/gif-kit/GifParser.js +196 -0
  73. package/lib/owlly/element/gif-kit/GifPresenter.d.ts +20 -0
  74. package/lib/owlly/element/gif-kit/GifPresenter.js +43 -0
  75. package/lib/owlly/element/gif-kit/GifVersion.d.ts +10 -0
  76. package/lib/owlly/element/gif-kit/GifVersion.js +12 -0
  77. package/lib/owlly/element/gltf-mesh-element.d.ts +31 -0
  78. package/lib/owlly/element/gltf-mesh-element.js +136 -0
  79. package/lib/owlly/element/index.d.ts +20 -0
  80. package/lib/owlly/element/index.js +24 -0
  81. package/lib/owlly/element/map-kit/shape.d.ts +131 -0
  82. package/lib/owlly/element/map-kit/shape.js +189 -0
  83. package/lib/owlly/element/mesh-element.d.ts +22 -0
  84. package/lib/owlly/element/mesh-element.js +63 -0
  85. package/lib/owlly/element/mesh-line-2d.d.ts +82 -0
  86. package/lib/owlly/element/mesh-line-2d.js +887 -0
  87. package/lib/owlly/element/meshline-o.d.ts +64 -0
  88. package/lib/owlly/element/meshline-o.js +678 -0
  89. package/lib/owlly/element/panorama-group.d.ts +241 -0
  90. package/lib/owlly/element/panorama-group.js +966 -0
  91. package/lib/owlly/element/panorama.d.ts +132 -0
  92. package/lib/owlly/element/panorama.js +812 -0
  93. package/lib/owlly/element/path-group.d.ts +69 -0
  94. package/lib/owlly/element/path-group.js +171 -0
  95. package/lib/owlly/element/path.d.ts +99 -0
  96. package/lib/owlly/element/path.js +531 -0
  97. package/lib/owlly/element/placeable-2d.d.ts +158 -0
  98. package/lib/owlly/element/placeable-2d.js +470 -0
  99. package/lib/owlly/element/polygon-mesh.d.ts +107 -0
  100. package/lib/owlly/element/polygon-mesh.js +307 -0
  101. package/lib/owlly/element/ring-element.d.ts +79 -0
  102. package/lib/owlly/element/ring-element.js +383 -0
  103. package/lib/owlly/element/sphere-mesh.d.ts +28 -0
  104. package/lib/owlly/element/sphere-mesh.js +69 -0
  105. package/lib/owlly/element/svg-floor-model.d.ts +22 -0
  106. package/lib/owlly/element/svg-floor-model.js +184 -0
  107. package/lib/owlly/element/svg-floors.d.ts +27 -0
  108. package/lib/owlly/element/svg-floors.js +109 -0
  109. package/lib/owlly/element/tile-panorama-group.d.ts +335 -0
  110. package/lib/owlly/element/tile-panorama-group.js +1006 -0
  111. package/lib/owlly/element/tile-panorama.d.ts +161 -0
  112. package/lib/owlly/element/tile-panorama.js +509 -0
  113. package/lib/owlly/element/tile-plane.d.ts +105 -0
  114. package/lib/owlly/element/tile-plane.js +360 -0
  115. package/lib/owlly/element/video-element.d.ts +33 -0
  116. package/lib/owlly/element/video-element.js +159 -0
  117. package/lib/owlly/geometries/ExtrudeGeometry2.d.ts +15 -0
  118. package/lib/owlly/geometries/ExtrudeGeometry2.js +210 -0
  119. package/lib/owlly/index.d.ts +13 -0
  120. package/lib/owlly/index.js +16 -0
  121. package/lib/owlly/overlay/canvas-overlay.d.ts +96 -0
  122. package/lib/owlly/overlay/canvas-overlay.js +510 -0
  123. package/lib/owlly/overlay/css-2d-overlay.d.ts +14 -0
  124. package/lib/owlly/overlay/css-2d-overlay.js +35 -0
  125. package/lib/owlly/overlay/css-3d-overlay.d.ts +16 -0
  126. package/lib/owlly/overlay/css-3d-overlay.js +36 -0
  127. package/lib/owlly/overlay/index.d.ts +6 -0
  128. package/lib/owlly/overlay/index.js +11 -0
  129. package/lib/owlly/overlay/label-overlay.d.ts +62 -0
  130. package/lib/owlly/overlay/label-overlay.js +328 -0
  131. package/lib/owlly/overlay/overlay.d.ts +14 -0
  132. package/lib/owlly/overlay/overlay.js +4 -0
  133. package/lib/owlly/overlay/path-overlay.d.ts +39 -0
  134. package/lib/owlly/overlay/path-overlay.js +124 -0
  135. package/lib/owlly/overlay/path-overlay2.d.ts +35 -0
  136. package/lib/owlly/overlay/path-overlay2.js +118 -0
  137. package/lib/owlly/overlay/poi-overlay-3d.d.ts +278 -0
  138. package/lib/owlly/overlay/poi-overlay-3d.js +1432 -0
  139. package/lib/owlly/overlay/poi-overlay.d.ts +277 -0
  140. package/lib/owlly/overlay/poi-overlay.js +1411 -0
  141. package/lib/owlly/owlly-2d/index.d.ts +28 -0
  142. package/lib/owlly/owlly-2d/index.js +92 -0
  143. package/lib/owlly/screen/index.d.ts +1 -0
  144. package/lib/owlly/screen/index.js +1 -0
  145. package/lib/owlly/screen/screen.d.ts +73 -0
  146. package/lib/owlly/screen/screen.js +236 -0
  147. package/lib/owlly/stage/externals.d.ts +19 -0
  148. package/lib/owlly/stage/externals.js +24 -0
  149. package/lib/owlly/stage/index.d.ts +4 -0
  150. package/lib/owlly/stage/index.js +6 -0
  151. package/lib/owlly/stage/owlly.d.ts +38 -0
  152. package/lib/owlly/stage/owlly.js +168 -0
  153. package/lib/owlly/stage/stage.d.ts +108 -0
  154. package/lib/owlly/stage/stage.js +234 -0
  155. package/lib/owlly/utils/alignment-utils.d.ts +20 -0
  156. package/lib/owlly/utils/alignment-utils.js +63 -0
  157. package/lib/owlly/utils/basic-calc.d.ts +18 -0
  158. package/lib/owlly/utils/basic-calc.js +129 -0
  159. package/lib/owlly/utils/basic-tools.d.ts +71 -0
  160. package/lib/owlly/utils/basic-tools.js +235 -0
  161. package/lib/owlly/utils/bvh-tree.d.ts +105 -0
  162. package/lib/owlly/utils/bvh-tree.js +539 -0
  163. package/lib/owlly/utils/camera.d.ts +37 -0
  164. package/lib/owlly/utils/camera.js +50 -0
  165. package/lib/owlly/utils/cube-texture-cache.d.ts +25 -0
  166. package/lib/owlly/utils/cube-texture-cache.js +143 -0
  167. package/lib/owlly/utils/device-utils.d.ts +18 -0
  168. package/lib/owlly/utils/device-utils.js +41 -0
  169. package/lib/owlly/utils/environment-utils.d.ts +37 -0
  170. package/lib/owlly/utils/environment-utils.js +73 -0
  171. package/lib/owlly/utils/event-hub.d.ts +50 -0
  172. package/lib/owlly/utils/event-hub.js +106 -0
  173. package/lib/owlly/utils/events.d.ts +219 -0
  174. package/lib/owlly/utils/events.js +219 -0
  175. package/lib/owlly/utils/geometry-utils.d.ts +119 -0
  176. package/lib/owlly/utils/geometry-utils.js +622 -0
  177. package/lib/owlly/utils/helper.d.ts +6 -0
  178. package/lib/owlly/utils/helper.js +24 -0
  179. package/lib/owlly/utils/index.d.ts +14 -0
  180. package/lib/owlly/utils/index.js +17 -0
  181. package/lib/owlly/utils/lru-cache.d.ts +26 -0
  182. package/lib/owlly/utils/lru-cache.js +109 -0
  183. package/lib/owlly/utils/map-utils.d.ts +7 -0
  184. package/lib/owlly/utils/map-utils.js +52 -0
  185. package/lib/owlly/utils/number-utils.d.ts +8 -0
  186. package/lib/owlly/utils/number-utils.js +72 -0
  187. package/lib/owlly/utils/panorama-model-util.d.ts +46 -0
  188. package/lib/owlly/utils/panorama-model-util.js +245 -0
  189. package/lib/owlly/utils/path-utils.d.ts +80 -0
  190. package/lib/owlly/utils/path-utils.js +728 -0
  191. package/lib/owlly/utils/svgutils.d.ts +138 -0
  192. package/lib/owlly/utils/svgutils.js +561 -0
  193. package/lib/owlly/utils/texture-cache.d.ts +29 -0
  194. package/lib/owlly/utils/texture-cache.js +115 -0
  195. package/lib/owlly/utils/tile-util.d.ts +187 -0
  196. package/lib/owlly/utils/tile-util.js +456 -0
  197. package/lib/owlly/utils/time-profiler.d.ts +21 -0
  198. package/lib/owlly/utils/time-profiler.js +48 -0
  199. package/lib/owlly/view/camera-view.d.ts +35 -0
  200. package/lib/owlly/view/camera-view.js +101 -0
  201. package/lib/owlly/view/index.d.ts +3 -0
  202. package/lib/owlly/view/index.js +5 -0
  203. package/lib/owlly/view/orthographic-view.d.ts +40 -0
  204. package/lib/owlly/view/orthographic-view.js +94 -0
  205. package/lib/owlly/view/perspective-view.d.ts +40 -0
  206. package/lib/owlly/view/perspective-view.js +95 -0
  207. package/lib/owlly/view/svg-map-view.d.ts +46 -0
  208. package/lib/owlly/view/svg-map-view.js +144 -0
  209. package/lib/owlly/view/view.d.ts +146 -0
  210. package/lib/owlly/view/view.js +317 -0
  211. package/lib/prod/owlly.esm.js +93462 -0
  212. package/lib/prod/owlly.esm.js.map +1 -0
  213. package/lib/prod/owlly.esm.min.js +54 -0
  214. package/lib/prod/owlly.iife.js +93560 -0
  215. package/lib/prod/owlly.iife.js.map +1 -0
  216. package/lib/prod/owlly.iife.min.js +69 -0
  217. package/lib/prod/owlly.miniapp.js +73845 -0
  218. package/lib/prod/owlly.miniapp.js.map +1 -0
  219. package/lib/prod/owlly.miniapp.min.js +63 -0
  220. package/lib/prod/src/external/lines/line-geometry.d.ts +9 -0
  221. package/lib/prod/src/external/lines/line-material.d.ts +10 -0
  222. package/lib/prod/src/external/lines/line-segments-2.d.ts +7 -0
  223. package/lib/prod/src/external/lines/line-segments-geometry.d.ts +15 -0
  224. package/lib/prod/src/external/loaders/gltf-loader.d.ts +77 -0
  225. package/lib/prod/src/external/orbit-controls.d.ts +44 -0
  226. package/lib/prod/src/external/renderers/css-2d-renderer.d.ts +16 -0
  227. package/lib/prod/src/external/renderers/css-3d-renderer.d.ts +18 -0
  228. package/lib/prod/src/external/transform-controls.d.ts +106 -0
  229. package/lib/prod/src/external/util/buffer-geometry-utils.d.ts +45 -0
  230. package/lib/prod/src/owlly/controller/aerial-element-controller.d.ts +65 -0
  231. package/lib/prod/src/owlly/controller/basic-controller.d.ts +324 -0
  232. package/lib/prod/src/owlly/controller/camera-controller.d.ts +37 -0
  233. package/lib/prod/src/owlly/controller/controller.d.ts +61 -0
  234. package/lib/prod/src/owlly/controller/index.d.ts +2 -0
  235. package/lib/prod/src/owlly/controller/mouse-indicator-controller.d.ts +34 -0
  236. package/lib/prod/src/owlly/controller/orbit-control.d.ts +147 -0
  237. package/lib/prod/src/owlly/controller/panorama-adjust-controller.d.ts +45 -0
  238. package/lib/prod/src/owlly/controller/panorama-controller.d.ts +441 -0
  239. package/lib/prod/src/owlly/controller/panorama-transform-controller.d.ts +66 -0
  240. package/lib/prod/src/owlly/controller/plane-controller.d.ts +43 -0
  241. package/lib/prod/src/owlly/controller/texture-controller.d.ts +183 -0
  242. package/lib/prod/src/owlly/controller/tile-panorama-controller.d.ts +308 -0
  243. package/lib/prod/src/owlly/controller/transform-controller.d.ts +106 -0
  244. package/lib/prod/src/owlly/element/bottom-nav-element.d.ts +65 -0
  245. package/lib/prod/src/owlly/element/camera.d.ts +82 -0
  246. package/lib/prod/src/owlly/element/dom-2d-element.d.ts +35 -0
  247. package/lib/prod/src/owlly/element/dom-3d-element.d.ts +27 -0
  248. package/lib/prod/src/owlly/element/dom-label-2d.d.ts +116 -0
  249. package/lib/prod/src/owlly/element/element.d.ts +53 -0
  250. package/lib/prod/src/owlly/element/floor-model.d.ts +83 -0
  251. package/lib/prod/src/owlly/element/gif-kit/Gif.d.ts +96 -0
  252. package/lib/prod/src/owlly/element/gif-kit/GifColor.d.ts +21 -0
  253. package/lib/prod/src/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.d.ts +20 -0
  254. package/lib/prod/src/owlly/element/gif-kit/GifFrame.d.ts +31 -0
  255. package/lib/prod/src/owlly/element/gif-kit/GifImage.d.ts +23 -0
  256. package/lib/prod/src/owlly/element/gif-kit/GifParser.d.ts +17 -0
  257. package/lib/prod/src/owlly/element/gif-kit/GifPresenter.d.ts +20 -0
  258. package/lib/prod/src/owlly/element/gif-kit/GifVersion.d.ts +10 -0
  259. package/lib/prod/src/owlly/element/gltf-mesh-element.d.ts +31 -0
  260. package/lib/prod/src/owlly/element/index.d.ts +6 -0
  261. package/lib/prod/src/owlly/element/map-kit/area.d.ts +24 -0
  262. package/lib/prod/src/owlly/element/map-kit/block-set.d.ts +39 -0
  263. package/lib/prod/src/owlly/element/map-kit/block.d.ts +77 -0
  264. package/lib/prod/src/owlly/element/map-kit/index.d.ts +3 -0
  265. package/lib/prod/src/owlly/element/map-kit/shape.d.ts +131 -0
  266. package/lib/prod/src/owlly/element/mesh-element.d.ts +22 -0
  267. package/lib/prod/src/owlly/element/mesh-line-2d.d.ts +82 -0
  268. package/lib/prod/src/owlly/element/meshline-o.d.ts +64 -0
  269. package/lib/prod/src/owlly/element/panorama-group.d.ts +241 -0
  270. package/lib/prod/src/owlly/element/panorama.d.ts +132 -0
  271. package/lib/prod/src/owlly/element/path-group.d.ts +69 -0
  272. package/lib/prod/src/owlly/element/path.d.ts +99 -0
  273. package/lib/prod/src/owlly/element/placeable-2d.d.ts +158 -0
  274. package/lib/prod/src/owlly/element/polygon-mesh.d.ts +107 -0
  275. package/lib/prod/src/owlly/element/ring-element.d.ts +79 -0
  276. package/lib/prod/src/owlly/element/sphere-mesh.d.ts +28 -0
  277. package/lib/prod/src/owlly/element/svg-floor-model.d.ts +22 -0
  278. package/lib/prod/src/owlly/element/svg-floors.d.ts +27 -0
  279. package/lib/prod/src/owlly/element/tile-panorama-group.d.ts +335 -0
  280. package/lib/prod/src/owlly/element/tile-panorama.d.ts +162 -0
  281. package/lib/prod/src/owlly/element/tile-plane.d.ts +114 -0
  282. package/lib/prod/src/owlly/element/video-element.d.ts +33 -0
  283. package/lib/prod/src/owlly/geometries/ExtrudeGeometry2.d.ts +15 -0
  284. package/lib/prod/src/owlly/index.d.ts +13 -0
  285. package/lib/prod/src/owlly/overlay/canvas-overlay.d.ts +96 -0
  286. package/lib/prod/src/owlly/overlay/css-2d-overlay.d.ts +14 -0
  287. package/lib/prod/src/owlly/overlay/css-3d-overlay.d.ts +16 -0
  288. package/lib/prod/src/owlly/overlay/index.d.ts +5 -0
  289. package/lib/prod/src/owlly/overlay/label-overlay.d.ts +62 -0
  290. package/lib/prod/src/owlly/overlay/overlay.d.ts +14 -0
  291. package/lib/prod/src/owlly/overlay/path-overlay.d.ts +39 -0
  292. package/lib/prod/src/owlly/overlay/path-overlay2.d.ts +35 -0
  293. package/lib/prod/src/owlly/overlay/poi-overlay-3d.d.ts +278 -0
  294. package/lib/prod/src/owlly/overlay/poi-overlay.d.ts +277 -0
  295. package/lib/prod/src/owlly/owlly-2d/index.d.ts +28 -0
  296. package/lib/prod/src/owlly/screen/index.d.ts +1 -0
  297. package/lib/prod/src/owlly/screen/screen.d.ts +73 -0
  298. package/lib/prod/src/owlly/stage/__test__/stage.spec.d.ts +1 -0
  299. package/lib/prod/src/owlly/stage/externals.d.ts +19 -0
  300. package/lib/prod/src/owlly/stage/index.d.ts +3 -0
  301. package/lib/prod/src/owlly/stage/owlly.d.ts +38 -0
  302. package/lib/prod/src/owlly/stage/stage.d.ts +108 -0
  303. package/lib/prod/src/owlly/utils/alignment-utils.d.ts +20 -0
  304. package/lib/prod/src/owlly/utils/basic-calc.d.ts +18 -0
  305. package/lib/prod/src/owlly/utils/basic-tools.d.ts +71 -0
  306. package/lib/prod/src/owlly/utils/bvh-tree.d.ts +105 -0
  307. package/lib/prod/src/owlly/utils/camera.d.ts +37 -0
  308. package/lib/prod/src/owlly/utils/cube-texture-cache.d.ts +25 -0
  309. package/lib/prod/src/owlly/utils/device-utils.d.ts +18 -0
  310. package/lib/prod/src/owlly/utils/environment-utils.d.ts +37 -0
  311. package/lib/prod/src/owlly/utils/event-hub.d.ts +50 -0
  312. package/lib/prod/src/owlly/utils/events.d.ts +219 -0
  313. package/lib/prod/src/owlly/utils/geometry-utils.d.ts +119 -0
  314. package/lib/prod/src/owlly/utils/helper.d.ts +6 -0
  315. package/lib/prod/src/owlly/utils/index.d.ts +13 -0
  316. package/lib/prod/src/owlly/utils/lru-cache.d.ts +26 -0
  317. package/lib/prod/src/owlly/utils/map-utils.d.ts +7 -0
  318. package/lib/prod/src/owlly/utils/number-utils.d.ts +8 -0
  319. package/lib/prod/src/owlly/utils/panorama-model-util.d.ts +46 -0
  320. package/lib/prod/src/owlly/utils/path-utils.d.ts +80 -0
  321. package/lib/prod/src/owlly/utils/svgutils.d.ts +138 -0
  322. package/lib/prod/src/owlly/utils/texture-cache.d.ts +29 -0
  323. package/lib/prod/src/owlly/utils/tile-util.d.ts +187 -0
  324. package/lib/prod/src/owlly/utils/time-profiler.d.ts +21 -0
  325. package/lib/prod/src/owlly/view/__test__/perspective-view.spec.d.ts +0 -0
  326. package/lib/prod/src/owlly/view/camera-view.d.ts +35 -0
  327. package/lib/prod/src/owlly/view/index.d.ts +3 -0
  328. package/lib/prod/src/owlly/view/orthographic-view.d.ts +40 -0
  329. package/lib/prod/src/owlly/view/perspective-view.d.ts +40 -0
  330. package/lib/prod/src/owlly/view/svg-map-view.d.ts +46 -0
  331. package/lib/prod/src/owlly/view/view.d.ts +146 -0
  332. package/lib/src/owlly/controller/texture-controller.d.ts +3 -1
  333. package/lib/src/owlly/controller/texture-controller.js +16 -1
  334. package/lib/src/owlly/controller/texture-controller.js.map +1 -1
  335. package/lib/src/owlly/controller/tile-panorama-controller.js +4 -0
  336. package/lib/src/owlly/controller/tile-panorama-controller.js.map +1 -1
  337. package/lib/src/owlly/element/tile-panorama.d.ts +1 -0
  338. package/lib/src/owlly/element/tile-panorama.js +16 -3
  339. package/lib/src/owlly/element/tile-panorama.js.map +1 -1
  340. package/lib/src/owlly/element/tile-plane.d.ts +9 -0
  341. package/lib/src/owlly/element/tile-plane.js +27 -0
  342. package/lib/src/owlly/element/tile-plane.js.map +1 -1
  343. package/lib/src/owlly/overlay/poi-overlay-3d.js.map +1 -1
  344. package/lib/src/owlly/overlay/poi-overlay.js.map +1 -1
  345. package/lib/src/owlly/stage/owlly.js +7 -1
  346. package/lib/src/owlly/stage/owlly.js.map +1 -1
  347. package/lib/src/owlly/stage/stage.js +2 -0
  348. package/lib/src/owlly/stage/stage.js.map +1 -1
  349. package/lib/src/web/main.rpeng.mes.plane.js.map +1 -1
  350. package/package.json +16 -7
  351. package/src/owlly/controller/texture-controller.ts +18 -1
  352. package/src/owlly/controller/tile-panorama-controller.ts +3 -1
  353. package/src/owlly/element/tile-panorama.ts +14 -0
  354. package/src/owlly/element/tile-plane.ts +26 -0
  355. package/src/owlly/overlay/poi-overlay-3d.ts +0 -4
  356. package/src/owlly/overlay/poi-overlay.ts +0 -4
  357. package/src/owlly/stage/owlly.ts +6 -1
  358. package/src/owlly/stage/stage.ts +2 -0
  359. package/src/web/main.rpeng.mes.plane.ts +0 -6
@@ -0,0 +1,510 @@
1
+ import { Externals } from '../stage/externals';
2
+ import { Overlay } from './overlay';
3
+ import { Owlly2D } from '../owlly-2d';
4
+ import { Events } from '../utils/events';
5
+ // import { BasicTools } from '../utils';
6
+ class ShapeGroup {
7
+ constructor(shape, rawShape, baseZoom, zIndices = []) {
8
+ this.shape = shape;
9
+ this.rawShape = rawShape;
10
+ this.baseZoom = baseZoom;
11
+ this.zIndices = zIndices;
12
+ this.points = [];
13
+ this.lineJointsStyle = 'joints';
14
+ this.vertexOptions = {
15
+ radius: 0,
16
+ fill: '#fff',
17
+ shadowColor: '#000',
18
+ shadowBlur: 3,
19
+ shadowOffset: { x: 1, y: 2 },
20
+ shadowOpacity: 0.3,
21
+ shadowEnabled: false,
22
+ };
23
+ }
24
+ }
25
+ var MouseState;
26
+ (function (MouseState) {
27
+ MouseState[MouseState["IDLE"] = 0] = "IDLE";
28
+ MouseState[MouseState["DOWN"] = 1] = "DOWN";
29
+ MouseState[MouseState["MOVE"] = 2] = "MOVE";
30
+ })(MouseState || (MouseState = {}));
31
+ /**
32
+ * POI覆盖层, 可以展示POI图标与文字, 存在图标时以图标中心为中心, 否则为文字中心
33
+ * @example
34
+ * ```typescript
35
+ * const poiOverlay = new PoiOverlay();
36
+ * // 任意View
37
+ * view.addOverlay(poiOverlay);
38
+ * ```
39
+ */
40
+ class CanvasOverlay extends Overlay {
41
+ init(parent, container = new HTMLElement()) {
42
+ const { THREE } = Externals.getInstance();
43
+ this.container = container;
44
+ this.parent = parent;
45
+ this.owlly2D = Owlly2D.getInstance(container);
46
+ this.layer = this.owlly2D.addLayer();
47
+ this.shapes = [];
48
+ this.renderThisFrame = true;
49
+ this.layer.zIndex(0);
50
+ this.enabled = true;
51
+ this.mouseState = MouseState.IDLE;
52
+ this.mousePositionBuffer = new THREE.Vector2();
53
+ this.listeners = {
54
+ pointerDown: (e) => { this.onPointerDown(e); },
55
+ pointerUp: (e) => { this.onPointerUp(e); },
56
+ touchStart: (e) => { this.onTouchStart(e); },
57
+ touchEnd: (e) => { this.onTouchEnd(e); },
58
+ nodePointerDown: (e) => { this.onNodePointerDown(e); },
59
+ nodePointerUp: () => { this.onNodePointerUp(); },
60
+ };
61
+ this.container.addEventListener('pointerdown', this.listeners.pointerDown, true);
62
+ this.container.addEventListener('pointerup', this.listeners.pointerUp, true);
63
+ this.container.addEventListener('touchstart', this.listeners.touchStart, true);
64
+ this.container.addEventListener('touchend', this.listeners.touchEnd, true);
65
+ }
66
+ /**
67
+ * 打开交互
68
+ */
69
+ openInteraction() {
70
+ this.owlly2D.openInteraction();
71
+ }
72
+ /**
73
+ * 关闭交互
74
+ */
75
+ closeInteraction() {
76
+ this.owlly2D.closeInteraction();
77
+ }
78
+ update() {
79
+ if (this.renderThisFrame) {
80
+ this.renderThisFrame = false;
81
+ return true;
82
+ }
83
+ return false;
84
+ }
85
+ render() {
86
+ if (!this.enabled)
87
+ return;
88
+ if (this.parent.camera) {
89
+ const { camera } = this.parent;
90
+ const { clientHeight, clientWidth } = this.container;
91
+ const widthHalf = clientWidth / 2;
92
+ const heightHalf = clientHeight / 2;
93
+ this.shapes.forEach(({ shape, rawShape, zIndices, points, vertexOptions, lineJointsStyle, }) => {
94
+ this.updateShapeDataToKonvaShape(shape, rawShape, camera, widthHalf, heightHalf, points, vertexOptions, zIndices, lineJointsStyle);
95
+ });
96
+ }
97
+ this.layer.draw();
98
+ }
99
+ setRenderOrder(order) {
100
+ this.layer.zIndex(order);
101
+ }
102
+ dispose() {
103
+ this.shapes.forEach((s) => {
104
+ const konvaObject = s.shape;
105
+ konvaObject.destroy();
106
+ if (s.shape.children.length === 0) {
107
+ s.shape.destroy();
108
+ s.points.forEach((p) => {
109
+ p.off('mousedown touchdown');
110
+ p.destroy();
111
+ });
112
+ }
113
+ if (s && s.shape)
114
+ delete s.shape; // eslint-disable-line
115
+ });
116
+ this.renderThisFrame = true;
117
+ this.container.removeEventListener('pointerdown', this.listeners.pointerDown, true);
118
+ this.container.removeEventListener('pointerup', this.listeners.pointerUp, true);
119
+ this.container.removeEventListener('touchstart', this.listeners.touchStart, true);
120
+ this.container.removeEventListener('touchend', this.listeners.touchEnd, true);
121
+ this.layer.destroy();
122
+ }
123
+ onPointerDown(e) {
124
+ this.owlly2D.stage._mousedown(e); // eslint-disable-line no-underscore-dangle
125
+ }
126
+ onPointerUp(e) {
127
+ const { THREE } = Externals.getInstance();
128
+ this.owlly2D.stage._mouseup(e); // eslint-disable-line no-underscore-dangle
129
+ const { clientX, clientY } = e;
130
+ const { left: rectX, top: rectY } = this.container.getBoundingClientRect();
131
+ const x = clientX - rectX;
132
+ const y = clientY - rectY;
133
+ const distance = new THREE.Vector2(x, y).distanceToSquared(this.mousePositionBuffer);
134
+ this.emit(Events.CANVAS_VERTEX_UP, this.eventTarget, e.button);
135
+ if (this.mouseState === MouseState.DOWN && distance < 100) {
136
+ this.emit(Events.CANVAS_VERTEX_CLICKED, this.eventTarget, e.button);
137
+ }
138
+ this.mouseState = MouseState.IDLE;
139
+ }
140
+ onTouchStart(e) {
141
+ this.owlly2D.stage._touchstart(e); // eslint-disable-line no-underscore-dangle
142
+ }
143
+ onTouchEnd(e) {
144
+ const { THREE } = Externals.getInstance();
145
+ this.owlly2D.stage._touchend(e); // eslint-disable-line no-underscore-dangle
146
+ const { clientX, clientY } = e.changedTouches[0];
147
+ // const { clientWidth, clientHeight } = this.container;
148
+ const { left: rectX, top: rectY } = this.container.getBoundingClientRect();
149
+ const x = clientX - rectX;
150
+ const y = clientY - rectY;
151
+ const distance = new THREE.Vector2(x, y).distanceToSquared(this.mousePositionBuffer);
152
+ this.emit(Events.CANVAS_VERTEX_UP, this.eventTarget, 0);
153
+ if (this.mouseState === MouseState.DOWN && distance < 100) {
154
+ this.emit(Events.CANVAS_VERTEX_CLICKED, this.eventTarget, 0);
155
+ }
156
+ this.mouseState = MouseState.IDLE;
157
+ }
158
+ onNodePointerDown(e) {
159
+ // console.log('node pointer down', e);
160
+ if (this.mouseState !== MouseState.IDLE)
161
+ return;
162
+ let index = -1;
163
+ const target = this.shapes.find((shape) => {
164
+ const i = shape.points.indexOf((e.currentTarget));
165
+ if (i >= 0)
166
+ index = i;
167
+ return i >= 0;
168
+ });
169
+ if (!target)
170
+ return;
171
+ this.mouseState = MouseState.DOWN;
172
+ const { clientX, clientY } = e.evt instanceof MouseEvent ? e.evt : e.evt.touches[0];
173
+ // const { clientWidth, clientHeight } = this.container;
174
+ const { left: rectX, top: rectY } = this.container.getBoundingClientRect();
175
+ const x = clientX - rectX;
176
+ const y = clientY - rectY;
177
+ this.mousePositionBuffer.set(x, y);
178
+ this.eventTarget = target;
179
+ this.emit(Events.CANVAS_VERTEX_DOWN, target, index, e.evt instanceof MouseEvent ? e.evt.button : 0);
180
+ }
181
+ onNodePointerUp() {
182
+ // do nothing
183
+ }
184
+ /**
185
+ * 清空画布
186
+ */
187
+ clearShapes() {
188
+ this.shapes.forEach((shape) => {
189
+ shape.shape.destroy();
190
+ shape.points.forEach((point) => {
191
+ point.destroy();
192
+ });
193
+ delete shape.shape; // eslint-disable-line
194
+ });
195
+ this.shapes = [];
196
+ this.renderThisFrame = true;
197
+ }
198
+ /**
199
+ * 删除Shape
200
+ * @param shape Shape
201
+ */
202
+ removeShape(shape) {
203
+ if (!shape)
204
+ return;
205
+ for (let i = 0; i < this.shapes.length; i++) {
206
+ if (this.shapes[i].rawShape === shape || this.shapes[i].shape === shape) {
207
+ const konvaObject = this.shapes[i].shape;
208
+ konvaObject.destroy();
209
+ const shapeToRemove = this.shapes[i];
210
+ if (this.shapes[i].shape.children.length === 0) {
211
+ this.shapes[i].shape.destroy();
212
+ this.shapes[i].points.forEach((p) => {
213
+ p.off('mousedown touchdown');
214
+ p.destroy();
215
+ });
216
+ this.shapes.splice(i, 1);
217
+ }
218
+ if (shapeToRemove === this.shapes[i] && this.shapes[i].shape)
219
+ delete this.shapes[i].shape; // eslint-disable-line
220
+ this.renderThisFrame = true;
221
+ }
222
+ }
223
+ }
224
+ /**
225
+ * 更新Shape
226
+ * @param shape Shape
227
+ */
228
+ updateShape(shape, zIndices = []) {
229
+ if (!shape)
230
+ return null;
231
+ const { Konva } = Externals.getInstance();
232
+ for (let i = 0; i < this.shapes.length; i++) {
233
+ if (this.shapes[i].rawShape === shape || this.shapes[i].shape === shape) {
234
+ const konvaObject = this.shapes[i].shape;
235
+ this.shapes[i].zIndices = zIndices;
236
+ if (konvaObject instanceof Konva.Shape) {
237
+ const newShape = this.transformShapeDataToKonvaShape(this.shapes[i].rawShape.getData());
238
+ if (newShape) {
239
+ konvaObject.setAttrs(newShape.attrs);
240
+ }
241
+ this.shapes[i].points.forEach((p) => { p.setAttrs(this.shapes[i].vertexOptions); });
242
+ }
243
+ this.renderThisFrame = true;
244
+ return this.shapes[i].shape;
245
+ }
246
+ }
247
+ return null;
248
+ }
249
+ setVertexConfig(shape, config) {
250
+ if (!shape)
251
+ return null;
252
+ for (let i = 0; i < this.shapes.length; i++) {
253
+ if (this.shapes[i].rawShape === shape || this.shapes[i].shape === shape) {
254
+ const newConfig = Object.assign(this.shapes[i].vertexOptions, config);
255
+ this.shapes[i].points.forEach((p) => {
256
+ p.setAttrs(newConfig);
257
+ });
258
+ this.renderThisFrame = true;
259
+ return this.shapes[i].shape;
260
+ }
261
+ }
262
+ return null;
263
+ }
264
+ /**
265
+ * 将shapeData转换为Konva.Path对象
266
+ * @param shapeData ShapeData
267
+ */
268
+ transformShapeDataToKonvaShape(shapeData) {
269
+ const { shapeType } = shapeData;
270
+ const { Konva } = Externals.getInstance();
271
+ if (shapeType === 'point') {
272
+ const circle = new Konva.Circle({
273
+ radius: shapeData.radius,
274
+ id: shapeData.id,
275
+ x: shapeData.x,
276
+ y: shapeData.y,
277
+ stroke: shapeData.stroke,
278
+ strokeWidth: shapeData.strokeWidth,
279
+ fill: shapeData.fill,
280
+ });
281
+ return circle;
282
+ }
283
+ if (shapeType === 'line') {
284
+ const path = new Konva.Path({
285
+ id: shapeData.id,
286
+ x: shapeData.x,
287
+ y: shapeData.y,
288
+ data: `${shapeData.path.toUpperCase()}`,
289
+ stroke: shapeData.stroke,
290
+ strokeWidth: shapeData.strokeWidth,
291
+ lineJoin: 'round',
292
+ lineCap: 'round',
293
+ });
294
+ return path;
295
+ }
296
+ if (shapeType === 'shape') {
297
+ const path = new Konva.Path({
298
+ id: shapeData.id,
299
+ x: shapeData.x,
300
+ y: shapeData.y,
301
+ data: `${shapeData.path.toUpperCase()}z`,
302
+ stroke: shapeData.stroke,
303
+ strokeWidth: shapeData.strokeWidth,
304
+ fill: shapeData.fill,
305
+ lineJoin: 'round',
306
+ lineCap: 'round',
307
+ });
308
+ return path;
309
+ }
310
+ return null;
311
+ }
312
+ // private sideOfVecToCamera(camera: Camera, vec: Vector3, norm: Vector3): number {
313
+ // return vec.clone().sub(camera.position).dot(norm);
314
+ // }
315
+ updateShapeDataToKonvaShape(shape, rawShape, camera, halfW, halfH, points, pointOptions, zIndices = [], lineJointsStyle = 'joints') {
316
+ const { THREE, Konva } = Externals.getInstance();
317
+ const shapeData = rawShape.getData();
318
+ const { shapeType } = shapeData;
319
+ const frustum = new THREE.Frustum();
320
+ frustum.setFromProjectionMatrix(new THREE.Matrix4().multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse));
321
+ if (shapeType === 'point') {
322
+ const circle = shape;
323
+ const v = new THREE.Vector3(shapeData.x, shapeData.y, shapeData.zIndex);
324
+ const coordinate2 = v.project(camera);
325
+ const x = (coordinate2.x + 1) * halfW;
326
+ const y = (1 - coordinate2.y) * halfH;
327
+ circle.x(x);
328
+ circle.y(y);
329
+ }
330
+ else if (camera instanceof THREE.OrthographicCamera) {
331
+ const path = shape;
332
+ const pathSteps = rawShape.getSteps();
333
+ const globalZ = shapeData.zIndex;
334
+ let data = pathSteps.map((s, i) => {
335
+ let z = globalZ;
336
+ if (i < zIndices.length)
337
+ z = zIndices[i];
338
+ const coords = s.coords.map(([x, y]) => {
339
+ const v = new THREE.Vector3(x, y, z);
340
+ const coordinate2 = v.project(camera);
341
+ const sx = (coordinate2.x + 1) * halfW;
342
+ const sy = (1 - coordinate2.y) * halfH;
343
+ return `${sx},${sy}`;
344
+ }).join(',');
345
+ return `${s.command}${coords}`;
346
+ }).join('').toUpperCase();
347
+ if (shapeType === 'shape')
348
+ data += 'z';
349
+ path.data(data);
350
+ }
351
+ else {
352
+ const path = shape;
353
+ const pathSteps = rawShape.getSteps();
354
+ const globalZ = shapeData.zIndex;
355
+ const lookAtVec = new THREE.Vector3(0, 0, -1);
356
+ lookAtVec.applyQuaternion(camera.quaternion);
357
+ let prevVecVisible = false;
358
+ let currentVecVisible = false;
359
+ const prevVec = new THREE.Vector3();
360
+ let data = pathSteps.map((s, i) => {
361
+ let z = globalZ;
362
+ if (i < zIndices.length)
363
+ z = zIndices[i];
364
+ const [x, y] = s.coords[s.coords.length - 1];
365
+ const v = new THREE.Vector3(x, y, z);
366
+ let addOn = '';
367
+ currentVecVisible = frustum.containsPoint(v);
368
+ if (i > 0) {
369
+ const line = new THREE.Line3(prevVec.clone(), v.clone());
370
+ const lVisible = prevVecVisible && currentVecVisible;
371
+ if (!lVisible) {
372
+ const intersections = frustum.planes.map((p) => {
373
+ const intersects = p.intersectLine(line, new THREE.Vector3());
374
+ if (!intersects)
375
+ return null;
376
+ const valid = !frustum.planes.filter((pl) => pl !== p).some((pl) => (pl.distanceToPoint(intersects) < 0));
377
+ return valid ? intersects : null;
378
+ }).filter((p) => p);
379
+ if (intersections.length) {
380
+ intersections.sort((a, b) => (a.distanceToSquared(prevVec) - b.distanceToSquared(prevVec)));
381
+ addOn = intersections.map((vec, j) => {
382
+ const coord = vec.project(camera);
383
+ const sign = coord.z > 1 ? -1 : 1;
384
+ const sx = (coord.x + 1) * halfW * sign;
385
+ const sy = (1 - coord.y) * halfH * sign;
386
+ if (j === 0)
387
+ return `${prevVecVisible ? 'l' : 'm'}${sx},${sy}`;
388
+ return `l${sx},${sy}`;
389
+ }).join('');
390
+ }
391
+ }
392
+ }
393
+ prevVec.copy(v);
394
+ const coordinate2 = v.project(camera);
395
+ const sign = coordinate2.z > 1 ? -1 : 1;
396
+ const sx = (coordinate2.x + 1) * halfW * sign;
397
+ const sy = (1 - coordinate2.y) * halfH * sign;
398
+ const pointVisible = lineJointsStyle === 'joints' || (lineJointsStyle === 'endpoints' && (i === 0 || i === zIndices.length - 1));
399
+ if (i < points.length) {
400
+ const point = points[i];
401
+ point.x(sx);
402
+ point.y(sy);
403
+ point.visible(pointVisible && currentVecVisible && path.visible());
404
+ point.setAttrs(pointOptions);
405
+ }
406
+ else {
407
+ const point = new Konva.Circle({
408
+ radius: 0,
409
+ x: sx,
410
+ y: sy,
411
+ stroke: 'transparent',
412
+ strokeWidth: 0,
413
+ });
414
+ point.visible(pointVisible && currentVecVisible && path.visible());
415
+ point.setAttrs(pointOptions);
416
+ point.on('mousedown touchdown', this.listeners.nodePointerDown);
417
+ this.layer.add(point);
418
+ points.push(point);
419
+ }
420
+ prevVecVisible = currentVecVisible;
421
+ return `${addOn}${currentVecVisible ? 'l' : 'm'}${sx},${sy}`;
422
+ }).join('').toUpperCase();
423
+ while (points.length > pathSteps.length) {
424
+ const point = points.pop();
425
+ point.off('mousedown touchdown');
426
+ point.destroy();
427
+ }
428
+ if (shapeType === 'shape')
429
+ data += 'z';
430
+ path.data(data);
431
+ }
432
+ }
433
+ addShape(shapes, baseZoom = { x: 1, y: 1 }, zIndices = []) {
434
+ const ret = [];
435
+ const shapeList = Array.isArray(shapes) ? shapes : [shapes];
436
+ const zIndicesList = (zIndices.length && Array.isArray(zIndices[0]) ? zIndices : [zIndices]);
437
+ shapeList.forEach((shape, i) => {
438
+ const shapeData = shape.getData();
439
+ const konvaShape = this.transformShapeDataToKonvaShape(shapeData);
440
+ if (konvaShape !== null) {
441
+ ret.push(konvaShape);
442
+ this.layer.add(konvaShape);
443
+ const shapeGroup = new ShapeGroup(konvaShape, shape, baseZoom, zIndicesList[i]);
444
+ shapeGroup.points.forEach((p) => { p.setAttrs(shapeGroup.vertexOptions); });
445
+ this.shapes.push(shapeGroup);
446
+ }
447
+ });
448
+ this.renderThisFrame = true;
449
+ if (Array.isArray(shapes)) {
450
+ return ret;
451
+ }
452
+ if (ret.length > 0) {
453
+ return ret[0];
454
+ }
455
+ return null;
456
+ }
457
+ getShapeGroup(shape) {
458
+ return this.shapes.find((s) => s.rawShape === shape || s.shape === shape);
459
+ }
460
+ forceRender() {
461
+ this.renderThisFrame = true;
462
+ }
463
+ /**
464
+ * 计算路径距离中点
465
+ * @param shape 目标图形
466
+ */
467
+ getMiddlePoint(shape) {
468
+ const shapeGroup = this.getShapeGroup(shape);
469
+ if (!shapeGroup)
470
+ return null;
471
+ const steps = shapeGroup.rawShape.getSteps();
472
+ const { zIndices } = shapeGroup;
473
+ const { THREE } = Externals.getInstance();
474
+ if (!steps.length)
475
+ return null;
476
+ const distArray = [0];
477
+ let dist = 0;
478
+ const prevPoint = new THREE.Vector3(steps[0].coords[steps[0].coords.length - 1][0], steps[0].coords[steps[0].coords.length - 1][1], zIndices.length > 0 ? zIndices[0] : 0);
479
+ const currentPoint = new THREE.Vector3();
480
+ const result = new THREE.Vector3().copy(prevPoint);
481
+ for (let i = 1; i < steps.length; i += 1) {
482
+ const [x, y] = steps[i].coords[steps[i].coords.length - 1];
483
+ const z = zIndices[i];
484
+ currentPoint.set(x, y, z);
485
+ const d = currentPoint.distanceTo(prevPoint);
486
+ dist += d;
487
+ distArray.push(dist);
488
+ prevPoint.copy(currentPoint);
489
+ }
490
+ const distHalf = dist / 2;
491
+ let middleIndex = 0;
492
+ while (middleIndex + 1 < distArray.length && distArray[middleIndex + 1] < distHalf)
493
+ middleIndex += 1;
494
+ result.set(steps[middleIndex].coords[steps[middleIndex].coords.length - 1][0], steps[middleIndex].coords[steps[middleIndex].coords.length - 1][1], zIndices.length > middleIndex ? zIndices[middleIndex] : 0);
495
+ if (middleIndex + 1 < distArray.length) {
496
+ const segmentLength = distArray[middleIndex + 1] - distArray[middleIndex];
497
+ const ratio = (distHalf - distArray[middleIndex]) / segmentLength;
498
+ const furtherPoint = new THREE.Vector3(steps[middleIndex + 1].coords[steps[middleIndex + 1].coords.length - 1][0], steps[middleIndex + 1].coords[steps[middleIndex + 1].coords.length - 1][1], zIndices.length > middleIndex + 1 ? zIndices[middleIndex + 1] : 0);
499
+ result.add(furtherPoint.sub(result).multiplyScalar(ratio));
500
+ }
501
+ return result;
502
+ }
503
+ setEnabled(value) {
504
+ this.enabled = value;
505
+ }
506
+ resize(containerWidth, containerHeight) {
507
+ this.owlly2D.resize(containerWidth, containerHeight);
508
+ }
509
+ }
510
+ export { CanvasOverlay, ShapeGroup };
@@ -0,0 +1,14 @@
1
+ import { Overlay } from './overlay';
2
+ import { View } from '../view/view';
3
+ declare class CSS2DOverlay extends Overlay {
4
+ private container;
5
+ private parent;
6
+ private renderer;
7
+ init(parent: View, container?: HTMLElement): void;
8
+ resize(containerWidth: number, containerHeight: number): void;
9
+ setRenderOrder(order: number): void;
10
+ update(): boolean;
11
+ render(): void;
12
+ dispose(): void;
13
+ }
14
+ export { CSS2DOverlay };
@@ -0,0 +1,35 @@
1
+ import { CSS2DRenderer } from '../../external/renderers/css-2d-renderer';
2
+ import { Overlay } from './overlay';
3
+ class CSS2DOverlay extends Overlay {
4
+ init(parent, container = parent.container) {
5
+ this.container = container;
6
+ this.parent = parent;
7
+ const { clientWidth, clientHeight } = this.container;
8
+ this.renderer = new CSS2DRenderer();
9
+ this.renderer.setSize(clientWidth, clientHeight);
10
+ this.renderer.domElement.style.position = 'absolute';
11
+ this.renderer.domElement.style.top = '0';
12
+ this.renderer.domElement.style.userSelect = 'none';
13
+ this.container.appendChild(this.renderer.domElement);
14
+ }
15
+ resize(containerWidth, containerHeight) {
16
+ this.renderer.setSize(containerWidth, containerHeight);
17
+ }
18
+ setRenderOrder(order) {
19
+ this.renderer.domElement.style.setProperty('z-index', `${order}`);
20
+ }
21
+ update() {
22
+ return false;
23
+ }
24
+ render() {
25
+ if (!this.parent.camera)
26
+ return;
27
+ this.renderer.render(this.parent.stage.scene, this.parent.camera);
28
+ }
29
+ dispose() {
30
+ this.container.removeChild(this.renderer.domElement);
31
+ this.renderer = null;
32
+ this.container = null;
33
+ }
34
+ }
35
+ export { CSS2DOverlay };
@@ -0,0 +1,16 @@
1
+ import { NS_THREE } from '../stage/externals';
2
+ import { CSS3DRenderer } from '../../external/renderers/css-3d-renderer';
3
+ import { Overlay } from './overlay';
4
+ import { View } from '../view/view';
5
+ declare class CSS3DOverlay extends Overlay {
6
+ private container;
7
+ private parent;
8
+ renderer: CSS3DRenderer | null;
9
+ init(parent: View, container?: HTMLElement): void;
10
+ resize(containerWidth: number, containerHeight: number): void;
11
+ setRenderOrder(order: number): void;
12
+ update(): boolean;
13
+ render(scene: NS_THREE.Scene): void;
14
+ dispose(): void;
15
+ }
16
+ export { CSS3DOverlay };
@@ -0,0 +1,36 @@
1
+ import { CSS3DRenderer } from '../../external/renderers/css-3d-renderer';
2
+ import { Overlay } from './overlay';
3
+ class CSS3DOverlay extends Overlay {
4
+ init(parent, container = new HTMLElement()) {
5
+ this.container = container;
6
+ this.parent = parent;
7
+ const { clientWidth, clientHeight } = this.container;
8
+ this.renderer = new CSS3DRenderer();
9
+ this.renderer.setSize(clientWidth, clientHeight);
10
+ this.renderer.domElement.style.position = 'absolute';
11
+ this.renderer.domElement.style.top = '0';
12
+ this.renderer.domElement.style.left = '0';
13
+ this.renderer.domElement.style.userSelect = 'none';
14
+ // this.renderer.domElement.style.pointerEvents = 'none';
15
+ this.container.appendChild(this.renderer.domElement);
16
+ }
17
+ resize(containerWidth, containerHeight) {
18
+ this.renderer.setSize(containerWidth, containerHeight);
19
+ }
20
+ setRenderOrder(order) {
21
+ this.renderer.domElement.style.setProperty('z-index', `${order}`);
22
+ }
23
+ update() {
24
+ return false;
25
+ }
26
+ render(scene) {
27
+ if (!this.parent.camera)
28
+ return;
29
+ this.renderer.render(scene, this.parent.camera);
30
+ }
31
+ dispose() {
32
+ this.container.removeChild(this.renderer.domElement);
33
+ this.renderer = null;
34
+ }
35
+ }
36
+ export { CSS3DOverlay };
@@ -0,0 +1,6 @@
1
+ export * from './overlay';
2
+ export * from './path-overlay2';
3
+ export * from './css-2d-overlay';
4
+ export * from './poi-overlay';
5
+ export * from './canvas-overlay';
6
+ export * from './poi-overlay-3d';
@@ -0,0 +1,11 @@
1
+ // #if WEB_ONLY
2
+ export * from './overlay';
3
+ // #endif
4
+ // export * from './path-overlay';
5
+ export * from './path-overlay2';
6
+ // export * from './label-overlay';
7
+ export * from './css-2d-overlay';
8
+ // export * from './css-3d-overlay';
9
+ export * from './poi-overlay';
10
+ export * from './canvas-overlay';
11
+ export * from './poi-overlay-3d';