@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,277 @@
|
|
|
1
|
+
import { NS_THREE } from '../stage/externals';
|
|
2
|
+
import { Overlay } from './overlay';
|
|
3
|
+
import { View } from '../view/view';
|
|
4
|
+
/**
|
|
5
|
+
* POI元素, 包含一个图标与一段文字
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const poiOverlay = new PoiOverlay();
|
|
9
|
+
* const poi = poiOverlay.createPoi(new Vector3(0, 0, 0));
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
interface Rect {
|
|
13
|
+
xMin: number;
|
|
14
|
+
xMax: number;
|
|
15
|
+
yMin: number;
|
|
16
|
+
yMax: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* POI覆盖层, 可以展示POI图标与文字, 存在图标时以图标中心为中心, 否则为文字中心
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const poiOverlay = new PoiOverlay();
|
|
23
|
+
* // 任意View
|
|
24
|
+
* view.addOverlay(poiOverlay);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare class PoiOverlay extends Overlay {
|
|
28
|
+
static canvas: HTMLCanvasElement;
|
|
29
|
+
static ctx: CanvasRenderingContext2D;
|
|
30
|
+
private parent;
|
|
31
|
+
private rectMap;
|
|
32
|
+
private pois;
|
|
33
|
+
private mouseState;
|
|
34
|
+
private mousePositionBuffer;
|
|
35
|
+
private eventTarget;
|
|
36
|
+
private enabled;
|
|
37
|
+
private renderThisFrame;
|
|
38
|
+
private visible;
|
|
39
|
+
camera: NS_THREE.Camera;
|
|
40
|
+
scene: NS_THREE.Scene;
|
|
41
|
+
renderCamera: NS_THREE.OrthographicCamera;
|
|
42
|
+
renderer: NS_THREE.WebGL1Renderer;
|
|
43
|
+
orderPois: Function;
|
|
44
|
+
prevPosition: NS_THREE.Vector3 | null;
|
|
45
|
+
prevQuaternion: NS_THREE.Quaternion | null;
|
|
46
|
+
prevZoom: any;
|
|
47
|
+
private needRender;
|
|
48
|
+
private listeners;
|
|
49
|
+
constructor(canvas?: HTMLCanvasElement);
|
|
50
|
+
init(parent: View): void;
|
|
51
|
+
update(): boolean;
|
|
52
|
+
forceRenderInThisFrame(): void;
|
|
53
|
+
render(): void;
|
|
54
|
+
orderPoisByLevel(): void;
|
|
55
|
+
recalculateVisibilities(pois: Poi[]): void;
|
|
56
|
+
checkUpdate(): void;
|
|
57
|
+
dispose(): void;
|
|
58
|
+
private onPointerDown;
|
|
59
|
+
private onPointerUp;
|
|
60
|
+
private onTouchStart;
|
|
61
|
+
private onTouchEnd;
|
|
62
|
+
private onNodePointerDown;
|
|
63
|
+
/**
|
|
64
|
+
* 新建POI
|
|
65
|
+
* @param position POI在3D空间中的位置
|
|
66
|
+
*/
|
|
67
|
+
createPoi(position: NS_THREE.Vector3): Poi;
|
|
68
|
+
setRectMap(rect: Rect, ele: Poi): void;
|
|
69
|
+
/**
|
|
70
|
+
* 删除POI
|
|
71
|
+
* @param poi 待删除的POI
|
|
72
|
+
*/
|
|
73
|
+
removePoi(poi: Poi): void;
|
|
74
|
+
clearPoi(): void;
|
|
75
|
+
/**
|
|
76
|
+
* 设置覆盖层可见性 兼容旧poi
|
|
77
|
+
* @param visible 覆盖层是否可见
|
|
78
|
+
*/
|
|
79
|
+
setVisibility(visible: boolean): void;
|
|
80
|
+
setEnabled(value: boolean): void;
|
|
81
|
+
resize(viewWidth: number, viewHeight: number): void;
|
|
82
|
+
private updateCameraAspect;
|
|
83
|
+
}
|
|
84
|
+
declare class Poi {
|
|
85
|
+
static ImageMaterialMap: Map<any, any>;
|
|
86
|
+
private position;
|
|
87
|
+
private screenPosition;
|
|
88
|
+
private visible;
|
|
89
|
+
private hide;
|
|
90
|
+
private parent;
|
|
91
|
+
private subHide;
|
|
92
|
+
private textVisibility;
|
|
93
|
+
private iconVisibility;
|
|
94
|
+
private animationEnabled;
|
|
95
|
+
isInFrustum: boolean;
|
|
96
|
+
private textPosInfo;
|
|
97
|
+
private iconPosInfo;
|
|
98
|
+
private autoRotation;
|
|
99
|
+
private rotation;
|
|
100
|
+
collision: boolean;
|
|
101
|
+
private boundingBox;
|
|
102
|
+
private overlapArea;
|
|
103
|
+
collisionMode: string;
|
|
104
|
+
private withBoundingBox;
|
|
105
|
+
private subAreaOpacity;
|
|
106
|
+
private abandonedAreaOpacity;
|
|
107
|
+
private visiblePartWhenCollision;
|
|
108
|
+
private boundingRect;
|
|
109
|
+
private outerRect;
|
|
110
|
+
private iconCircleOptions;
|
|
111
|
+
private iconInCircle;
|
|
112
|
+
private iconRect;
|
|
113
|
+
private textRect;
|
|
114
|
+
private visibilityAnimation;
|
|
115
|
+
private textWidth;
|
|
116
|
+
private textHeight;
|
|
117
|
+
private iconSize;
|
|
118
|
+
private textMaterial;
|
|
119
|
+
private iconMaterial;
|
|
120
|
+
private iconCircleMaterial;
|
|
121
|
+
private rectMaterial;
|
|
122
|
+
private text;
|
|
123
|
+
private icon;
|
|
124
|
+
group: NS_THREE.Group | null;
|
|
125
|
+
poiId: number;
|
|
126
|
+
private iconOptions;
|
|
127
|
+
private labelOptions;
|
|
128
|
+
private rectOptions;
|
|
129
|
+
private withRect;
|
|
130
|
+
private rect;
|
|
131
|
+
private level;
|
|
132
|
+
private dpr;
|
|
133
|
+
private isFlipY;
|
|
134
|
+
private _renderThisFrame;
|
|
135
|
+
private labelOpacity;
|
|
136
|
+
private iconOpacity;
|
|
137
|
+
private set renderThisFrame(value);
|
|
138
|
+
private get renderThisFrame();
|
|
139
|
+
constructor(position?: NS_THREE.Vector3);
|
|
140
|
+
dispose(): void;
|
|
141
|
+
setParent(parent: PoiOverlay): void;
|
|
142
|
+
setPosition(position: NS_THREE.Vector3, tolerance?: number): void;
|
|
143
|
+
setOpacity(labelOpacity?: number, iconOpacity?: number): void;
|
|
144
|
+
/**
|
|
145
|
+
* 设置旋转角度
|
|
146
|
+
* @param rotation 旋转角度
|
|
147
|
+
*/
|
|
148
|
+
setRotation(rotation: number, tolerance?: number): void;
|
|
149
|
+
/**
|
|
150
|
+
* 设置是否碰撞
|
|
151
|
+
* @param collision 是否碰撞
|
|
152
|
+
*/
|
|
153
|
+
setCollision(collision: boolean): void;
|
|
154
|
+
/**
|
|
155
|
+
* 设置碰撞模式
|
|
156
|
+
* @param mode 碰撞模式 label || icon || outer(默认)
|
|
157
|
+
*/
|
|
158
|
+
setCollisionMode(mode: string): void;
|
|
159
|
+
setLabelVisibility(visible: boolean): void;
|
|
160
|
+
setIconVisiblity(visible: boolean): void;
|
|
161
|
+
setHideModeWhenCollision(mode: string): void;
|
|
162
|
+
setVisiblePartWhenCollision(part: string): void;
|
|
163
|
+
setCollisionOverlap(x: number, y: number): void;
|
|
164
|
+
/**
|
|
165
|
+
* 设置POI层级
|
|
166
|
+
* @param level 层级
|
|
167
|
+
*/
|
|
168
|
+
setLevel(level: number, forceOrder?: boolean): void;
|
|
169
|
+
/**
|
|
170
|
+
* 获取POI层级
|
|
171
|
+
*/
|
|
172
|
+
getLevel(): number;
|
|
173
|
+
/**
|
|
174
|
+
* 设置POI可见性
|
|
175
|
+
* @param visible 可见性
|
|
176
|
+
*/
|
|
177
|
+
setVisibility(visible: boolean): void;
|
|
178
|
+
/**
|
|
179
|
+
* 设置POI是否暂时隐藏
|
|
180
|
+
* @param hide true 全部隐藏 false: 根据 hideModeWhenCollision 做显隐判断
|
|
181
|
+
*/
|
|
182
|
+
setHidden(hide: boolean, subHide?: boolean): void;
|
|
183
|
+
/**
|
|
184
|
+
* 设置Rect是否可见
|
|
185
|
+
* @param withRect 可见性
|
|
186
|
+
*/
|
|
187
|
+
setRect(withRect: boolean): void;
|
|
188
|
+
/**
|
|
189
|
+
* 设置Rect默认宽高 未废弃, 不发挥作用
|
|
190
|
+
* @param withRect 可见性
|
|
191
|
+
*/
|
|
192
|
+
private setRectDefSize;
|
|
193
|
+
/**
|
|
194
|
+
* 设置Rect背景色 未废弃, 不发挥作用
|
|
195
|
+
* @param color
|
|
196
|
+
*/
|
|
197
|
+
setRectFill(color: number | string): void;
|
|
198
|
+
/**
|
|
199
|
+
* 设置Rect偏移 未废弃, 不发挥作用
|
|
200
|
+
* @param x
|
|
201
|
+
* @param y
|
|
202
|
+
*/
|
|
203
|
+
setRectOffset(x?: number, y?: number): void;
|
|
204
|
+
setIconImage(src: string): void;
|
|
205
|
+
setIconSize(width: number, height: number): void;
|
|
206
|
+
/**
|
|
207
|
+
* 设置POI中icon的显示
|
|
208
|
+
*/
|
|
209
|
+
setIconShowInCircle(lineWidth: number, lineColor: string): void;
|
|
210
|
+
drawIcon(): void;
|
|
211
|
+
private clearIcon;
|
|
212
|
+
/**
|
|
213
|
+
* 设置图标相对(0,0)的位置
|
|
214
|
+
* @param direction: x / y value: + / - 表示方向
|
|
215
|
+
* x = 2 的时候, 表示label 中心 和 icon 中心 同一条y轴, label 右边框 距离 icon 左边框2个单位
|
|
216
|
+
*/
|
|
217
|
+
setIconAnchor(anchor: 'center' | 'left' | 'right' | 'top' | 'bottom' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): void;
|
|
218
|
+
/**
|
|
219
|
+
* 设置图标反转
|
|
220
|
+
*/
|
|
221
|
+
setIconFlipY(flipY: boolean): void;
|
|
222
|
+
setIconOffset(x: number, y: number): void;
|
|
223
|
+
/**
|
|
224
|
+
* 设置文字字体大小
|
|
225
|
+
* @param fontSize 字号, 单位为px
|
|
226
|
+
*/
|
|
227
|
+
setFontSize(fontSize: number): void;
|
|
228
|
+
setFontPadding(fPadding: number): void;
|
|
229
|
+
setLabelText(text: string): void;
|
|
230
|
+
drawText(): void;
|
|
231
|
+
recalcOffset(width: number, height: number, anchor: string, anchorOffsetX: number, anchorOffsetY: number): {
|
|
232
|
+
offsetX: number;
|
|
233
|
+
offsetY: number;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* 设置POI文字相对(0,0)的位置。在有icon 和 无icon时锚点不同
|
|
237
|
+
* @param direction: x / y value: + / - 表示方向
|
|
238
|
+
* x = 2 的时候, 表示label 中心 和 icon 中心 同一条y轴, label 右边框 距离 icon 左边框2个单位
|
|
239
|
+
*/
|
|
240
|
+
setLabelAnchor(anchor: 'center' | 'left' | 'right' | 'top' | 'bottom' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright'): void;
|
|
241
|
+
setLabelOffset(x: number, y: number): void;
|
|
242
|
+
getLabelAnchor(): 'center' | 'left' | 'right' | 'top' | 'bottom' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright';
|
|
243
|
+
getLabelOffset(): {
|
|
244
|
+
x: number;
|
|
245
|
+
y: number;
|
|
246
|
+
};
|
|
247
|
+
calcBoundingSize(): void;
|
|
248
|
+
private drawRect;
|
|
249
|
+
private drawBoundingBox;
|
|
250
|
+
setBoundingBox(): void;
|
|
251
|
+
/** @ignore */
|
|
252
|
+
getBoundingRect(): {
|
|
253
|
+
xMin: number;
|
|
254
|
+
yMin: number;
|
|
255
|
+
xMax: number;
|
|
256
|
+
yMax: number;
|
|
257
|
+
};
|
|
258
|
+
/** @ignore */
|
|
259
|
+
getOuterRect(): {
|
|
260
|
+
xMin: number;
|
|
261
|
+
yMin: number;
|
|
262
|
+
xMax: number;
|
|
263
|
+
yMax: number;
|
|
264
|
+
};
|
|
265
|
+
setAnimationEnabled(value: boolean): void;
|
|
266
|
+
private calcPoiRotation;
|
|
267
|
+
getVisibility(): boolean;
|
|
268
|
+
calcPosAndSize(frustum: NS_THREE.Frustum, widthHalf: number, heightHalf: number): {
|
|
269
|
+
isInFrustum: boolean;
|
|
270
|
+
};
|
|
271
|
+
draw(): void;
|
|
272
|
+
updatePosition(// 根据已计算出的position, offset, visible 等更新渲染位置, 显隐
|
|
273
|
+
widthHalf: number, heightHalf: number, index: number): void;
|
|
274
|
+
update(): boolean;
|
|
275
|
+
setPoiId(poiId: number): void;
|
|
276
|
+
}
|
|
277
|
+
export { PoiOverlay, Poi };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NS_KONVA } from '../stage/externals';
|
|
2
|
+
/**
|
|
3
|
+
* 为统一2D渲染所提供的解决方案,将会在一段时间后弃用(不再依赖 Konva)
|
|
4
|
+
*/
|
|
5
|
+
declare class Owlly2D {
|
|
6
|
+
private static containerMap;
|
|
7
|
+
private konvaContainer;
|
|
8
|
+
stage: NS_KONVA.Stage;
|
|
9
|
+
private constructor();
|
|
10
|
+
static getInstance(container: HTMLElement): Owlly2D;
|
|
11
|
+
static get initialized(): boolean;
|
|
12
|
+
static resize(): void;
|
|
13
|
+
static dispose(): void;
|
|
14
|
+
static disposeStage(container: HTMLElement): void;
|
|
15
|
+
resize(containerWidth: number, containerHeight: number): void;
|
|
16
|
+
addLayer(): NS_KONVA.Layer;
|
|
17
|
+
/**
|
|
18
|
+
* 打开交互
|
|
19
|
+
* pointer-events = auto
|
|
20
|
+
*/
|
|
21
|
+
openInteraction(): void;
|
|
22
|
+
/**
|
|
23
|
+
* 关闭交互
|
|
24
|
+
* pointer-events = none
|
|
25
|
+
*/
|
|
26
|
+
closeInteraction(): void;
|
|
27
|
+
}
|
|
28
|
+
export { Owlly2D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './screen';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { NS_THREE } from '../stage/externals';
|
|
2
|
+
import { EventHubClassic } from '../utils/event-hub';
|
|
3
|
+
import { View } from '../view/view';
|
|
4
|
+
/** 窗口, 用于描述一个 Canvas / Renderer @ignore */
|
|
5
|
+
declare class Screen extends EventHubClassic {
|
|
6
|
+
private views;
|
|
7
|
+
private listeners;
|
|
8
|
+
renderer: NS_THREE.WebGL1Renderer | NS_THREE.WebGLRenderer;
|
|
9
|
+
container: HTMLElement;
|
|
10
|
+
canvas: HTMLCanvasElement;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
eventOnContainer: boolean;
|
|
15
|
+
eventEnable: boolean;
|
|
16
|
+
constructor(container?: HTMLElement, options?: {
|
|
17
|
+
isCanvas?: boolean;
|
|
18
|
+
preserveDrawingBuffer?: boolean;
|
|
19
|
+
logarithmicDepthBuffer?: boolean;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
eventOnContainer?: boolean;
|
|
23
|
+
});
|
|
24
|
+
private createRenderer;
|
|
25
|
+
/**
|
|
26
|
+
* 设置清屏时的颜色
|
|
27
|
+
* @param color 颜色
|
|
28
|
+
* @param alpha 不透明度
|
|
29
|
+
*/
|
|
30
|
+
setClearColor(color: number | string, alpha?: number): void;
|
|
31
|
+
private getRenderParams;
|
|
32
|
+
/**
|
|
33
|
+
* 设置事件在容器上
|
|
34
|
+
* @param eventOnContainer 事件在容器S
|
|
35
|
+
*/
|
|
36
|
+
setEventOnContainer(eventOnContainer: boolean): void;
|
|
37
|
+
/**
|
|
38
|
+
* 设置事件有效
|
|
39
|
+
* @param enable 有效
|
|
40
|
+
*/
|
|
41
|
+
setEventEnable(enable: boolean): void;
|
|
42
|
+
private registerEvents;
|
|
43
|
+
private unregisterEvents;
|
|
44
|
+
mouseDown(e: MouseEvent): void;
|
|
45
|
+
mouseMove(e: MouseEvent): void;
|
|
46
|
+
mouseUp(e: MouseEvent): void;
|
|
47
|
+
mouseWheel(e: WheelEvent): void;
|
|
48
|
+
touchStart(e: TouchEvent): void;
|
|
49
|
+
touchMove(e: TouchEvent): void;
|
|
50
|
+
touchEnd(e: TouchEvent): void;
|
|
51
|
+
contextMenu(e: MouseEvent): void;
|
|
52
|
+
dblclick(e: MouseEvent): void;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
resize(width?: number, height?: number): void;
|
|
55
|
+
/**
|
|
56
|
+
* 添加 View
|
|
57
|
+
* @param view 需要添加到 Screen 的 View
|
|
58
|
+
*/
|
|
59
|
+
addView(view: View): void;
|
|
60
|
+
/**
|
|
61
|
+
* 删除 View
|
|
62
|
+
* @param view 需要删除的 View
|
|
63
|
+
*/
|
|
64
|
+
removeView(view: View): void;
|
|
65
|
+
update(): boolean;
|
|
66
|
+
renderScreen(): void;
|
|
67
|
+
/**
|
|
68
|
+
* 设置当前 Screen 是否工作
|
|
69
|
+
* @param value 开关值
|
|
70
|
+
*/
|
|
71
|
+
setEnabled(value: boolean): void;
|
|
72
|
+
}
|
|
73
|
+
export { Screen };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import Konva from 'konva';
|
|
3
|
+
import * as GLTFLoader from 'three/examples/jsm/loaders/GLTFLoader';
|
|
4
|
+
/**
|
|
5
|
+
* 外部库
|
|
6
|
+
*/
|
|
7
|
+
declare class Externals {
|
|
8
|
+
private static instance;
|
|
9
|
+
Konva: typeof Konva;
|
|
10
|
+
THREE: typeof THREE;
|
|
11
|
+
setKonvaInstance(konva: typeof Konva): void;
|
|
12
|
+
setThreeInstance(three: typeof THREE): void;
|
|
13
|
+
static getInstance(): Externals;
|
|
14
|
+
}
|
|
15
|
+
declare function SetExternal(three: typeof THREE, optionals?: {
|
|
16
|
+
konva?: typeof Konva;
|
|
17
|
+
gltfLoader?: typeof GLTFLoader;
|
|
18
|
+
}): void;
|
|
19
|
+
export { Externals, THREE as NS_THREE, Konva as NS_KONVA, SetExternal, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Stage } from './stage';
|
|
2
|
+
import { Screen } from '../screen/screen';
|
|
3
|
+
import { Controller } from '../controller/controller';
|
|
4
|
+
declare class Owlly {
|
|
5
|
+
private static SHARED_INSTANCE;
|
|
6
|
+
private static RequestAnimationFrame;
|
|
7
|
+
private stages;
|
|
8
|
+
private screens;
|
|
9
|
+
private controllers;
|
|
10
|
+
private timeProfiler;
|
|
11
|
+
private statsEnabled;
|
|
12
|
+
private selfManageTick;
|
|
13
|
+
private forceRender;
|
|
14
|
+
private listeners;
|
|
15
|
+
private constructor();
|
|
16
|
+
static GetSharedInstance(): Owlly;
|
|
17
|
+
/**
|
|
18
|
+
* 时钟函数
|
|
19
|
+
* @param time 距离上一帧的时间, ms
|
|
20
|
+
*/
|
|
21
|
+
tick(time: number): void;
|
|
22
|
+
private registerEvents;
|
|
23
|
+
private onWindowResize;
|
|
24
|
+
private beforeWindowUnload;
|
|
25
|
+
registerStage(stage: Stage): void;
|
|
26
|
+
unregisterStage(stage: Stage): void;
|
|
27
|
+
registerScreen(screen: Screen): void;
|
|
28
|
+
unregisterScreen(screen: Screen): void;
|
|
29
|
+
registerController(controller: Controller): void;
|
|
30
|
+
unregisterController(controller: Controller): void;
|
|
31
|
+
setStatsEnabled(value: boolean): void;
|
|
32
|
+
setRequestAnimationFrameFunction(requestAnimationFrame: Function): void;
|
|
33
|
+
toggleTickSelfManagement(value: boolean): void;
|
|
34
|
+
renderNextFrame(): void;
|
|
35
|
+
}
|
|
36
|
+
declare function updateTick(): void;
|
|
37
|
+
declare function forceRender(): void;
|
|
38
|
+
export { Owlly, updateTick, forceRender };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { NS_THREE } from './externals';
|
|
2
|
+
import { Element } from '../element/element';
|
|
3
|
+
import { View } from '../view';
|
|
4
|
+
import { Controller } from '../controller';
|
|
5
|
+
/**
|
|
6
|
+
* 场景类, 所有元素应当置于场景中, 视图与场景绑定后可渲染内容
|
|
7
|
+
*/
|
|
8
|
+
declare class Stage {
|
|
9
|
+
/**
|
|
10
|
+
* Stage 所使用的 THREE Scene
|
|
11
|
+
*/
|
|
12
|
+
scene: NS_THREE.Scene;
|
|
13
|
+
private elements;
|
|
14
|
+
private lights;
|
|
15
|
+
private axesHelper;
|
|
16
|
+
private stageListeners;
|
|
17
|
+
private disposed;
|
|
18
|
+
constructor();
|
|
19
|
+
private registerEvents;
|
|
20
|
+
private initLights;
|
|
21
|
+
/**
|
|
22
|
+
* 旧的时钟函数, 后期应删除
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
25
|
+
tick(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 时钟钩子函数
|
|
28
|
+
* @returns 是否需要重新渲染
|
|
29
|
+
*/
|
|
30
|
+
update(): boolean;
|
|
31
|
+
private handleElementUpdate;
|
|
32
|
+
/**
|
|
33
|
+
* 绑定视图至场景
|
|
34
|
+
* @param view 需要添加的视图
|
|
35
|
+
*/
|
|
36
|
+
bindView(view: View): void;
|
|
37
|
+
/**
|
|
38
|
+
* 销毁视图
|
|
39
|
+
* @param view 需要销毁的视图
|
|
40
|
+
*/
|
|
41
|
+
disposeView(view: View): void;
|
|
42
|
+
/**
|
|
43
|
+
* 绑定一个新的控制器到场景
|
|
44
|
+
* @param controller 添加的控制器
|
|
45
|
+
*/
|
|
46
|
+
bindController(controller: Controller): void;
|
|
47
|
+
/**
|
|
48
|
+
* 销毁控制器
|
|
49
|
+
* @param controller 销毁的控制器
|
|
50
|
+
*/
|
|
51
|
+
disposeController(controller?: Controller): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* 绑定元素至场景
|
|
54
|
+
* @param element 需要绑定的元素
|
|
55
|
+
*/
|
|
56
|
+
bindElement(element: Element): void;
|
|
57
|
+
/**
|
|
58
|
+
* 销毁元素
|
|
59
|
+
* @param element 需要销毁的元素
|
|
60
|
+
*/
|
|
61
|
+
disposeElement(element: Element): void;
|
|
62
|
+
/**
|
|
63
|
+
* 解绑元素, 元素仅会从 Stage 中移除而非销毁
|
|
64
|
+
* @param element 需要解绑的元素
|
|
65
|
+
*/
|
|
66
|
+
unbindElement(element: Element): void;
|
|
67
|
+
/**
|
|
68
|
+
* (调试用) 开关性能统计
|
|
69
|
+
* @param value 开关值
|
|
70
|
+
*/
|
|
71
|
+
setStatsEnabled(value: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* (调试用) 开关场景xyz轴指示器
|
|
74
|
+
* @param value 开关值
|
|
75
|
+
*/
|
|
76
|
+
setAxesEnabled(value: boolean): void;
|
|
77
|
+
/**
|
|
78
|
+
* 强制渲染
|
|
79
|
+
* @deprecated
|
|
80
|
+
*/
|
|
81
|
+
render(): void;
|
|
82
|
+
/**
|
|
83
|
+
* 销毁场景
|
|
84
|
+
*/
|
|
85
|
+
dispose(): void;
|
|
86
|
+
resizeElements(viewWidth: number, viewHeight: number): void;
|
|
87
|
+
renderElements(): void;
|
|
88
|
+
/**
|
|
89
|
+
* 强制重新计算绘制区域
|
|
90
|
+
* @deprecated
|
|
91
|
+
*/
|
|
92
|
+
forceResize(): void;
|
|
93
|
+
/**
|
|
94
|
+
* 设置全场景背景色
|
|
95
|
+
* @param hexColor 颜色, 可以使用字符串
|
|
96
|
+
*/
|
|
97
|
+
setBackgroundColor(hexColor: number | string): void;
|
|
98
|
+
/**
|
|
99
|
+
* 设置帧函数
|
|
100
|
+
* @param requestAnimationFrame
|
|
101
|
+
*/
|
|
102
|
+
setFrameTickFunction(requestAnimationFrame: Function): void;
|
|
103
|
+
/**
|
|
104
|
+
* @ignore
|
|
105
|
+
*/
|
|
106
|
+
toggleTickSelfManagement(value: boolean): void;
|
|
107
|
+
}
|
|
108
|
+
export { Stage };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { View } from '../view/view';
|
|
2
|
+
declare class AlignmentUtils {
|
|
3
|
+
/**
|
|
4
|
+
* 获取2d与3d之间的对齐参数
|
|
5
|
+
* @param view 基准视图
|
|
6
|
+
* @param baseImageScale 底图缩放等级, 绝对值
|
|
7
|
+
* @param offset 底图整体偏移, 结构为 [ number, number ], 对应x, y轴偏移值
|
|
8
|
+
* @param imageSize 底图图片尺寸, 结构为 [ number, number ], 对应宽度, 高度
|
|
9
|
+
* @returns { upTrans: number[]; downTrans: number[]; matrixWorld: number[]; } 三个矩阵,
|
|
10
|
+
* uptrans: 2d转3d, downTrans: 3d转2d, matrixWorld: 相机自身参数, 重设时使用
|
|
11
|
+
*/
|
|
12
|
+
static getTransformMatrices(view: View, baseImageScale: number, offset: [number, number], imageSize: [number, number]): {
|
|
13
|
+
upTransOrigin: number[];
|
|
14
|
+
downTransOrigin: number[];
|
|
15
|
+
upTrans: number[];
|
|
16
|
+
downTrans: number[];
|
|
17
|
+
matrixWorld: number[];
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export { AlignmentUtils };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface Coord2d {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
interface TurningInfo {
|
|
6
|
+
point: number[];
|
|
7
|
+
angle: number;
|
|
8
|
+
startTPoint: number[];
|
|
9
|
+
endTPoint: number[];
|
|
10
|
+
startIndex: number;
|
|
11
|
+
endIndex: number;
|
|
12
|
+
}
|
|
13
|
+
declare class BasicCalcTool {
|
|
14
|
+
static getLineCross(line1_p1: Coord2d, line1_p2: Coord2d, line2_p1: Coord2d, line2_p2: Coord2d): boolean;
|
|
15
|
+
static calcTurning(linePoints: [number, number][], turningStandard?: number[]): TurningInfo[];
|
|
16
|
+
static chunk(items: any[], size: number): any[][];
|
|
17
|
+
}
|
|
18
|
+
export { BasicCalcTool, TurningInfo };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { NS_THREE } from '../stage/externals';
|
|
2
|
+
import { Element } from '../element/element';
|
|
3
|
+
import { View } from '../view/view';
|
|
4
|
+
declare class BasicTools {
|
|
5
|
+
/**
|
|
6
|
+
* 销毁工具
|
|
7
|
+
* @param o 对象
|
|
8
|
+
* @param recursive 递归销毁
|
|
9
|
+
*/
|
|
10
|
+
static dispose(o: NS_THREE.Object3D, recursive?: boolean): void;
|
|
11
|
+
/**
|
|
12
|
+
* 鼠标碰撞工具函数
|
|
13
|
+
* @param objects 需要检测碰撞的 Element
|
|
14
|
+
* @param param1 鼠标点击坐标
|
|
15
|
+
* @param camera 使用的相机
|
|
16
|
+
* @param candidates 候选者, candidate 存在于 object 中
|
|
17
|
+
* @param maxWorldDistance 世界中点击时的距离
|
|
18
|
+
* @returns 碰撞对象
|
|
19
|
+
*/
|
|
20
|
+
static getMouseIntersection(objects: Element[], { x, y }: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}, camera: NS_THREE.Camera, candidates?: Element[], maxWorldDistance?: number): NS_THREE.Intersection | null;
|
|
24
|
+
/**
|
|
25
|
+
* 获取屏幕空间的点击碰撞
|
|
26
|
+
* @param objects 需要检查的对象
|
|
27
|
+
* @param param1 点击坐标
|
|
28
|
+
* @param param2 屏幕尺寸
|
|
29
|
+
* @param maxDistance 最大检测距离
|
|
30
|
+
* @param camera 相机
|
|
31
|
+
* @param candidates 候选对象, 可能在 object 内
|
|
32
|
+
* @param maxWorldDistance 最大世界空间坐标检测距离
|
|
33
|
+
* @param boundingBoxes 候选的碰撞盒, 可选
|
|
34
|
+
* @returns 碰撞到的对象
|
|
35
|
+
*/
|
|
36
|
+
static getMouseIntersectionOnScreen(objects: NS_THREE.Object3D[] | Element[], { x, y }: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
}, { screenWidth, screenHeight }: {
|
|
40
|
+
screenWidth: number;
|
|
41
|
+
screenHeight: number;
|
|
42
|
+
}, maxDistance: number, camera: NS_THREE.Camera, candidates?: NS_THREE.Object3D[] | Element[], maxWorldDistance?: number, boundingBoxes?: Map<NS_THREE.Object3D | Element, [number, number]>): NS_THREE.Object3D | Element | null;
|
|
43
|
+
/**
|
|
44
|
+
* 转换俯视图屏幕坐标为三维坐标
|
|
45
|
+
* @param {x, y} 屏幕坐标
|
|
46
|
+
* @param view 视图
|
|
47
|
+
* @param camera 相机
|
|
48
|
+
*/
|
|
49
|
+
static getHorizontalPlaneCoordinate({ x, y }: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
}, view: View, camera: NS_THREE.Camera | undefined): NS_THREE.Vector2 | null;
|
|
53
|
+
static getHorizontalPlaneCoordinate3({ x, y }: {
|
|
54
|
+
x: number;
|
|
55
|
+
y: number;
|
|
56
|
+
}, view: View, camera: NS_THREE.Camera | undefined): NS_THREE.Vector3 | null;
|
|
57
|
+
/**
|
|
58
|
+
* 将坐标投影到屏幕空间
|
|
59
|
+
* @param position 世界坐标
|
|
60
|
+
* @param view 视图
|
|
61
|
+
* @param camera 相机
|
|
62
|
+
* @returns 转换后的屏幕坐标
|
|
63
|
+
*/
|
|
64
|
+
static projectToScreenCoordinate(position: NS_THREE.Vector3, view: View, camera: NS_THREE.Camera | undefined): {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
} | null;
|
|
68
|
+
private static getMesh;
|
|
69
|
+
static debounce(fn: Function, delay: number): Function;
|
|
70
|
+
}
|
|
71
|
+
export { BasicTools };
|