@aibee/owlly 1.0.25 → 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.
- package/lib/external/lines/line-geometry.d.ts +9 -0
- package/lib/external/lines/line-geometry.js +51 -0
- package/lib/external/lines/line-material.d.ts +10 -0
- package/lib/external/lines/line-material.js +376 -0
- package/lib/external/lines/line-segments-2.d.ts +7 -0
- package/lib/external/lines/line-segments-2.js +143 -0
- package/lib/external/lines/line-segments-geometry.d.ts +15 -0
- package/lib/external/lines/line-segments-geometry.js +140 -0
- package/lib/external/loaders/gltf-loader.d.ts +77 -0
- package/lib/external/loaders/gltf-loader.js +2318 -0
- package/lib/external/orbit-controls.d.ts +44 -0
- package/lib/external/orbit-controls.js +745 -0
- package/lib/external/renderers/css-2d-renderer.d.ts +16 -0
- package/lib/external/renderers/css-2d-renderer.js +121 -0
- package/lib/external/renderers/css-3d-renderer.d.ts +18 -0
- package/lib/external/renderers/css-3d-renderer.js +138 -0
- package/lib/external/transform-controls.d.ts +106 -0
- package/lib/external/transform-controls.js +1112 -0
- package/lib/owlly/controller/aerial-element-controller.d.ts +65 -0
- package/lib/owlly/controller/aerial-element-controller.js +235 -0
- package/lib/owlly/controller/basic-controller.d.ts +324 -0
- package/lib/owlly/controller/basic-controller.js +1238 -0
- package/lib/owlly/controller/camera-controller.d.ts +37 -0
- package/lib/owlly/controller/camera-controller.js +137 -0
- package/lib/owlly/controller/controller.d.ts +61 -0
- package/lib/owlly/controller/controller.js +23 -0
- package/lib/owlly/controller/index.d.ts +2 -0
- package/lib/owlly/controller/index.js +13 -0
- package/lib/owlly/controller/mouse-indicator-controller.d.ts +34 -0
- package/lib/owlly/controller/mouse-indicator-controller.js +118 -0
- package/lib/owlly/controller/orbit-control.d.ts +147 -0
- package/lib/owlly/controller/orbit-control.js +264 -0
- package/lib/owlly/controller/panorama-adjust-controller.d.ts +45 -0
- package/lib/owlly/controller/panorama-adjust-controller.js +157 -0
- package/lib/owlly/controller/panorama-controller.d.ts +441 -0
- package/lib/owlly/controller/panorama-controller.js +1943 -0
- package/lib/owlly/controller/panorama-transform-controller.d.ts +66 -0
- package/lib/owlly/controller/panorama-transform-controller.js +136 -0
- package/lib/owlly/controller/plane-controller.d.ts +43 -0
- package/lib/owlly/controller/plane-controller.js +173 -0
- package/lib/owlly/controller/texture-controller.d.ts +181 -0
- package/lib/owlly/controller/texture-controller.js +875 -0
- package/lib/owlly/controller/tile-panorama-controller.d.ts +308 -0
- package/lib/owlly/controller/tile-panorama-controller.js +1353 -0
- package/lib/owlly/controller/transform-controller.d.ts +106 -0
- package/lib/owlly/controller/transform-controller.js +545 -0
- package/lib/owlly/element/bottom-nav-element.d.ts +65 -0
- package/lib/owlly/element/bottom-nav-element.js +257 -0
- package/lib/owlly/element/camera.d.ts +82 -0
- package/lib/owlly/element/camera.js +283 -0
- package/lib/owlly/element/dom-2d-element.d.ts +35 -0
- package/lib/owlly/element/dom-2d-element.js +48 -0
- package/lib/owlly/element/dom-3d-element.d.ts +27 -0
- package/lib/owlly/element/dom-3d-element.js +33 -0
- package/lib/owlly/element/dom-label-2d.d.ts +116 -0
- package/lib/owlly/element/dom-label-2d.js +382 -0
- package/lib/owlly/element/element.d.ts +53 -0
- package/lib/owlly/element/element.js +75 -0
- package/lib/owlly/element/floor-model.d.ts +83 -0
- package/lib/owlly/element/floor-model.js +227 -0
- package/lib/owlly/element/gif-kit/Gif.d.ts +96 -0
- package/lib/owlly/element/gif-kit/Gif.js +432 -0
- package/lib/owlly/element/gif-kit/GifColor.d.ts +21 -0
- package/lib/owlly/element/gif-kit/GifColor.js +37 -0
- package/lib/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.d.ts +20 -0
- package/lib/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.js +50 -0
- package/lib/owlly/element/gif-kit/GifFrame.d.ts +31 -0
- package/lib/owlly/element/gif-kit/GifFrame.js +96 -0
- package/lib/owlly/element/gif-kit/GifImage.d.ts +23 -0
- package/lib/owlly/element/gif-kit/GifImage.js +7 -0
- package/lib/owlly/element/gif-kit/GifParser.d.ts +17 -0
- package/lib/owlly/element/gif-kit/GifParser.js +196 -0
- package/lib/owlly/element/gif-kit/GifPresenter.d.ts +20 -0
- package/lib/owlly/element/gif-kit/GifPresenter.js +43 -0
- package/lib/owlly/element/gif-kit/GifVersion.d.ts +10 -0
- package/lib/owlly/element/gif-kit/GifVersion.js +12 -0
- package/lib/owlly/element/gltf-mesh-element.d.ts +31 -0
- package/lib/owlly/element/gltf-mesh-element.js +136 -0
- package/lib/owlly/element/index.d.ts +20 -0
- package/lib/owlly/element/index.js +24 -0
- package/lib/owlly/element/map-kit/shape.d.ts +131 -0
- package/lib/owlly/element/map-kit/shape.js +189 -0
- package/lib/owlly/element/mesh-element.d.ts +22 -0
- package/lib/owlly/element/mesh-element.js +63 -0
- package/lib/owlly/element/mesh-line-2d.d.ts +82 -0
- package/lib/owlly/element/mesh-line-2d.js +887 -0
- package/lib/owlly/element/meshline-o.d.ts +64 -0
- package/lib/owlly/element/meshline-o.js +678 -0
- package/lib/owlly/element/panorama-group.d.ts +241 -0
- package/lib/owlly/element/panorama-group.js +966 -0
- package/lib/owlly/element/panorama.d.ts +132 -0
- package/lib/owlly/element/panorama.js +812 -0
- package/lib/owlly/element/path-group.d.ts +69 -0
- package/lib/owlly/element/path-group.js +171 -0
- package/lib/owlly/element/path.d.ts +99 -0
- package/lib/owlly/element/path.js +531 -0
- package/lib/owlly/element/placeable-2d.d.ts +158 -0
- package/lib/owlly/element/placeable-2d.js +470 -0
- package/lib/owlly/element/polygon-mesh.d.ts +107 -0
- package/lib/owlly/element/polygon-mesh.js +307 -0
- package/lib/owlly/element/ring-element.d.ts +79 -0
- package/lib/owlly/element/ring-element.js +383 -0
- package/lib/owlly/element/sphere-mesh.d.ts +28 -0
- package/lib/owlly/element/sphere-mesh.js +69 -0
- package/lib/owlly/element/svg-floor-model.d.ts +22 -0
- package/lib/owlly/element/svg-floor-model.js +184 -0
- package/lib/owlly/element/svg-floors.d.ts +27 -0
- package/lib/owlly/element/svg-floors.js +109 -0
- package/lib/owlly/element/tile-panorama-group.d.ts +335 -0
- package/lib/owlly/element/tile-panorama-group.js +1006 -0
- package/lib/owlly/element/tile-panorama.d.ts +161 -0
- package/lib/owlly/element/tile-panorama.js +509 -0
- package/lib/owlly/element/tile-plane.d.ts +105 -0
- package/lib/owlly/element/tile-plane.js +360 -0
- package/lib/owlly/element/video-element.d.ts +33 -0
- package/lib/owlly/element/video-element.js +159 -0
- package/lib/owlly/geometries/ExtrudeGeometry2.d.ts +15 -0
- package/lib/owlly/geometries/ExtrudeGeometry2.js +210 -0
- package/lib/owlly/index.d.ts +13 -0
- package/lib/owlly/index.js +16 -0
- package/lib/owlly/overlay/canvas-overlay.d.ts +96 -0
- package/lib/owlly/overlay/canvas-overlay.js +510 -0
- package/lib/owlly/overlay/css-2d-overlay.d.ts +14 -0
- package/lib/owlly/overlay/css-2d-overlay.js +35 -0
- package/lib/owlly/overlay/css-3d-overlay.d.ts +16 -0
- package/lib/owlly/overlay/css-3d-overlay.js +36 -0
- package/lib/owlly/overlay/index.d.ts +6 -0
- package/lib/owlly/overlay/index.js +11 -0
- package/lib/owlly/overlay/label-overlay.d.ts +62 -0
- package/lib/owlly/overlay/label-overlay.js +328 -0
- package/lib/owlly/overlay/overlay.d.ts +14 -0
- package/lib/owlly/overlay/overlay.js +4 -0
- package/lib/owlly/overlay/path-overlay.d.ts +39 -0
- package/lib/owlly/overlay/path-overlay.js +124 -0
- package/lib/owlly/overlay/path-overlay2.d.ts +35 -0
- package/lib/owlly/overlay/path-overlay2.js +118 -0
- package/lib/owlly/overlay/poi-overlay-3d.d.ts +278 -0
- package/lib/owlly/overlay/poi-overlay-3d.js +1432 -0
- package/lib/owlly/overlay/poi-overlay.d.ts +277 -0
- package/lib/owlly/overlay/poi-overlay.js +1411 -0
- package/lib/owlly/owlly-2d/index.d.ts +28 -0
- package/lib/owlly/owlly-2d/index.js +92 -0
- package/lib/owlly/screen/index.d.ts +1 -0
- package/lib/owlly/screen/index.js +1 -0
- package/lib/owlly/screen/screen.d.ts +73 -0
- package/lib/owlly/screen/screen.js +236 -0
- package/lib/owlly/stage/externals.d.ts +19 -0
- package/lib/owlly/stage/externals.js +24 -0
- package/lib/owlly/stage/index.d.ts +4 -0
- package/lib/owlly/stage/index.js +6 -0
- package/lib/owlly/stage/owlly.d.ts +38 -0
- package/lib/owlly/stage/owlly.js +168 -0
- package/lib/owlly/stage/stage.d.ts +108 -0
- package/lib/owlly/stage/stage.js +234 -0
- package/lib/owlly/utils/alignment-utils.d.ts +20 -0
- package/lib/owlly/utils/alignment-utils.js +63 -0
- package/lib/owlly/utils/basic-calc.d.ts +18 -0
- package/lib/owlly/utils/basic-calc.js +129 -0
- package/lib/owlly/utils/basic-tools.d.ts +71 -0
- package/lib/owlly/utils/basic-tools.js +235 -0
- package/lib/owlly/utils/bvh-tree.d.ts +105 -0
- package/lib/owlly/utils/bvh-tree.js +539 -0
- package/lib/owlly/utils/camera.d.ts +37 -0
- package/lib/owlly/utils/camera.js +50 -0
- package/lib/owlly/utils/cube-texture-cache.d.ts +25 -0
- package/lib/owlly/utils/cube-texture-cache.js +143 -0
- package/lib/owlly/utils/device-utils.d.ts +18 -0
- package/lib/owlly/utils/device-utils.js +41 -0
- package/lib/owlly/utils/environment-utils.d.ts +37 -0
- package/lib/owlly/utils/environment-utils.js +73 -0
- package/lib/owlly/utils/event-hub.d.ts +50 -0
- package/lib/owlly/utils/event-hub.js +106 -0
- package/lib/owlly/utils/events.d.ts +219 -0
- package/lib/owlly/utils/events.js +219 -0
- package/lib/owlly/utils/geometry-utils.d.ts +119 -0
- package/lib/owlly/utils/geometry-utils.js +622 -0
- package/lib/owlly/utils/helper.d.ts +6 -0
- package/lib/owlly/utils/helper.js +24 -0
- package/lib/owlly/utils/index.d.ts +14 -0
- package/lib/owlly/utils/index.js +17 -0
- package/lib/owlly/utils/lru-cache.d.ts +26 -0
- package/lib/owlly/utils/lru-cache.js +109 -0
- package/lib/owlly/utils/map-utils.d.ts +7 -0
- package/lib/owlly/utils/map-utils.js +52 -0
- package/lib/owlly/utils/number-utils.d.ts +8 -0
- package/lib/owlly/utils/number-utils.js +72 -0
- package/lib/owlly/utils/panorama-model-util.d.ts +46 -0
- package/lib/owlly/utils/panorama-model-util.js +245 -0
- package/lib/owlly/utils/path-utils.d.ts +80 -0
- package/lib/owlly/utils/path-utils.js +728 -0
- package/lib/owlly/utils/svgutils.d.ts +138 -0
- package/lib/owlly/utils/svgutils.js +561 -0
- package/lib/owlly/utils/texture-cache.d.ts +29 -0
- package/lib/owlly/utils/texture-cache.js +115 -0
- package/lib/owlly/utils/tile-util.d.ts +187 -0
- package/lib/owlly/utils/tile-util.js +456 -0
- package/lib/owlly/utils/time-profiler.d.ts +21 -0
- package/lib/owlly/utils/time-profiler.js +48 -0
- package/lib/owlly/view/camera-view.d.ts +35 -0
- package/lib/owlly/view/camera-view.js +101 -0
- package/lib/owlly/view/index.d.ts +3 -0
- package/lib/owlly/view/index.js +5 -0
- package/lib/owlly/view/orthographic-view.d.ts +40 -0
- package/lib/owlly/view/orthographic-view.js +94 -0
- package/lib/owlly/view/perspective-view.d.ts +40 -0
- package/lib/owlly/view/perspective-view.js +95 -0
- package/lib/owlly/view/svg-map-view.d.ts +46 -0
- package/lib/owlly/view/svg-map-view.js +144 -0
- package/lib/owlly/view/view.d.ts +146 -0
- package/lib/owlly/view/view.js +317 -0
- package/lib/prod/owlly.esm.js +93462 -0
- package/lib/prod/owlly.esm.js.map +1 -0
- package/lib/prod/owlly.esm.min.js +54 -0
- package/lib/prod/owlly.iife.js +93560 -0
- package/lib/prod/owlly.iife.js.map +1 -0
- package/lib/prod/owlly.iife.min.js +69 -0
- package/lib/prod/owlly.miniapp.js +73845 -0
- package/lib/prod/owlly.miniapp.js.map +1 -0
- package/lib/prod/owlly.miniapp.min.js +63 -0
- package/lib/prod/src/external/lines/line-geometry.d.ts +9 -0
- package/lib/prod/src/external/lines/line-material.d.ts +10 -0
- package/lib/prod/src/external/lines/line-segments-2.d.ts +7 -0
- package/lib/prod/src/external/lines/line-segments-geometry.d.ts +15 -0
- package/lib/prod/src/external/loaders/gltf-loader.d.ts +77 -0
- package/lib/prod/src/external/orbit-controls.d.ts +44 -0
- package/lib/prod/src/external/renderers/css-2d-renderer.d.ts +16 -0
- package/lib/prod/src/external/renderers/css-3d-renderer.d.ts +18 -0
- package/lib/prod/src/external/transform-controls.d.ts +106 -0
- package/lib/prod/src/external/util/buffer-geometry-utils.d.ts +45 -0
- package/lib/prod/src/owlly/controller/aerial-element-controller.d.ts +65 -0
- package/lib/prod/src/owlly/controller/basic-controller.d.ts +324 -0
- package/lib/prod/src/owlly/controller/camera-controller.d.ts +37 -0
- package/lib/prod/src/owlly/controller/controller.d.ts +61 -0
- package/lib/prod/src/owlly/controller/index.d.ts +2 -0
- package/lib/prod/src/owlly/controller/mouse-indicator-controller.d.ts +34 -0
- package/lib/prod/src/owlly/controller/orbit-control.d.ts +147 -0
- package/lib/prod/src/owlly/controller/panorama-adjust-controller.d.ts +45 -0
- package/lib/prod/src/owlly/controller/panorama-controller.d.ts +441 -0
- package/lib/prod/src/owlly/controller/panorama-transform-controller.d.ts +66 -0
- package/lib/prod/src/owlly/controller/plane-controller.d.ts +43 -0
- package/lib/prod/src/owlly/controller/texture-controller.d.ts +183 -0
- package/lib/prod/src/owlly/controller/tile-panorama-controller.d.ts +308 -0
- package/lib/prod/src/owlly/controller/transform-controller.d.ts +106 -0
- package/lib/prod/src/owlly/element/bottom-nav-element.d.ts +65 -0
- package/lib/prod/src/owlly/element/camera.d.ts +82 -0
- package/lib/prod/src/owlly/element/dom-2d-element.d.ts +35 -0
- package/lib/prod/src/owlly/element/dom-3d-element.d.ts +27 -0
- package/lib/prod/src/owlly/element/dom-label-2d.d.ts +116 -0
- package/lib/prod/src/owlly/element/element.d.ts +53 -0
- package/lib/prod/src/owlly/element/floor-model.d.ts +83 -0
- package/lib/prod/src/owlly/element/gif-kit/Gif.d.ts +96 -0
- package/lib/prod/src/owlly/element/gif-kit/GifColor.d.ts +21 -0
- package/lib/prod/src/owlly/element/gif-kit/GifCompressedCodesToByteArrayConverter.d.ts +20 -0
- package/lib/prod/src/owlly/element/gif-kit/GifFrame.d.ts +31 -0
- package/lib/prod/src/owlly/element/gif-kit/GifImage.d.ts +23 -0
- package/lib/prod/src/owlly/element/gif-kit/GifParser.d.ts +17 -0
- package/lib/prod/src/owlly/element/gif-kit/GifPresenter.d.ts +20 -0
- package/lib/prod/src/owlly/element/gif-kit/GifVersion.d.ts +10 -0
- package/lib/prod/src/owlly/element/gltf-mesh-element.d.ts +31 -0
- package/lib/prod/src/owlly/element/index.d.ts +6 -0
- package/lib/prod/src/owlly/element/map-kit/area.d.ts +24 -0
- package/lib/prod/src/owlly/element/map-kit/block-set.d.ts +39 -0
- package/lib/prod/src/owlly/element/map-kit/block.d.ts +77 -0
- package/lib/prod/src/owlly/element/map-kit/index.d.ts +3 -0
- package/lib/prod/src/owlly/element/map-kit/shape.d.ts +131 -0
- package/lib/prod/src/owlly/element/mesh-element.d.ts +22 -0
- package/lib/prod/src/owlly/element/mesh-line-2d.d.ts +82 -0
- package/lib/prod/src/owlly/element/meshline-o.d.ts +64 -0
- package/lib/prod/src/owlly/element/panorama-group.d.ts +241 -0
- package/lib/prod/src/owlly/element/panorama.d.ts +132 -0
- package/lib/prod/src/owlly/element/path-group.d.ts +69 -0
- package/lib/prod/src/owlly/element/path.d.ts +99 -0
- package/lib/prod/src/owlly/element/placeable-2d.d.ts +158 -0
- package/lib/prod/src/owlly/element/polygon-mesh.d.ts +107 -0
- package/lib/prod/src/owlly/element/ring-element.d.ts +79 -0
- package/lib/prod/src/owlly/element/sphere-mesh.d.ts +28 -0
- package/lib/prod/src/owlly/element/svg-floor-model.d.ts +22 -0
- package/lib/prod/src/owlly/element/svg-floors.d.ts +27 -0
- package/lib/prod/src/owlly/element/tile-panorama-group.d.ts +335 -0
- package/lib/prod/src/owlly/element/tile-panorama.d.ts +162 -0
- package/lib/prod/src/owlly/element/tile-plane.d.ts +114 -0
- package/lib/prod/src/owlly/element/video-element.d.ts +33 -0
- package/lib/prod/src/owlly/geometries/ExtrudeGeometry2.d.ts +15 -0
- package/lib/prod/src/owlly/index.d.ts +13 -0
- package/lib/prod/src/owlly/overlay/canvas-overlay.d.ts +96 -0
- package/lib/prod/src/owlly/overlay/css-2d-overlay.d.ts +14 -0
- package/lib/prod/src/owlly/overlay/css-3d-overlay.d.ts +16 -0
- package/lib/prod/src/owlly/overlay/index.d.ts +5 -0
- package/lib/prod/src/owlly/overlay/label-overlay.d.ts +62 -0
- package/lib/prod/src/owlly/overlay/overlay.d.ts +14 -0
- package/lib/prod/src/owlly/overlay/path-overlay.d.ts +39 -0
- package/lib/prod/src/owlly/overlay/path-overlay2.d.ts +35 -0
- package/lib/prod/src/owlly/overlay/poi-overlay-3d.d.ts +278 -0
- package/lib/prod/src/owlly/overlay/poi-overlay.d.ts +277 -0
- package/lib/prod/src/owlly/owlly-2d/index.d.ts +28 -0
- package/lib/prod/src/owlly/screen/index.d.ts +1 -0
- package/lib/prod/src/owlly/screen/screen.d.ts +73 -0
- package/lib/prod/src/owlly/stage/__test__/stage.spec.d.ts +1 -0
- package/lib/prod/src/owlly/stage/externals.d.ts +19 -0
- package/lib/prod/src/owlly/stage/index.d.ts +3 -0
- package/lib/prod/src/owlly/stage/owlly.d.ts +38 -0
- package/lib/prod/src/owlly/stage/stage.d.ts +108 -0
- package/lib/prod/src/owlly/utils/alignment-utils.d.ts +20 -0
- package/lib/prod/src/owlly/utils/basic-calc.d.ts +18 -0
- package/lib/prod/src/owlly/utils/basic-tools.d.ts +71 -0
- package/lib/prod/src/owlly/utils/bvh-tree.d.ts +105 -0
- package/lib/prod/src/owlly/utils/camera.d.ts +37 -0
- package/lib/prod/src/owlly/utils/cube-texture-cache.d.ts +25 -0
- package/lib/prod/src/owlly/utils/device-utils.d.ts +18 -0
- package/lib/prod/src/owlly/utils/environment-utils.d.ts +37 -0
- package/lib/prod/src/owlly/utils/event-hub.d.ts +50 -0
- package/lib/prod/src/owlly/utils/events.d.ts +219 -0
- package/lib/prod/src/owlly/utils/geometry-utils.d.ts +119 -0
- package/lib/prod/src/owlly/utils/helper.d.ts +6 -0
- package/lib/prod/src/owlly/utils/index.d.ts +13 -0
- package/lib/prod/src/owlly/utils/lru-cache.d.ts +26 -0
- package/lib/prod/src/owlly/utils/map-utils.d.ts +7 -0
- package/lib/prod/src/owlly/utils/number-utils.d.ts +8 -0
- package/lib/prod/src/owlly/utils/panorama-model-util.d.ts +46 -0
- package/lib/prod/src/owlly/utils/path-utils.d.ts +80 -0
- package/lib/prod/src/owlly/utils/svgutils.d.ts +138 -0
- package/lib/prod/src/owlly/utils/texture-cache.d.ts +29 -0
- package/lib/prod/src/owlly/utils/tile-util.d.ts +187 -0
- package/lib/prod/src/owlly/utils/time-profiler.d.ts +21 -0
- package/lib/prod/src/owlly/view/__test__/perspective-view.spec.d.ts +0 -0
- package/lib/prod/src/owlly/view/camera-view.d.ts +35 -0
- package/lib/prod/src/owlly/view/index.d.ts +3 -0
- package/lib/prod/src/owlly/view/orthographic-view.d.ts +40 -0
- package/lib/prod/src/owlly/view/perspective-view.d.ts +40 -0
- package/lib/prod/src/owlly/view/svg-map-view.d.ts +46 -0
- package/lib/prod/src/owlly/view/view.d.ts +146 -0
- package/lib/src/owlly/controller/texture-controller.d.ts +3 -1
- package/lib/src/owlly/controller/texture-controller.js +16 -1
- package/lib/src/owlly/controller/texture-controller.js.map +1 -1
- package/lib/src/owlly/controller/tile-panorama-controller.js +4 -0
- package/lib/src/owlly/controller/tile-panorama-controller.js.map +1 -1
- package/lib/src/owlly/element/tile-panorama.d.ts +1 -0
- package/lib/src/owlly/element/tile-panorama.js +16 -3
- package/lib/src/owlly/element/tile-panorama.js.map +1 -1
- package/lib/src/owlly/element/tile-plane.d.ts +9 -0
- package/lib/src/owlly/element/tile-plane.js +27 -0
- package/lib/src/owlly/element/tile-plane.js.map +1 -1
- package/lib/src/owlly/overlay/poi-overlay-3d.js.map +1 -1
- package/lib/src/owlly/overlay/poi-overlay.js.map +1 -1
- package/lib/src/owlly/stage/owlly.js +7 -1
- package/lib/src/owlly/stage/owlly.js.map +1 -1
- package/lib/src/owlly/stage/stage.js +2 -0
- package/lib/src/owlly/stage/stage.js.map +1 -1
- package/lib/src/web/main.rpeng.mes.plane.js.map +1 -1
- package/package.json +16 -7
- package/src/owlly/controller/texture-controller.ts +18 -1
- package/src/owlly/controller/tile-panorama-controller.ts +3 -1
- package/src/owlly/element/tile-panorama.ts +14 -0
- package/src/owlly/element/tile-plane.ts +26 -0
- package/src/owlly/overlay/poi-overlay-3d.ts +0 -4
- package/src/owlly/overlay/poi-overlay.ts +0 -4
- package/src/owlly/stage/owlly.ts +6 -1
- package/src/owlly/stage/stage.ts +2 -0
- package/src/web/main.rpeng.mes.plane.ts +0 -6
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Externals } from '../stage/externals';
|
|
11
|
+
import { LruCache } from './lru-cache';
|
|
12
|
+
import { TextureCache } from './texture-cache';
|
|
13
|
+
class CubeTextureCache {
|
|
14
|
+
constructor(capacity) {
|
|
15
|
+
this.cubeTextureCache = new LruCache(capacity);
|
|
16
|
+
this.workingTasks = new Map();
|
|
17
|
+
}
|
|
18
|
+
static disposeAll() {
|
|
19
|
+
this.sharedInstance.dispose();
|
|
20
|
+
}
|
|
21
|
+
dispose() {
|
|
22
|
+
this.cubeTextureCache.clear((key, value) => {
|
|
23
|
+
value.dispose();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @ignore
|
|
28
|
+
* 获取立方体贴图,先从缓存中获取,若未命中则异步加载立方体贴图
|
|
29
|
+
* @param cubeTextureURLs 立方体贴图六个面的图像URL数组
|
|
30
|
+
*/
|
|
31
|
+
// public async loadCubeTexture(cubeTextureURLs: string[], cacheAnyway: boolean|undefined = true): Promise<CubeTexture> {
|
|
32
|
+
// const cubeTexture = this.cubeTextureCache.get(cubeTextureURLs[0]);
|
|
33
|
+
// if (cubeTexture) {
|
|
34
|
+
// // console.log(`#PanoCtrl# Use cached CubeTexture:${cubeTextureURLs[0]}`);
|
|
35
|
+
// return cubeTexture;
|
|
36
|
+
// }
|
|
37
|
+
// let workingTask = this.workingTasks.get(cubeTextureURLs[0]);
|
|
38
|
+
// if (!workingTask) {
|
|
39
|
+
// workingTask = new Promise((resolve, reject) => {
|
|
40
|
+
// // console.log(`#PanoCtrl# Will load CubeTexture:${cubeTextureURLs[0]}`);
|
|
41
|
+
// new CubeTextureLoader().load(cubeTextureURLs,
|
|
42
|
+
// (texture) => {
|
|
43
|
+
// // console.log(`#PanoCtrl# CubeTexture loaded for key '${cubeTextureURLs[0]}'`);
|
|
44
|
+
// // console.log(`#PanoCtrl# cacheAnyway=${cacheAnyway}`);
|
|
45
|
+
// this.cubeTextureCache.put(cubeTextureURLs[0], texture, (k: string, v: CubeTexture) => {
|
|
46
|
+
// // 销毁立方体贴图资源
|
|
47
|
+
// // console.log(`#PanoCtrl# By evicting cubeTexture with key '${k}', dispose it`);
|
|
48
|
+
// v.dispose();
|
|
49
|
+
// }, !cacheAnyway);
|
|
50
|
+
// this.workingTasks.delete(cubeTextureURLs[0]);
|
|
51
|
+
// resolve(texture);
|
|
52
|
+
// },
|
|
53
|
+
// () => {},
|
|
54
|
+
// (event: ErrorEvent) => {
|
|
55
|
+
// // console.log(`#PanoCtrl# Error with key '${cubeTextureURLs[0]}', event=${event}`);
|
|
56
|
+
// this.workingTasks.delete(cubeTextureURLs[0]);
|
|
57
|
+
// reject(event);
|
|
58
|
+
// });
|
|
59
|
+
// });
|
|
60
|
+
// this.workingTasks.set(cubeTextureURLs[0], workingTask);
|
|
61
|
+
// }
|
|
62
|
+
// return workingTask;
|
|
63
|
+
// }
|
|
64
|
+
loadCubeTexture(cubeTextureURLs, cacheAnyway, recycleIntermediateTextures) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const cubeTexture = this.cubeTextureCache.get(cubeTextureURLs[0]);
|
|
67
|
+
if (cubeTexture) {
|
|
68
|
+
// console.log(`#PanoCtrl# Use cached CubeTexture:${cubeTextureURLs[0]}`);
|
|
69
|
+
return cubeTexture;
|
|
70
|
+
}
|
|
71
|
+
const { THREE } = Externals.getInstance();
|
|
72
|
+
let workingTask = this.workingTasks.get(cubeTextureURLs[0]);
|
|
73
|
+
if (!workingTask) {
|
|
74
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
75
|
+
workingTask = new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
// console.log(`#TextureLeak# CubeTextureCache.loadCubeTexture Before preloadTextures: LD.totalCost=${TextureCache.ldFaceTexturesCache.getTotalCost()}`);
|
|
77
|
+
const faceTextures = yield TextureCache.ldFaceTexturesCache.preloadTextures(cubeTextureURLs, cubeTextureURLs.length);
|
|
78
|
+
// console.log(`#TextureLeak# CubeTextureCache.loadCubeTexture After preloadTextures: LD.totalCost=${TextureCache.ldFaceTexturesCache.getTotalCost()}`);
|
|
79
|
+
const images = faceTextures.map((tex) => tex.image);
|
|
80
|
+
const texture = new THREE.CubeTexture(images);
|
|
81
|
+
texture.needsUpdate = true;
|
|
82
|
+
// console.log(`#TextureLeak# CubeTextureCache.loadCubeTexture Before recycling textures: LD.totalCost=${TextureCache.ldFaceTexturesCache.getTotalCost()}`);
|
|
83
|
+
// let recycledCount = 0;
|
|
84
|
+
if (recycleIntermediateTextures === true) {
|
|
85
|
+
cubeTextureURLs.forEach((key) => {
|
|
86
|
+
TextureCache.ldFaceTexturesCache.recycleTexture(key);
|
|
87
|
+
// if (TextureCache.ldFaceTexturesCache.recycleTexture(key)) { // /#TextureLeak#
|
|
88
|
+
// recycledCount += 1;
|
|
89
|
+
// }
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// console.log(`#TextureLeak# CubeTextureCache.loadCubeTexture After recycling ${recycledCount} textures: LD.totalCost=${TextureCache.ldFaceTexturesCache.getTotalCost()}`);
|
|
93
|
+
// console.log(`#PanoCtrl# cacheAnyway=${cacheAnyway}`);
|
|
94
|
+
this.cubeTextureCache.put(cubeTextureURLs[0], texture, (k, v) => {
|
|
95
|
+
// 销毁立方体贴图资源
|
|
96
|
+
// console.log(`#PanoCtrl# By evicting cubeTexture with key '${k}', dispose it`);
|
|
97
|
+
v.dispose();
|
|
98
|
+
}, !cacheAnyway);
|
|
99
|
+
this.workingTasks.delete(cubeTextureURLs[0]);
|
|
100
|
+
resolve(texture);
|
|
101
|
+
}));
|
|
102
|
+
this.workingTasks.set(cubeTextureURLs[0], workingTask);
|
|
103
|
+
}
|
|
104
|
+
return workingTask;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 获取一组立方体贴图,若没命中则异步加载
|
|
109
|
+
* @param textureURLsArray 需要获取的立方体贴图URL数组,其每个元素是一个6元素的数组,表示一个立方体贴图的六个面
|
|
110
|
+
* @param waitForReadyCount 指定函数必须在textureURLsArray中的前多少个立方体贴图获取到以后才能返回
|
|
111
|
+
* 比如在即将显示一个全景点时,指定必须等指定全景点的立方体贴图获取到后才能返回,而其周围全景点可以同时预加载但不用等
|
|
112
|
+
*/
|
|
113
|
+
preloadCubeTextures(textureURLsArray, waitForReadyCount, recycleIntermediateTextures) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const waitCount = waitForReadyCount > textureURLsArray.length ? textureURLsArray.length : waitForReadyCount;
|
|
116
|
+
const promises = textureURLsArray.map((textureURLs, index) => {
|
|
117
|
+
if (textureURLs) {
|
|
118
|
+
if (recycleIntermediateTextures) {
|
|
119
|
+
return this.loadCubeTexture(textureURLs, index < waitCount, recycleIntermediateTextures[index]);
|
|
120
|
+
}
|
|
121
|
+
return this.loadCubeTexture(textureURLs, index < waitCount);
|
|
122
|
+
}
|
|
123
|
+
return undefined;
|
|
124
|
+
});
|
|
125
|
+
const mustPromises = [];
|
|
126
|
+
for (let i = 0; i < waitCount; i += 1) {
|
|
127
|
+
const promise = promises[i];
|
|
128
|
+
if (promise) {
|
|
129
|
+
mustPromises.push(promise);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return Promise.all(mustPromises);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
recycleCubeTexture(cubeTextureURLs) {
|
|
136
|
+
this.cubeTextureCache.recycle(cubeTextureURLs[0], (key, value) => {
|
|
137
|
+
value.dispose();
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
getCapacity() { return this.cubeTextureCache.getCapacity(); }
|
|
141
|
+
}
|
|
142
|
+
CubeTextureCache.sharedInstance = new CubeTextureCache(3);
|
|
143
|
+
export { CubeTextureCache };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设备信息工具类
|
|
3
|
+
*/
|
|
4
|
+
declare class DeviceUtils {
|
|
5
|
+
static GetVersion(match: RegExp, token: string): {
|
|
6
|
+
major: number;
|
|
7
|
+
minor: number;
|
|
8
|
+
patch: number;
|
|
9
|
+
};
|
|
10
|
+
static DetectWeChat(): boolean;
|
|
11
|
+
static DetectIOS(): boolean;
|
|
12
|
+
static DetectIPad(): boolean;
|
|
13
|
+
static DetectIPod(): boolean;
|
|
14
|
+
static DetectIPhone(): boolean;
|
|
15
|
+
static DetectAndroid(): boolean;
|
|
16
|
+
static DetectAndroidMobile(): boolean;
|
|
17
|
+
}
|
|
18
|
+
export { DeviceUtils };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设备信息工具类
|
|
3
|
+
*/
|
|
4
|
+
class DeviceUtils {
|
|
5
|
+
static GetVersion(match, token) {
|
|
6
|
+
let matches = window.navigator.userAgent.match(match);
|
|
7
|
+
matches = matches ? matches[1].split(token) : [];
|
|
8
|
+
return {
|
|
9
|
+
major: parseInt(matches[0], 10) || 0,
|
|
10
|
+
minor: parseInt(matches[1], 10) || 0,
|
|
11
|
+
patch: parseInt(matches[2], 10) || 0,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
static DetectWeChat() {
|
|
15
|
+
const matches = window.navigator.userAgent.toLowerCase();
|
|
16
|
+
return !!matches && matches.toString() === 'micromessenger';
|
|
17
|
+
}
|
|
18
|
+
static DetectIOS() {
|
|
19
|
+
return this.DetectIPhone() || this.DetectIPad() || this.DetectIPod();
|
|
20
|
+
}
|
|
21
|
+
static DetectIPad() {
|
|
22
|
+
const { userAgent } = window.navigator;
|
|
23
|
+
return /iPad/.test(userAgent);
|
|
24
|
+
}
|
|
25
|
+
static DetectIPod() {
|
|
26
|
+
const { userAgent } = window.navigator;
|
|
27
|
+
return /iPod/.test(userAgent);
|
|
28
|
+
}
|
|
29
|
+
static DetectIPhone() {
|
|
30
|
+
const { userAgent } = window.navigator;
|
|
31
|
+
return /iPhone/.test(userAgent);
|
|
32
|
+
}
|
|
33
|
+
static DetectAndroid() {
|
|
34
|
+
return window.navigator.userAgent.indexOf('Android') !== -1;
|
|
35
|
+
}
|
|
36
|
+
static DetectAndroidMobile() {
|
|
37
|
+
const { userAgent } = window.navigator;
|
|
38
|
+
return this.DetectAndroid() && userAgent.indexOf('Mobile') !== -1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export { DeviceUtils };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 环境值
|
|
3
|
+
*/
|
|
4
|
+
declare enum Env {
|
|
5
|
+
/** 浏览器 */
|
|
6
|
+
Web = 0,
|
|
7
|
+
/** 小程序 */
|
|
8
|
+
Miniapp = 1
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 环境信息工具类
|
|
12
|
+
*/
|
|
13
|
+
declare class EnvironmentUtils {
|
|
14
|
+
private static ENV;
|
|
15
|
+
private static DPR;
|
|
16
|
+
/**
|
|
17
|
+
* 设置运行环境(浏览器或小程序)
|
|
18
|
+
* @param env 环境值
|
|
19
|
+
*/
|
|
20
|
+
static SetEnv(env: Env): void;
|
|
21
|
+
/**
|
|
22
|
+
* 获得运行环境
|
|
23
|
+
* @returns 环境值
|
|
24
|
+
*/
|
|
25
|
+
static GetEnv(): Env;
|
|
26
|
+
/**
|
|
27
|
+
* 设置全局 dpr
|
|
28
|
+
* @param dpr 设备像素密度倍数
|
|
29
|
+
*/
|
|
30
|
+
static SetGlobalDPR(dpr: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* 获取全局 dpr
|
|
33
|
+
* @returns 设备像素密度倍数
|
|
34
|
+
*/
|
|
35
|
+
static GetGlobalDPR(): number;
|
|
36
|
+
}
|
|
37
|
+
export { Env, EnvironmentUtils };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 环境值
|
|
3
|
+
*/
|
|
4
|
+
var Env;
|
|
5
|
+
(function (Env) {
|
|
6
|
+
/** 浏览器 */
|
|
7
|
+
Env[Env["Web"] = 0] = "Web";
|
|
8
|
+
/** 小程序 */
|
|
9
|
+
Env[Env["Miniapp"] = 1] = "Miniapp";
|
|
10
|
+
})(Env || (Env = {}));
|
|
11
|
+
/**
|
|
12
|
+
* 环境信息工具类
|
|
13
|
+
*/
|
|
14
|
+
class EnvironmentUtils {
|
|
15
|
+
/**
|
|
16
|
+
* 设置运行环境(浏览器或小程序)
|
|
17
|
+
* @param env 环境值
|
|
18
|
+
*/
|
|
19
|
+
static SetEnv(env) {
|
|
20
|
+
EnvironmentUtils.ENV = env;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 获得运行环境
|
|
24
|
+
* @returns 环境值
|
|
25
|
+
*/
|
|
26
|
+
static GetEnv() {
|
|
27
|
+
if (EnvironmentUtils.ENV === undefined) {
|
|
28
|
+
try {
|
|
29
|
+
if (wx) {
|
|
30
|
+
EnvironmentUtils.ENV = Env.Web; // 小程序环境判断有点问题,先写死
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
EnvironmentUtils.ENV = Env.Web;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
// do nothing
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
if (EnvironmentUtils.ENV === undefined) {
|
|
41
|
+
EnvironmentUtils.ENV = Env.Web;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return EnvironmentUtils.ENV;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 设置全局 dpr
|
|
49
|
+
* @param dpr 设备像素密度倍数
|
|
50
|
+
*/
|
|
51
|
+
static SetGlobalDPR(dpr) {
|
|
52
|
+
EnvironmentUtils.DPR = dpr;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 获取全局 dpr
|
|
56
|
+
* @returns 设备像素密度倍数
|
|
57
|
+
*/
|
|
58
|
+
static GetGlobalDPR() {
|
|
59
|
+
if (!EnvironmentUtils.DPR) {
|
|
60
|
+
let dpr;
|
|
61
|
+
if (EnvironmentUtils.GetEnv() === Env.Miniapp) {
|
|
62
|
+
const sys = wx.getSystemInfoSync();
|
|
63
|
+
dpr = sys.pixelRatio;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
dpr = window.devicePixelRatio;
|
|
67
|
+
}
|
|
68
|
+
EnvironmentUtils.DPR = dpr;
|
|
69
|
+
}
|
|
70
|
+
return EnvironmentUtils.DPR;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export { Env, EnvironmentUtils };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 事件管理器
|
|
3
|
+
*/
|
|
4
|
+
declare class EventHub {
|
|
5
|
+
private static hub;
|
|
6
|
+
private eventMap;
|
|
7
|
+
constructor();
|
|
8
|
+
private on;
|
|
9
|
+
private emit;
|
|
10
|
+
private off;
|
|
11
|
+
/**
|
|
12
|
+
* 注册事件监听
|
|
13
|
+
* @param event 事件名
|
|
14
|
+
* @param callback 回调函数
|
|
15
|
+
*/
|
|
16
|
+
static on(event: string, callback: Function): void;
|
|
17
|
+
/** @ignore */
|
|
18
|
+
static emit(event: string, ...args: unknown[]): void;
|
|
19
|
+
/**
|
|
20
|
+
* 注销事件监听
|
|
21
|
+
* @param event 事件名
|
|
22
|
+
* @param callback 回调函数
|
|
23
|
+
*/
|
|
24
|
+
static off(event: string, callback: Function): void;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated
|
|
27
|
+
* 注销事件监听, 请使用EventHub.off代替
|
|
28
|
+
* @param event 事件名
|
|
29
|
+
* @param callback 回调函数
|
|
30
|
+
*/
|
|
31
|
+
static remove(event: string, callback: Function): void;
|
|
32
|
+
}
|
|
33
|
+
declare class EventHubClassic {
|
|
34
|
+
protected eventMap: Map<string, Set<Function>>;
|
|
35
|
+
constructor();
|
|
36
|
+
/**
|
|
37
|
+
* 注册事件监听
|
|
38
|
+
* @param event 事件名
|
|
39
|
+
* @param callback 回调函数
|
|
40
|
+
*/
|
|
41
|
+
on(event: string, callback: Function): void;
|
|
42
|
+
protected emit(event: string, ...args: unknown[]): void;
|
|
43
|
+
/**
|
|
44
|
+
* 注销事件监听
|
|
45
|
+
* @param event 事件名
|
|
46
|
+
* @param callback 回调函数
|
|
47
|
+
*/
|
|
48
|
+
off(event: string, callback: Function): void;
|
|
49
|
+
}
|
|
50
|
+
export { EventHub, EventHubClassic };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 事件管理器
|
|
3
|
+
*/
|
|
4
|
+
class EventHub {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.eventMap = new Map();
|
|
7
|
+
}
|
|
8
|
+
on(event, callback) {
|
|
9
|
+
if (!this.eventMap.has(event))
|
|
10
|
+
this.eventMap.set(event, new Set());
|
|
11
|
+
const callbacks = this.eventMap.get(event);
|
|
12
|
+
if (callbacks) {
|
|
13
|
+
callbacks.add(callback);
|
|
14
|
+
this.eventMap.set(event, callbacks);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
emit(event, ...args) {
|
|
18
|
+
const callbacks = this.eventMap.get(event);
|
|
19
|
+
if (callbacks) {
|
|
20
|
+
callbacks.forEach((callback) => { callback(...args); });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
off(event, callback) {
|
|
24
|
+
const callbacks = this.eventMap.get(event);
|
|
25
|
+
if (!callbacks)
|
|
26
|
+
return;
|
|
27
|
+
callbacks.delete(callback);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 注册事件监听
|
|
31
|
+
* @param event 事件名
|
|
32
|
+
* @param callback 回调函数
|
|
33
|
+
*/
|
|
34
|
+
static on(event, callback) {
|
|
35
|
+
if (!EventHub.hub) {
|
|
36
|
+
EventHub.hub = new EventHub();
|
|
37
|
+
}
|
|
38
|
+
EventHub.hub.on(event, callback);
|
|
39
|
+
}
|
|
40
|
+
/** @ignore */
|
|
41
|
+
static emit(event, ...args) {
|
|
42
|
+
if (!EventHub.hub) {
|
|
43
|
+
EventHub.hub = new EventHub();
|
|
44
|
+
}
|
|
45
|
+
EventHub.hub.emit(event, ...args);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 注销事件监听
|
|
49
|
+
* @param event 事件名
|
|
50
|
+
* @param callback 回调函数
|
|
51
|
+
*/
|
|
52
|
+
static off(event, callback) {
|
|
53
|
+
if (!EventHub.hub) {
|
|
54
|
+
EventHub.hub = new EventHub();
|
|
55
|
+
}
|
|
56
|
+
EventHub.hub.off(event, callback);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
* 注销事件监听, 请使用EventHub.off代替
|
|
61
|
+
* @param event 事件名
|
|
62
|
+
* @param callback 回调函数
|
|
63
|
+
*/
|
|
64
|
+
static remove(event, callback) {
|
|
65
|
+
console.warn('EventHub.remove() will be removed in future releases. Use EventHub.off() instead.'); // eslint-disable-line
|
|
66
|
+
EventHub.off(event, callback);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
class EventHubClassic {
|
|
70
|
+
constructor() {
|
|
71
|
+
this.eventMap = new Map();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* 注册事件监听
|
|
75
|
+
* @param event 事件名
|
|
76
|
+
* @param callback 回调函数
|
|
77
|
+
*/
|
|
78
|
+
on(event, callback) {
|
|
79
|
+
if (!this.eventMap.has(event))
|
|
80
|
+
this.eventMap.set(event, new Set());
|
|
81
|
+
const callbacks = this.eventMap.get(event);
|
|
82
|
+
if (callbacks) {
|
|
83
|
+
callbacks.add(callback);
|
|
84
|
+
this.eventMap.set(event, callbacks);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
emit(event, ...args) {
|
|
88
|
+
const callbacks = this.eventMap.get(event);
|
|
89
|
+
if (callbacks) {
|
|
90
|
+
callbacks.forEach((callback) => { callback(...args); });
|
|
91
|
+
}
|
|
92
|
+
EventHub.emit(event, ...args);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 注销事件监听
|
|
96
|
+
* @param event 事件名
|
|
97
|
+
* @param callback 回调函数
|
|
98
|
+
*/
|
|
99
|
+
off(event, callback) {
|
|
100
|
+
const callbacks = this.eventMap.get(event);
|
|
101
|
+
if (!callbacks)
|
|
102
|
+
return;
|
|
103
|
+
callbacks.delete(callback);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export { EventHub, EventHubClassic };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
declare class Events {
|
|
2
|
+
/**
|
|
3
|
+
* @event element-selected 元素选中事件, 由 TransformController 抛出
|
|
4
|
+
* @eventParam element 被选中的元素对象
|
|
5
|
+
* @eventParam intersection 碰撞信息
|
|
6
|
+
* @eventParam button 鼠标按键
|
|
7
|
+
*/
|
|
8
|
+
static ELEMENT_SELECTED: string;
|
|
9
|
+
/**
|
|
10
|
+
* @event element-position-updated 元素位置更新, 由 TransformController 抛出
|
|
11
|
+
* @eventParam position 元素的位置
|
|
12
|
+
* @eventParam element 元素对象
|
|
13
|
+
* @eventParam uuid 若元素为相机, 相机的UUID, 否则为空
|
|
14
|
+
*/
|
|
15
|
+
static ELEMENT_POSITION_UPDATED: string;
|
|
16
|
+
/**
|
|
17
|
+
* @event element-pose-updated 元素姿态更新, 由 TransformController 抛出
|
|
18
|
+
* @eventParam quaternion 元素的姿态四元数(x, y, z, w)
|
|
19
|
+
* @eventParam element 元素对象
|
|
20
|
+
* @eventParam uuid 若元素为相机, 相机的UUID, 否则为空
|
|
21
|
+
*/
|
|
22
|
+
static ELEMENT_POSE_UPDATED: string;
|
|
23
|
+
/**
|
|
24
|
+
* @event camera-changed 相机位移/朝向发生变化, 由 PanoramaController 抛出
|
|
25
|
+
* @eventParam position 相机位置
|
|
26
|
+
* @eventParam quaternion 相机的姿态四元数(x, y, z, w)
|
|
27
|
+
* @eventParam controller 产生事件的controller
|
|
28
|
+
*/
|
|
29
|
+
static CAMERA_CHANGED: string;
|
|
30
|
+
/**
|
|
31
|
+
* @event camera-zoom 相机位移/朝向发生变化, 由 PanoramaController 抛出
|
|
32
|
+
* @eventParam typeMode 缩放模式
|
|
33
|
+
* @eventParam value 缩放值
|
|
34
|
+
* @eventParam controller 产生事件的controller
|
|
35
|
+
*/
|
|
36
|
+
static CAMERA_ZOOM: string;
|
|
37
|
+
/**
|
|
38
|
+
* @event panorama-camera-changed 全景图相机位移/朝向发生变化, 由 PanoramaController 抛出
|
|
39
|
+
* @eventParam position 相机位置
|
|
40
|
+
* @eventParam quaternion 相机的姿态四元数(x, y, z, w)
|
|
41
|
+
* @eventParam controller 产生事件的controller
|
|
42
|
+
*/
|
|
43
|
+
static PANORAMA_CAMERA_CHANGED: string;
|
|
44
|
+
/**
|
|
45
|
+
* @event orbit-camera-changed ORBIT相机位移/朝向发生变化, 由 OrbitControl 抛出
|
|
46
|
+
* @eventParam position 相机位置
|
|
47
|
+
* @eventParam quaternion 相机的姿态四元数(x, y, z, w)
|
|
48
|
+
* @eventParam controller 产生事件的controller
|
|
49
|
+
*/
|
|
50
|
+
static ORBIT_CAMERA_CHANGED: string;
|
|
51
|
+
/**
|
|
52
|
+
* @event panorama-presented 全景图被显示出来, 由 PanoramaGroup、TilePanoramaGroup 抛出
|
|
53
|
+
* @eventParam pid 全景点ID
|
|
54
|
+
*/
|
|
55
|
+
static PANORAMA_PRESENTED: string;
|
|
56
|
+
/**
|
|
57
|
+
* @event panorama-selected 全景图被选中, 由 PanoramaGroup、TilePanoramaGroup 抛出
|
|
58
|
+
* @eventParam pid 全景点ID
|
|
59
|
+
*/
|
|
60
|
+
static PANORAMA_SELECTED: string;
|
|
61
|
+
/**
|
|
62
|
+
* @event panorama-hover 全景目标点hover, 由 PanoramaGroup、TilePanoramaGroup 抛出
|
|
63
|
+
* @eventParam pid 全景点ID
|
|
64
|
+
* @eventParam indicatorPosition 点位位置
|
|
65
|
+
*/
|
|
66
|
+
static PANORAMA_HOVER: string;
|
|
67
|
+
/**
|
|
68
|
+
* @event element-loaded Element读取完成, 由 FloorModel、BlockSet 抛出
|
|
69
|
+
* @eventParam element{Element} 读取完成的Element
|
|
70
|
+
*/
|
|
71
|
+
static ELEMENT_LOADED: string;
|
|
72
|
+
/**
|
|
73
|
+
* @event element-loaded-error Element读取错误
|
|
74
|
+
* @eventParam element{Element} 读取错误的Element
|
|
75
|
+
*/
|
|
76
|
+
static ELEMENT_LOADED_ERROR: string;
|
|
77
|
+
/**
|
|
78
|
+
* @event click-panorama 点击到全景图
|
|
79
|
+
* @eventParam pid 全景点ID
|
|
80
|
+
*/
|
|
81
|
+
static CLICK_PANORAMA: string;
|
|
82
|
+
/**
|
|
83
|
+
* @event move-to-panorama 漫游到全景图, 由 PanoramaController、TilePanoramaController 抛出
|
|
84
|
+
* @eventParam pid 全景点ID
|
|
85
|
+
*/
|
|
86
|
+
static MOVE_TO_PANORAMA: string;
|
|
87
|
+
/**
|
|
88
|
+
* @event will-move-to-panorama 漫游到全景图, 由 PanoramaController、TilePanoramaController 抛出
|
|
89
|
+
* @eventParam pid 全景点ID
|
|
90
|
+
*/
|
|
91
|
+
static WILL_MOVE_TO_PANORAMA: string;
|
|
92
|
+
/**
|
|
93
|
+
* @event path-movement-start 走完一条路径, 由 PanoramaController、TilePanoramaController 抛出
|
|
94
|
+
* @eventParam PIDs []number 路径的全景点ID数组
|
|
95
|
+
*/
|
|
96
|
+
static PATH_MOVEMENT_START: string;
|
|
97
|
+
/**
|
|
98
|
+
* @event path-movement-completed 走完一条路径, 由 PanoramaController、TilePanoramaController 抛出
|
|
99
|
+
* @eventParam PIDs []number 路径的全景点ID数组
|
|
100
|
+
*/
|
|
101
|
+
static PATH_MOVEMENT_COMPLETED: string;
|
|
102
|
+
/**
|
|
103
|
+
* @event will-load-panorama 即将加载全景图资源, 由 Panorama、TilePanoramaController 抛出
|
|
104
|
+
* @eventParam pid 全景点ID
|
|
105
|
+
*/
|
|
106
|
+
static WILL_LOAD_PANORAMA: string;
|
|
107
|
+
/**
|
|
108
|
+
* @event did-load-panorama 完成加载全景图资源, 由 Panorama、TilePanorama、TilePanoramaController 抛出
|
|
109
|
+
* @eventParam pid 全景点ID
|
|
110
|
+
*/
|
|
111
|
+
static DID_LOAD_PANORAMA: string;
|
|
112
|
+
/**
|
|
113
|
+
* @event transform-activated 开始移动元素, 由 TransformController 抛出
|
|
114
|
+
*/
|
|
115
|
+
static TRANSFORM_ACTIVATED: string;
|
|
116
|
+
/**
|
|
117
|
+
* @event transform-deactivated 结束移动元素, 由 TransformController 抛出
|
|
118
|
+
*/
|
|
119
|
+
static TRANSFORM_DEACTIVATED: string;
|
|
120
|
+
/**
|
|
121
|
+
* @event fps-updated 计算得到当前帧率, 暂无
|
|
122
|
+
*/
|
|
123
|
+
static FPS_UPDATED: string;
|
|
124
|
+
/**
|
|
125
|
+
* @event get-plane-intersect 元素姿态更新, 由 PlaneController 抛出
|
|
126
|
+
* @eventParam event touch事件 event
|
|
127
|
+
* @eventParam position 与平面相交的点(x, y, z)
|
|
128
|
+
*/
|
|
129
|
+
static GET_PLANE_INTERSECT: string;
|
|
130
|
+
/**
|
|
131
|
+
* @event poi-clicked poi点击事件, 由 PoiOverlay 抛出
|
|
132
|
+
* @eventParam poi 点击的poi对象
|
|
133
|
+
*/
|
|
134
|
+
static POI_CLICKED: string;
|
|
135
|
+
/**
|
|
136
|
+
* @event poi-down poi鼠标按下, 由 PoiOverlay 抛出
|
|
137
|
+
* @eventParam poi 点击的poi对象
|
|
138
|
+
*/
|
|
139
|
+
static POI_DOWN: string;
|
|
140
|
+
/**
|
|
141
|
+
* @event poi-up poi鼠标抬起, 由 PoiOverlay 抛出
|
|
142
|
+
* @eventParam poi 点击的poi对象
|
|
143
|
+
*/
|
|
144
|
+
static POI_UP: string;
|
|
145
|
+
/**
|
|
146
|
+
* @event canvas-vertex-clicked canvas-vertex点击事件, 由 CanvasOverlay 抛出
|
|
147
|
+
* @eventParam canvas-vertex 点击的canvas-vertex对象
|
|
148
|
+
*/
|
|
149
|
+
static CANVAS_VERTEX_CLICKED: string;
|
|
150
|
+
/**
|
|
151
|
+
* @event canvas-vertex-down canvas-vertex鼠标按下, 由 CanvasOverlay 抛出
|
|
152
|
+
* @eventParam canvas-vertex 点击的canvas-vertex对象
|
|
153
|
+
*/
|
|
154
|
+
static CANVAS_VERTEX_DOWN: string;
|
|
155
|
+
/**
|
|
156
|
+
* @event canvas-vertex-up canvas-vertex鼠标抬起, 由 CanvasOverlay 抛出
|
|
157
|
+
* @eventParam canvas-vertex 点击的canvas-vertex对象
|
|
158
|
+
*/
|
|
159
|
+
static CANVAS_VERTEX_UP: string;
|
|
160
|
+
/**
|
|
161
|
+
* @event label-icons-position-updated LabelOverlay - Icon位置更新, 由 LabelOverlay 抛出
|
|
162
|
+
* @eventParam elements Icon元素数组
|
|
163
|
+
*/
|
|
164
|
+
static LABEL_ICONS_POSITION_UPDATED: string;
|
|
165
|
+
/**
|
|
166
|
+
* @event label-down 标签鼠标按下, 由 DomLabel2D 抛出
|
|
167
|
+
* @eventParam label 点击的label
|
|
168
|
+
*/
|
|
169
|
+
static LABEL_DOWN: string;
|
|
170
|
+
/**
|
|
171
|
+
* @event tick 帧渲染, 由 EventHub 抛出
|
|
172
|
+
*/
|
|
173
|
+
static TICK: string;
|
|
174
|
+
/**
|
|
175
|
+
* @event view-rendered 视图渲染完毕, 暂无
|
|
176
|
+
* @eventParam view 对应的视图
|
|
177
|
+
*/
|
|
178
|
+
static VIEW_RENDERED: string;
|
|
179
|
+
}
|
|
180
|
+
/** @ignore */
|
|
181
|
+
declare class OwllyEvents {
|
|
182
|
+
/**
|
|
183
|
+
* @event o/element-selected 元素被选中
|
|
184
|
+
* @eventParam element 被选中的元素
|
|
185
|
+
*/
|
|
186
|
+
static ELEMENT_SELECTED: string;
|
|
187
|
+
/**
|
|
188
|
+
* @event o/rendering-view-changed 当前渲染目标View改变
|
|
189
|
+
* @eventParam view 正在渲染的View
|
|
190
|
+
*/
|
|
191
|
+
static RENDERING_VIEW_CHANGED: string;
|
|
192
|
+
/**
|
|
193
|
+
* @event o/dispose-element 有Element销毁时发生
|
|
194
|
+
* @eventParam element{Element|Element[]} 销毁的Element
|
|
195
|
+
*/
|
|
196
|
+
static DISPOSE_ELEMENT: string;
|
|
197
|
+
/**
|
|
198
|
+
* @event o/element-loaded Element读取完成
|
|
199
|
+
* @eventParam element{Element} 读取完成的Element
|
|
200
|
+
*/
|
|
201
|
+
static ELEMENT_LOADED: string;
|
|
202
|
+
/**
|
|
203
|
+
* @event element-position-updated 元素位置更新
|
|
204
|
+
* @eventParam position 元素的位置
|
|
205
|
+
* @eventParam element 元素对象
|
|
206
|
+
* @eventParam view 变动位置所在View
|
|
207
|
+
*/
|
|
208
|
+
static ELEMENT_POSITION_UPDATED: string;
|
|
209
|
+
static MOUSE_DOWN: string;
|
|
210
|
+
static MOUSE_UP: string;
|
|
211
|
+
static MOUSE_MOVE: string;
|
|
212
|
+
static MOUSE_WHEEL: string;
|
|
213
|
+
static TOUCH_START: string;
|
|
214
|
+
static TOUCH_MOVE: string;
|
|
215
|
+
static TOUCH_END: string;
|
|
216
|
+
static CONTEXT_MENU: string;
|
|
217
|
+
static DBLCLICK: string;
|
|
218
|
+
}
|
|
219
|
+
export { Events, OwllyEvents };
|