@xgis/xgis3d 0.3.55 → 0.4.1
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/Map3D.d.ts +2 -2
- package/dist/cameraBoundsGuard.d.ts +7 -4
- package/dist/cameraScale.d.ts +2 -2
- package/dist/capabilities/cesiumCamera.d.ts +3 -2
- package/dist/capabilities/cesiumMoving.d.ts +2 -0
- package/dist/entryCamera.d.ts +3 -3
- package/dist/index.js +216 -81
- package/dist/index.js.map +1 -1
- package/dist/projection.d.ts +7 -41
- package/dist/reconcilers/useCesiumViewBounds.d.ts +4 -1
- package/dist/utils/createKMLLayer.d.ts +2 -2
- package/dist/utils/createWMSLayer.d.ts +2 -2
- package/dist/utils/createWMTSLayer.d.ts +2 -1
- package/dist/utils/kmlEntityStyle.d.ts +2 -2
- package/dist/utils/layerCreation.d.ts +2 -2
- package/dist/utils/topicRectangle.d.ts +3 -0
- package/package.json +4 -6
- package/dist/reconcilers/useCesiumLayerReconciler.d.ts +0 -2
package/dist/Map3D.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'cesium/Build/Cesium/Widgets/widgets.css';
|
|
2
|
-
import type {
|
|
2
|
+
import type { IEngineRegistration, IMapEngine } from '@xgis/xgis-common';
|
|
3
3
|
import type { Viewer as CesiumViewer } from 'cesium';
|
|
4
4
|
export declare function applyRotationPermission(viewer: CesiumViewer, rotationAllowed: boolean): void;
|
|
5
5
|
export declare function releaseWebglContext(canvas: HTMLCanvasElement): void;
|
|
6
6
|
interface Map3DProps {
|
|
7
|
-
onEngineReady: (engine: IMapEngine) =>
|
|
7
|
+
onEngineReady: (engine: IMapEngine) => IEngineRegistration;
|
|
8
8
|
}
|
|
9
9
|
export declare function Map3D({ onEngineReady }: Map3DProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EpsgCode, MapExtent, ZoomLevel } from '@xgis/xgis-common';
|
|
2
2
|
import type { Viewer as CesiumViewer } from 'cesium';
|
|
3
3
|
/** Zoom at which `bounds` just fills the canvas — the furthest this camera may pull back. */
|
|
4
|
-
export declare function boundsFloor(viewer: CesiumViewer, bounds:
|
|
5
|
-
/**
|
|
6
|
-
|
|
4
|
+
export declare function boundsFloor(viewer: CesiumViewer, bounds: MapExtent): ZoomLevel;
|
|
5
|
+
/**
|
|
6
|
+
* Cesium has no extent constraint, so the camera is pulled back each frame after it moves: out of
|
|
7
|
+
* anywhere past `bounds`, and back from any closer than `zoomCeiling`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createCameraBoundsGuard(viewer: CesiumViewer, bounds: MapExtent, projection: EpsgCode, zoomCeiling: ZoomLevel): () => void;
|
package/dist/cameraScale.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ZoomLevel } from '@xgis/xgis-common';
|
|
2
2
|
import type { Viewer as CesiumViewer } from 'cesium';
|
|
3
3
|
/** Camera→focus range that renders `zoom` at the same ground scale as the 2D map. */
|
|
4
|
-
export declare function rangeForZoom(viewer: CesiumViewer, zoom: number): number;
|
|
4
|
+
export declare function rangeForZoom(viewer: CesiumViewer, zoom: number, metresPerUnit: number): number;
|
|
5
5
|
/** The 2D zoom whose resolution matches the ground scale at `range` — inverse of `rangeForZoom`. */
|
|
6
|
-
export declare function zoomForRange(viewer: CesiumViewer, range: number): number;
|
|
6
|
+
export declare function zoomForRange(viewer: CesiumViewer, range: number, metresPerUnit: number): number;
|
|
7
7
|
export declare function reportedZoomGrid(zoom: number): ZoomLevel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ICameraCapability } from '@xgis/xgis-common';
|
|
1
|
+
import type { EpsgCode, ICameraCapability } from '@xgis/xgis-common';
|
|
2
2
|
import type { Camera, TerrainProvider, Viewer as CesiumViewer } from 'cesium';
|
|
3
3
|
interface CameraFocus {
|
|
4
4
|
readonly lon: number;
|
|
@@ -17,5 +17,6 @@ export declare function sampleTerrainHeight(provider: TerrainProvider, position:
|
|
|
17
17
|
lon: number;
|
|
18
18
|
lat: number;
|
|
19
19
|
}): Promise<number | undefined>;
|
|
20
|
-
export declare function
|
|
20
|
+
export declare function viewCenter(viewer: CesiumViewer, focus: CameraFocus | undefined): [number, number];
|
|
21
|
+
export declare function createCesiumCameraCapability(viewer: CesiumViewer, getProjection: () => EpsgCode): ICameraCapability;
|
|
21
22
|
export {};
|
package/dist/entryCamera.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type EpsgCode, type MapExtent, type Radians, type ZoomLevel } from '@xgis/xgis-common';
|
|
2
2
|
import { type Viewer as CesiumViewer } from 'cesium';
|
|
3
3
|
export declare const ELLIPSOID_HEIGHT = 0;
|
|
4
4
|
export interface EntryView {
|
|
5
|
-
readonly bbox:
|
|
5
|
+
readonly bbox: MapExtent;
|
|
6
6
|
readonly zoom: ZoomLevel;
|
|
7
7
|
readonly rotation: Radians;
|
|
8
8
|
readonly pitch: Radians;
|
|
@@ -14,6 +14,6 @@ export interface EntryTarget {
|
|
|
14
14
|
readonly pitch: number;
|
|
15
15
|
readonly range: number;
|
|
16
16
|
}
|
|
17
|
-
export declare function entryTarget(viewer: CesiumViewer, view: EntryView): EntryTarget;
|
|
17
|
+
export declare function entryTarget(viewer: CesiumViewer, view: EntryView, projection: EpsgCode): EntryTarget;
|
|
18
18
|
export declare function placeEntryCamera(viewer: CesiumViewer, target: EntryTarget, height: number): void;
|
|
19
19
|
export declare function raiseEntryCameraToTerrain(viewer: CesiumViewer, target: EntryTarget, height: number): void;
|