vesium 1.0.1-beta.51 → 1.0.1-beta.52
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/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +49 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.iife.js +14 -0
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -10
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,8 @@ const CREATE_VIEWER_INJECTION_KEY = Symbol("CREATE_VIEWER_INJECTION_KEY");
|
|
|
34
34
|
* @internal
|
|
35
35
|
*/
|
|
36
36
|
const CREATE_VIEWER_COLLECTION = /* @__PURE__ */ new WeakMap();
|
|
37
|
+
/**
|
|
38
|
+
*/
|
|
37
39
|
function createViewer(...args) {
|
|
38
40
|
const viewer = (0, vue.shallowRef)();
|
|
39
41
|
const readonlyViewer = (0, vue.shallowReadonly)(viewer);
|
|
@@ -599,6 +601,7 @@ function tryRun(fn) {
|
|
|
599
601
|
*
|
|
600
602
|
* @param source The source value, which can be a reactive reference or an asynchronous getter.
|
|
601
603
|
* @param options Conversion options
|
|
604
|
+
* @returns The converted value.
|
|
602
605
|
*
|
|
603
606
|
* @example
|
|
604
607
|
* ```ts
|
|
@@ -631,6 +634,11 @@ async function toPromiseValue(source, options = {}) {
|
|
|
631
634
|
* Easily use the `addEventListener` in `Cesium.Event` instances,
|
|
632
635
|
* when the dependent data changes or the component is unmounted,
|
|
633
636
|
* the listener function will automatically reload or destroy.
|
|
637
|
+
*
|
|
638
|
+
* @param event The Cesium.Event instance
|
|
639
|
+
* @param listener The listener function
|
|
640
|
+
* @param options additional options
|
|
641
|
+
* @returns A function that can be called to remove the event listener
|
|
634
642
|
*/
|
|
635
643
|
function useCesiumEventListener(event, listener, options = {}) {
|
|
636
644
|
const isActive = (0, vue.toRef)(options.isActive ?? true);
|
|
@@ -675,6 +683,8 @@ function useViewer() {
|
|
|
675
683
|
//#region useCameraState/index.ts
|
|
676
684
|
/**
|
|
677
685
|
* Reactive Cesium Camera state
|
|
686
|
+
* @param options options
|
|
687
|
+
* @returns Reactive camera states
|
|
678
688
|
*/
|
|
679
689
|
function useCameraState(options = {}) {
|
|
680
690
|
let getCamera = options.camera;
|
|
@@ -726,6 +736,8 @@ function computeLevel(height) {
|
|
|
726
736
|
//#region useCesiumFps/index.ts
|
|
727
737
|
/**
|
|
728
738
|
* Reactive get the frame rate of Cesium
|
|
739
|
+
* @param options options
|
|
740
|
+
* @returns Reactive fps states
|
|
729
741
|
*/
|
|
730
742
|
function useCesiumFps(options = {}) {
|
|
731
743
|
const { delay = 100 } = options;
|
|
@@ -753,6 +765,8 @@ function useCesiumFps(options = {}) {
|
|
|
753
765
|
* @param addFn - add SideEffect function. eg.`entites.add`
|
|
754
766
|
* @param removeFn - Clean SideEffect function. eg.`entities.remove`
|
|
755
767
|
* @param removeScopeArgs - The parameters to pass for `removeScope` triggered when the component is unmounted
|
|
768
|
+
*
|
|
769
|
+
* @returns Contains side effect addition and removal functions
|
|
756
770
|
*/
|
|
757
771
|
function useCollectionScope(addFn, removeFn, removeScopeArgs) {
|
|
758
772
|
const scope = (0, vue.shallowReactive)(/* @__PURE__ */ new Set());
|