@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,105 @@
1
+ import { NS_THREE } from '../stage/externals';
2
+ import { Element, ElementFrameContext, View } from '..';
3
+ import { TileTextureInfo } from '../utils/tile-util';
4
+ /**
5
+ * 瓦片平面,可以是平面,也可以是曲面
6
+ */
7
+ declare class TilePlane extends Element {
8
+ private initialized;
9
+ /** 全景面id @ignore */
10
+ pfid: number;
11
+ private planeGeometry;
12
+ private uniforms;
13
+ private plane;
14
+ private needsUpdate;
15
+ /** @ignore */
16
+ textureMap: Map<string, TileTextureInfo>;
17
+ /** @ignore */
18
+ level: number;
19
+ /** @ignore */
20
+ revers: boolean;
21
+ /** @ignore */
22
+ face: number;
23
+ /** @ignore */
24
+ flipX: boolean;
25
+ /** @ignore */
26
+ flipY: boolean;
27
+ /** @ignore */
28
+ textureRootUrl: string;
29
+ /** @ignore */
30
+ offLineTextureRootUrl?: string;
31
+ /** @ignore */
32
+ offLineTextureLevel: number;
33
+ /**
34
+ * 构造
35
+ * @param face 面数
36
+ * @param flipX x翻转
37
+ * @param flipY y翻转
38
+ */
39
+ constructor(face: number, flipX?: boolean, flipY?: boolean);
40
+ /**
41
+ * 更新面id
42
+ * @ignore
43
+ * @param pfid 全景面id
44
+ * @param level 全景等级
45
+ */
46
+ updatePfid(pfid: number, level: number): void;
47
+ /**
48
+ * 设置纹理
49
+ * @param max
50
+ * @param textures
51
+ */
52
+ private setTexturesUniforms;
53
+ /**
54
+ * 更新纹理
55
+ * @param textures
56
+ * @param textureMap
57
+ */
58
+ updateTextures(textures: NS_THREE.Texture[], textureMap: Map<string, TileTextureInfo>): void;
59
+ /**
60
+ * 更新纹理图
61
+ * @ignore
62
+ * @param textureMap
63
+ */
64
+ updateInfos(textureMap: Map<string, TileTextureInfo>): void;
65
+ /**
66
+ * 更新在相机中的信息
67
+ * @ignore
68
+ * @param view
69
+ * @returns
70
+ */
71
+ udpateInCamera(view: View): TileTextureInfo[];
72
+ /**
73
+ * 更新
74
+ * @returns
75
+ */
76
+ update(): ElementFrameContext;
77
+ renderOnce(): void;
78
+ }
79
+ /**
80
+ * 瓦片平面工具类
81
+ */
82
+ declare class TilePlaneUtil {
83
+ private static cubeMatrix;
84
+ /**
85
+ * 设置平面可见性
86
+ * @ignore
87
+ * @param visible
88
+ */
89
+ static setPlanesVisible(visible: boolean): void;
90
+ /**
91
+ * 根据矩阵获取平面组
92
+ * @ignore
93
+ * @param pid 全景id
94
+ * @param level 瓦片等级
95
+ * @param textureUrls 纹理地址
96
+ * @returns
97
+ */
98
+ static getPlanesByMatrix(pid: number, level: number, textureUrls: string[], offLineTextureLevel?: number, offLineTextureUrls?: string[]): TilePlane[];
99
+ /**
100
+ * 获取cube平面矩阵
101
+ * @returns
102
+ */
103
+ static getCubeMatrix(): NS_THREE.Matrix4[];
104
+ }
105
+ export { TilePlane, TilePlaneUtil };
@@ -0,0 +1,360 @@
1
+ import { NS_THREE, Externals } from '../stage/externals';
2
+ import { Element, ElementFrameContext } from '..';
3
+ import { FragmentShader, VertexShader, TileTextureInfo, TileUtil, CubeFaceConfig, } from '../utils/tile-util';
4
+ const TILE_PLANE_SIZE = 2;
5
+ /**
6
+ * 瓦片平面,可以是平面,也可以是曲面
7
+ */
8
+ class TilePlane extends Element {
9
+ /**
10
+ * 构造
11
+ * @param face 面数
12
+ * @param flipX x翻转
13
+ * @param flipY y翻转
14
+ */
15
+ constructor(face, flipX, flipY) {
16
+ super();
17
+ /** @ignore */
18
+ this.offLineTextureLevel = -1;
19
+ this.face = face;
20
+ this.flipX = flipX || false;
21
+ this.flipY = flipY || false;
22
+ // if (textureRootUrl) { this.textureRootUrl = textureRootUrl; }
23
+ this.textureMap = new Map();
24
+ this.needsUpdate = false;
25
+ const uniforms = this.uniforms = {
26
+ mTexture0: {
27
+ type: 't',
28
+ value: null,
29
+ },
30
+ mTexture1: {
31
+ type: 't',
32
+ value: null,
33
+ },
34
+ mTexture2: {
35
+ type: 't',
36
+ value: null,
37
+ },
38
+ mTexture3: {
39
+ type: 't',
40
+ value: null,
41
+ },
42
+ mTexture4: {
43
+ type: 't',
44
+ value: null,
45
+ },
46
+ mTexture5: {
47
+ type: 't',
48
+ value: null,
49
+ },
50
+ mTexture6: {
51
+ type: 't',
52
+ value: null,
53
+ },
54
+ mTexture7: {
55
+ type: 't',
56
+ value: null,
57
+ },
58
+ mTexture8: {
59
+ type: 't',
60
+ value: null,
61
+ },
62
+ mTexture9: {
63
+ type: 't',
64
+ value: null,
65
+ },
66
+ mTexture10: {
67
+ type: 't',
68
+ value: null,
69
+ },
70
+ mTexture11: {
71
+ type: 't',
72
+ value: null,
73
+ },
74
+ mTexture12: {
75
+ type: 't',
76
+ value: null,
77
+ },
78
+ mTexture13: {
79
+ type: 't',
80
+ value: null,
81
+ },
82
+ mTexture14: {
83
+ type: 't',
84
+ value: null,
85
+ },
86
+ mTexture15: {
87
+ type: 't',
88
+ value: null,
89
+ },
90
+ uvMax: {
91
+ type: 'i',
92
+ value: 0,
93
+ },
94
+ flipX: {
95
+ type: 'b',
96
+ value: false,
97
+ },
98
+ flipY: {
99
+ type: 'b',
100
+ value: false,
101
+ },
102
+ black: {
103
+ type: 'b',
104
+ value: false,
105
+ },
106
+ };
107
+ const { THREE } = Externals.getInstance();
108
+ const material = new THREE.ShaderMaterial({
109
+ fragmentShader: FragmentShader,
110
+ vertexShader: VertexShader,
111
+ uniforms,
112
+ depthTest: false,
113
+ side: NS_THREE.BackSide,
114
+ transparent: false,
115
+ });
116
+ const planeGeometry = new THREE.BufferGeometry();
117
+ // const planeGeometry = new PlaneBufferGeometry(2, 2);
118
+ this.planeGeometry = planeGeometry;
119
+ const plane = this.plane = new THREE.Mesh(planeGeometry, material);
120
+ plane.visible = true;
121
+ plane.frustumCulled = false;
122
+ plane.material = material;
123
+ plane.renderOrder = 100;
124
+ this.add(plane);
125
+ // TilePlaneController.instance.addPlane(this.pfid, this, true);
126
+ }
127
+ /**
128
+ * 更新面id
129
+ * @ignore
130
+ * @param pfid 全景面id
131
+ * @param level 全景等级
132
+ */
133
+ updatePfid(pfid, level) {
134
+ if (this.pfid !== pfid) {
135
+ // TilePlaneController.instance.deletePlane(this.pfid);
136
+ this.pfid = pfid;
137
+ // TilePlaneController.instance.addPlane(this.pfid, this);
138
+ }
139
+ this.level = level;
140
+ }
141
+ /**
142
+ * 设置纹理
143
+ * @param max
144
+ * @param textures
145
+ */
146
+ setTexturesUniforms(max, textures) {
147
+ this.uniforms.uvMax.value = max;
148
+ textures.forEach((i, j) => {
149
+ this.uniforms[`mTexture${j}`].value = i;
150
+ });
151
+ // this.uniforms.mTextures.value = textures;
152
+ this.uniforms.flipX.value = this.flipX;
153
+ this.uniforms.flipY.value = this.flipY;
154
+ if (this.face !== 0) {
155
+ this.uniforms.black.value = true;
156
+ }
157
+ this.needsUpdate = true;
158
+ }
159
+ /**
160
+ * 更新纹理
161
+ * @param textures
162
+ * @param textureMap
163
+ */
164
+ updateTextures(textures, textureMap) {
165
+ // console.log('textures.length', textures.length, 'textureMap.size', textureMap.size);
166
+ this.setTexturesUniforms(textures.length, textures);
167
+ this.updateInfos(textureMap);
168
+ }
169
+ /**
170
+ * 更新纹理图
171
+ * @ignore
172
+ * @param textureMap
173
+ */
174
+ updateInfos(textureMap) {
175
+ this.textureMap = textureMap;
176
+ const infos = Array.from(this.textureMap.values());
177
+ infos.sort((a, b) => a.level - b.level);
178
+ // const list = infos.map((info) => info.textureIndex);
179
+ // console.log('textureInfos', textureInfos.length, 'infos', infos.length);
180
+ // console.log(list);
181
+ const revers = this.revers;
182
+ // console.log('infos.length', this.pfid, infos.length);
183
+ const geometry = this.planeGeometry;
184
+ const vertices = [];
185
+ const normals = [];
186
+ const indices = [];
187
+ const uvi = []; // 定位索引
188
+ const computeOne = (ti, index) => {
189
+ const level = ti.level;
190
+ const uIndex = ti.textureIndex;
191
+ const tIndex = ti.index;
192
+ const vs = TileUtil.getVertices(level, tIndex, revers, this.flipX, this.flipY);
193
+ vs.forEach((v) => {
194
+ vertices.push(v.x, v.y, v.z);
195
+ });
196
+ normals.push(0, 0, 1);
197
+ normals.push(0, 0, 1);
198
+ normals.push(0, 0, 1);
199
+ normals.push(0, 0, 1);
200
+ uvi.push(0, 0, uIndex);
201
+ uvi.push(0, 1, uIndex);
202
+ uvi.push(1, 1, uIndex);
203
+ uvi.push(1, 0, uIndex);
204
+ const t = index * 4;
205
+ if (revers) {
206
+ indices.push(t + 1, t + 2, t);
207
+ indices.push(t + 2, t + 3, t);
208
+ }
209
+ else {
210
+ indices.push(t, t + 2, t + 1);
211
+ indices.push(t, t + 3, t + 2);
212
+ }
213
+ };
214
+ for (let i = 0; i < infos.length; i++) {
215
+ computeOne(infos[i], i);
216
+ }
217
+ const { THREE } = Externals.getInstance();
218
+ geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3));
219
+ geometry.setAttribute('normal', new THREE.Float32BufferAttribute(normals, 3));
220
+ geometry.setAttribute('uvi', new THREE.Float32BufferAttribute(uvi, 3));
221
+ geometry.setIndex(indices);
222
+ }
223
+ /**
224
+ * 更新在相机中的信息
225
+ * @ignore
226
+ * @param view
227
+ * @returns
228
+ */
229
+ udpateInCamera(view) {
230
+ const { textureMap, pfid, level, textureRootUrl, offLineTextureLevel, offLineTextureRootUrl, } = this;
231
+ const updates = [];
232
+ if (view.camera) {
233
+ this.textureMap.forEach((info) => {
234
+ if (info.level > level) {
235
+ info.willIsInCamera = false;
236
+ if (info.willIsInCamera !== info.isInCamera) {
237
+ info.isInCamera = info.willIsInCamera;
238
+ updates.push(info);
239
+ }
240
+ }
241
+ });
242
+ const count = TileUtil.getCount(this.level);
243
+ for (let i = 0; i < count; i++) {
244
+ const id = TileUtil.getTileInfoId(pfid, level, i);
245
+ const info = textureMap.get(id) || new TileTextureInfo(pfid, 0, level, i, textureRootUrl, offLineTextureLevel, offLineTextureRootUrl);
246
+ info.willIsInCamera = info.inCamera(this.matrixWorld, view.camera);
247
+ if (info.willIsInCamera !== info.isInCamera) {
248
+ info.isInCamera = info.willIsInCamera;
249
+ updates.push(info);
250
+ }
251
+ }
252
+ }
253
+ // const us = updates.map((info) => info.index);
254
+ // console.log(us);
255
+ return updates;
256
+ }
257
+ /**
258
+ * 更新
259
+ * @returns
260
+ */
261
+ update() {
262
+ const frameContext = new ElementFrameContext(this);
263
+ if (!this.initialized) {
264
+ this.initialized = true;
265
+ frameContext.needUpdate = true;
266
+ }
267
+ else if (this.needsUpdate) {
268
+ frameContext.needUpdate = true;
269
+ this.plane.material.uniformsNeedUpdate = true;
270
+ }
271
+ if (this.initialized && !this.parent) {
272
+ frameContext.shouldPlaceElement = true;
273
+ }
274
+ return frameContext;
275
+ }
276
+ renderOnce() {
277
+ this.updateInfos(this.textureMap);
278
+ }
279
+ }
280
+ /** 全局瓦片平面,挂载在全景节点下面 */
281
+ const tilePlanes = [];
282
+ /**
283
+ * 瓦片平面工具类
284
+ */
285
+ class TilePlaneUtil {
286
+ /**
287
+ * 设置平面可见性
288
+ * @ignore
289
+ * @param visible
290
+ */
291
+ static setPlanesVisible(visible) {
292
+ tilePlanes.forEach((plane) => {
293
+ plane.visible = visible;
294
+ });
295
+ }
296
+ /**
297
+ * 根据矩阵获取平面组
298
+ * @ignore
299
+ * @param pid 全景id
300
+ * @param level 瓦片等级
301
+ * @param textureUrls 纹理地址
302
+ * @returns
303
+ */
304
+ static getPlanesByMatrix(pid, level, textureUrls, offLineTextureLevel, offLineTextureUrls) {
305
+ const cubeMatrix = TilePlaneUtil.getCubeMatrix();
306
+ const planes = cubeMatrix.map((pm, index) => {
307
+ // pm.multiplyScalar(size);
308
+ // pm.premultiply(matrix);
309
+ let plane = tilePlanes[index];
310
+ const { face, revers, flipX, flipY, } = CubeFaceConfig[index];
311
+ if (!plane) {
312
+ plane = tilePlanes[index] = new TilePlane(face, flipX, flipY);
313
+ plane.revers = revers || false;
314
+ plane.applyMatrix4(pm);
315
+ }
316
+ plane.level = level;
317
+ const pPfid = pid + (face + 1) / 10;
318
+ plane.pfid = pPfid;
319
+ plane.level = 0;
320
+ plane.textureRootUrl = textureUrls[index];
321
+ if (offLineTextureUrls) {
322
+ plane.offLineTextureRootUrl = offLineTextureUrls[index];
323
+ }
324
+ if (offLineTextureLevel != null) {
325
+ plane.offLineTextureLevel = offLineTextureLevel;
326
+ }
327
+ return plane;
328
+ });
329
+ return planes;
330
+ }
331
+ /**
332
+ * 获取cube平面矩阵
333
+ * @returns
334
+ */
335
+ static getCubeMatrix() {
336
+ const { THREE } = Externals.getInstance();
337
+ if (!TilePlaneUtil.cubeMatrix) {
338
+ const cubeMatrix = [];
339
+ const ti = new THREE.Matrix4();
340
+ for (let i = 0; i < CubeFaceConfig.length; i++) {
341
+ const conf = CubeFaceConfig[i];
342
+ const { trans, euler, } = conf;
343
+ const t = new THREE.Matrix4();
344
+ if (euler) {
345
+ t.multiply(ti.makeRotationFromEuler(euler));
346
+ }
347
+ t.multiply(ti.makeTranslation(trans.x, trans.y, trans.z));
348
+ t.multiplyScalar(TILE_PLANE_SIZE);
349
+ // 默认姿态
350
+ const INIT_EULER = new THREE.Euler(Math.PI / 2, 0, 0);
351
+ t.premultiply(ti.makeRotationFromEuler(INIT_EULER));
352
+ cubeMatrix[i] = t;
353
+ }
354
+ TilePlaneUtil.cubeMatrix = cubeMatrix;
355
+ }
356
+ // return TilePlaneUtil.cubeMatrix.map((matrix) => matrix.clone());
357
+ return TilePlaneUtil.cubeMatrix;
358
+ }
359
+ }
360
+ export { TilePlane, TilePlaneUtil };
@@ -0,0 +1,33 @@
1
+ import { NS_THREE } from '../stage/externals';
2
+ import { Element, ElementFrameContext } from './element';
3
+ declare class SharedVideo {
4
+ video: HTMLVideoElement;
5
+ count: number;
6
+ playing: boolean;
7
+ playSet: Set<number>;
8
+ texture: NS_THREE.VideoTexture;
9
+ private listeners;
10
+ constructor(videoSrc: string);
11
+ play(identifier?: number): void;
12
+ pause(identifier?: number): void;
13
+ destroy(): void;
14
+ }
15
+ declare class VideoElement extends Element {
16
+ static Videos: Map<string, SharedVideo>;
17
+ private initialized;
18
+ private video;
19
+ private videoPlane;
20
+ private videoVisible;
21
+ constructor(videoSrc: string);
22
+ private static RemoveVideo;
23
+ private static AddVideo;
24
+ private createVideoPlane;
25
+ setVideoSrc(videoSrc: string): void;
26
+ setVideoVisible(visible: boolean): void;
27
+ setVideoSize(width: number, height: number): void;
28
+ play(identifier?: number): void;
29
+ stop(identifier?: number): void;
30
+ update(): ElementFrameContext;
31
+ dispose(): void;
32
+ }
33
+ export { VideoElement };
@@ -0,0 +1,159 @@
1
+ import { Externals } from '../stage/externals';
2
+ import { BasicTools } from '../utils/basic-tools';
3
+ import { Element, ElementFrameContext } from './element';
4
+ class SharedVideo {
5
+ constructor(videoSrc) {
6
+ const { THREE } = Externals.getInstance();
7
+ this.count = 0;
8
+ this.playSet = new Set();
9
+ this.playing = false;
10
+ this.listeners = {
11
+ onPlaying: () => { this.playing = true; },
12
+ onPaused: () => { this.playing = false; },
13
+ };
14
+ const video = document.createElement('video');
15
+ video.setAttribute('webkit-playsinline', 'true');
16
+ video.setAttribute('x5-playsinline', 'true');
17
+ video.setAttribute('playsinline', 'true');
18
+ video.setAttribute('crossOrigin', 'anonymous');
19
+ video.setAttribute('autoplay', 'false');
20
+ video.setAttribute('muted', 'true');
21
+ video.muted = true;
22
+ video.src = videoSrc;
23
+ video.loop = true;
24
+ video.volume = 0;
25
+ video.addEventListener('playing', this.listeners.onPlaying);
26
+ video.addEventListener('pause', this.listeners.onPaused);
27
+ this.video = video;
28
+ this.texture = new THREE.VideoTexture(this.video);
29
+ }
30
+ play(identifier) {
31
+ if (this.playSet.size < 1)
32
+ this.video.play();
33
+ if (identifier)
34
+ this.playSet.add(identifier);
35
+ }
36
+ pause(identifier) {
37
+ if (identifier)
38
+ this.playSet.delete(identifier);
39
+ if (this.playSet.size === 0)
40
+ this.video.pause();
41
+ }
42
+ destroy() {
43
+ if (this.texture)
44
+ this.texture.dispose();
45
+ if (!this.video)
46
+ return;
47
+ this.video.removeEventListener('playing', this.listeners.onPlaying);
48
+ this.video.removeEventListener('pause', this.listeners.onPaused);
49
+ this.video.pause();
50
+ this.video.removeAttribute('src');
51
+ this.video.load();
52
+ }
53
+ }
54
+ class VideoElement extends Element {
55
+ constructor(videoSrc) {
56
+ super();
57
+ if (!VideoElement.Videos)
58
+ VideoElement.Videos = new Map();
59
+ this.initialized = false;
60
+ this.up.set(0, 0, 1);
61
+ this.visible = false;
62
+ this.videoVisible = false;
63
+ if (videoSrc)
64
+ this.setVideoSrc(videoSrc);
65
+ }
66
+ static RemoveVideo(videoSrc) {
67
+ if (!VideoElement.Videos.has(videoSrc))
68
+ return;
69
+ const sharedVideo = VideoElement.Videos.get(videoSrc);
70
+ if (sharedVideo.count - 1 === 0) {
71
+ sharedVideo.destroy();
72
+ VideoElement.Videos.delete(videoSrc);
73
+ }
74
+ else {
75
+ sharedVideo.count -= 1;
76
+ VideoElement.Videos.set(videoSrc, sharedVideo);
77
+ }
78
+ }
79
+ static AddVideo(videoSrc) {
80
+ if (!VideoElement.Videos.has(videoSrc)) {
81
+ const video = new SharedVideo(videoSrc);
82
+ VideoElement.Videos.set(videoSrc, video);
83
+ }
84
+ const video = VideoElement.Videos.get(videoSrc);
85
+ video.count += 1;
86
+ return video;
87
+ }
88
+ createVideoPlane() {
89
+ const { THREE } = Externals.getInstance();
90
+ const geometry = new THREE.PlaneBufferGeometry(1.6, 0.9);
91
+ const material = new THREE.MeshBasicMaterial({
92
+ map: this.video.texture,
93
+ side: THREE.DoubleSide,
94
+ transparent: false,
95
+ depthTest: false,
96
+ depthWrite: false,
97
+ });
98
+ this.videoPlane = new THREE.Mesh(geometry, material);
99
+ this.add(this.videoPlane);
100
+ this.initialized = true;
101
+ this.videoVisible = true;
102
+ }
103
+ setVideoSrc(videoSrc) {
104
+ const video = VideoElement.AddVideo(videoSrc);
105
+ if (this.video) {
106
+ this.videoPlane.material.map = null;
107
+ VideoElement.RemoveVideo(this.video.video.src);
108
+ }
109
+ this.video = video;
110
+ if (this.videoPlane && this.videoPlane.material) {
111
+ this.videoPlane.material.map = this.video.texture;
112
+ }
113
+ if (!this.videoPlane)
114
+ this.createVideoPlane();
115
+ }
116
+ setVideoVisible(visible) {
117
+ this.videoVisible = visible;
118
+ }
119
+ setVideoSize(width, height) {
120
+ if (!this.videoPlane)
121
+ return;
122
+ const { THREE } = Externals.getInstance();
123
+ const { geometry } = this.videoPlane;
124
+ const newGeometry = new THREE.PlaneBufferGeometry(width, height);
125
+ this.videoPlane.geometry = newGeometry;
126
+ geometry.dispose();
127
+ }
128
+ play(identifier) {
129
+ if (!this.video)
130
+ return;
131
+ this.video.play(identifier);
132
+ this.videoPlane.renderOrder = 150;
133
+ }
134
+ stop(identifier) {
135
+ if (!this.video)
136
+ return;
137
+ this.video.pause(identifier);
138
+ this.videoPlane.renderOrder = 1;
139
+ }
140
+ update() {
141
+ const frameContext = new ElementFrameContext(this);
142
+ if (this.initialized && !this.parent) {
143
+ frameContext.shouldPlaceElement = true;
144
+ frameContext.needUpdate = true;
145
+ }
146
+ this.visible = this.videoVisible && this.video && this.video.playing;
147
+ if (this.visible) {
148
+ frameContext.needUpdate = true;
149
+ }
150
+ return frameContext;
151
+ }
152
+ dispose() {
153
+ if (this.video)
154
+ VideoElement.RemoveVideo(this.video.video.src);
155
+ super.dispose();
156
+ BasicTools.dispose(this, true);
157
+ }
158
+ }
159
+ export { VideoElement };
@@ -0,0 +1,15 @@
1
+ import { NS_THREE } from '../stage/externals';
2
+ export interface ExtrudeGeometry2Options {
3
+ extrudePath: NS_THREE.Vector3[];
4
+ closed: boolean;
5
+ }
6
+ export interface UVGenerator2 {
7
+ generateTopUV(geometry: ExtrudeGeometry2, vertices: number[], indexA: number, indexB: number, indexC: number): THREE.Vector2[];
8
+ generateSideWallUV(geometry: ExtrudeGeometry2, vertices: number[], indexA: number, indexB: number, indexC: number, indexD: number): THREE.Vector2[];
9
+ }
10
+ declare class ExtrudeGeometry2 extends NS_THREE.BufferGeometry {
11
+ private parameters;
12
+ constructor(shapes: NS_THREE.Shape | NS_THREE.Shape[], options: ExtrudeGeometry2Options);
13
+ toJSON(): any;
14
+ }
15
+ export { ExtrudeGeometry2, ExtrudeGeometry2 as ExtrudeBufferGeometry2 };