@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,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,92 @@
|
|
|
1
|
+
import { Externals } from '../stage/externals';
|
|
2
|
+
/**
|
|
3
|
+
* 为统一2D渲染所提供的解决方案,将会在一段时间后弃用(不再依赖 Konva)
|
|
4
|
+
*/
|
|
5
|
+
class Owlly2D {
|
|
6
|
+
// private renderMap: Map<Konva.Layer, boolean>;
|
|
7
|
+
constructor(container) {
|
|
8
|
+
const { Konva } = Externals.getInstance();
|
|
9
|
+
this.konvaContainer = document.createElement('div');
|
|
10
|
+
this.konvaContainer.style.cssText = `
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
`;
|
|
18
|
+
container.appendChild(this.konvaContainer);
|
|
19
|
+
this.stage = new Konva.Stage({
|
|
20
|
+
container: this.konvaContainer,
|
|
21
|
+
});
|
|
22
|
+
const { clientWidth, clientHeight } = container;
|
|
23
|
+
this.resize(clientWidth, clientHeight);
|
|
24
|
+
// this.renderMap = new Map<Konva.Layer, boolean>();
|
|
25
|
+
}
|
|
26
|
+
static getInstance(container) {
|
|
27
|
+
if (!this.containerMap)
|
|
28
|
+
this.containerMap = new Map();
|
|
29
|
+
if (!this.containerMap.has(container)) {
|
|
30
|
+
this.containerMap.set(container, new Owlly2D(container));
|
|
31
|
+
}
|
|
32
|
+
return this.containerMap.get(container);
|
|
33
|
+
}
|
|
34
|
+
static get initialized() {
|
|
35
|
+
return this.containerMap && !!this.containerMap.size;
|
|
36
|
+
}
|
|
37
|
+
static resize() {
|
|
38
|
+
this.containerMap.forEach((instance, container) => {
|
|
39
|
+
if (!instance)
|
|
40
|
+
return;
|
|
41
|
+
const { clientHeight, clientWidth } = container;
|
|
42
|
+
instance.resize(clientWidth, clientHeight);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
static dispose() {
|
|
46
|
+
if (!this.containerMap)
|
|
47
|
+
return;
|
|
48
|
+
this.containerMap.forEach((instance, container) => {
|
|
49
|
+
instance.stage.destroy();
|
|
50
|
+
container.removeChild(instance.konvaContainer);
|
|
51
|
+
});
|
|
52
|
+
this.containerMap.clear();
|
|
53
|
+
}
|
|
54
|
+
static disposeStage(container) {
|
|
55
|
+
if (this.containerMap && this.containerMap.has(container)) {
|
|
56
|
+
const instance = this.containerMap.get(container);
|
|
57
|
+
instance.stage.destroy();
|
|
58
|
+
container.removeChild(instance.konvaContainer);
|
|
59
|
+
this.containerMap.delete(container);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// public render(): void {
|
|
63
|
+
// this.renderMap.forEach((needRender, layer) => {
|
|
64
|
+
// if (needRender) layer.draw();
|
|
65
|
+
// });
|
|
66
|
+
// }
|
|
67
|
+
resize(containerWidth, containerHeight) {
|
|
68
|
+
this.stage.size({ width: containerWidth, height: containerHeight });
|
|
69
|
+
}
|
|
70
|
+
addLayer() {
|
|
71
|
+
const { Konva } = Externals.getInstance();
|
|
72
|
+
const newLayer = new Konva.Layer();
|
|
73
|
+
this.stage.add(newLayer);
|
|
74
|
+
// this.renderMap.set(newLayer, true);
|
|
75
|
+
return newLayer;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* 打开交互
|
|
79
|
+
* pointer-events = auto
|
|
80
|
+
*/
|
|
81
|
+
openInteraction() {
|
|
82
|
+
this.konvaContainer.style.pointerEvents = 'auto';
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 关闭交互
|
|
86
|
+
* pointer-events = none
|
|
87
|
+
*/
|
|
88
|
+
closeInteraction() {
|
|
89
|
+
this.konvaContainer.style.pointerEvents = 'none';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
export { Owlly2D };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './screen';
|
|
@@ -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,236 @@
|
|
|
1
|
+
import { Externals } from '../stage/externals';
|
|
2
|
+
import { Owlly } from '../stage/owlly';
|
|
3
|
+
import { EventHubClassic } from '../utils/event-hub';
|
|
4
|
+
import { Env, EnvironmentUtils } from '../utils/environment-utils';
|
|
5
|
+
import { OwllyEvents } from '../utils/events';
|
|
6
|
+
/** 窗口, 用于描述一个 Canvas / Renderer @ignore */
|
|
7
|
+
class Screen extends EventHubClassic {
|
|
8
|
+
constructor(container, options = {}) {
|
|
9
|
+
super();
|
|
10
|
+
this.eventEnable = false;
|
|
11
|
+
this.createRenderer(container, options);
|
|
12
|
+
this.enabled = true;
|
|
13
|
+
this.views = new Set();
|
|
14
|
+
this.eventOnContainer = !!options.eventOnContainer;
|
|
15
|
+
this.listeners = {
|
|
16
|
+
mouseDown: this.mouseDown.bind(this),
|
|
17
|
+
mouseMove: this.mouseMove.bind(this),
|
|
18
|
+
mouseUp: this.mouseUp.bind(this),
|
|
19
|
+
mouseWheel: this.mouseWheel.bind(this),
|
|
20
|
+
touchStart: this.touchStart.bind(this),
|
|
21
|
+
touchMove: this.touchMove.bind(this),
|
|
22
|
+
touchEnd: this.touchEnd.bind(this),
|
|
23
|
+
contextMenu: this.contextMenu.bind(this),
|
|
24
|
+
dblclick: this.dblclick.bind(this),
|
|
25
|
+
};
|
|
26
|
+
this.setEventEnable(true);
|
|
27
|
+
Owlly.GetSharedInstance().registerScreen(this);
|
|
28
|
+
}
|
|
29
|
+
createRenderer(container, options = {}) {
|
|
30
|
+
const { THREE } = Externals.getInstance();
|
|
31
|
+
const rendererParams = this.getRenderParams(container, options);
|
|
32
|
+
this.renderer = THREE.WebGL1Renderer
|
|
33
|
+
? new THREE.WebGL1Renderer(rendererParams)
|
|
34
|
+
: new THREE.WebGLRenderer(rendererParams);
|
|
35
|
+
this.renderer.setPixelRatio(EnvironmentUtils.GetGlobalDPR());
|
|
36
|
+
this.renderer.autoClear = false;
|
|
37
|
+
if (this.container) {
|
|
38
|
+
this.renderer.setSize(this.container.clientWidth, this.container.clientHeight);
|
|
39
|
+
this.container.appendChild(this.renderer.domElement);
|
|
40
|
+
this.width = this.container.clientWidth;
|
|
41
|
+
this.height = this.container.clientHeight;
|
|
42
|
+
this.canvas = this.renderer.domElement;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
const canvasWidth = options.width;
|
|
46
|
+
const canvasHeight = options.height;
|
|
47
|
+
if (EnvironmentUtils.GetEnv() === Env.Miniapp && (!canvasWidth || !canvasHeight)) {
|
|
48
|
+
throw new Error('[Owlly] Cannot initialize View without canvas dimensions in miniapp.');
|
|
49
|
+
}
|
|
50
|
+
this.renderer.setSize(canvasWidth, canvasHeight);
|
|
51
|
+
this.width = canvasWidth;
|
|
52
|
+
this.height = canvasHeight;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* 设置清屏时的颜色
|
|
57
|
+
* @param color 颜色
|
|
58
|
+
* @param alpha 不透明度
|
|
59
|
+
*/
|
|
60
|
+
setClearColor(color, alpha = 1) {
|
|
61
|
+
if (!this.renderer)
|
|
62
|
+
return;
|
|
63
|
+
const { THREE } = Externals.getInstance();
|
|
64
|
+
this.renderer.setClearColor(new THREE.Color(color), alpha);
|
|
65
|
+
}
|
|
66
|
+
getRenderParams(container, options = {}) {
|
|
67
|
+
const rendererParams = {
|
|
68
|
+
alpha: true,
|
|
69
|
+
antialias: true,
|
|
70
|
+
precision: 'highp',
|
|
71
|
+
preserveDrawingBuffer: options && options.preserveDrawingBuffer,
|
|
72
|
+
logarithmicDepthBuffer: options && options.logarithmicDepthBuffer,
|
|
73
|
+
};
|
|
74
|
+
const isCanvas = options && options.isCanvas;
|
|
75
|
+
if (EnvironmentUtils.GetEnv() === Env.Miniapp && !isCanvas) {
|
|
76
|
+
throw new Error('[Owlly] Cannot initialize View without canvas in miniapp.');
|
|
77
|
+
}
|
|
78
|
+
if (isCanvas) {
|
|
79
|
+
this.canvas = container;
|
|
80
|
+
Object.assign(rendererParams, { canvas: this.canvas });
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this.container = container;
|
|
84
|
+
}
|
|
85
|
+
return rendererParams;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* 设置事件在容器上
|
|
89
|
+
* @param eventOnContainer 事件在容器S
|
|
90
|
+
*/
|
|
91
|
+
setEventOnContainer(eventOnContainer) {
|
|
92
|
+
if (this.eventOnContainer !== eventOnContainer) {
|
|
93
|
+
this.setEventEnable(false);
|
|
94
|
+
this.eventOnContainer = eventOnContainer;
|
|
95
|
+
this.setEventEnable(true);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* 设置事件有效
|
|
100
|
+
* @param enable 有效
|
|
101
|
+
*/
|
|
102
|
+
setEventEnable(enable) {
|
|
103
|
+
if (this.eventEnable !== enable) {
|
|
104
|
+
this.eventEnable = enable;
|
|
105
|
+
if (enable) {
|
|
106
|
+
this.registerEvents();
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
this.unregisterEvents();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
registerEvents() {
|
|
114
|
+
const target = this.eventOnContainer ? this.container : this.canvas;
|
|
115
|
+
target.addEventListener('mousedown', this.listeners.mouseDown, false);
|
|
116
|
+
target.addEventListener('mousemove', this.listeners.mouseMove, false);
|
|
117
|
+
target.addEventListener('mouseup', this.listeners.mouseUp, false);
|
|
118
|
+
target.addEventListener('mousewheel', this.listeners.mouseWheel, false);
|
|
119
|
+
target.addEventListener('touchstart', this.listeners.touchStart, false);
|
|
120
|
+
target.addEventListener('touchmove', this.listeners.touchMove, false);
|
|
121
|
+
target.addEventListener('touchend', this.listeners.touchEnd, false);
|
|
122
|
+
target.addEventListener('contextmenu', this.listeners.contextMenu, false);
|
|
123
|
+
target.addEventListener('dblclick', this.listeners.dblclick, false);
|
|
124
|
+
}
|
|
125
|
+
unregisterEvents() {
|
|
126
|
+
const target = this.eventOnContainer ? this.container : this.canvas;
|
|
127
|
+
target.removeEventListener('mousedown', this.listeners.mouseDown, false);
|
|
128
|
+
target.removeEventListener('mousemove', this.listeners.mouseMove, false);
|
|
129
|
+
target.removeEventListener('mouseup', this.listeners.mouseUp, false);
|
|
130
|
+
target.removeEventListener('mousewheel', this.listeners.mouseWheel, false);
|
|
131
|
+
target.removeEventListener('touchstart', this.listeners.touchStart, false);
|
|
132
|
+
target.removeEventListener('touchmove', this.listeners.touchMove, false);
|
|
133
|
+
target.removeEventListener('touchend', this.listeners.touchEnd, false);
|
|
134
|
+
target.removeEventListener('contextmenu', this.listeners.contextMenu, false);
|
|
135
|
+
target.removeEventListener('dblclick', this.listeners.dblclick, false);
|
|
136
|
+
}
|
|
137
|
+
mouseDown(e) {
|
|
138
|
+
this.emit(OwllyEvents.MOUSE_DOWN, e);
|
|
139
|
+
}
|
|
140
|
+
mouseMove(e) {
|
|
141
|
+
this.emit(OwllyEvents.MOUSE_MOVE, e);
|
|
142
|
+
}
|
|
143
|
+
mouseUp(e) {
|
|
144
|
+
this.emit(OwllyEvents.MOUSE_UP, e);
|
|
145
|
+
}
|
|
146
|
+
mouseWheel(e) {
|
|
147
|
+
this.emit(OwllyEvents.MOUSE_WHEEL, e);
|
|
148
|
+
}
|
|
149
|
+
touchStart(e) {
|
|
150
|
+
this.emit(OwllyEvents.TOUCH_START, e);
|
|
151
|
+
}
|
|
152
|
+
touchMove(e) {
|
|
153
|
+
this.emit(OwllyEvents.TOUCH_MOVE, e);
|
|
154
|
+
}
|
|
155
|
+
touchEnd(e) {
|
|
156
|
+
this.emit(OwllyEvents.TOUCH_END, e);
|
|
157
|
+
}
|
|
158
|
+
contextMenu(e) {
|
|
159
|
+
this.emit(OwllyEvents.CONTEXT_MENU, e);
|
|
160
|
+
}
|
|
161
|
+
dblclick(e) {
|
|
162
|
+
this.emit(OwllyEvents.DBLCLICK, e);
|
|
163
|
+
}
|
|
164
|
+
dispose() {
|
|
165
|
+
this.unregisterEvents();
|
|
166
|
+
this.views.forEach((view) => { view.dispose(); });
|
|
167
|
+
this.views.clear();
|
|
168
|
+
if (this.container)
|
|
169
|
+
this.container.removeChild(this.renderer.domElement);
|
|
170
|
+
this.renderer.dispose();
|
|
171
|
+
Owlly.GetSharedInstance().unregisterScreen(this);
|
|
172
|
+
this.container = null;
|
|
173
|
+
this.canvas = null;
|
|
174
|
+
this.renderer.domElement = null;
|
|
175
|
+
this.renderer.state = null;
|
|
176
|
+
this.renderer = null;
|
|
177
|
+
}
|
|
178
|
+
resize(width, height) {
|
|
179
|
+
let targetWidth;
|
|
180
|
+
let targetHeight;
|
|
181
|
+
if (this.container) {
|
|
182
|
+
targetWidth = width || this.container.clientWidth;
|
|
183
|
+
targetHeight = height || this.container.clientHeight;
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
if (!width || !height)
|
|
187
|
+
throw new Error('[Owlly] Width and Height must be passed in when using canvas mode');
|
|
188
|
+
targetWidth = width;
|
|
189
|
+
targetHeight = height;
|
|
190
|
+
}
|
|
191
|
+
this.renderer.setSize(targetWidth, targetHeight);
|
|
192
|
+
this.views.forEach((view) => { view.resize(targetWidth, targetHeight); });
|
|
193
|
+
this.width = targetWidth;
|
|
194
|
+
this.height = targetHeight;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* 添加 View
|
|
198
|
+
* @param view 需要添加到 Screen 的 View
|
|
199
|
+
*/
|
|
200
|
+
addView(view) {
|
|
201
|
+
// console.log('add view', view);
|
|
202
|
+
this.views.add(view);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* 删除 View
|
|
206
|
+
* @param view 需要删除的 View
|
|
207
|
+
*/
|
|
208
|
+
removeView(view) {
|
|
209
|
+
this.views.delete(view);
|
|
210
|
+
}
|
|
211
|
+
update() {
|
|
212
|
+
if (!this.enabled)
|
|
213
|
+
return false;
|
|
214
|
+
return Array.from(this.views).reduce((tf, e) => (e.update() || tf), false);
|
|
215
|
+
}
|
|
216
|
+
renderScreen() {
|
|
217
|
+
if (!this.enabled)
|
|
218
|
+
return;
|
|
219
|
+
this.renderer.clear();
|
|
220
|
+
const views = Array.from(this.views);
|
|
221
|
+
views.sort((a, b) => (a.renderOrder - b.renderOrder > 0 ? 1 : -1));
|
|
222
|
+
views.forEach((view) => {
|
|
223
|
+
view.setRendererPort();
|
|
224
|
+
view.renderView();
|
|
225
|
+
view.clearRendererPort();
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* 设置当前 Screen 是否工作
|
|
230
|
+
* @param value 开关值
|
|
231
|
+
*/
|
|
232
|
+
setEnabled(value) {
|
|
233
|
+
this.enabled = value;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
export { Screen };
|
|
@@ -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,24 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import Konva from 'konva';
|
|
3
|
+
/**
|
|
4
|
+
* 外部库
|
|
5
|
+
*/
|
|
6
|
+
class Externals {
|
|
7
|
+
setKonvaInstance(konva) {
|
|
8
|
+
this.Konva = konva;
|
|
9
|
+
}
|
|
10
|
+
setThreeInstance(three) {
|
|
11
|
+
this.THREE = three;
|
|
12
|
+
}
|
|
13
|
+
static getInstance() {
|
|
14
|
+
if (!this.instance)
|
|
15
|
+
this.instance = new Externals();
|
|
16
|
+
return this.instance;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function SetExternal(three, optionals = {}) {
|
|
20
|
+
Externals.getInstance().setThreeInstance(three);
|
|
21
|
+
if (optionals && optionals.konva)
|
|
22
|
+
Externals.getInstance().setKonvaInstance(optionals.konva);
|
|
23
|
+
}
|
|
24
|
+
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 };
|