@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.
- 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,264 @@
|
|
|
1
|
+
import { Externals } from '../stage/externals';
|
|
2
|
+
import { OrbitControls } from '../../external/orbit-controls';
|
|
3
|
+
import { Events } from '../utils/events';
|
|
4
|
+
import { Controller } from './controller';
|
|
5
|
+
/**
|
|
6
|
+
* 使用Three.js OrbitControls实现的场景控制器
|
|
7
|
+
*/
|
|
8
|
+
class OrbitControl extends Controller {
|
|
9
|
+
/**
|
|
10
|
+
* @param view 需要绑定的View
|
|
11
|
+
*/
|
|
12
|
+
constructor(view) {
|
|
13
|
+
super();
|
|
14
|
+
const { THREE } = Externals.getInstance();
|
|
15
|
+
if (view)
|
|
16
|
+
this.bindView(view);
|
|
17
|
+
this.enabled = true;
|
|
18
|
+
this.prevPosition = new THREE.Vector3();
|
|
19
|
+
}
|
|
20
|
+
renderThisFrame() {
|
|
21
|
+
if (!this.renderFrame) {
|
|
22
|
+
this.renderFrame = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 绑定视图
|
|
27
|
+
* @param view 需要绑定的View
|
|
28
|
+
*/
|
|
29
|
+
bindView(view) {
|
|
30
|
+
if (!view.camera || !view.renderer) {
|
|
31
|
+
throw new Error('No Camera or Renderer found in view');
|
|
32
|
+
}
|
|
33
|
+
this.view = view;
|
|
34
|
+
this.controls = new OrbitControls(view.camera, view.container);
|
|
35
|
+
this.controls.addEventListener('start', () => { this.renderThisFrame(); });
|
|
36
|
+
this.controls.addEventListener('end', () => { this.renderThisFrame(); });
|
|
37
|
+
this.controls.addEventListener('change', () => {
|
|
38
|
+
this.emit(Events.ORBIT_CAMERA_CHANGED, view.camera.position, view.camera.quaternion, this);
|
|
39
|
+
if (this.box && !this.box.containsPoint(view.camera.position)) {
|
|
40
|
+
const position = view.camera.position.clone();
|
|
41
|
+
position.set(Math.max(this.box.min.x + 1, Math.min(position.x, this.box.max.x - 1)), Math.max(this.box.min.y + 1, Math.min(position.y, this.box.max.y - 1)), Math.max(this.box.min.z + 1, Math.min(position.z, this.box.max.z - 1)));
|
|
42
|
+
if (this.prevPosition.distanceToSquared(position) > 0.01) {
|
|
43
|
+
this.prevPosition.copy(position);
|
|
44
|
+
}
|
|
45
|
+
this.setPosition(this.prevPosition.x, this.prevPosition.y);
|
|
46
|
+
}
|
|
47
|
+
this.renderThisFrame();
|
|
48
|
+
});
|
|
49
|
+
this.controls.update();
|
|
50
|
+
}
|
|
51
|
+
unbind() {
|
|
52
|
+
super.unbind();
|
|
53
|
+
this.controls.dispose();
|
|
54
|
+
}
|
|
55
|
+
/** @ignore */
|
|
56
|
+
update() {
|
|
57
|
+
this.controls.update();
|
|
58
|
+
const { renderFrame } = this;
|
|
59
|
+
this.renderFrame = undefined;
|
|
60
|
+
return !!renderFrame;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 设置视图中心点位
|
|
64
|
+
* @param x x
|
|
65
|
+
* @param y y
|
|
66
|
+
*/
|
|
67
|
+
setPosition(x, y) {
|
|
68
|
+
const angle = this.controls.getAzimuthalAngle();
|
|
69
|
+
this.controls.object.position.set(x, y, this.controls.object.position.z);
|
|
70
|
+
this.controls.target.set(x, y, this.controls.target.z);
|
|
71
|
+
this.controls.update();
|
|
72
|
+
this.setCameraRotation(angle);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* 设置键盘控制启用
|
|
76
|
+
* @param value 是否启用键盘控制
|
|
77
|
+
*/
|
|
78
|
+
setKeysEnabled(value) {
|
|
79
|
+
this.controls.enableKeys = value;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 设置是否启用惯性
|
|
83
|
+
* @param value 开关值
|
|
84
|
+
*/
|
|
85
|
+
setDampingEnabled(value) {
|
|
86
|
+
this.controls.enableDamping = value;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 设置位移速度
|
|
90
|
+
* @param value 位移速度
|
|
91
|
+
*/
|
|
92
|
+
setPanSpeed(value) {
|
|
93
|
+
this.controls.panSpeed = value;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 设置是否启用旋转功能
|
|
97
|
+
* @param value 开关值
|
|
98
|
+
*/
|
|
99
|
+
setRotateEnabled(value) {
|
|
100
|
+
this.controls.enableRotate = value;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 设置是否启用平移功能
|
|
104
|
+
* @param value 开关值
|
|
105
|
+
*/
|
|
106
|
+
setPanEnabled(value) {
|
|
107
|
+
this.controls.enablePan = value;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 设置是否启用缩放功能
|
|
111
|
+
* @param value 开关值
|
|
112
|
+
*/
|
|
113
|
+
setZoomEnabled(value) {
|
|
114
|
+
this.controls.enableZoom = value;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 设置是否启用该控制器
|
|
118
|
+
* @param value 开关值
|
|
119
|
+
*/
|
|
120
|
+
setEnabled(value) {
|
|
121
|
+
if (this.enabled === value)
|
|
122
|
+
return;
|
|
123
|
+
this.enabled = value;
|
|
124
|
+
this.controls.enabled = this.enabled;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* 设置惯性阻尼
|
|
128
|
+
* @param value 衰减值
|
|
129
|
+
*/
|
|
130
|
+
setDampingFactor(value) {
|
|
131
|
+
this.controls.dampingFactor = value;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 设置触摸操作模式
|
|
135
|
+
* @param touches 触摸配置
|
|
136
|
+
*/
|
|
137
|
+
setTouchControls(touches) {
|
|
138
|
+
this.controls.touches = touches;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* 设置鼠标操作模式
|
|
142
|
+
* @param mouseButtons 鼠标按键配置
|
|
143
|
+
*/
|
|
144
|
+
setMouseControls(mouseButtons) {
|
|
145
|
+
this.controls.mouseButtons = mouseButtons;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* 设置控制中心点
|
|
149
|
+
* @param x 世界坐标X
|
|
150
|
+
* @param y 世界坐标Y
|
|
151
|
+
* @param z 世界坐标Z
|
|
152
|
+
*/
|
|
153
|
+
setTarget(x, y, z) {
|
|
154
|
+
this.controls.target.set(x, y, z);
|
|
155
|
+
this.controls.update();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* 设置纵向转动范围, 最低为0, 最高为Math.PI
|
|
159
|
+
* @param min 纵向转动范围最小值
|
|
160
|
+
* @param max 纵向转动范围最大值
|
|
161
|
+
*/
|
|
162
|
+
setPolarAngle(min, max) {
|
|
163
|
+
this.controls.minPolarAngle = min;
|
|
164
|
+
this.controls.maxPolarAngle = max;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* 设置zoom范围
|
|
168
|
+
* @param min zoom最小值
|
|
169
|
+
* @param max zoom最大值
|
|
170
|
+
*/
|
|
171
|
+
setZoomRange(min, max) {
|
|
172
|
+
this.controls.minZoom = min;
|
|
173
|
+
this.controls.maxZoom = max;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* 设置横向转动范围, 最低为-Math.PI, 最高为Math.PI
|
|
177
|
+
* @param min 横向转动范围最小值
|
|
178
|
+
* @param max 横向转动范围最大值
|
|
179
|
+
*/
|
|
180
|
+
setAzimuthAngle(min, max) {
|
|
181
|
+
this.controls.minAzimuthAngle = min;
|
|
182
|
+
this.controls.maxAzimuthAngle = max;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* 获取相机缩放
|
|
186
|
+
*/
|
|
187
|
+
getZoom() {
|
|
188
|
+
const { THREE } = Externals.getInstance();
|
|
189
|
+
if (this.view.camera instanceof THREE.PerspectiveCamera
|
|
190
|
+
|| this.view.camera instanceof THREE.OrthographicCamera)
|
|
191
|
+
return this.view.camera.zoom;
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* 设置相机缩放
|
|
196
|
+
* @param zoom 目标缩放值
|
|
197
|
+
*/
|
|
198
|
+
setZoom(zoom) {
|
|
199
|
+
const { THREE } = Externals.getInstance();
|
|
200
|
+
if (!(this.view.camera instanceof THREE.PerspectiveCamera)
|
|
201
|
+
&& !(this.view.camera instanceof THREE.OrthographicCamera))
|
|
202
|
+
throw new Error('Cannot set zoom for camera');
|
|
203
|
+
this.view.camera.zoom = zoom;
|
|
204
|
+
this.view.camera.updateProjectionMatrix();
|
|
205
|
+
this.renderFrame = true;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* 获得相机旋转
|
|
209
|
+
* @returns 当前相机的旋转, 单位为弧度
|
|
210
|
+
*/
|
|
211
|
+
getCameraRotation() {
|
|
212
|
+
return this.controls.getAzimuthalAngle();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* 设置相机的旋转
|
|
216
|
+
* @param radius 目标弧度
|
|
217
|
+
*/
|
|
218
|
+
setCameraRotation(radius) {
|
|
219
|
+
const { minAzimuthAngle, maxAzimuthAngle } = this.controls;
|
|
220
|
+
this.setAzimuthAngle(radius, radius + 0.000001);
|
|
221
|
+
this.controls.update();
|
|
222
|
+
this.setAzimuthAngle(minAzimuthAngle, maxAzimuthAngle);
|
|
223
|
+
this.controls.update();
|
|
224
|
+
this.renderThisFrame();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 设置相机姿态
|
|
228
|
+
* @param worldMatrix 相机的姿态矩阵
|
|
229
|
+
*/
|
|
230
|
+
setCameraWorldMatrix(worldMatrix) {
|
|
231
|
+
if (!this.view.camera)
|
|
232
|
+
throw Error('Cannot set camera matrix to no-camera view.');
|
|
233
|
+
this.view.camera.matrixAutoUpdate = false;
|
|
234
|
+
const { THREE } = Externals.getInstance();
|
|
235
|
+
const position = new THREE.Vector3();
|
|
236
|
+
const scale = new THREE.Vector3();
|
|
237
|
+
const quaternion = new THREE.Quaternion();
|
|
238
|
+
const lookDistance = this.controls.object.position.distanceTo(this.controls.target);
|
|
239
|
+
new THREE.Matrix4().fromArray(worldMatrix).decompose(position, quaternion, scale);
|
|
240
|
+
this.view.camera.position.copy(position);
|
|
241
|
+
this.view.camera.scale.copy(scale);
|
|
242
|
+
this.view.camera.quaternion.copy(quaternion);
|
|
243
|
+
this.view.camera.updateMatrixWorld(true);
|
|
244
|
+
const lookVector = this.view.camera.getWorldDirection(new THREE.Vector3(0, 0, -1));
|
|
245
|
+
this.controls.target.copy(position.clone().add(lookVector.multiplyScalar(lookDistance)));
|
|
246
|
+
this.view.camera.matrixAutoUpdate = true;
|
|
247
|
+
const targetAngle = new THREE.Euler().setFromQuaternion(quaternion).z;
|
|
248
|
+
this.setCameraRotation(targetAngle);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* 设置旋转速度
|
|
252
|
+
* @param speed 速度, 默认为1, 不传值时为重置为默认值
|
|
253
|
+
*/
|
|
254
|
+
setRotateSpeed(speed = 1) {
|
|
255
|
+
if (!this.controls)
|
|
256
|
+
return;
|
|
257
|
+
this.controls.rotateSpeed = speed;
|
|
258
|
+
}
|
|
259
|
+
setPositionRange(min, max) {
|
|
260
|
+
const { THREE } = Externals.getInstance();
|
|
261
|
+
this.box = new THREE.Box3(min, max);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
export { OrbitControl };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Controller } from './controller';
|
|
2
|
+
import { Panorama } from '../element/panorama';
|
|
3
|
+
import { View } from '../view/view';
|
|
4
|
+
/**
|
|
5
|
+
* 全景图矫正控制器, 暂不使用
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
declare class PanoramaAdjustController extends Controller {
|
|
9
|
+
private enabled;
|
|
10
|
+
private view;
|
|
11
|
+
private target;
|
|
12
|
+
private mousePosition;
|
|
13
|
+
private mouseDownPosition;
|
|
14
|
+
private state;
|
|
15
|
+
private cameraInfoHolder;
|
|
16
|
+
private listeners;
|
|
17
|
+
private renderThisFrame;
|
|
18
|
+
private activePanorama?;
|
|
19
|
+
/**
|
|
20
|
+
* @param view 需要绑定的View
|
|
21
|
+
*/
|
|
22
|
+
constructor(view: View);
|
|
23
|
+
private onPointerDown;
|
|
24
|
+
private onPointerUpOrLeave;
|
|
25
|
+
private onPointerMove;
|
|
26
|
+
/**
|
|
27
|
+
* 绑定视图
|
|
28
|
+
* @param view 需要绑定的CameraView
|
|
29
|
+
*/
|
|
30
|
+
bindView(view: View): void;
|
|
31
|
+
/**
|
|
32
|
+
* 绑定全景图元素
|
|
33
|
+
* @param element 设定控制器控制的全景图元素, 类型需要为Panorama
|
|
34
|
+
*/
|
|
35
|
+
bindElement(element: Panorama): void;
|
|
36
|
+
unbind(): void;
|
|
37
|
+
/** @ignore */
|
|
38
|
+
update(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 启用/禁用该控制器
|
|
41
|
+
* @param enabled 目标值
|
|
42
|
+
*/
|
|
43
|
+
setEnabled(enabled: boolean): void;
|
|
44
|
+
}
|
|
45
|
+
export { PanoramaAdjustController };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Externals } from '../stage/externals';
|
|
2
|
+
import { Controller } from './controller';
|
|
3
|
+
import { Camera } from '../utils/camera';
|
|
4
|
+
/** @ignore */
|
|
5
|
+
var STATE;
|
|
6
|
+
(function (STATE) {
|
|
7
|
+
STATE[STATE["IDLE"] = 0] = "IDLE";
|
|
8
|
+
STATE[STATE["TO_MOVE_CAMERA"] = 1] = "TO_MOVE_CAMERA";
|
|
9
|
+
STATE[STATE["MOVE_CAMERA"] = 2] = "MOVE_CAMERA";
|
|
10
|
+
})(STATE || (STATE = {}));
|
|
11
|
+
/**
|
|
12
|
+
* 全景图矫正控制器, 暂不使用
|
|
13
|
+
* @ignore
|
|
14
|
+
*/
|
|
15
|
+
class PanoramaAdjustController extends Controller {
|
|
16
|
+
/**
|
|
17
|
+
* @param view 需要绑定的View
|
|
18
|
+
*/
|
|
19
|
+
constructor(view) {
|
|
20
|
+
super();
|
|
21
|
+
const { THREE } = Externals.getInstance();
|
|
22
|
+
this.enabled = false;
|
|
23
|
+
this.mousePosition = new THREE.Vector2();
|
|
24
|
+
this.mouseDownPosition = new THREE.Vector2();
|
|
25
|
+
this.state = STATE.IDLE;
|
|
26
|
+
this.cameraInfoHolder = {};
|
|
27
|
+
this.renderThisFrame = false;
|
|
28
|
+
this.listeners = {
|
|
29
|
+
pointerdown: (e) => { this.onPointerDown(e); },
|
|
30
|
+
pointerup: () => { this.onPointerUpOrLeave(); },
|
|
31
|
+
pointerleave: () => { this.onPointerUpOrLeave(); },
|
|
32
|
+
pointermove: (e) => { this.onPointerMove(e); },
|
|
33
|
+
};
|
|
34
|
+
if (view)
|
|
35
|
+
this.bindView(view);
|
|
36
|
+
}
|
|
37
|
+
onPointerDown(e) {
|
|
38
|
+
const { offsetX, offsetY, button } = e;
|
|
39
|
+
if (button !== 0)
|
|
40
|
+
return;
|
|
41
|
+
this.mouseDownPosition.x = offsetX;
|
|
42
|
+
this.mouseDownPosition.y = offsetY;
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
if (this.state !== STATE.IDLE)
|
|
46
|
+
return;
|
|
47
|
+
this.state = STATE.TO_MOVE_CAMERA;
|
|
48
|
+
}
|
|
49
|
+
onPointerUpOrLeave() {
|
|
50
|
+
if (this.state === STATE.IDLE)
|
|
51
|
+
return;
|
|
52
|
+
this.state = STATE.IDLE;
|
|
53
|
+
}
|
|
54
|
+
onPointerMove(e) {
|
|
55
|
+
const { offsetX, offsetY } = e;
|
|
56
|
+
this.mousePosition.x = offsetX;
|
|
57
|
+
this.mousePosition.y = offsetY;
|
|
58
|
+
e.stopPropagation();
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
const camera = this.view.camera;
|
|
61
|
+
if (!camera)
|
|
62
|
+
return;
|
|
63
|
+
const { THREE } = Externals.getInstance();
|
|
64
|
+
if (this.state === STATE.TO_MOVE_CAMERA) {
|
|
65
|
+
const v = camera.getWorldDirection(new THREE.Vector3(0, 0, -1));
|
|
66
|
+
const { yaw, pitch } = Camera.getYawPitchFromCameraLookVector(v);
|
|
67
|
+
this.cameraInfoHolder.yaw = yaw;
|
|
68
|
+
this.cameraInfoHolder.pitch = pitch;
|
|
69
|
+
this.state = STATE.MOVE_CAMERA;
|
|
70
|
+
}
|
|
71
|
+
if (this.state === STATE.MOVE_CAMERA) {
|
|
72
|
+
const { width, height } = this.target.getBoundingClientRect();
|
|
73
|
+
const diffX = this.mousePosition.x - this.mouseDownPosition.x;
|
|
74
|
+
const diffY = this.mousePosition.y - this.mouseDownPosition.y;
|
|
75
|
+
const { aspect } = camera;
|
|
76
|
+
const vFov = camera.fov;
|
|
77
|
+
const hFov = vFov * aspect;
|
|
78
|
+
const degreeX = diffX / width * hFov;
|
|
79
|
+
const degreeY = diffY / height * vFov;
|
|
80
|
+
const { yaw, pitch } = this.cameraInfoHolder;
|
|
81
|
+
let targetPitch = parseFloat((pitch + degreeY).toFixed(2));
|
|
82
|
+
if (Math.abs(targetPitch) > 89.99)
|
|
83
|
+
targetPitch = Math.sign(targetPitch) * 89.99;
|
|
84
|
+
let targetYaw = parseFloat(((yaw + degreeX + 360) % 360).toFixed(2));
|
|
85
|
+
if (targetYaw > 360 || targetYaw < 0)
|
|
86
|
+
targetYaw = 0;
|
|
87
|
+
const { position } = Camera.getCameraLookAtPositionByYawPitch(camera.position.clone(), targetYaw, targetPitch);
|
|
88
|
+
camera.lookAt(position);
|
|
89
|
+
camera.updateProjectionMatrix();
|
|
90
|
+
this.renderThisFrame = true;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 绑定视图
|
|
95
|
+
* @param view 需要绑定的CameraView
|
|
96
|
+
*/
|
|
97
|
+
bindView(view) {
|
|
98
|
+
if (!view.camera || !view.renderer) {
|
|
99
|
+
throw new Error('No Renderer or Camera found in view');
|
|
100
|
+
}
|
|
101
|
+
const { THREE } = Externals.getInstance();
|
|
102
|
+
if (!(view.camera instanceof THREE.PerspectiveCamera)) {
|
|
103
|
+
throw new Error('PanoramaAdjustController only works with views with PerspectiveCamera');
|
|
104
|
+
}
|
|
105
|
+
this.view = view;
|
|
106
|
+
this.target = view.renderer.domElement;
|
|
107
|
+
if (this.activePanorama) {
|
|
108
|
+
this.bindElement(this.activePanorama);
|
|
109
|
+
this.setEnabled(true);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 绑定全景图元素
|
|
114
|
+
* @param element 设定控制器控制的全景图元素, 类型需要为Panorama
|
|
115
|
+
*/
|
|
116
|
+
bindElement(element) {
|
|
117
|
+
this.activePanorama = element;
|
|
118
|
+
const { x, y, z } = this.activePanorama.position.clone();
|
|
119
|
+
if (this.view)
|
|
120
|
+
this.view.camera.position.set(x, y, z);
|
|
121
|
+
this.renderThisFrame = true;
|
|
122
|
+
this.setEnabled(true);
|
|
123
|
+
}
|
|
124
|
+
unbind() {
|
|
125
|
+
super.unbind();
|
|
126
|
+
this.setEnabled(false);
|
|
127
|
+
}
|
|
128
|
+
/** @ignore */
|
|
129
|
+
update() {
|
|
130
|
+
let result = true;
|
|
131
|
+
if (!this.enabled || !this.renderThisFrame)
|
|
132
|
+
result = false;
|
|
133
|
+
this.renderThisFrame = false;
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 启用/禁用该控制器
|
|
138
|
+
* @param enabled 目标值
|
|
139
|
+
*/
|
|
140
|
+
setEnabled(enabled) {
|
|
141
|
+
if (!this.target)
|
|
142
|
+
return;
|
|
143
|
+
this.enabled = enabled;
|
|
144
|
+
if (enabled) {
|
|
145
|
+
Object.entries(this.listeners).forEach(([e, callback]) => {
|
|
146
|
+
this.target.addEventListener(e, callback);
|
|
147
|
+
});
|
|
148
|
+
this.renderThisFrame = true;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
Object.entries(this.listeners).forEach(([e, callback]) => {
|
|
152
|
+
this.target.removeEventListener(e, callback);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
export { PanoramaAdjustController };
|