iflow-engine-base 4.0.16 → 4.0.19
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/bim-engine-sdk.es.js +29 -40
- package/dist/bim-engine-sdk.umd.js +2754 -2392
- package/dist/chunks/{EngineKernel-BLJsCrxR.js → EngineKernel-CZX0Omjs.js} +2676 -2402
- package/dist/chunks/{engine-2d-DneQvSOi.js → engine-2d-CA5-uNuf.js} +5 -5
- package/dist/chunks/{engine-3d-B0D38zLu.js → engine-3d-BsWcD-bl.js} +7215 -6460
- package/dist/chunks/{engine-720-OdgX2p-d.js → engine-720-DiTJEtdN.js} +8 -8
- package/dist/chunks/{engine-gaussian-CQdrGBYh.js → engine-gaussian-BHUGuaw_.js} +227 -227
- package/dist/chunks/gis-tiles-vendor-DIbUOKJM.js +11781 -0
- package/dist/chunks/index-D7NwsYhB.js +2640 -0
- package/dist/chunks/{sdk-assets-Dh7PGW73.js → sdk-assets-DtcFvuth.js} +2 -2
- package/dist/chunks/{sdk-runtime-KslKRuwI.js → sdk-runtime-DN15bwdD.js} +761 -762
- package/dist/chunks/{sdk-vendor-CVc1LiJj.js → sdk-vendor-6wYtfmXR.js} +31044 -31044
- package/dist/chunks/{three-vendor-Ds9cgGKb.js → three-vendor-CGmeNMm5.js} +7963 -7954
- package/dist/gis-fixtures/terrain/0/0/0.terrain +0 -0
- package/dist/gis-fixtures/terrain/0/1/0.terrain +0 -0
- package/dist/gis-fixtures/terrain/1/2/0.terrain +0 -0
- package/dist/gis-fixtures/terrain/1/2/1.terrain +0 -0
- package/dist/gis-fixtures/terrain/1/3/0.terrain +0 -0
- package/dist/gis-fixtures/terrain/1/3/1.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1694/650.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1694/651.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1694/652.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1695/650.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1695/651.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1695/652.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1696/650.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1696/651.terrain +0 -0
- package/dist/gis-fixtures/terrain/10/1696/652.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3390/1301.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3390/1302.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3390/1303.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3391/1301.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3391/1302.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3391/1303.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3392/1301.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3392/1302.terrain +0 -0
- package/dist/gis-fixtures/terrain/11/3392/1303.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6782/2604.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6782/2605.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6782/2606.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6783/2604.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6783/2605.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6783/2606.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6784/2604.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6784/2605.terrain +0 -0
- package/dist/gis-fixtures/terrain/12/6784/2606.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13565/5209.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13565/5210.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13565/5211.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13566/5209.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13566/5210.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13566/5211.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13567/5209.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13567/5210.terrain +0 -0
- package/dist/gis-fixtures/terrain/13/13567/5211.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27131/10419.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27131/10420.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27131/10421.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27132/10419.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27132/10420.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27132/10421.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27133/10419.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27133/10420.terrain +0 -0
- package/dist/gis-fixtures/terrain/14/27133/10421.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/5/1.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/5/2.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/5/3.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/6/1.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/6/2.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/6/3.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/7/1.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/7/2.terrain +0 -0
- package/dist/gis-fixtures/terrain/2/7/3.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/12/4.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/12/5.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/12/6.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/13/4.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/13/5.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/13/6.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/14/4.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/14/5.terrain +0 -0
- package/dist/gis-fixtures/terrain/3/14/6.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/25/10.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/25/11.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/25/9.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/26/10.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/26/11.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/26/9.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/27/10.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/27/11.terrain +0 -0
- package/dist/gis-fixtures/terrain/4/27/9.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/51/19.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/51/20.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/51/21.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/52/19.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/52/20.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/52/21.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/53/19.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/53/20.terrain +0 -0
- package/dist/gis-fixtures/terrain/5/53/21.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/104/39.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/104/40.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/104/41.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/105/39.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/105/40.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/105/41.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/106/39.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/106/40.terrain +0 -0
- package/dist/gis-fixtures/terrain/6/106/41.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/210/80.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/210/81.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/210/82.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/211/80.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/211/81.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/211/82.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/212/80.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/212/81.terrain +0 -0
- package/dist/gis-fixtures/terrain/7/212/82.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/422/161.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/422/162.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/422/163.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/423/161.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/423/162.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/423/163.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/424/161.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/424/162.terrain +0 -0
- package/dist/gis-fixtures/terrain/8/424/163.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/846/324.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/846/325.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/846/326.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/847/324.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/847/325.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/847/326.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/848/324.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/848/325.terrain +0 -0
- package/dist/gis-fixtures/terrain/9/848/326.terrain +0 -0
- package/dist/gis-fixtures/terrain/layer.json +141 -0
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +928 -1711
- package/package.json +10 -21
- package/dist/chunks/gis-tiles-vendor-Dr7piDQM.js +0 -11386
- package/dist/chunks/index-DjNAYhvI.js +0 -5252
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Box3 } from 'three';
|
|
1
|
+
import { Box3 as Box3_2 } from 'three';
|
|
2
2
|
import { Camera } from 'three';
|
|
3
3
|
import { Circle } from 'fabric';
|
|
4
|
-
import { ColorRepresentation } from 'three';
|
|
5
4
|
import { default as default_2 } from 'stats.js';
|
|
6
5
|
import * as GaussianSplats3D from '@mkkellogg/gaussian-splats-3d';
|
|
6
|
+
import { GlobeControls } from '3d-tiles-renderer';
|
|
7
7
|
import { Group } from 'fabric';
|
|
8
8
|
import { IText } from 'fabric';
|
|
9
9
|
import { Line } from 'fabric';
|
|
10
|
-
import { Matrix4 } from 'three';
|
|
11
10
|
import { Object3D } from 'three';
|
|
12
11
|
import { Path } from 'fabric';
|
|
12
|
+
import { PerspectiveCamera } from 'three';
|
|
13
13
|
import { Rect } from 'fabric';
|
|
14
14
|
import { RenderPipeline } from 'three/webgpu';
|
|
15
15
|
import { Scene } from 'three';
|
|
@@ -990,13 +990,39 @@ declare class AreaMeasure2d extends BaseMeasureTool2d {
|
|
|
990
990
|
handleDoubleClick(): void;
|
|
991
991
|
}
|
|
992
992
|
|
|
993
|
+
/** v2 自动曝光模块,使用低分辨率 RGBA8 离屏目标完成 WebGL 测光。 */
|
|
994
|
+
declare class AutoExposureModule {
|
|
995
|
+
private readonly engine;
|
|
996
|
+
private readonly renderer;
|
|
997
|
+
private readonly scene;
|
|
998
|
+
private options;
|
|
999
|
+
private probeTarget;
|
|
1000
|
+
private lastMeasurementTime;
|
|
1001
|
+
private lastUpdateTime;
|
|
1002
|
+
private targetExposure;
|
|
1003
|
+
private disposed;
|
|
1004
|
+
constructor(engine: any);
|
|
1005
|
+
get settings(): ResolvedAutoExposureOptions;
|
|
1006
|
+
isEnabled(): boolean;
|
|
1007
|
+
setEnabled(enabled: boolean): void;
|
|
1008
|
+
setOptions(options: AutoExposureOptions): void;
|
|
1009
|
+
/** 在主动画循环中更新曝光;低分辨率测光按配置间隔执行。 */
|
|
1010
|
+
update(time: DOMHighResTimeStamp): void;
|
|
1011
|
+
dispose(): void;
|
|
1012
|
+
private resolveOptions;
|
|
1013
|
+
private ensureProbeTarget;
|
|
1014
|
+
private measureScene;
|
|
1015
|
+
private calculateTrimmedLuminance;
|
|
1016
|
+
private clampExposure;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
993
1019
|
/**
|
|
994
1020
|
* v3 自动曝光模块。
|
|
995
1021
|
*
|
|
996
1022
|
* 使用低分辨率离屏渲染探针估计相机当前看到的线性亮度,再用指数平滑更新
|
|
997
1023
|
* renderer.toneMappingExposure。探针不会修改主渲染目标,也不会参与后期管线。
|
|
998
1024
|
*/
|
|
999
|
-
declare class
|
|
1025
|
+
declare class AutoExposureModule_2 {
|
|
1000
1026
|
private readonly engine;
|
|
1001
1027
|
private readonly renderer;
|
|
1002
1028
|
private readonly scene;
|
|
@@ -1106,7 +1132,7 @@ declare interface BoundsLike_2 {
|
|
|
1106
1132
|
/**
|
|
1107
1133
|
* 基础几何类型定义
|
|
1108
1134
|
*/
|
|
1109
|
-
declare interface
|
|
1135
|
+
declare interface Box3 {
|
|
1110
1136
|
min: {
|
|
1111
1137
|
x: number;
|
|
1112
1138
|
y: number;
|
|
@@ -1425,54 +1451,43 @@ declare type CalibrationVector3Array = [number, number, number];
|
|
|
1425
1451
|
|
|
1426
1452
|
declare type CalibrationVector3Array_2 = [number, number, number];
|
|
1427
1453
|
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
private
|
|
1431
|
-
private
|
|
1432
|
-
private
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
private
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
private
|
|
1439
|
-
private
|
|
1440
|
-
private
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
y: number;
|
|
1466
|
-
z: number;
|
|
1467
|
-
}, stableUp?: any, distanceOverride?: number | null, animationDuration?: number, onComplete?: () => void): void;
|
|
1468
|
-
/** 保持相机位置不变,以过渡动画将观察目标旋转到指定点。 */
|
|
1469
|
-
rotateToTarget(target: {
|
|
1470
|
-
x: number;
|
|
1471
|
-
y: number;
|
|
1472
|
-
z: number;
|
|
1473
|
-
}, animationDuration?: number, onComplete?: () => void): void;
|
|
1474
|
-
private applyCameraPose;
|
|
1475
|
-
private animateCameraToTarget;
|
|
1454
|
+
/** 管理 GIS 相机的经纬度定位与平滑视图跳转。 */
|
|
1455
|
+
export declare class CameraModule {
|
|
1456
|
+
private readonly camera;
|
|
1457
|
+
private readonly tiles;
|
|
1458
|
+
private readonly cameraFrame;
|
|
1459
|
+
private readonly requestRender;
|
|
1460
|
+
private readonly coordinateModule?;
|
|
1461
|
+
private controls;
|
|
1462
|
+
private currentView;
|
|
1463
|
+
private readonly inverseParentMatrix;
|
|
1464
|
+
private flight;
|
|
1465
|
+
private controlsEnabledBeforeFlight;
|
|
1466
|
+
private disposed;
|
|
1467
|
+
constructor(camera: PerspectiveCamera, tiles: TilesRenderer, cameraFrame: number, requestRender: () => void, initialView?: GISView, coordinateModule?: CoordinateModule | undefined);
|
|
1468
|
+
/** 绑定地球控制器,使跳转期间禁用输入并在结束后同步控制状态。 */
|
|
1469
|
+
setControls(controls: GlobeControls): void;
|
|
1470
|
+
/** 立即跳转到指定经纬度。 */
|
|
1471
|
+
setView(view: GISView): void;
|
|
1472
|
+
/** 平滑飞行到指定经纬度,默认动画时长为 1.5 秒。 */
|
|
1473
|
+
flyTo(view: GISView, options?: GISFlyToOptions): Promise<void>;
|
|
1474
|
+
/** 返回当前已经应用到相机的 WGS84 视图。 */
|
|
1475
|
+
getView(): Required<GISView>;
|
|
1476
|
+
/** 取消当前飞行,并恢复跳转前的控制器状态。 */
|
|
1477
|
+
cancelFlight(message?: string, aborted?: boolean): boolean;
|
|
1478
|
+
/** 由 GIS 共享渲染循环调用,推进当前相机飞行动画。 */
|
|
1479
|
+
update(time: DOMHighResTimeStamp): void;
|
|
1480
|
+
/** 释放飞行任务持有的事件和控制器状态。 */
|
|
1481
|
+
dispose(): void;
|
|
1482
|
+
/** 用户通过 GlobeControls 改变相机后,同步真实地理视图供保存和后续飞行使用。 */
|
|
1483
|
+
private readonly handleControlsChange;
|
|
1484
|
+
private syncViewFromCamera;
|
|
1485
|
+
private resolveView;
|
|
1486
|
+
private applyView;
|
|
1487
|
+
private cleanupFlight;
|
|
1488
|
+
private lerp;
|
|
1489
|
+
private lerpAngle;
|
|
1490
|
+
private normalizeAngle;
|
|
1476
1491
|
}
|
|
1477
1492
|
|
|
1478
1493
|
declare class CameraModule2d {
|
|
@@ -1659,6 +1674,56 @@ declare class CameraModule720 {
|
|
|
1659
1674
|
}
|
|
1660
1675
|
|
|
1661
1676
|
declare class CameraModule_2 {
|
|
1677
|
+
private static readonly MIN_VISIBLE_HEIGHT;
|
|
1678
|
+
private static readonly MIN_CAMERA_DISTANCE;
|
|
1679
|
+
private static readonly CAMERA_ANIMATION_IDLE_EXEMPT_REASON;
|
|
1680
|
+
private engine;
|
|
1681
|
+
perspectiveCamera: THREE.PerspectiveCamera;
|
|
1682
|
+
orthographicCamera: THREE.OrthographicCamera;
|
|
1683
|
+
private cameraAnimationFrame;
|
|
1684
|
+
constructor(engine: any);
|
|
1685
|
+
/** 视图跳转前统一退出图钉查看态,避免批注锁定与相机动画冲突。 */
|
|
1686
|
+
private exitDrawingPinView;
|
|
1687
|
+
private getCameraAspect;
|
|
1688
|
+
private getPerspectiveVisibleHeight;
|
|
1689
|
+
getOrthographicVisibleHeight(camera?: THREE.OrthographicCamera): number;
|
|
1690
|
+
setOrthographicVisibleHeight(visibleHeight: number, camera?: THREE.OrthographicCamera, aspect?: number): void;
|
|
1691
|
+
private getViewDirection;
|
|
1692
|
+
private getStableCameraUp;
|
|
1693
|
+
private updateComposerCamera;
|
|
1694
|
+
private applySwitchedCamera;
|
|
1695
|
+
private resolvePoseReferenceUp;
|
|
1696
|
+
private syncControlsAfterPoseRestore;
|
|
1697
|
+
private inferTargetFromRestoredCamera;
|
|
1698
|
+
switchCurrentCamera(): void;
|
|
1699
|
+
setPerspectiveFov(fov: number, options?: {
|
|
1700
|
+
adjustDistance?: boolean;
|
|
1701
|
+
}): void;
|
|
1702
|
+
switchToPerspectiveCamera(): void;
|
|
1703
|
+
switchToOrthographicCamera(): void;
|
|
1704
|
+
getCameraType(): CameraType;
|
|
1705
|
+
getCameraPose(): ICameraPose;
|
|
1706
|
+
restoreCameraPose(pose: ICameraPose): void;
|
|
1707
|
+
setViewFromOriginAndDirection(origin: {
|
|
1708
|
+
x: number;
|
|
1709
|
+
y: number;
|
|
1710
|
+
z: number;
|
|
1711
|
+
}, direction: {
|
|
1712
|
+
x: number;
|
|
1713
|
+
y: number;
|
|
1714
|
+
z: number;
|
|
1715
|
+
}, stableUp?: any, distanceOverride?: number | null, animationDuration?: number, onComplete?: () => void): void;
|
|
1716
|
+
/** 保持相机位置不变,以过渡动画将观察目标旋转到指定点。 */
|
|
1717
|
+
rotateToTarget(target: {
|
|
1718
|
+
x: number;
|
|
1719
|
+
y: number;
|
|
1720
|
+
z: number;
|
|
1721
|
+
}, animationDuration?: number, onComplete?: () => void): void;
|
|
1722
|
+
private applyCameraPose;
|
|
1723
|
+
private animateCameraToTarget;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
declare class CameraModule_3 {
|
|
1662
1727
|
private static readonly MIN_VISIBLE_HEIGHT;
|
|
1663
1728
|
private static readonly MIN_CAMERA_DISTANCE;
|
|
1664
1729
|
private static readonly CAMERA_ANIMATION_IDLE_EXEMPT_REASON;
|
|
@@ -2140,6 +2205,44 @@ declare interface ContextMenuItemConfig {
|
|
|
2140
2205
|
dividerBefore?: boolean;
|
|
2141
2206
|
}
|
|
2142
2207
|
|
|
2208
|
+
/** 只负责切换入口,具体控制行为由 GIS 或 v3 已有控制器实现。 */
|
|
2209
|
+
export declare class ControllerModule {
|
|
2210
|
+
private readonly engine;
|
|
2211
|
+
private readonly gisControls;
|
|
2212
|
+
private readonly requestRender;
|
|
2213
|
+
private readonly layerManager?;
|
|
2214
|
+
private currentMode;
|
|
2215
|
+
private disposed;
|
|
2216
|
+
private removeThirdPersonPlacementResolver;
|
|
2217
|
+
private removeOrbitCenterResolver;
|
|
2218
|
+
constructor(engine: EngineKernelV3, gisControls: GlobeControls, requestRender: () => void, layerManager?: GISLayerManager | undefined);
|
|
2219
|
+
/** 切换控制器模式,并把业务配置原样委托给 v3 控制模块。 */
|
|
2220
|
+
switchController(mode: GISControllerMode, options?: GISControllerSwitchOptions): void;
|
|
2221
|
+
/** 获取当前已请求的控制器模式。 */
|
|
2222
|
+
getMode(): GISControllerMode;
|
|
2223
|
+
/** 切换到 3d-tiles-renderer 原生 GIS 控制器。 */
|
|
2224
|
+
switchToGIS(): void;
|
|
2225
|
+
/** 切换到 v3 默认轨道控制器。 */
|
|
2226
|
+
switchToDefault(options?: Pick<GISControllerSwitchOptions, 'preserveCameraPose'>): void;
|
|
2227
|
+
/** 切换到 v3 第一人称控制器。 */
|
|
2228
|
+
switchToFirstPerson(): void;
|
|
2229
|
+
/** 进入 v3 第三人称控制器已有的落点选择流程。 */
|
|
2230
|
+
switchToThirdPerson(options?: unknown): void;
|
|
2231
|
+
/** 停止当前控制输入,具体控制器资源仍由各自所属模块释放。 */
|
|
2232
|
+
dispose(): void;
|
|
2233
|
+
/** 重入或离开第三人称前,借助 v3 默认入口清理等待落点状态。 */
|
|
2234
|
+
private leavePendingThirdPersonMode;
|
|
2235
|
+
/** 将 GlobeControls 的旋转支点适配为 v3 ViewCube 使用的 OrbitControls target。 */
|
|
2236
|
+
private ensureViewCubeTargetCompatibility;
|
|
2237
|
+
/** 记录 GIS 当前近远裁剪面,避免底层控制器切换改写地图可见范围。 */
|
|
2238
|
+
private captureCameraRange;
|
|
2239
|
+
/** 将切换前的裁剪范围应用到切换后的活动相机。 */
|
|
2240
|
+
private restoreCameraRange;
|
|
2241
|
+
/** 从当前可见 GIS 图层中拾取地图、地形或模型表面。 */
|
|
2242
|
+
private readonly resolveGISPlacement;
|
|
2243
|
+
private isVisibleWithinLayer;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2143
2246
|
declare class ControlModule {
|
|
2144
2247
|
private engine;
|
|
2145
2248
|
orbitControls: any;
|
|
@@ -2157,13 +2260,15 @@ declare class ControlModule {
|
|
|
2157
2260
|
private handelBehaved;
|
|
2158
2261
|
private pendingThirdPersonOptions;
|
|
2159
2262
|
private prevContainerCursor;
|
|
2263
|
+
private thirdPersonPlacementResolver;
|
|
2264
|
+
private orbitCenterResolver;
|
|
2160
2265
|
private roamLookDirection;
|
|
2161
2266
|
private isDragging;
|
|
2162
2267
|
private isDown;
|
|
2163
2268
|
private containerOffset;
|
|
2164
2269
|
constructor(engine: any);
|
|
2165
2270
|
init(): void;
|
|
2166
|
-
active(): void;
|
|
2271
|
+
active(preferredControl?: any): void;
|
|
2167
2272
|
disActive(): void;
|
|
2168
2273
|
private setEngineControls;
|
|
2169
2274
|
setMoveSpeed(value: number): void;
|
|
@@ -2187,7 +2292,17 @@ declare class ControlModule {
|
|
|
2187
2292
|
private createThirdPersonControl;
|
|
2188
2293
|
private beginThirdPersonPlacement;
|
|
2189
2294
|
isWaitingThirdPersonPlacement(): boolean;
|
|
2190
|
-
|
|
2295
|
+
/** 注册 BIM 八叉树之外的第三人称落点表面,例如 GIS 地图和地形。 */
|
|
2296
|
+
setThirdPersonPlacementResolver(resolver: ThirdPersonPlacementResolver | null): () => void;
|
|
2297
|
+
/** 合并 BIM 与扩展表面的拾取结果,始终选择距离相机最近的落点。 */
|
|
2298
|
+
resolveThirdPersonPlacement(event: any): ThirdPersonPlacementHit | null;
|
|
2299
|
+
/** 注册轨道控制器可使用的外部旋转中心表面。 */
|
|
2300
|
+
setOrbitCenterResolver(resolver: OrbitCenterResolver | null): () => void;
|
|
2301
|
+
/** 轨道模式按下时合并 BIM 与 GIS 命中点,供首次拖动立即使用。 */
|
|
2302
|
+
resolveOrbitCenter(event: any): ThirdPersonPlacementHit | null;
|
|
2303
|
+
private resolveSurfaceHit;
|
|
2304
|
+
private toThirdPersonPlacementHit;
|
|
2305
|
+
applyThirdPersonPlacement(point: THREE.Vector3, normal?: THREE.Vector3): boolean;
|
|
2191
2306
|
setThirdPersonAvatar(model: any, options?: any): void;
|
|
2192
2307
|
setThirdPersonMoveSpeed(value: number): void;
|
|
2193
2308
|
setThirdPersonApplyCollision(value: boolean): void;
|
|
@@ -2390,6 +2505,8 @@ declare class ControlModule_2 {
|
|
|
2390
2505
|
private handelBehaved;
|
|
2391
2506
|
private pendingThirdPersonOptions;
|
|
2392
2507
|
private prevContainerCursor;
|
|
2508
|
+
private thirdPersonPlacementResolver;
|
|
2509
|
+
private orbitCenterResolver;
|
|
2393
2510
|
private suspendedControl;
|
|
2394
2511
|
private roamLookDirection;
|
|
2395
2512
|
private isDragging;
|
|
@@ -2421,6 +2538,16 @@ declare class ControlModule_2 {
|
|
|
2421
2538
|
private createThirdPersonControl;
|
|
2422
2539
|
private beginThirdPersonPlacement;
|
|
2423
2540
|
isWaitingThirdPersonPlacement(): boolean;
|
|
2541
|
+
/** 注册 BIM 八叉树之外的第三人称落点表面,例如 GIS 地图和地形。 */
|
|
2542
|
+
setThirdPersonPlacementResolver(resolver: ThirdPersonPlacementResolver_2 | null): () => void;
|
|
2543
|
+
/** 合并 BIM 与扩展表面的拾取结果,始终选择距离相机最近的落点。 */
|
|
2544
|
+
resolveThirdPersonPlacement(event: any): ThirdPersonPlacementHit_2 | null;
|
|
2545
|
+
/** 注册轨道控制器可使用的外部旋转中心表面。 */
|
|
2546
|
+
setOrbitCenterResolver(resolver: OrbitCenterResolver_2 | null): () => void;
|
|
2547
|
+
/** 轨道模式按下时合并 BIM 与 GIS 命中点,供首次拖动立即使用。 */
|
|
2548
|
+
resolveOrbitCenter(event: any): ThirdPersonPlacementHit_2 | null;
|
|
2549
|
+
private resolveSurfaceHit;
|
|
2550
|
+
private toThirdPersonPlacementHit;
|
|
2424
2551
|
applyThirdPersonPlacement(point: THREE.Vector3, normal?: THREE.Vector3): boolean;
|
|
2425
2552
|
setThirdPersonAvatar(model: any, options?: any): void;
|
|
2426
2553
|
setThirdPersonMoveSpeed(value: number): void;
|
|
@@ -2472,6 +2599,33 @@ declare class ControlModuleGaussian {
|
|
|
2472
2599
|
dispose(): void;
|
|
2473
2600
|
}
|
|
2474
2601
|
|
|
2602
|
+
/**
|
|
2603
|
+
* 统一管理 WGS84、ECEF 与 GIS 局部世界坐标之间的转换。
|
|
2604
|
+
* 其他 GIS 模块不得自行假设 Y 轴始终等于地理高程方向。
|
|
2605
|
+
*/
|
|
2606
|
+
export declare class CoordinateModule {
|
|
2607
|
+
private tiles;
|
|
2608
|
+
private cameraFrame;
|
|
2609
|
+
private readonly inverseTilesMatrix;
|
|
2610
|
+
constructor(tiles: TilesRenderer, cameraFrame: number);
|
|
2611
|
+
/** 切换底图后更新坐标参考,但保持依赖此模块的业务管理器不变。 */
|
|
2612
|
+
setTiles(tiles: TilesRenderer, cameraFrame: number): void;
|
|
2613
|
+
/** 将 WGS84 经纬高转换为 Three.js 世界坐标。 */
|
|
2614
|
+
toWorld(coordinate: GISCoordinate, target?: Vector3): Vector3;
|
|
2615
|
+
/** 将 Three.js 世界坐标反算为 WGS84 经纬高。 */
|
|
2616
|
+
toWgs84(coordinate: Vector3 | GISWorldCoordinate): Required<GISCoordinate>;
|
|
2617
|
+
/** 从相机当前真实世界矩阵读取 WGS84 位置和姿态。 */
|
|
2618
|
+
getCameraView(camera: Camera): Required<GISView>;
|
|
2619
|
+
/** 获取指定 WGS84 位置在 Three.js 世界空间中的东、北、上单位轴。 */
|
|
2620
|
+
getEastNorthUpAxes(coordinate: GISCoordinate, east?: Vector3, north?: Vector3, up?: Vector3): {
|
|
2621
|
+
east: Vector3;
|
|
2622
|
+
north: Vector3;
|
|
2623
|
+
up: Vector3;
|
|
2624
|
+
};
|
|
2625
|
+
private normalizeCoordinate;
|
|
2626
|
+
private normalizeAngle;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2475
2629
|
/**
|
|
2476
2630
|
* 动态创建 3D 引擎实例;未指定渲染后端时根据 WebGPU 支持情况自动选择 v3 或 v2。
|
|
2477
2631
|
* 第二个参数可固定渲染后端,并优先于环境探测结果。
|
|
@@ -2497,15 +2651,11 @@ export declare function createEngine720(options: any): Promise<EngineKernel720>;
|
|
|
2497
2651
|
*/
|
|
2498
2652
|
export declare function createEngineGaussian(options: any): Promise<EngineKernelGaussian>;
|
|
2499
2653
|
|
|
2500
|
-
/**
|
|
2501
|
-
export declare function
|
|
2654
|
+
/** 按指定底座创建 GIS 引擎,并在传入地理配置时完成数据源加载。 */
|
|
2655
|
+
export declare function createEngineGIS(options: EngineGISOptions, gisConfig?: EngineGISConfig): Promise<EngineGISInstance>;
|
|
2502
2656
|
|
|
2503
2657
|
declare function createWebGPUFillAdapter(engine: any, state: WebGPUClippingState): WebGPUFillAdapter;
|
|
2504
2658
|
|
|
2505
|
-
export declare type DeepPartial<T> = T extends (...args: never[]) => unknown ? T : T extends readonly (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
2506
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
2507
|
-
} : T;
|
|
2508
|
-
|
|
2509
2659
|
export declare const DEFAULT_AUTO_EXPOSURE_OPTIONS: ResolvedAutoExposureOptions;
|
|
2510
2660
|
|
|
2511
2661
|
export declare const DEFAULT_LIGHTING_PRESETS: readonly LightingPreset[];
|
|
@@ -2957,12 +3107,6 @@ declare interface DWGMetadata {
|
|
|
2957
3107
|
layoutsUrl?: string;
|
|
2958
3108
|
}
|
|
2959
3109
|
|
|
2960
|
-
/** 将 ECEF 坐标转换为指定 WGS84 原点下的局部 ENU。 */
|
|
2961
|
-
export declare function ecefToEnu(position: GisEcefPosition, origin: GisPosition): GisEnuPosition;
|
|
2962
|
-
|
|
2963
|
-
/** 将 ECEF 坐标迭代还原为 WGS84,经极点分支避免除以接近零的 cos(latitude)。 */
|
|
2964
|
-
export declare function ecefToWgs84(position: GisEcefPosition): Required<GisPosition>;
|
|
2965
|
-
|
|
2966
3110
|
declare type EffectState = Record<WebGPUPostProcessingEffect, boolean>;
|
|
2967
3111
|
|
|
2968
3112
|
/**
|
|
@@ -3029,6 +3173,10 @@ declare interface Engine720Options {
|
|
|
3029
3173
|
dampingFactor?: number;
|
|
3030
3174
|
}
|
|
3031
3175
|
|
|
3176
|
+
declare type EngineFrameCallback = (time: DOMHighResTimeStamp) => void;
|
|
3177
|
+
|
|
3178
|
+
declare type EngineFrameCallback_2 = (time: DOMHighResTimeStamp) => void;
|
|
3179
|
+
|
|
3032
3180
|
/**
|
|
3033
3181
|
* Gaussian 高斯点云引擎配置项。
|
|
3034
3182
|
* 结构参考 core720,由 EngineKernel 统一装配各模块。
|
|
@@ -3052,6 +3200,15 @@ declare interface EngineGaussianOptions {
|
|
|
3052
3200
|
viewerOptions?: Record<string, any>;
|
|
3053
3201
|
}
|
|
3054
3202
|
|
|
3203
|
+
export declare type EngineGISConfig = GISOptions;
|
|
3204
|
+
|
|
3205
|
+
export declare type EngineGISInstance = GIS;
|
|
3206
|
+
|
|
3207
|
+
export declare type EngineGISOptions = EngineKernelV3Options & Pick<EngineKernelV2Options, 'limit_memory'> & {
|
|
3208
|
+
/** 默认使用 v3;指定 v2 时创建原生 WebGLRenderer 引擎。 */
|
|
3209
|
+
engineVersion?: GISEngineVersion;
|
|
3210
|
+
};
|
|
3211
|
+
|
|
3055
3212
|
/**
|
|
3056
3213
|
* 引擎信息统计类
|
|
3057
3214
|
* 用于统计引擎中模型的顶点和三角面数量
|
|
@@ -3510,6 +3667,7 @@ declare class EngineKernelV2 {
|
|
|
3510
3667
|
private readonly _idleFrameInterval;
|
|
3511
3668
|
private _lastIdleFrameTime;
|
|
3512
3669
|
private readonly _idleFrameRateExemptionReasons;
|
|
3670
|
+
private readonly frameCallbacks;
|
|
3513
3671
|
private readonly _fpsCheckInterval;
|
|
3514
3672
|
private readonly _fpsSwitchCooldown;
|
|
3515
3673
|
private readonly _fpsThreshold;
|
|
@@ -3522,11 +3680,12 @@ declare class EngineKernelV2 {
|
|
|
3522
3680
|
camera: THREE.Camera | null;
|
|
3523
3681
|
renderer: THREE.WebGLRenderer | null;
|
|
3524
3682
|
sceneModule: SceneModule;
|
|
3525
|
-
cameraModule:
|
|
3683
|
+
cameraModule: CameraModule_2;
|
|
3526
3684
|
deviceModule: DeviceModule;
|
|
3527
3685
|
renderModule: RenderModule;
|
|
3528
3686
|
controlModule: ControlModule;
|
|
3529
3687
|
composerModule: ComposerModule;
|
|
3688
|
+
autoExposureModule: AutoExposureModule;
|
|
3530
3689
|
loaderModule: LoaderModule;
|
|
3531
3690
|
engineStatus: EngineStatus;
|
|
3532
3691
|
events: EventModule;
|
|
@@ -3592,13 +3751,17 @@ declare class EngineKernelV2 {
|
|
|
3592
3751
|
};
|
|
3593
3752
|
version: string;
|
|
3594
3753
|
private versionEl;
|
|
3595
|
-
|
|
3754
|
+
container: HTMLElement;
|
|
3596
3755
|
constructor(options: EngineKernelV2Options);
|
|
3597
3756
|
changeHandelBehavedMode(mode: string): void;
|
|
3598
3757
|
getHandelBehavedMode(): string;
|
|
3599
3758
|
updateVersionDisplay(): void;
|
|
3600
3759
|
bindControlEvents(control: any): void;
|
|
3601
3760
|
requestComposerRender(): void;
|
|
3761
|
+
/** 与 v3 保持一致的统一重绘入口,供 GIS 等共享模块调用。 */
|
|
3762
|
+
requestRender(): void;
|
|
3763
|
+
/** 注册共享渲染循环回调,返回函数用于释放订阅。 */
|
|
3764
|
+
addFrameCallback(callback: EngineFrameCallback): () => void;
|
|
3602
3765
|
/**
|
|
3603
3766
|
* 设置自动锁帧状态;开启后引擎空闲时限制为 1 FPS,关闭后持续全帧渲染。
|
|
3604
3767
|
*/
|
|
@@ -3680,9 +3843,21 @@ declare class EngineKernelV2 {
|
|
|
3680
3843
|
|
|
3681
3844
|
/** v2 引擎初始化参数。 */
|
|
3682
3845
|
export declare interface EngineKernelV2Options {
|
|
3683
|
-
|
|
3846
|
+
container?: HTMLElement;
|
|
3847
|
+
containerId?: string;
|
|
3684
3848
|
/** 移动端硬件内存,单位 GB;用于选择纹理上限和后处理 MSAA 档位。 */
|
|
3685
3849
|
limit_memory?: number;
|
|
3850
|
+
/** v2 自动曝光;传入 false 可关闭,传入参数对象可覆盖默认值。默认开启。 */
|
|
3851
|
+
autoExposure?: boolean | AutoExposureOptions;
|
|
3852
|
+
/** 普通 Mesh 与实例批次的自动距离裁剪;传入 false 可整体关闭。 */
|
|
3853
|
+
ordinaryMeshOptimization?: false | {
|
|
3854
|
+
enabled?: boolean;
|
|
3855
|
+
meshDistanceCullingEnabled?: boolean;
|
|
3856
|
+
instanceDistanceCullingEnabled?: boolean;
|
|
3857
|
+
instanceDistanceCullingUpdateIntervalMs?: number;
|
|
3858
|
+
maxTrianglesPerMesh?: number;
|
|
3859
|
+
minProjectedSizePx?: number;
|
|
3860
|
+
};
|
|
3686
3861
|
[key: string]: any;
|
|
3687
3862
|
}
|
|
3688
3863
|
|
|
@@ -3698,7 +3873,7 @@ export declare class EngineKernelV3 {
|
|
|
3698
3873
|
camera: THREE.Camera;
|
|
3699
3874
|
renderer: WebGPURenderer;
|
|
3700
3875
|
sceneModule: SceneModule_2;
|
|
3701
|
-
cameraModule:
|
|
3876
|
+
cameraModule: CameraModule_3;
|
|
3702
3877
|
deviceModule: DeviceModule_2;
|
|
3703
3878
|
renderModule: RenderModule_2;
|
|
3704
3879
|
controlModule: ControlModule_2;
|
|
@@ -3716,7 +3891,7 @@ export declare class EngineKernelV3 {
|
|
|
3716
3891
|
worldToScreen: WorldToScreen;
|
|
3717
3892
|
modelProperties: ModelProperties_2;
|
|
3718
3893
|
hoverHighLight: HoverHighLight_2;
|
|
3719
|
-
autoExposureModule:
|
|
3894
|
+
autoExposureModule: AutoExposureModule_2;
|
|
3720
3895
|
rxQuotaListMapper: RxQuotaListMapper_2;
|
|
3721
3896
|
filterLoaderModel: FilterLoaderModel_2;
|
|
3722
3897
|
/** v2 管理器完整集合,保留原有公开 API 以兼容现有调用方。 */
|
|
@@ -3759,7 +3934,6 @@ export declare class EngineKernelV3 {
|
|
|
3759
3934
|
modelEditor: ModelEditor;
|
|
3760
3935
|
modelQuantityList: ModelQuantityList;
|
|
3761
3936
|
roomSpace: RoomSpace;
|
|
3762
|
-
gisManager: GisManager;
|
|
3763
3937
|
materialReplacement: MaterialReplacementManager;
|
|
3764
3938
|
stats?: default_2;
|
|
3765
3939
|
models: any[];
|
|
@@ -3778,6 +3952,7 @@ export declare class EngineKernelV3 {
|
|
|
3778
3952
|
private readonly idleFrameInterval;
|
|
3779
3953
|
private lastIdleFrameTime;
|
|
3780
3954
|
private readonly idleFrameRateExemptionReasons;
|
|
3955
|
+
private readonly frameCallbacks;
|
|
3781
3956
|
private temporalRenderingRequired;
|
|
3782
3957
|
private controlsEnabledBeforePause;
|
|
3783
3958
|
private boundControl;
|
|
@@ -3806,6 +3981,8 @@ export declare class EngineKernelV3 {
|
|
|
3806
3981
|
/** 仅在交互繁忙期间为时间域后处理保持连续帧,空闲时仍遵循 1 FPS 限帧。 */
|
|
3807
3982
|
setTemporalRenderingRequired(enabled: boolean): void;
|
|
3808
3983
|
setIdleFrameRateExempt(reason: string, exempt: boolean): void;
|
|
3984
|
+
/** 注册共享渲染循环回调,返回函数用于释放订阅。 */
|
|
3985
|
+
addFrameCallback(callback: EngineFrameCallback_2): () => void;
|
|
3809
3986
|
private updateTemporalFrameRateExemption;
|
|
3810
3987
|
pauseRendering(): void;
|
|
3811
3988
|
resumeRendering(): void;
|
|
@@ -3828,6 +4005,7 @@ export declare interface EngineKernelV3Options {
|
|
|
3828
4005
|
assetFiles?: File[] | FileList;
|
|
3829
4006
|
sdkAuth?: SdkAuthOptions;
|
|
3830
4007
|
version?: string;
|
|
4008
|
+
/** 强制 WebGPURenderer 使用 WebGL2 后端,适用于后端兼容性验证。 */
|
|
3831
4009
|
forceWebGL?: boolean;
|
|
3832
4010
|
antialias?: boolean;
|
|
3833
4011
|
/** 初始渲染像素比,运行时可由 EngineModelModule 修改,范围 0.5 至 2。 */
|
|
@@ -3857,7 +4035,7 @@ export declare interface EngineKernelV3Options {
|
|
|
3857
4035
|
modelDepthBias?: boolean;
|
|
3858
4036
|
postProcessing?: WebGPUPostProcessingOptions;
|
|
3859
4037
|
/** 初始手动渲染等级,范围 1 至 12,默认 8。 */
|
|
3860
|
-
renderQualityLevel?:
|
|
4038
|
+
renderQualityLevel?: RenderQualityInput;
|
|
3861
4039
|
/** 是否显示 EngineModelModule 维护的渲染设置面板,默认显示。 */
|
|
3862
4040
|
renderQualityUI?: boolean;
|
|
3863
4041
|
/** v3 自动曝光;传入 false 可关闭,传入参数对象可覆盖默认值。默认开启。 */
|
|
@@ -3994,10 +4172,12 @@ declare class EngineModelModule_2 {
|
|
|
3994
4172
|
constructor(engine: any);
|
|
3995
4173
|
/** 初始化默认手动等级和设置面板。 */
|
|
3996
4174
|
init(): void;
|
|
3997
|
-
/** 手动切换 1 至 12
|
|
3998
|
-
setQualityLevel(level:
|
|
4175
|
+
/** 手动切换 1 至 12 级渲染质量,同时接受 v2 三档模式名称。 */
|
|
4176
|
+
setQualityLevel(level: RenderQualityInput): void;
|
|
3999
4177
|
/** 返回当前数字渲染等级。 */
|
|
4000
4178
|
getQualityLevel(): RenderQualityLevel;
|
|
4179
|
+
/** 兼容 v2 的三档模式 API,并映射到 v3 的 1、5、8 级。 */
|
|
4180
|
+
switchModel(mode: LegacyRenderMode): void;
|
|
4001
4181
|
/** 返回指定等级的深拷贝,调用方可以安全地编辑草稿。 */
|
|
4002
4182
|
getQualityPreset(level: number): RenderQualityPreset;
|
|
4003
4183
|
/** 保存指定等级的完整参数,并按需立即应用。 */
|
|
@@ -4166,15 +4346,6 @@ declare class EngineStatus_2 {
|
|
|
4166
4346
|
*/
|
|
4167
4347
|
declare type EntityType = 'LINE' | 'POLYLINE' | 'SPLINE' | 'CIRCLE' | 'HATCH' | 'INSERT' | 'MTEXT' | 'DIMENSIONLINEAR';
|
|
4168
4348
|
|
|
4169
|
-
/** 将局部 ENU 坐标转换回 ECEF。 */
|
|
4170
|
-
export declare function enuToEcef(position: GisEnuPosition, origin: GisPosition): GisEcefPosition;
|
|
4171
|
-
|
|
4172
|
-
/** 将 ENU 映射到既有 V3 GIS 场景轴:+X 西、+Y 天、+Z 北。 */
|
|
4173
|
-
export declare function enuToScene(position: GisEnuPosition): GisScenePosition;
|
|
4174
|
-
|
|
4175
|
-
/** 局部 ENU 到 WGS84 的组合转换。 */
|
|
4176
|
-
export declare function enuToWgs84(position: GisEnuPosition, origin: GisPosition): Required<GisPosition>;
|
|
4177
|
-
|
|
4178
4349
|
declare type EnvironmentType = 'none' | 'hdr' | 'sky';
|
|
4179
4350
|
|
|
4180
4351
|
declare type EnvironmentType_2 = 'none' | 'hdr' | 'sky';
|
|
@@ -4873,1458 +5044,574 @@ declare interface GaussianSceneOptions {
|
|
|
4873
5044
|
|
|
4874
5045
|
declare type GaussianVector3 = [number, number, number];
|
|
4875
5046
|
|
|
4876
|
-
/** 管理 WGS84、ECEF 与 V3 局部 ENU 场景之间的转换和浮动原点事务。 */
|
|
4877
|
-
export declare class GeoReferenceManager {
|
|
4878
|
-
private origin;
|
|
4879
|
-
private readonly floatingOrigin;
|
|
4880
|
-
private readonly onOriginChange?;
|
|
4881
|
-
private readonly participants;
|
|
4882
|
-
private readonly ecefToSceneMatrix;
|
|
4883
|
-
private readonly sceneToEcefMatrix;
|
|
4884
|
-
private readonly temporaryVector;
|
|
4885
|
-
private lastAutomaticChangeAt;
|
|
4886
|
-
private disposed;
|
|
4887
|
-
constructor(options: GeoReferenceManagerOptions);
|
|
4888
|
-
/** 返回当前局部 ENU 原点的不可变副本。 */
|
|
4889
|
-
getOrigin(): Readonly<Required<GisPosition>>;
|
|
4890
|
-
/** 将 WGS84 经纬高转换为当前 V3 场景坐标。 */
|
|
4891
|
-
geographicToScene(position: GisPosition, target?: Vector3): Vector3;
|
|
4892
|
-
/** 将当前 V3 场景坐标转换为 WGS84 经纬高。 */
|
|
4893
|
-
sceneToGeographic(position: GisScenePosition): Required<GisPosition>;
|
|
4894
|
-
/** 复制 ECEF 到当前 V3 场景的仿射矩阵,避免调用方修改内部状态。 */
|
|
4895
|
-
getEcefToSceneMatrix(target?: Matrix4): Matrix4;
|
|
4896
|
-
/** 复制当前 V3 场景到 ECEF 的仿射矩阵。 */
|
|
4897
|
-
getSceneToEcefMatrix(target?: Matrix4): Matrix4;
|
|
4898
|
-
/** 注册需要在浮动原点变化时同步迁移的空间对象持有者。 */
|
|
4899
|
-
registerParticipant(participant: GisOriginParticipant): () => void;
|
|
4900
|
-
/** 手动变更局部原点;所有参与者在当前调用栈内完成迁移或整体回滚。 */
|
|
4901
|
-
setOrigin(nextOrigin: GisPosition, reason?: GisOriginChangeReason): boolean;
|
|
4902
|
-
/** 相机越过阈值时自动把原点移动到相机地理位置;返回本帧是否发生重定位。 */
|
|
4903
|
-
updateFloatingOrigin(cameraPosition: GisScenePosition, now?: number): boolean;
|
|
4904
|
-
/** 清理订阅并禁止继续执行坐标事务。 */
|
|
4905
|
-
dispose(): void;
|
|
4906
|
-
private rebuildMatrices;
|
|
4907
|
-
/** 构建 ECEF 到既有 +X 西、+Y 天、+Z 北场景轴的刚体变换。 */
|
|
4908
|
-
private createEcefToSceneMatrix;
|
|
4909
|
-
private assertUsable;
|
|
4910
|
-
}
|
|
4911
|
-
|
|
4912
|
-
declare interface GeoReferenceManagerOptions {
|
|
4913
|
-
origin: GisPosition;
|
|
4914
|
-
floatingOrigin?: GisFloatingOriginConfig;
|
|
4915
|
-
onOriginChange?: (event: GisOriginTransaction) => void;
|
|
4916
|
-
}
|
|
4917
|
-
|
|
4918
5047
|
/**
|
|
4919
5048
|
* 获取 SDK 内置 public 资源根路径,默认使用版本固定的 CDN。
|
|
4920
5049
|
*/
|
|
4921
5050
|
export declare function getSdkAssetBaseUrl(moduleUrl?: string): string;
|
|
4922
5051
|
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
html: string;
|
|
4944
|
-
visible?: boolean;
|
|
4945
|
-
order?: number;
|
|
4946
|
-
}
|
|
4947
|
-
|
|
4948
|
-
declare interface GisCacheKeyInput {
|
|
4949
|
-
url: string;
|
|
4950
|
-
method?: string;
|
|
4951
|
-
headers?: Readonly<Record<string, string>>;
|
|
4952
|
-
credential?: string;
|
|
4953
|
-
}
|
|
4954
|
-
|
|
4955
|
-
declare interface GisCacheMetrics {
|
|
4956
|
-
entries: number;
|
|
4957
|
-
hits: number;
|
|
4958
|
-
misses: number;
|
|
4959
|
-
evictions: number;
|
|
4960
|
-
}
|
|
4961
|
-
|
|
4962
|
-
export declare interface GisCameraConfig {
|
|
4963
|
-
controller?: {
|
|
4964
|
-
type?: GisControllerType;
|
|
4965
|
-
gis?: GisNavigationControlsOptions;
|
|
4966
|
-
orbitV2?: GisOrbitControlsV2Options;
|
|
4967
|
-
};
|
|
4968
|
-
minHeightAboveSurface?: number;
|
|
4969
|
-
nearFarMode?: 'auto' | 'manual';
|
|
4970
|
-
}
|
|
4971
|
-
|
|
4972
|
-
/** 统一维护 GIS 相机裁剪面;V3 Renderer 已启用反向深度以提高大范围场景精度。 */
|
|
4973
|
-
export declare class GisCameraManager {
|
|
4974
|
-
private readonly geoReference;
|
|
4975
|
-
private readonly options;
|
|
4976
|
-
private camera;
|
|
4977
|
-
private readonly snapshots;
|
|
4978
|
-
private readonly nearFarMode;
|
|
4979
|
-
private readonly minHeightAboveSurface;
|
|
4980
|
-
constructor(camera: Camera, geoReference: GeoReferenceManager, options: GisCameraManagerOptions);
|
|
4981
|
-
/** 相机实例发生切换时记录原裁剪面,销毁 GIS 后可准确恢复。 */
|
|
4982
|
-
setCamera(camera: Camera): void;
|
|
4983
|
-
/** 根据相机椭球高和显示模式收紧 near/far,避免近地深度精度被无界 far 消耗。 */
|
|
4984
|
-
updateClippingPlanes(surfaceHeight?: number): boolean;
|
|
4985
|
-
/** 将相机抬升到最小离地高度,供两种控制器共享同一碰撞底线。 */
|
|
4986
|
-
enforceMinimumHeight(surfaceHeight?: number): boolean;
|
|
4987
|
-
/** 恢复所有接管过的相机裁剪面,不改变相机类型或姿态。 */
|
|
4988
|
-
dispose(): void;
|
|
4989
|
-
private calculateGlobeFar;
|
|
4990
|
-
private capture;
|
|
4991
|
-
}
|
|
4992
|
-
|
|
4993
|
-
declare interface GisCameraManagerOptions {
|
|
4994
|
-
displayMode: GisDisplayMode;
|
|
4995
|
-
nearFarMode?: 'auto' | 'manual';
|
|
4996
|
-
minHeightAboveSurface?: number;
|
|
4997
|
-
}
|
|
4998
|
-
|
|
4999
|
-
/** GIS 相机视角;姿态角均使用度。 */
|
|
5000
|
-
export declare interface GisCameraView extends GisPosition {
|
|
5001
|
-
heading?: number;
|
|
5002
|
-
pitch?: number;
|
|
5003
|
-
roll?: number;
|
|
5004
|
-
}
|
|
5005
|
-
|
|
5006
|
-
declare interface GisCesiumIonImageryLayerConfig extends GisImageryLayerBase {
|
|
5007
|
-
provider: 'cesium-ion';
|
|
5008
|
-
assetId: string | number;
|
|
5009
|
-
token: GisCredentialProvider;
|
|
5010
|
-
}
|
|
5011
|
-
|
|
5012
|
-
/** Cesium ion 鉴权描述只保存凭据引用,不在公开数据源中暴露 Token 明文。 */
|
|
5013
|
-
export declare interface GisCesiumIonTilesetAuthentication {
|
|
5014
|
-
type: 'cesium-ion';
|
|
5015
|
-
assetId: string;
|
|
5016
|
-
endpointUrl: string;
|
|
5017
|
-
credentialSourceId: string;
|
|
5018
|
-
autoRefreshToken: boolean;
|
|
5019
|
-
}
|
|
5020
|
-
|
|
5021
|
-
declare interface GisCesiumIonTilesetConfig extends GisTilesetBaseConfig {
|
|
5022
|
-
provider: 'cesium-ion';
|
|
5023
|
-
assetId: string | number;
|
|
5024
|
-
token: GisCredentialProvider;
|
|
5025
|
-
autoRefreshToken?: boolean;
|
|
5026
|
-
}
|
|
5027
|
-
|
|
5028
|
-
declare interface GisCesiumTerrainConfig extends GisTerrainBaseConfig {
|
|
5029
|
-
provider: 'cesium-ion';
|
|
5030
|
-
assetId: string | number;
|
|
5031
|
-
token: GisCredentialProvider;
|
|
5032
|
-
}
|
|
5033
|
-
|
|
5034
|
-
declare interface GisContextHost {
|
|
5035
|
-
scene: Scene;
|
|
5036
|
-
camera: Camera;
|
|
5037
|
-
renderer: GisRuntimeRenderer;
|
|
5038
|
-
container: HTMLElement;
|
|
5039
|
-
options: {
|
|
5040
|
-
backgroundColor?: ColorRepresentation | 'transparent' | null;
|
|
5041
|
-
};
|
|
5042
|
-
controls?: GisOrbitControls | null;
|
|
5043
|
-
controlModule?: {
|
|
5044
|
-
orbitControls?: GisOrbitControls | null;
|
|
5045
|
-
active?: (controls?: GisOrbitControls) => void;
|
|
5046
|
-
disActive?: () => void;
|
|
5047
|
-
};
|
|
5048
|
-
skyManager: GisSkyService;
|
|
5049
|
-
models?: Array<{
|
|
5050
|
-
url?: string;
|
|
5051
|
-
boundingBox?: Box3;
|
|
5052
|
-
}>;
|
|
5053
|
-
requestComposerRender?: () => void;
|
|
5054
|
-
requestShadowUpdate?: () => void;
|
|
5055
|
-
setIdleFrameRateExempt?: (reason: string, enabled: boolean) => void;
|
|
5056
|
-
bindControlEvents?: (controls: GisOrbitControls) => void;
|
|
5057
|
-
composerModule?: {
|
|
5058
|
-
markSceneDirty?: () => void;
|
|
5059
|
-
};
|
|
5060
|
-
}
|
|
5061
|
-
|
|
5062
|
-
declare interface GisControllerChangeEvent {
|
|
5063
|
-
previous: GisControllerType;
|
|
5064
|
-
current: GisControllerType;
|
|
5065
|
-
}
|
|
5066
|
-
|
|
5067
|
-
declare interface GisControllerConstraints {
|
|
5068
|
-
minDistance: number;
|
|
5069
|
-
maxDistance: number;
|
|
5070
|
-
minHeightAboveSurface: number;
|
|
5071
|
-
enableCollision: boolean;
|
|
5072
|
-
enableHorizonConstraint: boolean;
|
|
5073
|
-
}
|
|
5074
|
-
|
|
5075
|
-
/** 控制器之间传递的稳定快照;位置使用 WGS84,上方向使用 ECEF 单位向量。 */
|
|
5076
|
-
declare interface GisControllerState {
|
|
5077
|
-
camera: Required<GisPosition>;
|
|
5078
|
-
target: Required<GisPosition>;
|
|
5079
|
-
upEcef: GisScenePosition;
|
|
5080
|
-
distance: number;
|
|
5081
|
-
zoom: number;
|
|
5082
|
-
enabled: boolean;
|
|
5083
|
-
constraints: GisControllerConstraints;
|
|
5084
|
-
}
|
|
5085
|
-
|
|
5086
|
-
declare interface GisControllerSwitchErrorEvent {
|
|
5087
|
-
requested: GisControllerType;
|
|
5088
|
-
error: GisError;
|
|
5089
|
-
}
|
|
5090
|
-
|
|
5091
|
-
declare interface GisControllerSwitchOptions {
|
|
5092
|
-
/** 即使目标类型与当前类型相同,也重新同步一次状态。 */
|
|
5093
|
-
force?: boolean;
|
|
5094
|
-
}
|
|
5095
|
-
|
|
5096
|
-
declare interface GisControllerSwitchResult {
|
|
5097
|
-
changed: boolean;
|
|
5098
|
-
previous: GisControllerType;
|
|
5099
|
-
current: GisControllerType;
|
|
5100
|
-
rolledBack: boolean;
|
|
5101
|
-
error?: GisError;
|
|
5102
|
-
}
|
|
5103
|
-
|
|
5104
|
-
export declare type GisControllerType = 'gis' | 'orbit-v2';
|
|
5105
|
-
|
|
5106
|
-
declare type GisCoordinateSystem = 'WGS84' | 'GCJ02';
|
|
5107
|
-
|
|
5108
|
-
declare interface GisCredentialEvent {
|
|
5109
|
-
sourceId: string;
|
|
5110
|
-
}
|
|
5111
|
-
|
|
5112
|
-
/** 统一解析 Token/Key,并合并同一数据源的并发刷新请求。 */
|
|
5113
|
-
export declare class GisCredentialManager {
|
|
5114
|
-
private readonly records;
|
|
5115
|
-
private readonly refreshes;
|
|
5116
|
-
private readonly now;
|
|
5117
|
-
private readonly expirationSkewMs;
|
|
5118
|
-
private readonly onExpired?;
|
|
5119
|
-
private disposed;
|
|
5120
|
-
constructor(options?: GisCredentialManagerOptions);
|
|
5121
|
-
/** 注册或替换数据源凭据;凭据本身不会写入日志、事件或持久缓存。 */
|
|
5122
|
-
register(sourceId: string, provider: GisCredentialProvider): void;
|
|
5123
|
-
/** 移除数据源凭据及其刷新引用。 */
|
|
5124
|
-
remove(sourceId: string): void;
|
|
5125
|
-
/** 解析有效凭据;同一 sourceId 的并发调用共享一个 Promise。 */
|
|
5126
|
-
resolve(sourceId: string, forceRefresh?: boolean): Promise<string>;
|
|
5127
|
-
/** 标记服务端判定的凭据过期,并发出不含 Token 的结构化事件。 */
|
|
5128
|
-
markExpired(sourceId: string): void;
|
|
5129
|
-
/** 强制刷新并继续复用并发刷新任务。 */
|
|
5130
|
-
refresh(sourceId: string): Promise<string>;
|
|
5131
|
-
/** 返回缓存隔离所需的不可逆指纹,不暴露真实凭据。 */
|
|
5132
|
-
getFingerprint(sourceId: string): Promise<string>;
|
|
5133
|
-
/** 清除全部凭据引用,并阻止在途刷新结果写回缓存。 */
|
|
5134
|
-
dispose(): void;
|
|
5135
|
-
private resolveProvider;
|
|
5136
|
-
private isExpired;
|
|
5137
|
-
private assertUsable;
|
|
5138
|
-
private createMissingError;
|
|
5139
|
-
}
|
|
5140
|
-
|
|
5141
|
-
declare interface GisCredentialManagerOptions {
|
|
5142
|
-
now?: () => number;
|
|
5143
|
-
expirationSkewMs?: number;
|
|
5144
|
-
onExpired?: (sourceId: string) => void;
|
|
5145
|
-
}
|
|
5146
|
-
|
|
5147
|
-
export declare type GisCredentialProvider = string | (() => string | GisCredentialValue | Promise<string | GisCredentialValue>);
|
|
5148
|
-
|
|
5149
|
-
export declare interface GisCredentialValue {
|
|
5150
|
-
value: string;
|
|
5151
|
-
/** Unix 毫秒时间戳;到期前会重新调用异步提供器。 */
|
|
5152
|
-
expiresAt?: number;
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
|
-
/** 聚合各图层版权信息,并随显隐、替换和删除实时生成显示模型。 */
|
|
5156
|
-
export declare class GisCreditCollection {
|
|
5157
|
-
private readonly entries;
|
|
5158
|
-
private readonly onChange?;
|
|
5159
|
-
constructor(onChange?: (count: number) => void);
|
|
5160
|
-
/** 添加或替换版权来源;内容未变化时不触发更新。 */
|
|
5161
|
-
upsert(entry: GisAttributionEntry): void;
|
|
5162
|
-
/** 同步图层显隐状态,不删除其版权元数据。 */
|
|
5163
|
-
setVisible(sourceId: string, visible: boolean): void;
|
|
5164
|
-
/** 删除已卸载数据源对应的版权信息。 */
|
|
5165
|
-
remove(sourceId: string): void;
|
|
5166
|
-
/** 清空全部版权来源。 */
|
|
5167
|
-
clear(): void;
|
|
5168
|
-
/** 按顺序聚合可见版权,并把相同文案合并为一个显示项。 */
|
|
5169
|
-
getDisplayModel(): GisAttributionDisplayModel;
|
|
5170
|
-
/** 返回已登记来源总数,包括当前隐藏来源。 */
|
|
5171
|
-
getSourceCount(): number;
|
|
5172
|
-
private emitChange;
|
|
5173
|
-
}
|
|
5174
|
-
|
|
5175
|
-
declare interface GisCreditConfig {
|
|
5176
|
-
visible?: boolean;
|
|
5177
|
-
}
|
|
5178
|
-
|
|
5179
|
-
declare interface GisDiagnosticError {
|
|
5180
|
-
timestamp: number;
|
|
5181
|
-
code: GisErrorCode;
|
|
5182
|
-
module: string;
|
|
5183
|
-
sourceId?: string;
|
|
5184
|
-
message: string;
|
|
5185
|
-
}
|
|
5186
|
-
|
|
5187
|
-
/** 汇总请求、缓存、Provider 和错误指标,不持有场景或业务 UI。 */
|
|
5188
|
-
export declare class GisDiagnostics {
|
|
5189
|
-
private requests;
|
|
5190
|
-
private cache;
|
|
5191
|
-
private providerCount;
|
|
5192
|
-
private attributionCount;
|
|
5193
|
-
private readonly recentErrors;
|
|
5194
|
-
private readonly sourceResponses;
|
|
5195
|
-
private disposed;
|
|
5196
|
-
/** 同步当前等待队列长度。 */
|
|
5197
|
-
requestQueued(queueSize: number): void;
|
|
5198
|
-
/** 记录请求开始和当前活动请求数。 */
|
|
5199
|
-
requestStarted(active: number): void;
|
|
5200
|
-
/** 累加一次请求重试。 */
|
|
5201
|
-
requestRetried(): void;
|
|
5202
|
-
/** 记录成功响应及其数据源状态。 */
|
|
5203
|
-
requestCompleted(sourceId: string | undefined, status: number | undefined, durationMs: number): void;
|
|
5204
|
-
/** 记录失败、取消或超时,错误文案会在保存前脱敏。 */
|
|
5205
|
-
requestFailed(error: GisError, sourceId: string | undefined, durationMs: number): void;
|
|
5206
|
-
/** 请求结算后同步活动数与排队数。 */
|
|
5207
|
-
requestSettled(active: number, queued: number): void;
|
|
5208
|
-
/** 累加一次缓存命中。 */
|
|
5209
|
-
cacheHit(): void;
|
|
5210
|
-
/** 累加一次缓存未命中。 */
|
|
5211
|
-
cacheMiss(): void;
|
|
5212
|
-
/** 同步缓存占用和累计淘汰数量。 */
|
|
5213
|
-
setCacheState(entries: number, evictions: number): void;
|
|
5214
|
-
/** 同步已注册 Provider 数量。 */
|
|
5215
|
-
setProviderCount(count: number): void;
|
|
5216
|
-
/** 同步已登记版权来源数量。 */
|
|
5217
|
-
setAttributionCount(count: number): void;
|
|
5218
|
-
/** 返回与内部可变状态隔离的结构化快照。 */
|
|
5219
|
-
getSnapshot(): GisDiagnosticsSnapshot;
|
|
5220
|
-
/** 清理诊断历史并阻止异步请求继续写入。 */
|
|
5221
|
-
dispose(): void;
|
|
5222
|
-
private createErrorRecord;
|
|
5223
|
-
private setSourceResponse;
|
|
5224
|
-
}
|
|
5225
|
-
|
|
5226
|
-
export declare interface GisDiagnosticsSnapshot {
|
|
5227
|
-
requests: Readonly<GisRequestMetrics>;
|
|
5228
|
-
cache: Readonly<GisCacheMetrics>;
|
|
5229
|
-
providers: number;
|
|
5230
|
-
attributions: number;
|
|
5231
|
-
recentErrors: readonly GisDiagnosticError[];
|
|
5232
|
-
sourceResponses: readonly GisSourceResponseState[];
|
|
5233
|
-
}
|
|
5234
|
-
|
|
5235
|
-
export declare type GisDisplayMode = 'planar' | 'terrain' | 'globe';
|
|
5236
|
-
|
|
5237
|
-
/** ECEF 地心地固直角坐标,单位为米。 */
|
|
5238
|
-
export declare interface GisEcefPosition {
|
|
5239
|
-
x: number;
|
|
5240
|
-
y: number;
|
|
5241
|
-
z: number;
|
|
5242
|
-
}
|
|
5243
|
-
|
|
5244
|
-
/** 以局部原点为基准的东、北、天坐标,单位为米。 */
|
|
5245
|
-
export declare interface GisEnuPosition {
|
|
5246
|
-
east: number;
|
|
5247
|
-
north: number;
|
|
5248
|
-
up: number;
|
|
5249
|
-
}
|
|
5250
|
-
|
|
5251
|
-
export declare interface GisEnvironmentConfig {
|
|
5252
|
-
sky?: boolean | GisSkyConfig;
|
|
5253
|
-
fog?: boolean | GisFogConfig;
|
|
5254
|
-
}
|
|
5255
|
-
|
|
5256
|
-
/** GIS 统一错误对象,保留原始异常但不在 message 中拼接凭据。 */
|
|
5257
|
-
export declare class GisError extends Error {
|
|
5258
|
-
readonly code: GisErrorCode;
|
|
5259
|
-
readonly module: GisErrorModule;
|
|
5260
|
-
readonly cause?: unknown;
|
|
5261
|
-
readonly sourceId?: string;
|
|
5262
|
-
readonly layerId?: string;
|
|
5263
|
-
readonly fieldPath?: string;
|
|
5264
|
-
readonly retryable: boolean;
|
|
5265
|
-
readonly suggestedAction?: string;
|
|
5266
|
-
constructor(options: GisErrorOptions);
|
|
5267
|
-
}
|
|
5268
|
-
|
|
5269
|
-
/** GIS 错误码保持结构化,业务不需要解析错误文案。 */
|
|
5270
|
-
export declare type GisErrorCode = 'GIS_CONFIG_INVALID' | 'GIS_INVALID_STATE' | 'GIS_COORDINATE_INVALID' | 'GIS_CREDENTIALS_MISSING' | 'GIS_CREDENTIALS_EXPIRED' | 'GIS_REQUEST_CANCELLED' | 'GIS_NETWORK_ERROR' | 'GIS_NETWORK_TIMEOUT' | 'GIS_FORMAT_UNSUPPORTED' | 'GIS_DECODE_FAILED' | 'GIS_LEVEL_OUT_OF_RANGE' | 'GIS_SURFACE_UNAVAILABLE' | 'GIS_WEBGPU_UNSUPPORTED' | 'GIS_FEATURE_NOT_IMPLEMENTED' | 'GIS_INITIALIZATION_FAILED' | 'GIS_CONTROLLER_UNAVAILABLE' | 'GIS_CONTROLLER_SWITCH_FAILED' | 'GIS_DISPOSED';
|
|
5271
|
-
|
|
5272
|
-
declare type GisErrorModule = 'manager' | 'config' | 'state' | 'imagery' | 'terrain' | 'tileset' | 'camera' | 'controller' | 'environment' | 'credentials' | 'provider' | 'diagnostics' | 'network' | 'placement';
|
|
5273
|
-
|
|
5274
|
-
declare interface GisErrorOptions {
|
|
5275
|
-
code: GisErrorCode;
|
|
5276
|
-
module: GisErrorModule;
|
|
5277
|
-
message: string;
|
|
5278
|
-
cause?: unknown;
|
|
5279
|
-
sourceId?: string;
|
|
5280
|
-
layerId?: string;
|
|
5281
|
-
fieldPath?: string;
|
|
5282
|
-
retryable?: boolean;
|
|
5283
|
-
suggestedAction?: string;
|
|
5284
|
-
}
|
|
5285
|
-
|
|
5286
|
-
declare type GisEventListener<K extends GisEventType> = (event: GisEventMap[K]) => void;
|
|
5287
|
-
|
|
5288
|
-
/** 所有 GIS 对外事件的载荷映射。 */
|
|
5289
|
-
export declare interface GisEventMap {
|
|
5290
|
-
'state-change': GisStateChangeEvent;
|
|
5291
|
-
ready: void;
|
|
5292
|
-
error: GisError;
|
|
5293
|
-
'layer-added': GisLayerEvent;
|
|
5294
|
-
'layer-ready': GisLayerEvent;
|
|
5295
|
-
'layer-error': GisLayerErrorEvent;
|
|
5296
|
-
'layer-removed': GisLayerEvent;
|
|
5297
|
-
'tile-load-progress': GisTileProgressEvent;
|
|
5298
|
-
'tileset-state-change': GisTilesetPhaseEvent;
|
|
5299
|
-
'tileset-metadata-ready': GisLayerEvent;
|
|
5300
|
-
'tileset-first-visible': GisLayerEvent;
|
|
5301
|
-
'tileset-idle': GisLayerEvent;
|
|
5302
|
-
'camera-change': GisCameraView;
|
|
5303
|
-
'controller-change': GisControllerChangeEvent;
|
|
5304
|
-
'controller-switch-error': GisControllerSwitchErrorEvent;
|
|
5305
|
-
'origin-change': GisOriginChangeEvent;
|
|
5306
|
-
'terrain-ready': GisTerrainEvent;
|
|
5307
|
-
'credentials-expired': GisCredentialEvent;
|
|
5308
|
-
'model-placement-change': GisModelPlacementChangeEvent;
|
|
5309
|
-
'model-placement-refined': GisModelPlacementRefinedEvent;
|
|
5310
|
-
'model-placement-error': GisModelPlacementErrorEvent;
|
|
5311
|
-
}
|
|
5312
|
-
|
|
5313
|
-
declare type GisEventType = keyof GisEventMap;
|
|
5314
|
-
|
|
5315
|
-
declare interface GisFlatTerrainConfig extends GisTerrainBaseConfig {
|
|
5316
|
-
provider: 'flat';
|
|
5317
|
-
height?: number;
|
|
5318
|
-
}
|
|
5319
|
-
|
|
5320
|
-
export declare interface GisFloatingOriginConfig {
|
|
5321
|
-
enabled?: boolean;
|
|
5322
|
-
/** 相机距局部原点达到该距离后重定位,单位为米。 */
|
|
5323
|
-
thresholdMeters?: number;
|
|
5324
|
-
/** 两次自动重定位的最小间隔,单位为毫秒。 */
|
|
5325
|
-
minimumIntervalMs?: number;
|
|
5326
|
-
}
|
|
5327
|
-
|
|
5328
|
-
/** 地理相机飞行选项;动画由 V3 单一渲染循环驱动。 */
|
|
5329
|
-
declare interface GisFlyToOptions {
|
|
5330
|
-
durationMs?: number;
|
|
5331
|
-
easing?: 'linear' | 'ease-in-out';
|
|
5332
|
-
signal?: AbortSignal;
|
|
5333
|
-
}
|
|
5334
|
-
|
|
5335
|
-
declare interface GisFogConfig {
|
|
5336
|
-
enabled?: boolean;
|
|
5337
|
-
color?: ColorRepresentation;
|
|
5338
|
-
density?: number;
|
|
5339
|
-
}
|
|
5340
|
-
|
|
5341
|
-
/** @deprecated 新代码使用 GisEnvironmentConfig.fog。 */
|
|
5342
|
-
export declare interface GisFogOptions {
|
|
5343
|
-
enabled?: boolean;
|
|
5344
|
-
color?: ColorRepresentation;
|
|
5345
|
-
density?: number;
|
|
5346
|
-
}
|
|
5347
|
-
|
|
5348
|
-
export declare interface GisGeoReferenceConfig {
|
|
5349
|
-
floatingOrigin?: GisFloatingOriginConfig;
|
|
5350
|
-
}
|
|
5351
|
-
|
|
5352
|
-
declare interface GisHeightmapTerrainConfig extends GisTerrainBaseConfig {
|
|
5353
|
-
provider: 'heightmap';
|
|
5354
|
-
url: string;
|
|
5355
|
-
encoding?: 'mapbox' | 'terrarium' | 'raw';
|
|
5356
|
-
}
|
|
5357
|
-
|
|
5358
|
-
/** 高度相对于椭球、地形或地形偏移的语义。 */
|
|
5359
|
-
export declare type GisHeightReference = 'ellipsoid' | 'terrain' | 'relative-to-terrain';
|
|
5360
|
-
|
|
5361
|
-
/** 高度参考解析结果统一换算为 WGS84 椭球高。 */
|
|
5362
|
-
export declare interface GisHeightResolution {
|
|
5363
|
-
heightReference: GisHeightReference;
|
|
5364
|
-
ellipsoidHeight: number;
|
|
5365
|
-
terrainHeight: number | null;
|
|
5366
|
-
usedFallback: boolean;
|
|
5367
|
-
}
|
|
5368
|
-
|
|
5369
|
-
declare interface GisHeightResolutionOptions {
|
|
5370
|
-
fallbackTerrainHeight?: number;
|
|
5371
|
-
surfaceOffset?: number;
|
|
5372
|
-
}
|
|
5373
|
-
|
|
5374
|
-
declare interface GisImageryLayerBase {
|
|
5375
|
-
id: string;
|
|
5376
|
-
visible?: boolean;
|
|
5377
|
-
opacity?: number;
|
|
5378
|
-
zIndex?: number;
|
|
5379
|
-
minLevel?: number;
|
|
5380
|
-
maxLevel?: number;
|
|
5381
|
-
tileSize?: number;
|
|
5382
|
-
attribution?: string;
|
|
5383
|
-
}
|
|
5384
|
-
|
|
5385
|
-
export declare type GisImageryLayerConfig = GisAmapImageryLayerConfig | GisTiandituImageryLayerConfig | GisCesiumIonImageryLayerConfig | GisXyzImageryLayerConfig | GisWmtsImageryLayerConfig | GisWmsImageryLayerConfig;
|
|
5386
|
-
|
|
5387
|
-
declare interface GisImageryLayerHandle extends GisLayerHandle {
|
|
5388
|
-
readonly type: 'imagery';
|
|
5389
|
-
readonly provider: string;
|
|
5390
|
-
readonly zIndex: number;
|
|
5391
|
-
}
|
|
5392
|
-
|
|
5393
|
-
declare interface GisImageryLayerUpdate {
|
|
5394
|
-
visible?: boolean;
|
|
5395
|
-
opacity?: number;
|
|
5396
|
-
zIndex?: number;
|
|
5397
|
-
}
|
|
5398
|
-
|
|
5399
|
-
/** @deprecated 仅供旧 createEngine({ gis }) 运行时转换;新代码使用 GisManagerConfig。 */
|
|
5400
|
-
export declare interface GisImageryOptions {
|
|
5401
|
-
type?: 'xyz';
|
|
5402
|
-
url: string;
|
|
5403
|
-
projection?: 'EPSG:3857' | 'EPSG:4326';
|
|
5404
|
-
coordinateSystem?: 'WGS84' | 'GCJ02';
|
|
5405
|
-
levels?: number;
|
|
5406
|
-
tileDimension?: number;
|
|
5407
|
-
attribution?: string;
|
|
5408
|
-
}
|
|
5409
|
-
|
|
5410
|
-
declare type GisImageryRequestScheme = 'xyz' | 'wmts';
|
|
5411
|
-
|
|
5412
|
-
/** 影像 Provider 交给瓦片运行时的标准描述,不包含第三方插件实例。 */
|
|
5413
|
-
declare interface GisImagerySourceDescriptor extends GisSourceDescriptor {
|
|
5414
|
-
kind: 'imagery';
|
|
5415
|
-
url: string;
|
|
5416
|
-
scheme: GisImageryRequestScheme;
|
|
5417
|
-
projection: GisProjection;
|
|
5418
|
-
coordinateSystem: GisCoordinateSystem;
|
|
5419
|
-
minimumLevel: number;
|
|
5420
|
-
maximumLevel: number;
|
|
5421
|
-
tileSize: number;
|
|
5422
|
-
headers?: Readonly<Record<string, string>>;
|
|
5423
|
-
wmts?: {
|
|
5424
|
-
layer: string;
|
|
5425
|
-
style: string;
|
|
5426
|
-
tileMatrixSet: string;
|
|
5427
|
-
format: string;
|
|
5428
|
-
tileMatrixLabels?: readonly string[];
|
|
5429
|
-
dimensions?: Readonly<Record<string, string | number>>;
|
|
5430
|
-
};
|
|
5431
|
-
}
|
|
5432
|
-
|
|
5433
|
-
/** 旧试验 API 允许只覆盖部分视角字段;新代码优先使用 GisCameraView。 */
|
|
5434
|
-
export declare type GisInitialView = Partial<GisCameraView>;
|
|
5435
|
-
|
|
5436
|
-
declare interface GisLayerErrorEvent extends GisLayerEvent {
|
|
5437
|
-
error: GisError;
|
|
5438
|
-
}
|
|
5439
|
-
|
|
5440
|
-
declare interface GisLayerEvent {
|
|
5441
|
-
id: string;
|
|
5442
|
-
type: 'imagery' | 'terrain' | 'tileset';
|
|
5443
|
-
}
|
|
5444
|
-
|
|
5445
|
-
/** 对外暴露的稳定图层句柄,不泄漏第三方瓦片对象。 */
|
|
5446
|
-
export declare interface GisLayerHandle {
|
|
5447
|
-
readonly id: string;
|
|
5448
|
-
readonly type: 'imagery' | 'terrain' | 'tileset';
|
|
5449
|
-
readonly state: GisLayerState;
|
|
5450
|
-
readonly visible: boolean;
|
|
5451
|
-
readonly opacity: number;
|
|
5452
|
-
}
|
|
5453
|
-
|
|
5454
|
-
/** 图层在统一管理器中的生命周期状态。 */
|
|
5455
|
-
declare type GisLayerState = 'loading' | 'ready' | 'error' | 'removed';
|
|
5456
|
-
|
|
5457
|
-
/** 旧试验 API 的兼容别名;新代码使用 GisPosition。 */
|
|
5458
|
-
export declare type GisLocalOrigin = GisPosition;
|
|
5459
|
-
|
|
5460
|
-
/** V3 GIS 唯一公开门面,统一管理配置、状态、事件与内部模块生命周期。 */
|
|
5461
|
-
export declare class GisManager {
|
|
5462
|
-
private readonly events;
|
|
5463
|
-
private readonly stateController;
|
|
5464
|
-
private readonly context;
|
|
5465
|
-
private readonly diagnostics;
|
|
5466
|
-
private readonly providerRegistry;
|
|
5467
|
-
private readonly attributions;
|
|
5468
|
-
private config;
|
|
5469
|
-
private network;
|
|
5470
|
-
private geoReference;
|
|
5471
|
-
private cameraManager;
|
|
5472
|
-
private controllerManager;
|
|
5473
|
-
private runtime;
|
|
5474
|
-
private initializePromise;
|
|
5475
|
-
private lifecycleToken;
|
|
5476
|
-
private legacyAutoInitialize;
|
|
5477
|
-
private legacyCallbacks;
|
|
5478
|
-
readonly imagery: ImageryLayerManager;
|
|
5479
|
-
readonly tilesets: TilesetManager;
|
|
5480
|
-
readonly models: GisModelPlacementManager;
|
|
5481
|
-
constructor(host: GisModuleContextHost, legacyOption?: GisOption);
|
|
5482
|
-
/** 当前兼容运行时的 TilesRenderer;新业务应使用后续图层 API。 */
|
|
5483
|
-
get tiles(): TilesRenderer | null;
|
|
5484
|
-
/** 当前兼容运行时使用的 OrbitControlsV2。 */
|
|
5485
|
-
get controls(): GisOrbitControls | null;
|
|
5486
|
-
/** 同步校验并冻结 GIS 配置,不触发网络请求或创建场景资源。 */
|
|
5487
|
-
configure(config: GisManagerConfig): void;
|
|
5488
|
-
/** 初始化 GIS 资源;并发或重复调用复用同一个任务。 */
|
|
5489
|
-
initialize(): Promise<void>;
|
|
5490
|
-
private initializeInternal;
|
|
5491
|
-
/** 从 stopped 状态恢复已有资源,不重复注册监听或重新请求首屏。 */
|
|
5492
|
-
start(): void;
|
|
5493
|
-
/** 暂停 GIS 更新和输入,但保留已加载资源。 */
|
|
5494
|
-
stop(): void;
|
|
5495
|
-
/** 释放 GIS 自有资源并恢复到 idle;Manager 本身仍可重新配置。 */
|
|
5496
|
-
reset(): Promise<void>;
|
|
5497
|
-
/** 永久销毁 GIS Manager;异步回调在生命周期令牌失效后不再回写。 */
|
|
5498
|
-
dispose(): void;
|
|
5499
|
-
/** 返回当前生命周期状态。 */
|
|
5500
|
-
getState(): GisManagerState;
|
|
5501
|
-
/** 返回校验并冻结后的配置;尚未配置时返回 null。 */
|
|
5502
|
-
getConfig(): Readonly<GisManagerConfig> | null;
|
|
5503
|
-
/** 注册自定义 Provider;新增供应商无需修改影像、地形或相机模块。 */
|
|
5504
|
-
registerProvider<TConfig>(provider: GisProvider<TConfig>): () => void;
|
|
5505
|
-
/** 通过注册器创建标准化数据源描述,供后续图层 Manager 消费。 */
|
|
5506
|
-
createProviderSource<TConfig>(kind: GisProviderKind, providerId: string, config: TConfig): Promise<GisSourceDescriptor>;
|
|
5507
|
-
/** 返回不包含 URL Token 和 Header 凭据的运行诊断快照。 */
|
|
5508
|
-
getDiagnostics(): GisDiagnosticsSnapshot;
|
|
5509
|
-
/** 添加或替换数据源版权;图层显隐与移除应同步调用对应方法。 */
|
|
5510
|
-
setAttribution(entry: GisAttributionEntry): void;
|
|
5511
|
-
/** 同步图层显隐对应的版权显示状态。 */
|
|
5512
|
-
setAttributionVisible(sourceId: string, visible: boolean): void;
|
|
5513
|
-
/** 移除已卸载数据源的版权信息。 */
|
|
5514
|
-
removeAttribution(sourceId: string): void;
|
|
5515
|
-
/** 返回已经排序并去重的版权显示模型。 */
|
|
5516
|
-
getAttributions(): GisAttributionDisplayModel;
|
|
5517
|
-
/** 返回当前局部 ENU 原点;尚未配置时返回 null。 */
|
|
5518
|
-
getOrigin(): Readonly<Required<GisPosition>> | null;
|
|
5519
|
-
/** 将公开 WGS84 坐标转换为当前 V3 GIS 场景坐标。 */
|
|
5520
|
-
geographicToScene(position: GisPosition): GisScenePosition;
|
|
5521
|
-
/** 将当前 V3 GIS 场景坐标转换为公开 WGS84 坐标。 */
|
|
5522
|
-
sceneToGeographic(position: GisScenePosition): Required<GisPosition>;
|
|
5523
|
-
/** 手动移动局部原点;运行中的空间对象会在同一事务内同步迁移。 */
|
|
5524
|
-
setOrigin(origin: GisPosition): boolean;
|
|
5525
|
-
/** 深度合并配置并按原运行状态重建 GIS 资源。 */
|
|
5526
|
-
updateConfig(patch: DeepPartial<GisManagerConfig>): Promise<void>;
|
|
5527
|
-
/** 订阅 GIS 类型化事件,并返回退订函数。 */
|
|
5528
|
-
on<K extends GisEventType>(type: K, listener: GisEventListener<K>): () => void;
|
|
5529
|
-
/** 移除 GIS 类型化事件监听。 */
|
|
5530
|
-
off<K extends GisEventType>(type: K, listener: GisEventListener<K>): void;
|
|
5531
|
-
/** 每帧入口由 V3 单一渲染循环驱动。 */
|
|
5532
|
-
update(): void;
|
|
5533
|
-
/** 同步容器尺寸变化,不创建额外 ResizeObserver。 */
|
|
5534
|
-
resize(): void;
|
|
5535
|
-
/** 设置地理相机视角;当前兼容运行时需处于 ready 或 stopped。 */
|
|
5536
|
-
setView(view: GisCameraView): void;
|
|
5537
|
-
/** 在单一渲染循环中飞行到指定 WGS84 视角。 */
|
|
5538
|
-
flyTo(view: GisCameraView, options?: GisFlyToOptions): Promise<void>;
|
|
5539
|
-
/** 返回当前 GIS 相机视角。 */
|
|
5540
|
-
getView(): GisCameraView;
|
|
5541
|
-
/** 事务式切换 GIS 专用控制器与共享 OrbitControlsV2。 */
|
|
5542
|
-
setController(type: GisControllerType, options?: GisControllerSwitchOptions): Promise<GisControllerSwitchResult>;
|
|
5543
|
-
/** 返回当前实际激活或配置待激活的控制器类型。 */
|
|
5544
|
-
getControllerType(): GisControllerType;
|
|
5545
|
-
/** 返回可跨控制器恢复的 WGS84 状态快照。 */
|
|
5546
|
-
getControllerState(): Readonly<GisControllerState>;
|
|
5547
|
-
/** 将普通场景对象放置到 WGS84 位置。 */
|
|
5548
|
-
placeObject(object: Object3D, placement: GisObjectPlacement): void;
|
|
5549
|
-
/** 将现有 loaderModule 模型放置到 WGS84 位置。 */
|
|
5550
|
-
placeModel(modelUrl: string, placement: GisObjectPlacement): boolean;
|
|
5551
|
-
/** 对当前兼容地表执行高程采样。 */
|
|
5552
|
-
sampleSurfaceHeight(latitude: number, longitude: number, options?: GisSurfaceQueryOptions): Promise<number | null>;
|
|
5553
|
-
/** 将普通模型底面放置到当前地表。 */
|
|
5554
|
-
placeModelOnSurface(modelUrl: string, placement: GisObjectPlacement, options?: GisSurfacePlacementOptions): Promise<GisSurfacePlacementResult>;
|
|
5555
|
-
/** 更新当前 GIS 天空;完整环境配置将在 M9 接入。 */
|
|
5556
|
-
setSky(option: boolean | GisSkyOptions): void;
|
|
5557
|
-
/** 更新当前 GIS 雾;完整环境配置将在 M9 接入。 */
|
|
5558
|
-
setFog(option: boolean | GisFogOptions): void;
|
|
5559
|
-
/** @deprecated 兼容旧内部调用,新代码使用 initialize()。 */
|
|
5560
|
-
init(): Promise<void>;
|
|
5561
|
-
/** 返回是否已经配置 GIS,供旧调用方迁移期间判断。 */
|
|
5562
|
-
isEnabled(): boolean;
|
|
5563
|
-
/** 仅由 Engine 启动旧 createEngine({ gis }) 转换后的配置。 */
|
|
5564
|
-
initializeLegacyIfConfigured(): Promise<void>;
|
|
5565
|
-
private configureLegacyEngineOption;
|
|
5566
|
-
private reportRuntimeError;
|
|
5567
|
-
private assertRuntimeReady;
|
|
5568
|
-
private assertControllerReady;
|
|
5569
|
-
/** 按资源依赖逆序释放,确保共享 OrbitControlsV2 最后恢复。 */
|
|
5570
|
-
private disposeInitializedResources;
|
|
5571
|
-
private assertGeoReference;
|
|
5572
|
-
}
|
|
5573
|
-
|
|
5574
|
-
/** GIS 的全部配置由 GisManager 持有,不属于 EngineKernel 初始化参数。 */
|
|
5575
|
-
export declare interface GisManagerConfig {
|
|
5576
|
-
displayMode: GisDisplayMode;
|
|
5577
|
-
origin: GisPosition;
|
|
5578
|
-
initialView?: GisCameraView;
|
|
5579
|
-
imageryLayers?: GisImageryLayerConfig[];
|
|
5580
|
-
terrain?: false | GisTerrainConfig;
|
|
5581
|
-
tilesets?: GisTilesetConfig[];
|
|
5582
|
-
environment?: GisEnvironmentConfig;
|
|
5583
|
-
camera?: GisCameraConfig;
|
|
5584
|
-
georeference?: GisGeoReferenceConfig;
|
|
5585
|
-
performance?: GisPerformanceConfig;
|
|
5586
|
-
credits?: GisCreditConfig;
|
|
5587
|
-
request?: GisRequestConfig;
|
|
5588
|
-
}
|
|
5589
|
-
|
|
5590
|
-
/** @deprecated 仅供一个次要版本的旧配置转换器使用。 */
|
|
5591
|
-
export declare interface GisManagerOptions {
|
|
5592
|
-
enabled?: boolean;
|
|
5593
|
-
mode?: GisMode;
|
|
5594
|
-
imagery?: GisImageryOptions;
|
|
5595
|
-
imageryLayers?: readonly GisRuntimeImageryLayer[];
|
|
5596
|
-
tilesets?: readonly GisRuntimeTilesetLayer[];
|
|
5597
|
-
tilesetUrl?: string;
|
|
5598
|
-
apiToken?: string;
|
|
5599
|
-
assetId?: string;
|
|
5600
|
-
autoRefreshToken?: boolean;
|
|
5601
|
-
initialView?: GisInitialView;
|
|
5602
|
-
localOrigin?: false | GisLocalOrigin;
|
|
5603
|
-
dracoDecoderPath?: string;
|
|
5604
|
-
fade?: boolean;
|
|
5605
|
-
creasedNormals?: boolean;
|
|
5606
|
-
creaseAngle?: number;
|
|
5607
|
-
errorTarget?: number;
|
|
5608
|
-
loadSiblings?: boolean;
|
|
5609
|
-
maximumCachedTiles?: number;
|
|
5610
|
-
nearFarMode?: 'auto' | 'manual';
|
|
5611
|
-
minHeightAboveSurface?: number;
|
|
5612
|
-
showCredits?: boolean;
|
|
5613
|
-
sky?: boolean | GisSkyOptions;
|
|
5614
|
-
fog?: boolean | GisFogOptions;
|
|
5615
|
-
onLoad?: () => void;
|
|
5616
|
-
onError?: (error: Error) => void;
|
|
5617
|
-
}
|
|
5618
|
-
|
|
5619
|
-
/** GIS Manager 的公开生命周期状态。 */
|
|
5620
|
-
export declare type GisManagerState = 'idle' | 'configured' | 'initializing' | 'ready' | 'stopped' | 'error' | 'disposed';
|
|
5621
|
-
|
|
5622
|
-
export declare type GisMode = 'photogrammetry' | 'planar';
|
|
5623
|
-
|
|
5624
|
-
/** 放置状态事件载荷。 */
|
|
5625
|
-
declare interface GisModelPlacementChangeEvent {
|
|
5626
|
-
handle: GisModelPlacementHandle;
|
|
5627
|
-
}
|
|
5628
|
-
|
|
5629
|
-
/** 放置错误事件载荷。 */
|
|
5630
|
-
declare interface GisModelPlacementErrorEvent {
|
|
5631
|
-
modelId: string;
|
|
5632
|
-
error: Error;
|
|
5633
|
-
}
|
|
5634
|
-
|
|
5635
|
-
/** 对外只读的放置记录,不暴露 Three.js 对象和内部异步任务。 */
|
|
5636
|
-
export declare interface GisModelPlacementHandle {
|
|
5637
|
-
id: string;
|
|
5638
|
-
placement: Readonly<GisObjectPlacement>;
|
|
5639
|
-
options: Readonly<GisModelPlacementOptions>;
|
|
5640
|
-
state: GisModelPlacementState;
|
|
5641
|
-
revision: number;
|
|
5642
|
-
result: Readonly<GisModelPlacementResult> | null;
|
|
5643
|
-
}
|
|
5644
|
-
|
|
5645
|
-
/**
|
|
5646
|
-
* 管理普通 V3 模型的地理放置状态,不接管模型下载、拾取、材质或 GPU 资源。
|
|
5647
|
-
* loaderModule 只需要在模型完成加载与卸载时发送通知。
|
|
5648
|
-
*/
|
|
5649
|
-
export declare class GisModelPlacementManager {
|
|
5650
|
-
private readonly context;
|
|
5651
|
-
private readonly records;
|
|
5652
|
-
private readonly directObjects;
|
|
5653
|
-
private geoReference;
|
|
5654
|
-
private unregisterOriginParticipant;
|
|
5052
|
+
/** 独立承载 3D Tiles、地球控制器及其生命周期,不依赖旧 GIS Manager。 */
|
|
5053
|
+
declare class GIS {
|
|
5054
|
+
readonly options: GISOptions;
|
|
5055
|
+
readonly engine: GISEngineKernel;
|
|
5056
|
+
tiles: TilesRenderer | null;
|
|
5057
|
+
loaderModule: LoaderModule_3;
|
|
5058
|
+
resourceLoaderModule: GISResourceLoaderModule | null;
|
|
5059
|
+
readonly layerManager: GISLayerManager;
|
|
5060
|
+
coordinateModule: CoordinateModule | null;
|
|
5061
|
+
controls: GlobeControls | null;
|
|
5062
|
+
cameraModule: CameraModule | null;
|
|
5063
|
+
controllerModule: ControllerModule | null;
|
|
5064
|
+
modelPositionManager: ModelPositionManager | null;
|
|
5065
|
+
modelCalibrationManager: GISModelCalibrationManager | null;
|
|
5066
|
+
label: GISLabelManager | null;
|
|
5067
|
+
viewCube: GISMainViewManager | null;
|
|
5068
|
+
skyManager: GISSkyManager | null;
|
|
5069
|
+
private resizeObserver;
|
|
5070
|
+
private removeFrameCallback;
|
|
5071
|
+
private previousTime;
|
|
5655
5072
|
private disposed;
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
/**
|
|
5670
|
-
|
|
5671
|
-
/**
|
|
5672
|
-
|
|
5673
|
-
/**
|
|
5674
|
-
|
|
5675
|
-
/**
|
|
5676
|
-
|
|
5677
|
-
/**
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
private applyOriginChange;
|
|
5690
|
-
private transformObject;
|
|
5691
|
-
private reapplyPlacedObjects;
|
|
5692
|
-
private createRecord;
|
|
5693
|
-
private createResult;
|
|
5694
|
-
private toHandle;
|
|
5695
|
-
private emitChange;
|
|
5696
|
-
private reportError;
|
|
5697
|
-
private cancelRefinement;
|
|
5698
|
-
private cancelAllRefinements;
|
|
5699
|
-
private isCurrent;
|
|
5700
|
-
private normalizeDuration;
|
|
5701
|
-
private requireRecord;
|
|
5702
|
-
private requireGeoReference;
|
|
5703
|
-
private assertUsable;
|
|
5704
|
-
}
|
|
5705
|
-
|
|
5706
|
-
declare interface GisModelPlacementManagerOptions {
|
|
5707
|
-
getTarget(modelId: string): GisModelPlacementTarget | null;
|
|
5708
|
-
sampleSurfaceHeight(latitude: number, longitude: number, options: GisModelPlacementOptions): Promise<number | null>;
|
|
5709
|
-
markSceneChanged(): void;
|
|
5710
|
-
emit<K extends GisEventType>(type: K, value: GisEventMap[K]): void;
|
|
5711
|
-
}
|
|
5712
|
-
|
|
5713
|
-
/** 普通模型贴地和异步回补策略;所有高度与时间分别使用米和毫秒。 */
|
|
5714
|
-
export declare interface GisModelPlacementOptions extends GisSurfacePlacementOptions {
|
|
5715
|
-
/** 地表暂不可用时是否继续后台采样并自动回补。 */
|
|
5716
|
-
refineAfterFallback?: boolean;
|
|
5717
|
-
/** 后台回补的最长持续时间。 */
|
|
5718
|
-
refineTimeoutMs?: number;
|
|
5719
|
-
}
|
|
5720
|
-
|
|
5721
|
-
/** 后台地表回补成功事件载荷。 */
|
|
5722
|
-
declare interface GisModelPlacementRefinedEvent {
|
|
5723
|
-
result: GisModelPlacementResult;
|
|
5724
|
-
}
|
|
5725
|
-
|
|
5726
|
-
/** 单次放置或回补后的结构化结果。 */
|
|
5727
|
-
export declare interface GisModelPlacementResult {
|
|
5728
|
-
modelId: string;
|
|
5729
|
-
placed: boolean;
|
|
5730
|
-
state: GisModelPlacementState;
|
|
5731
|
-
heightReference: GisHeightReference;
|
|
5732
|
-
surfaceHeight: number | null;
|
|
5733
|
-
appliedHeight: number;
|
|
5734
|
-
usedFallback: boolean;
|
|
5735
|
-
pendingSurfaceRefinement: boolean;
|
|
5736
|
-
}
|
|
5737
|
-
|
|
5738
|
-
/** 普通 V3 模型地理放置的生命周期状态。 */
|
|
5739
|
-
export declare type GisModelPlacementState = 'waiting-model' | 'sampling-surface' | 'placed' | 'fallback' | 'error';
|
|
5740
|
-
|
|
5741
|
-
declare interface GisModelPlacementTarget {
|
|
5742
|
-
group: Object3D;
|
|
5743
|
-
boundingBox?: Box3;
|
|
5744
|
-
}
|
|
5745
|
-
|
|
5746
|
-
/** 更新接口允许只覆盖需要变化的经纬度、姿态或贴地策略。 */
|
|
5747
|
-
export declare interface GisModelPlacementUpdate {
|
|
5748
|
-
placement?: Partial<GisObjectPlacement>;
|
|
5749
|
-
options?: Partial<GisModelPlacementOptions>;
|
|
5750
|
-
}
|
|
5751
|
-
|
|
5752
|
-
/** GIS 子模块可访问的最小 V3 能力集合,不暴露完整 Engine。 */
|
|
5753
|
-
declare interface GisModuleContext {
|
|
5754
|
-
readonly scene: Scene;
|
|
5755
|
-
readonly camera: Camera;
|
|
5756
|
-
readonly renderer: GisRuntimeRenderer;
|
|
5757
|
-
readonly container: HTMLElement;
|
|
5758
|
-
readonly inputElement: HTMLElement;
|
|
5759
|
-
readonly backgroundColor: ColorRepresentation | 'transparent' | null | undefined;
|
|
5760
|
-
readonly sky: GisSkyService;
|
|
5761
|
-
getOrbitControls(): GisOrbitControls | null;
|
|
5762
|
-
getActiveControls(): GisOrbitControls | null;
|
|
5763
|
-
setActiveControls(controls: GisOrbitControls): void;
|
|
5764
|
-
restoreActiveControls(controls: GisOrbitControls | null, enabled: boolean): void;
|
|
5765
|
-
getModelPlacementTarget(modelUrl: string): GisModelPlacementTarget | null;
|
|
5766
|
-
requestRender(): void;
|
|
5767
|
-
requestShadowUpdate(): void;
|
|
5768
|
-
markSceneDirty(): void;
|
|
5769
|
-
setContinuousRender(reason: string, enabled: boolean): void;
|
|
5770
|
-
emit<K extends GisEventType>(type: K, value: GisEventMap[K]): void;
|
|
5771
|
-
}
|
|
5772
|
-
|
|
5773
|
-
declare type GisModuleContextHost = GisContextHost;
|
|
5774
|
-
|
|
5775
|
-
declare interface GisNavigationControlsOptions {
|
|
5776
|
-
enableCollision?: boolean;
|
|
5777
|
-
enableHorizonConstraint?: boolean;
|
|
5778
|
-
rotateSpeed?: number;
|
|
5779
|
-
zoomSpeed?: number;
|
|
5780
|
-
}
|
|
5781
|
-
|
|
5782
|
-
/** 将场景对象锚定到地理位置时使用的位置和朝向。 */
|
|
5783
|
-
export declare interface GisObjectPlacement extends GisCameraView {
|
|
5784
|
-
/** 模型默认使用底面中心,普通对象固定使用自身原点。 */
|
|
5785
|
-
anchor?: 'origin' | 'bottom-center';
|
|
5786
|
-
heightReference?: GisHeightReference;
|
|
5787
|
-
}
|
|
5788
|
-
|
|
5789
|
-
/** @deprecated 从 EngineKernelV3Options 移除,仅在运行时兼容层识别。 */
|
|
5790
|
-
export declare type GisOption = boolean | GisManagerOptions;
|
|
5791
|
-
|
|
5792
|
-
/** GIS 运行时使用到的 OrbitControlsV2 稳定接口。 */
|
|
5793
|
-
declare interface GisOrbitControls {
|
|
5794
|
-
enabled: boolean;
|
|
5795
|
-
object?: Camera;
|
|
5796
|
-
target?: Vector3;
|
|
5797
|
-
origin?: Vector3;
|
|
5798
|
-
minDistance?: number;
|
|
5799
|
-
maxDistance?: number;
|
|
5800
|
-
enableDamping?: boolean;
|
|
5801
|
-
syncStateFromCamera?: (camera: Camera, target: Vector3, options?: {
|
|
5802
|
-
origin?: 'target' | Vector3;
|
|
5803
|
-
referenceUp?: Vector3;
|
|
5804
|
-
}) => boolean;
|
|
5805
|
-
update?: (force?: boolean) => boolean;
|
|
5806
|
-
}
|
|
5807
|
-
|
|
5808
|
-
declare interface GisOrbitControlsV2Options {
|
|
5809
|
-
minDistance?: number;
|
|
5810
|
-
maxDistance?: number;
|
|
5811
|
-
enableDamping?: boolean;
|
|
5812
|
-
}
|
|
5813
|
-
|
|
5814
|
-
declare interface GisOriginChangeEvent {
|
|
5815
|
-
previous: GisPosition;
|
|
5816
|
-
current: GisPosition;
|
|
5817
|
-
}
|
|
5818
|
-
|
|
5819
|
-
declare type GisOriginChangeReason = 'manual' | 'floating-origin';
|
|
5820
|
-
|
|
5821
|
-
declare interface GisOriginParticipant {
|
|
5822
|
-
/** 实现必须同步完成,且能够接受反向事务以支持失败回滚。 */
|
|
5823
|
-
applyOriginChange(event: GisOriginTransaction): void;
|
|
5824
|
-
}
|
|
5825
|
-
|
|
5826
|
-
/** 内部原点事务事件;sceneTransform 将旧场景坐标原子映射到新场景坐标。 */
|
|
5827
|
-
declare interface GisOriginTransaction {
|
|
5828
|
-
previous: Required<GisPosition>;
|
|
5829
|
-
current: Required<GisPosition>;
|
|
5830
|
-
reason: GisOriginChangeReason;
|
|
5831
|
-
sceneTransform: Readonly<Matrix4>;
|
|
5832
|
-
}
|
|
5833
|
-
|
|
5834
|
-
declare interface GisPerformanceConfig {
|
|
5835
|
-
errorTarget?: number;
|
|
5836
|
-
loadSiblings?: boolean;
|
|
5837
|
-
requestConcurrency?: number;
|
|
5838
|
-
maximumCachedTiles?: number;
|
|
5839
|
-
}
|
|
5840
|
-
|
|
5841
|
-
/** 对外地理位置统一使用 WGS84,经纬度为度,高度为米。 */
|
|
5842
|
-
export declare interface GisPosition {
|
|
5843
|
-
longitude: number;
|
|
5844
|
-
latitude: number;
|
|
5845
|
-
height?: number;
|
|
5846
|
-
}
|
|
5847
|
-
|
|
5848
|
-
declare type GisProjection = 'EPSG:3857' | 'EPSG:4326';
|
|
5849
|
-
|
|
5850
|
-
/** 所有供应商适配器遵循同一接口,新增 Provider 无需修改业务 Manager。 */
|
|
5851
|
-
export declare interface GisProvider<TConfig = unknown> {
|
|
5852
|
-
readonly id: string;
|
|
5853
|
-
readonly kind: GisProviderKind;
|
|
5854
|
-
readonly capabilities: Readonly<GisProviderCapabilities>;
|
|
5855
|
-
createSource(config: TConfig, context: GisProviderContext): GisSourceDescriptor | Promise<GisSourceDescriptor>;
|
|
5856
|
-
}
|
|
5857
|
-
|
|
5858
|
-
export declare interface GisProviderCapabilities {
|
|
5859
|
-
readonly projections?: readonly GisProjection[];
|
|
5860
|
-
readonly coordinateSystems?: readonly GisCoordinateSystem[];
|
|
5861
|
-
readonly minimumLevel?: number;
|
|
5862
|
-
readonly maximumLevel?: number;
|
|
5863
|
-
readonly supportsAuthentication?: boolean;
|
|
5864
|
-
readonly supportsAttribution?: boolean;
|
|
5865
|
-
readonly supportsMultipleSources?: boolean;
|
|
5866
|
-
}
|
|
5867
|
-
|
|
5868
|
-
declare interface GisProviderContext {
|
|
5869
|
-
readonly requests: GisRequestScheduler;
|
|
5870
|
-
readonly credentials: GisCredentialManager;
|
|
5871
|
-
readonly diagnostics: GisDiagnostics;
|
|
5872
|
-
}
|
|
5873
|
-
|
|
5874
|
-
export declare type GisProviderKind = 'imagery' | 'terrain' | 'tileset' | 'ion';
|
|
5875
|
-
|
|
5876
|
-
/** 保存可插拔 Provider,并校验其能力声明与标准化输出。 */
|
|
5877
|
-
export declare class GisProviderRegistry {
|
|
5878
|
-
private readonly providers;
|
|
5879
|
-
private readonly onChange?;
|
|
5880
|
-
private disposed;
|
|
5881
|
-
constructor(onChange?: (count: number) => void);
|
|
5882
|
-
/** 注册 Provider;返回的退订函数只移除本次注册的实例。 */
|
|
5883
|
-
register<TConfig>(provider: GisProvider<TConfig>): () => void;
|
|
5884
|
-
/** 按类型和 ID 查询 Provider,不泄漏注册表可变集合。 */
|
|
5885
|
-
get<TConfig = unknown>(kind: GisProviderKind, id: string): GisProvider<TConfig> | null;
|
|
5886
|
-
/** 返回全部或指定类型 Provider 的只读快照。 */
|
|
5887
|
-
list(kind?: GisProviderKind): readonly GisProvider[];
|
|
5888
|
-
/** 调用 Provider 并验证描述符没有跨类型或冒充其他 Provider。 */
|
|
5889
|
-
createSource<TConfig>(kind: GisProviderKind, id: string, config: TConfig, context: GisProviderContext): Promise<GisSourceDescriptor>;
|
|
5890
|
-
/** 清空注册项并禁止销毁后继续注册或创建数据源。 */
|
|
5891
|
-
dispose(): void;
|
|
5892
|
-
private assertUsable;
|
|
5893
|
-
private createProviderError;
|
|
5894
|
-
}
|
|
5895
|
-
|
|
5896
|
-
declare interface GisProviderRequestDescriptor {
|
|
5897
|
-
url: string;
|
|
5898
|
-
method?: string;
|
|
5899
|
-
headers?: Readonly<Record<string, string>>;
|
|
5900
|
-
query?: Readonly<Record<string, string>>;
|
|
5901
|
-
credentialSourceId?: string;
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
declare interface GisQuantizedMeshTerrainConfig extends GisTerrainBaseConfig {
|
|
5905
|
-
provider: 'quantized-mesh';
|
|
5906
|
-
url: string;
|
|
5907
|
-
headers?: Record<string, string>;
|
|
5908
|
-
}
|
|
5909
|
-
|
|
5910
|
-
declare interface GisRequestConfig {
|
|
5911
|
-
timeoutMs?: number;
|
|
5912
|
-
retryCount?: number;
|
|
5913
|
-
retryBaseDelayMs?: number;
|
|
5914
|
-
}
|
|
5915
|
-
|
|
5916
|
-
declare interface GisRequestExecutionContext {
|
|
5917
|
-
signal: AbortSignal;
|
|
5918
|
-
attempt: number;
|
|
5919
|
-
}
|
|
5920
|
-
|
|
5921
|
-
declare interface GisRequestExecutionResult<T> {
|
|
5922
|
-
data: T;
|
|
5923
|
-
status?: number;
|
|
5924
|
-
headers?: Readonly<Record<string, string>>;
|
|
5925
|
-
}
|
|
5926
|
-
|
|
5927
|
-
declare interface GisRequestMetadata {
|
|
5928
|
-
requestId: string;
|
|
5929
|
-
sourceId?: string;
|
|
5930
|
-
url: string;
|
|
5931
|
-
method: string;
|
|
5932
|
-
status?: number;
|
|
5933
|
-
startedAt: number;
|
|
5934
|
-
completedAt: number;
|
|
5935
|
-
durationMs: number;
|
|
5936
|
-
attempts: number;
|
|
5937
|
-
fromCache: boolean;
|
|
5938
|
-
}
|
|
5939
|
-
|
|
5940
|
-
declare interface GisRequestMetrics {
|
|
5941
|
-
queued: number;
|
|
5942
|
-
active: number;
|
|
5943
|
-
started: number;
|
|
5944
|
-
completed: number;
|
|
5945
|
-
failed: number;
|
|
5946
|
-
canceled: number;
|
|
5947
|
-
timedOut: number;
|
|
5948
|
-
retried: number;
|
|
5949
|
-
}
|
|
5950
|
-
|
|
5951
|
-
export declare interface GisRequestResult<T> {
|
|
5952
|
-
data: T;
|
|
5953
|
-
headers: Readonly<Record<string, string>>;
|
|
5954
|
-
metadata: GisRequestMetadata;
|
|
5955
|
-
}
|
|
5956
|
-
|
|
5957
|
-
/** 为全部 GIS Provider 提供统一的并发、取消、超时与重试调度。 */
|
|
5958
|
-
export declare class GisRequestScheduler {
|
|
5959
|
-
private readonly queue;
|
|
5960
|
-
private readonly active;
|
|
5961
|
-
private readonly concurrency;
|
|
5962
|
-
private readonly timeoutMs;
|
|
5963
|
-
private readonly retryCount;
|
|
5964
|
-
private readonly retryBaseDelayMs;
|
|
5965
|
-
private readonly cache;
|
|
5966
|
-
private readonly diagnostics;
|
|
5967
|
-
private readonly ownsCache;
|
|
5968
|
-
private requestSequence;
|
|
5969
|
-
private disposed;
|
|
5970
|
-
constructor(options?: GisRequestSchedulerOptions, dependencies?: {
|
|
5971
|
-
cache?: GisResponseCache;
|
|
5972
|
-
diagnostics?: GisDiagnostics;
|
|
5973
|
-
});
|
|
5974
|
-
/** 入队请求并返回可独立取消的句柄。 */
|
|
5975
|
-
schedule<T>(task: GisRequestTask<T>): GisScheduledRequest<T>;
|
|
5976
|
-
/** 取消排队或执行中的单个请求。 */
|
|
5977
|
-
cancel(id: string, reason?: string): void;
|
|
5978
|
-
/** 返回当前等待执行的请求数量。 */
|
|
5979
|
-
getQueueSize(): number;
|
|
5980
|
-
/** 返回当前占用并发槽位的请求数量。 */
|
|
5981
|
-
getActiveCount(): number;
|
|
5982
|
-
/** 取消所有任务并阻止迟到的 Promise 结果写入缓存与诊断。 */
|
|
5983
|
-
dispose(): void;
|
|
5984
|
-
private drain;
|
|
5985
|
-
private run;
|
|
5986
|
-
private runAttempt;
|
|
5987
|
-
private waitForRetry;
|
|
5988
|
-
private normalizeError;
|
|
5989
|
-
private createCancelError;
|
|
5990
|
-
private createRejectedHandle;
|
|
5991
|
-
private syncCacheMetrics;
|
|
5992
|
-
}
|
|
5993
|
-
|
|
5994
|
-
declare interface GisRequestSchedulerOptions {
|
|
5995
|
-
concurrency?: number;
|
|
5996
|
-
timeoutMs?: number;
|
|
5997
|
-
retryCount?: number;
|
|
5998
|
-
retryBaseDelayMs?: number;
|
|
5999
|
-
}
|
|
6000
|
-
|
|
6001
|
-
export declare interface GisRequestTask<T> {
|
|
6002
|
-
id?: string;
|
|
6003
|
-
sourceId?: string;
|
|
6004
|
-
url: string;
|
|
6005
|
-
method?: string;
|
|
6006
|
-
headers?: Readonly<Record<string, string>>;
|
|
6007
|
-
/** 仅用于生成不可逆缓存指纹,不进入诊断或错误信息。 */
|
|
6008
|
-
credential?: string;
|
|
6009
|
-
signal?: AbortSignal;
|
|
6010
|
-
timeoutMs?: number;
|
|
6011
|
-
retryCount?: number;
|
|
6012
|
-
retryBaseDelayMs?: number;
|
|
6013
|
-
cache?: boolean;
|
|
6014
|
-
cacheKey?: string;
|
|
6015
|
-
cacheTtlMs?: number;
|
|
6016
|
-
execute(context: GisRequestExecutionContext): Promise<GisRequestExecutionResult<T>>;
|
|
6017
|
-
shouldRetry?(error: GisError, attempt: number): boolean;
|
|
6018
|
-
}
|
|
6019
|
-
|
|
6020
|
-
/** 保存可复用的标准化响应;采用有界 LRU,避免瓦片请求无限占用内存。 */
|
|
6021
|
-
export declare class GisResponseCache {
|
|
6022
|
-
private readonly entries;
|
|
6023
|
-
private readonly maxEntries;
|
|
6024
|
-
private readonly defaultTtlMs;
|
|
6025
|
-
private readonly now;
|
|
6026
|
-
private evictionCount;
|
|
6027
|
-
private disposed;
|
|
6028
|
-
constructor(options?: GisResponseCacheOptions);
|
|
6029
|
-
/** 读取缓存并刷新 LRU 顺序;过期项目会立即释放。 */
|
|
6030
|
-
get<T>(key: string): GisRequestResult<T> | null;
|
|
6031
|
-
/** 写入响应并淘汰最久未使用项目;零容量配置等同关闭缓存。 */
|
|
6032
|
-
set<T>(key: string, value: GisRequestResult<T>, ttlMs?: number): void;
|
|
6033
|
-
/** 清空全部缓存项,但保留缓存实例供后续请求复用。 */
|
|
6034
|
-
clear(): void;
|
|
6035
|
-
/** 返回当前未过期或尚未访问清理的缓存项数量。 */
|
|
6036
|
-
getSize(): number;
|
|
6037
|
-
/** 返回因容量上限发生的累计淘汰次数。 */
|
|
6038
|
-
getEvictionCount(): number;
|
|
6039
|
-
/** 清空缓存并禁止后续异步请求重新写入。 */
|
|
5073
|
+
private baseMapSwitchVersion;
|
|
5074
|
+
private activeBaseSource;
|
|
5075
|
+
private readonly runtimeEngine;
|
|
5076
|
+
constructor(engine: GISEngineKernel, options: GISOptions);
|
|
5077
|
+
/** 按 Three.js 官方示例注册插件、定位相机并启动瓦片调度。 */
|
|
5078
|
+
initialize(): Promise<this>;
|
|
5079
|
+
/** 返回 GIS 是否已完成初始化且尚未销毁。 */
|
|
5080
|
+
isInitialized(): boolean;
|
|
5081
|
+
/** 兼容旧版业务入口,加载 3D Tiles 并返回稳定模型句柄。 */
|
|
5082
|
+
load3DTiles(options: GISLoadTilesetOptions & {
|
|
5083
|
+
url: string;
|
|
5084
|
+
flyTo?: boolean;
|
|
5085
|
+
}): Promise<GISLoadedTileset>;
|
|
5086
|
+
/** 统一加载在线 3D Tiles、glTF/GLB、GeoJSON 或 BIM 模型。 */
|
|
5087
|
+
loadModel(url: string, options?: GISModelLoadOptions): Promise<GISLoadedModel>;
|
|
5088
|
+
/** 加载本地 3D Tiles 文件集、glTF/GLB、GeoJSON 或 BIM 文件包。 */
|
|
5089
|
+
loadModelFile(files: File[] | FileList, options?: GISLocalLoadOptions & LoadModelOptions): Promise<GISLoadedModel[]>;
|
|
5090
|
+
/** 解析 ViewToken 并通过统一 GIS 资源加载链路加载。 */
|
|
5091
|
+
loadModelByViewToken(viewToken: string, options?: GISModelLoadOptions): Promise<GISLoadedModel[]>;
|
|
5092
|
+
/** 按统一模型句柄或 id 卸载资源。 */
|
|
5093
|
+
removeModel(idOrModel: string | GISLoadedModel): boolean;
|
|
5094
|
+
/**
|
|
5095
|
+
* 运行时切换 GIS 底图,并保留当前 WGS84 相机视角和业务图层。
|
|
5096
|
+
* 新底图加载失败时不会修改当前场景。
|
|
5097
|
+
*/
|
|
5098
|
+
switchBaseMap(source: GISImageId | GISSource): Promise<void>;
|
|
5099
|
+
/** 同时支持 3D Tiles 图层 id 和 BIM 模型 URL 的 ENU 校准。 */
|
|
5100
|
+
applyCalibration(options: GISModelCalibrationOptions): boolean;
|
|
5101
|
+
/** 返回全部 3D Tiles 与 BIM 校准状态。 */
|
|
5102
|
+
getModelCalibrationItems(): GISModelCalibrationItem[];
|
|
5103
|
+
/** 恢复指定 3D Tiles 或 BIM 模型的校准基准矩阵。 */
|
|
5104
|
+
resetModelCalibration(id: string): boolean;
|
|
5105
|
+
/** 释放控制器、瓦片缓存、事件以及 v3 引擎持有的 GPU 资源。 */
|
|
6040
5106
|
dispose(): void;
|
|
6041
|
-
|
|
5107
|
+
private configureControls;
|
|
5108
|
+
/** WebGPU 不编译 GlobeControls 内置的 GLSL ShaderMaterial,因此禁用该辅助圆圈。 */
|
|
5109
|
+
private disableIncompatiblePivotMarker;
|
|
5110
|
+
/** WebGPURenderer 可承载 WebGPU 或 WebGL2,兼容逻辑必须按实际后端判断。 */
|
|
5111
|
+
private usesWebGpuBackend;
|
|
5112
|
+
private readonly update;
|
|
5113
|
+
private readonly updateResolution;
|
|
5114
|
+
private readonly requestRender;
|
|
5115
|
+
private readonly handleLoadError;
|
|
5116
|
+
private getBaseLayerSource;
|
|
5117
|
+
private requireResourceLoader;
|
|
5118
|
+
}
|
|
5119
|
+
|
|
5120
|
+
/** GIS 场景可切换的控制器模式。 */
|
|
5121
|
+
export declare const GISControllerMode: {
|
|
5122
|
+
readonly GIS: "gis";
|
|
5123
|
+
readonly Default: "default";
|
|
5124
|
+
readonly FirstPerson: "first-person";
|
|
5125
|
+
readonly ThirdPerson: "third-person";
|
|
5126
|
+
};
|
|
6042
5127
|
|
|
6043
|
-
declare
|
|
6044
|
-
maxEntries?: number;
|
|
6045
|
-
defaultTtlMs?: number;
|
|
6046
|
-
now?: () => number;
|
|
6047
|
-
}
|
|
5128
|
+
export declare type GISControllerMode = typeof GISControllerMode[keyof typeof GISControllerMode];
|
|
6048
5129
|
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
zIndex: number;
|
|
5130
|
+
export declare interface GISControllerSwitchOptions {
|
|
5131
|
+
/** 切回 v3 默认控制器时是否保持当前相机姿态。 */
|
|
5132
|
+
preserveCameraPose?: boolean;
|
|
5133
|
+
/** 原样透传给 v3 第三人称控制器的配置。 */
|
|
5134
|
+
thirdPersonOptions?: unknown;
|
|
6055
5135
|
}
|
|
6056
5136
|
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
5137
|
+
/** GIS 对外统一使用的 WGS84 地理坐标,角度单位为度,高度单位为米。 */
|
|
5138
|
+
export declare interface GISCoordinate {
|
|
5139
|
+
longitude: number;
|
|
5140
|
+
latitude: number;
|
|
5141
|
+
height?: number;
|
|
6060
5142
|
}
|
|
6061
5143
|
|
|
6062
|
-
/**
|
|
6063
|
-
declare
|
|
6064
|
-
source: GisTilesetSourceDescriptor;
|
|
6065
|
-
visible: boolean;
|
|
6066
|
-
maximumScreenSpaceError: number;
|
|
6067
|
-
maximumCachedTiles: number;
|
|
6068
|
-
requestConcurrency: number;
|
|
6069
|
-
transform: GisTilesetTransformConfig;
|
|
6070
|
-
}
|
|
5144
|
+
/** XYZ 影像采用的经纬度坐标基准。 */
|
|
5145
|
+
export declare type GISCoordinateSystem = 'wgs84' | 'gcj02';
|
|
6071
5146
|
|
|
6072
|
-
declare interface
|
|
6073
|
-
|
|
6074
|
-
|
|
5147
|
+
export declare interface GISCubeSkyBoxOptions {
|
|
5148
|
+
urls: GISSkyBoxUrls;
|
|
5149
|
+
/** 背景亮度与环境光强度,默认值为 1。 */
|
|
5150
|
+
intensity?: number;
|
|
5151
|
+
/** 背景模糊度,取值范围为 0 到 1。 */
|
|
5152
|
+
blurriness?: number;
|
|
5153
|
+
/** 天空盒绕 Y 轴旋转角度,单位为度。 */
|
|
5154
|
+
rotation?: number;
|
|
6075
5155
|
}
|
|
6076
5156
|
|
|
6077
|
-
|
|
6078
|
-
export declare interface GisScenePosition {
|
|
6079
|
-
x: number;
|
|
6080
|
-
y: number;
|
|
6081
|
-
z: number;
|
|
6082
|
-
}
|
|
5157
|
+
export declare type GISEngineKernel = EngineKernelV2 | EngineKernelV3;
|
|
6083
5158
|
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
5159
|
+
/** GIS 使用的底层引擎版本;WebGPU 使用 v3,WebGL 使用 v2。 */
|
|
5160
|
+
export declare type GISEngineVersion = 'v2' | 'v3';
|
|
5161
|
+
|
|
5162
|
+
export declare interface GISFlyToOptions {
|
|
5163
|
+
durationMs?: number;
|
|
5164
|
+
signal?: AbortSignal;
|
|
6088
5165
|
}
|
|
6089
5166
|
|
|
6090
|
-
declare interface
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
5167
|
+
export declare interface GISFlyToTilesetOptions {
|
|
5168
|
+
/** 包围球之外的留白倍率,默认 1.25。 */
|
|
5169
|
+
padding?: number;
|
|
5170
|
+
/** 等待根瓦片元数据的超时时间,默认 15 秒。 */
|
|
5171
|
+
timeoutMs?: number;
|
|
5172
|
+
/** 相机相对局部地平线的仰角,单位为度,默认 35。 */
|
|
5173
|
+
elevation?: number;
|
|
6095
5174
|
}
|
|
6096
5175
|
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
5176
|
+
export declare interface GISHdrSkyBoxOptions {
|
|
5177
|
+
/** v3 引擎内置 HDR 标识,默认使用晴朗无云的 4。 */
|
|
5178
|
+
id?: string;
|
|
5179
|
+
/** HDR 环境光强度,默认值为 0.2。 */
|
|
6101
5180
|
intensity?: number;
|
|
6102
|
-
|
|
5181
|
+
/** HDR 背景亮度,默认值为 1。 */
|
|
5182
|
+
backgroundIntensity?: number;
|
|
6103
5183
|
}
|
|
6104
5184
|
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
5185
|
+
/** 引擎内置影像配置标识。 */
|
|
5186
|
+
export declare type GISImageId = 'cesium' | 'gd' | 'gd2';
|
|
5187
|
+
|
|
5188
|
+
/** 管理 WGS84 GIS 标签,并在可见 GIS/BIM 图层上完成选点。 */
|
|
5189
|
+
export declare class GISLabelManager {
|
|
5190
|
+
private readonly engine;
|
|
5191
|
+
private readonly coordinateModule;
|
|
5192
|
+
private readonly layerManager;
|
|
5193
|
+
private readonly manager;
|
|
5194
|
+
private readonly worldToScreen;
|
|
5195
|
+
private readonly raycaster;
|
|
5196
|
+
constructor(engine: EngineKernelV3, coordinateModule: CoordinateModule, layerManager: GISLayerManager);
|
|
5197
|
+
/** 进入一次选点模式,结果同时包含 WGS84 和 Three.js 世界坐标。 */
|
|
5198
|
+
pickPoint(): Promise<LabelCoordinate | null>;
|
|
5199
|
+
/** 兼容旧版回调式选点。 */
|
|
5200
|
+
startPickPoint(callback?: (coordinate: LabelCoordinate | null) => void): Promise<LabelCoordinate | null>;
|
|
5201
|
+
/** 创建 GIS 标签;经纬度按 WGS84 解释。 */
|
|
5202
|
+
createLabel(options: LabelCreateOptions): string;
|
|
5203
|
+
/** 更新指定 GIS 标签。 */
|
|
5204
|
+
updateLabel(id: string, options: LabelUpdateOptions): boolean;
|
|
5205
|
+
/** 删除指定 GIS 标签。 */
|
|
5206
|
+
deleteLabel(id: string): boolean;
|
|
5207
|
+
/** deleteLabel 的兼容别名。 */
|
|
5208
|
+
removeLabel(id: string): boolean;
|
|
5209
|
+
/** 清空全部 GIS 标签。 */
|
|
5210
|
+
clearLabels(): void;
|
|
5211
|
+
/** 查询单个 GIS 标签。 */
|
|
5212
|
+
getLabel(id: string): LabelInstance | undefined;
|
|
5213
|
+
/** 查询全部 GIS 标签。 */
|
|
5214
|
+
getLabels(): LabelInstance[];
|
|
5215
|
+
/** 监听标签点击,并返回取消监听函数。 */
|
|
5216
|
+
onLabelClick(callback: LabelClickCallback): () => void;
|
|
5217
|
+
/** 取消指定标签点击监听。 */
|
|
5218
|
+
offLabelClick(callback: LabelClickCallback): void;
|
|
5219
|
+
/** 由 GIS 共享帧循环更新标签屏幕位置。 */
|
|
5220
|
+
update(): void;
|
|
5221
|
+
/** 释放 DOM、选点监听和标签数据。 */
|
|
5222
|
+
dispose(): void;
|
|
5223
|
+
private projectCoordinate;
|
|
5224
|
+
private resolveWorldCoordinate;
|
|
5225
|
+
private pickCoordinate;
|
|
5226
|
+
private uniqueObjects;
|
|
6112
5227
|
}
|
|
6113
5228
|
|
|
6114
|
-
|
|
6115
|
-
export declare interface GisSourceDescriptor {
|
|
5229
|
+
export declare interface GISLayerInfo {
|
|
6116
5230
|
id: string;
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
metadata?: Readonly<Record<string, unknown>>;
|
|
5231
|
+
name: string;
|
|
5232
|
+
type: GISLayerType;
|
|
5233
|
+
source?: string;
|
|
5234
|
+
visible: boolean;
|
|
5235
|
+
/** 图层对应的 Three.js 场景对象,供高级业务读取。 */
|
|
5236
|
+
object: Object3D;
|
|
6124
5237
|
}
|
|
6125
5238
|
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
5239
|
+
/** 统一登记 GIS 数据图层,并通过场景对象显隐实现无损开关。 */
|
|
5240
|
+
export declare class GISLayerManager {
|
|
5241
|
+
private readonly engine;
|
|
5242
|
+
private readonly layers;
|
|
5243
|
+
private layerSequence;
|
|
5244
|
+
constructor(engine: EngineKernelV3);
|
|
5245
|
+
/** 登记图层;不同对象不得复用同一个 id,避免产生无法查询的孤立图层。 */
|
|
5246
|
+
registerLayer(registration: GISLayerRegistration): GISLayerInfo;
|
|
5247
|
+
/** 查询全部 GIS 图层,返回快照以避免外部修改内部登记信息。 */
|
|
5248
|
+
getLayers(): GISLayerInfo[];
|
|
5249
|
+
/** 按 id 查询单个 GIS 图层。 */
|
|
5250
|
+
getLayer(id: string): GISLayerInfo | null;
|
|
5251
|
+
/** 仅合并当前可见的业务模型,避免底图、地形和标注放大回家视角。 */
|
|
5252
|
+
getModelBoundingBox(): Box3_2 | null;
|
|
5253
|
+
/** 设置图层显隐;图层不存在时返回 false。 */
|
|
5254
|
+
setLayerVisible(id: string, visible: boolean): boolean;
|
|
5255
|
+
/** 开启指定图层。 */
|
|
5256
|
+
showLayer(id: string): boolean;
|
|
5257
|
+
/** 关闭指定图层,但保留已加载资源。 */
|
|
5258
|
+
hideLayer(id: string): boolean;
|
|
5259
|
+
/** 切换指定图层,返回切换后的显隐状态;图层不存在时返回 null。 */
|
|
5260
|
+
toggleLayer(id: string): boolean | null;
|
|
5261
|
+
/** 注销图层登记,不移除或销毁场景资源。 */
|
|
5262
|
+
unregisterLayer(id: string): boolean;
|
|
5263
|
+
/** 调用资源所有者的释放回调并移除图层;无释放回调时返回 false。 */
|
|
5264
|
+
removeLayer(id: string): boolean;
|
|
5265
|
+
/** 清空登记信息;实际资源仍由各自加载器负责释放。 */
|
|
5266
|
+
dispose(): void;
|
|
5267
|
+
private toInfo;
|
|
6132
5268
|
}
|
|
6133
5269
|
|
|
6134
|
-
declare interface
|
|
6135
|
-
|
|
6136
|
-
|
|
5270
|
+
export declare interface GISLayerRegistration {
|
|
5271
|
+
/** 未指定时由管理器按图层类型生成。 */
|
|
5272
|
+
id?: string;
|
|
5273
|
+
name: string;
|
|
5274
|
+
type: GISLayerType;
|
|
5275
|
+
source?: string;
|
|
5276
|
+
object: Object3D;
|
|
5277
|
+
/** 由资源所有者提供的释放回调;未提供时图层只允许注销登记。 */
|
|
5278
|
+
remove?: () => boolean | void;
|
|
6137
5279
|
}
|
|
6138
5280
|
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
fallbackHeight?: number;
|
|
6142
|
-
}
|
|
5281
|
+
/** GIS 图层分类;天空和控制器不属于可开关的数据图层。 */
|
|
5282
|
+
export declare type GISLayerType = 'imagery' | 'tileset' | 'model' | 'vector' | 'custom';
|
|
6143
5283
|
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
5284
|
+
/** 对外稳定的 GIS 模型句柄,避免业务依赖具体加载器内部结构。 */
|
|
5285
|
+
export declare interface GISLoadedModel {
|
|
5286
|
+
id: string;
|
|
5287
|
+
name: string;
|
|
5288
|
+
type: GISModelType;
|
|
5289
|
+
source: string;
|
|
5290
|
+
object: Object3D;
|
|
5291
|
+
raw?: TilesRenderer | Object3D;
|
|
6148
5292
|
}
|
|
6149
5293
|
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
5294
|
+
/** 3D Tiles 模型句柄。 */
|
|
5295
|
+
export declare interface GISLoadedTileset extends GISLoadedModel {
|
|
5296
|
+
type: '3dtiles';
|
|
5297
|
+
raw: TilesRenderer;
|
|
6153
5298
|
}
|
|
6154
5299
|
|
|
6155
|
-
declare interface
|
|
6156
|
-
|
|
6157
|
-
|
|
5300
|
+
declare interface GISLoaderTilesetLifecycle {
|
|
5301
|
+
onTilesetAdded?(tiles: TilesRenderer, layer: {
|
|
5302
|
+
id: string;
|
|
5303
|
+
name: string;
|
|
5304
|
+
source: string;
|
|
5305
|
+
}, ready: boolean): void;
|
|
5306
|
+
onTilesetReady?(tiles: TilesRenderer): void;
|
|
5307
|
+
onTilesetRemoved?(tiles: TilesRenderer, layerId?: string): void;
|
|
6158
5308
|
}
|
|
6159
5309
|
|
|
6160
|
-
export declare
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
5310
|
+
export declare interface GISLoadTilesetOptions {
|
|
5311
|
+
/** 图层管理器中的稳定标识;未指定时自动生成。 */
|
|
5312
|
+
id?: string;
|
|
5313
|
+
/** 图层列表中的显示名称,默认使用 URL。 */
|
|
5314
|
+
name?: string;
|
|
5315
|
+
/** 高度偏移,单位为米;局部坐标模式下只改变 Y,不改变水平位置。 */
|
|
5316
|
+
heightOffset?: number;
|
|
5317
|
+
/** 自定义请求入口,供本地 tileset 文件集映射使用。 */
|
|
5318
|
+
fetchData?: (url: string, options?: RequestInit) => Promise<Response>;
|
|
6164
5319
|
}
|
|
6165
5320
|
|
|
6166
|
-
|
|
5321
|
+
/** GIS 本地文件加载选项。 */
|
|
5322
|
+
export declare interface GISLocalLoadOptions {
|
|
5323
|
+
id?: string;
|
|
5324
|
+
name?: string;
|
|
5325
|
+
/** GeoJSON 未提供高度时采用的默认高度,单位为米。 */
|
|
5326
|
+
height?: number;
|
|
5327
|
+
}
|
|
6167
5328
|
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
subdomains?: readonly string[];
|
|
5329
|
+
/** GIS 局部原点;用于消除地心大坐标在 GPU 中产生的浮点精度抖动。 */
|
|
5330
|
+
declare interface GISLocalOrigin {
|
|
5331
|
+
latitude: number;
|
|
5332
|
+
longitude: number;
|
|
5333
|
+
height?: number;
|
|
6174
5334
|
}
|
|
6175
5335
|
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
5336
|
+
/** 保存和恢复可持久化的 WGS84 GIS 主视角。 */
|
|
5337
|
+
export declare class GISMainViewManager {
|
|
5338
|
+
private cameraModule;
|
|
5339
|
+
private readonly initialView;
|
|
5340
|
+
private mainView;
|
|
5341
|
+
constructor(cameraModule: CameraModule, initialView: GISView);
|
|
5342
|
+
/** 切换底图重建相机模块后更新引用,同时保留已经保存的主视角。 */
|
|
5343
|
+
setCameraModule(cameraModule: CameraModule): void;
|
|
5344
|
+
/** 保存用户当前实际相机姿态,而不是上一次 API 写入的缓存。 */
|
|
5345
|
+
saveMainViewPort(): Required<GISView>;
|
|
5346
|
+
/** 设置主视角并立即应用;null 表示清除已保存视角。 */
|
|
5347
|
+
setMainViewPort(view: GISView | null): void;
|
|
5348
|
+
/** 平滑飞行到已保存的主视角;未保存时保持当前视图。 */
|
|
5349
|
+
goToMainPort(options?: GISFlyToOptions): Promise<void>;
|
|
5350
|
+
/** 清除主视角并回到初始化视图。 */
|
|
5351
|
+
resetMainViewPort(): void;
|
|
5352
|
+
/** 查询已保存主视角的独立快照。 */
|
|
5353
|
+
getMainViewPort(): Required<GISView> | null;
|
|
6183
5354
|
}
|
|
6184
5355
|
|
|
6185
|
-
|
|
5356
|
+
/** 3D Tiles 与 BIM 共用的校准状态快照。 */
|
|
5357
|
+
export declare interface GISModelCalibrationItem {
|
|
6186
5358
|
id: string;
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
5359
|
+
name: string;
|
|
5360
|
+
source: string;
|
|
5361
|
+
type: GISModelCalibrationTargetType;
|
|
5362
|
+
offset: GISModelCalibrationOffset;
|
|
5363
|
+
rotation: GISModelCalibrationRotation;
|
|
5364
|
+
baseMatrix: number[];
|
|
5365
|
+
ready: boolean;
|
|
6193
5366
|
}
|
|
6194
5367
|
|
|
6195
|
-
/**
|
|
6196
|
-
declare
|
|
6197
|
-
readonly
|
|
6198
|
-
readonly
|
|
6199
|
-
readonly
|
|
5368
|
+
/** 使用当地 ENU 坐标统一校准附加 3D Tiles 与普通 BIM 模型。 */
|
|
5369
|
+
export declare class GISModelCalibrationManager {
|
|
5370
|
+
private readonly engine;
|
|
5371
|
+
private readonly coordinateModule;
|
|
5372
|
+
private readonly records;
|
|
5373
|
+
constructor(engine: EngineKernelV3, coordinateModule: CoordinateModule);
|
|
5374
|
+
/** 登记附加 3D Tiles;根节点就绪后再冻结加载完成矩阵作为校准基准。 */
|
|
5375
|
+
registerTileset(id: string, name: string, source: string, tiles: TilesRenderer, ready?: boolean): GISModelCalibrationItem;
|
|
5376
|
+
/** 高度偏移和根瓦片变换完成后,记录最终加载矩阵。 */
|
|
5377
|
+
markTilesetReady(tiles: TilesRenderer): boolean;
|
|
5378
|
+
/** 登记普通 BIM 模型;模型 URL 默认同时作为校准 id。 */
|
|
5379
|
+
registerBimModel(url: string, options?: RegisterBimCalibrationOptions): GISModelCalibrationItem;
|
|
5380
|
+
/** 查询全部模型校准状态快照。 */
|
|
5381
|
+
getItems(): GISModelCalibrationItem[];
|
|
5382
|
+
/** 查询单个模型校准状态。 */
|
|
5383
|
+
getItem(id: string): GISModelCalibrationItem | null;
|
|
5384
|
+
/**
|
|
5385
|
+
* 从基准矩阵应用 ENU 偏移与旋转。
|
|
5386
|
+
* 每次都从 baseMatrix 重算,避免滑块连续调整时累计产生水平漂移。
|
|
5387
|
+
*/
|
|
5388
|
+
setTransform(options: GISModelCalibrationOptions): boolean;
|
|
5389
|
+
/** 恢复模型登记时的矩阵。 */
|
|
5390
|
+
reset(id: string): boolean;
|
|
5391
|
+
/** 移除模型的校准记录,不改变模型当前矩阵。 */
|
|
5392
|
+
unregister(id: string): boolean;
|
|
5393
|
+
/** 释放内部快照,模型资源仍由各自加载器管理。 */
|
|
5394
|
+
dispose(): void;
|
|
5395
|
+
private createRecord;
|
|
5396
|
+
private captureBaseState;
|
|
5397
|
+
private readAnchorWorld;
|
|
5398
|
+
private buildCalibratedLocalMatrix;
|
|
5399
|
+
private applyMatrix;
|
|
5400
|
+
private resolveOffset;
|
|
5401
|
+
private resolveRotation;
|
|
5402
|
+
private numberOrCurrent;
|
|
5403
|
+
private emitChanged;
|
|
5404
|
+
private cloneItem;
|
|
5405
|
+
private zeroOffset;
|
|
5406
|
+
private zeroRotation;
|
|
5407
|
+
}
|
|
5408
|
+
|
|
5409
|
+
/** 模型在当地 ENU 坐标系中的平移,单位为米。 */
|
|
5410
|
+
export declare interface GISModelCalibrationOffset {
|
|
5411
|
+
east: number;
|
|
5412
|
+
north: number;
|
|
5413
|
+
up: number;
|
|
6200
5414
|
}
|
|
6201
5415
|
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
5416
|
+
/** 应用模型校准时允许只修改偏移或旋转中的一部分。 */
|
|
5417
|
+
export declare interface GISModelCalibrationOptions {
|
|
5418
|
+
id: string;
|
|
5419
|
+
offset?: Partial<GISModelCalibrationOffset>;
|
|
5420
|
+
rotation?: Partial<GISModelCalibrationRotation>;
|
|
6207
5421
|
}
|
|
6208
5422
|
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
5423
|
+
/** 模型在当地 ENU 坐标系中的旋转,单位为度。 */
|
|
5424
|
+
export declare interface GISModelCalibrationRotation {
|
|
5425
|
+
heading: number;
|
|
5426
|
+
pitch: number;
|
|
5427
|
+
roll: number;
|
|
6213
5428
|
}
|
|
6214
5429
|
|
|
6215
|
-
declare type
|
|
5430
|
+
export declare type GISModelCalibrationTargetType = '3dtiles' | 'bim';
|
|
6216
5431
|
|
|
6217
|
-
/**
|
|
6218
|
-
declare interface
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
readonly phase: GisTilesetPhase;
|
|
6225
|
-
readonly progress: Readonly<GisTileProgressEvent>;
|
|
6226
|
-
readonly transform: Readonly<GisTilesetTransformConfig>;
|
|
5432
|
+
/** GIS 统一模型加载选项;type 可用于无扩展名 URL 的显式分流。 */
|
|
5433
|
+
export declare interface GISModelLoadOptions extends GISLocalLoadOptions, LoadModelOptions {
|
|
5434
|
+
type?: GISModelType;
|
|
5435
|
+
/** 3D Tiles 加载后是否自动跳转,默认 true。 */
|
|
5436
|
+
flyTo?: boolean;
|
|
5437
|
+
/** 3D Tiles 高度偏移,单位为米。 */
|
|
5438
|
+
heightOffset?: number;
|
|
6227
5439
|
}
|
|
6228
5440
|
|
|
6229
|
-
/**
|
|
6230
|
-
declare interface
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
5441
|
+
/** 普通 BIM 模型的 WGS84 定位信息;角度单位为度,高度单位为米。 */
|
|
5442
|
+
export declare interface GISModelPosition {
|
|
5443
|
+
longitude: number;
|
|
5444
|
+
latitude: number;
|
|
5445
|
+
height?: number;
|
|
5446
|
+
heading?: number;
|
|
5447
|
+
pitch?: number;
|
|
5448
|
+
roll?: number;
|
|
6236
5449
|
}
|
|
6237
5450
|
|
|
6238
|
-
|
|
5451
|
+
/** GIS 统一模型类型。 */
|
|
5452
|
+
export declare type GISModelType = '3dtiles' | 'bim' | 'gltf' | 'geojson';
|
|
5453
|
+
|
|
5454
|
+
declare interface GISOptions {
|
|
5455
|
+
/** 内置影像配置标识,未指定时使用 Cesium。 */
|
|
5456
|
+
imageId?: GISImageId;
|
|
5457
|
+
/** 物理天空配置;未提供 sky 与 skyBox 时默认使用内置 HDR 天空盒。 */
|
|
5458
|
+
sky?: boolean | GISSkyOptions;
|
|
5459
|
+
/** 六面图天空盒配置;指定后优先于物理天空。 */
|
|
5460
|
+
skyBox?: GISSkyBoxOptions;
|
|
5461
|
+
source?: GISSource;
|
|
5462
|
+
initialView?: GISView;
|
|
5463
|
+
/** 城市级局部原点;默认使用 initialView 经纬度,传 false 可保留地心坐标。 */
|
|
5464
|
+
localOrigin?: false | GISLocalOrigin;
|
|
5465
|
+
/** Draco 解码器目录;默认使用 SDK 随包发布的 draco/ 资源,通常无需配置。 */
|
|
5466
|
+
dracoDecoderPath?: string;
|
|
5467
|
+
/** 屏幕空间误差阈值,越小近地瓦片越精细,默认值为 2。 */
|
|
5468
|
+
errorTarget?: number;
|
|
5469
|
+
loadSiblings?: boolean;
|
|
5470
|
+
/** 是否启用瓦片渐隐;WebGPU GIS 默认关闭以避免父子 LOD 边界漏缝。 */
|
|
5471
|
+
fade?: boolean;
|
|
5472
|
+
/** 是否保留 TRAA;默认关闭,避免流式瓦片切换时产生时域抖动。 */
|
|
5473
|
+
temporalAntialiasing?: boolean;
|
|
5474
|
+
creasedNormals?: boolean;
|
|
5475
|
+
creaseAngle?: number;
|
|
5476
|
+
onError?: (error: Error) => void;
|
|
5477
|
+
}
|
|
6239
5478
|
|
|
6240
|
-
|
|
6241
|
-
|
|
5479
|
+
/**
|
|
5480
|
+
* 统一加载 GIS 数据资源。
|
|
5481
|
+
* 3D Tiles 复用 GIS 瓦片加载器,BIM 复用 v3 模型加载器,避免产生两套模型状态。
|
|
5482
|
+
*/
|
|
5483
|
+
export declare class GISResourceLoaderModule {
|
|
5484
|
+
private readonly engine;
|
|
5485
|
+
private readonly tilesLoader;
|
|
5486
|
+
private readonly coordinateModule;
|
|
5487
|
+
private readonly layerManager;
|
|
5488
|
+
private readonly calibrationManager;
|
|
5489
|
+
private readonly resources;
|
|
5490
|
+
private sequence;
|
|
5491
|
+
private disposed;
|
|
5492
|
+
constructor(engine: EngineKernelV3, tilesLoader: LoaderModule_3, coordinateModule: CoordinateModule, layerManager: GISLayerManager, calibrationManager: GISModelCalibrationManager);
|
|
5493
|
+
/** 按 URL 加载 3D Tiles、glTF/GLB、GeoJSON 或 v3 BIM 模型。 */
|
|
5494
|
+
loadModel(url: string, options?: GISModelLoadOptions): Promise<GISLoadedModel>;
|
|
5495
|
+
/**
|
|
5496
|
+
* 加载浏览器选择的本地资源文件。
|
|
5497
|
+
* 支持 3D Tiles 文件集、glTF/GLB、GeoJSON 和 v3 BIM 包,不包含 SHP。
|
|
5498
|
+
*/
|
|
5499
|
+
loadModelFile(files: File[] | FileList, options?: GISLocalLoadOptions & LoadModelOptions): Promise<GISLoadedModel[]>;
|
|
5500
|
+
/** 通过 SDK ViewToken 解析资源,再进入相同的类型分流和生命周期。 */
|
|
5501
|
+
loadModelByViewToken(viewToken: string, options?: GISModelLoadOptions): Promise<GISLoadedModel[]>;
|
|
5502
|
+
/** 移除统一资源句柄对应的模型和图层。 */
|
|
5503
|
+
removeModel(idOrModel: string | GISLoadedModel): boolean;
|
|
5504
|
+
/** 查询由本模块加载的全部资源句柄。 */
|
|
5505
|
+
getModels(): GISLoadedModel[];
|
|
5506
|
+
/** 释放独立资源;3D Tiles 与 BIM 分别交还各自底层加载器卸载。 */
|
|
5507
|
+
dispose(): void;
|
|
5508
|
+
private loadTileset;
|
|
5509
|
+
private loadGltfUrl;
|
|
5510
|
+
private loadLocalGltf;
|
|
5511
|
+
private parseGltf;
|
|
5512
|
+
private loadGeoJsonUrl;
|
|
5513
|
+
private createGeoJsonModel;
|
|
5514
|
+
private loadBimUrl;
|
|
5515
|
+
private loadLocalBim;
|
|
5516
|
+
private addBimModel;
|
|
5517
|
+
private addStandaloneModel;
|
|
5518
|
+
private track;
|
|
5519
|
+
private loadLocalTileset;
|
|
5520
|
+
private disposeObject;
|
|
5521
|
+
private inferUrlType;
|
|
5522
|
+
private inferResolvedType;
|
|
5523
|
+
private isGeoJson;
|
|
5524
|
+
private resolveId;
|
|
5525
|
+
private normalizeUrl;
|
|
5526
|
+
private filePath;
|
|
5527
|
+
private baseName;
|
|
5528
|
+
private baseNameFromPath;
|
|
5529
|
+
private normalizePath;
|
|
5530
|
+
private assertUsable;
|
|
6242
5531
|
}
|
|
6243
5532
|
|
|
6244
|
-
export declare type
|
|
6245
|
-
readonly kind: 'tileset';
|
|
6246
|
-
};
|
|
5533
|
+
export declare type GISSkyBoxOptions = GISCubeSkyBoxOptions | GISHdrSkyBoxOptions;
|
|
6247
5534
|
|
|
6248
|
-
/**
|
|
6249
|
-
declare
|
|
6250
|
-
preprocessUrl?: (url: string) => string;
|
|
6251
|
-
fetch?: (url: string, options: RequestInit) => Promise<Response>;
|
|
6252
|
-
}
|
|
5535
|
+
/** 六面图顺序固定为:右、左、上、下、前、后。 */
|
|
5536
|
+
export declare type GISSkyBoxUrls = readonly [string, string, string, string, string, string];
|
|
6253
5537
|
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
5538
|
+
/** 为 GIS 提供内置 HDR、六面图和物理天空三种简单配置。 */
|
|
5539
|
+
export declare class GISSkyManager {
|
|
5540
|
+
private readonly engine;
|
|
5541
|
+
private readonly cubeTextureLoader;
|
|
5542
|
+
private skyBoxTexture;
|
|
5543
|
+
private savedSceneState;
|
|
5544
|
+
private skyBoxLoadVersion;
|
|
5545
|
+
private skyBoxType;
|
|
5546
|
+
constructor(engine: EngineKernelV3);
|
|
5547
|
+
/** 应用天空配置;传 false 时关闭并保留资源,便于后续快速恢复。 */
|
|
5548
|
+
setSky(option?: boolean | GISSkyOptions): void;
|
|
5549
|
+
/** 显示天空,并可同时覆盖预设、参数和环境光强度。 */
|
|
5550
|
+
show(options?: GISSkyOptions): void;
|
|
5551
|
+
/** 设置内置 HDR 或六面图天空盒,未传配置时使用内置晴空。 */
|
|
5552
|
+
setSkyBox(options?: GISSkyBoxOptions): Promise<void>;
|
|
5553
|
+
/** 清除天空盒并恢复设置前的场景背景和环境光。 */
|
|
5554
|
+
clearSkyBox(): void;
|
|
5555
|
+
private releaseCubeSkyBox;
|
|
5556
|
+
/** 返回 HDR 或六面图天空盒是否已经应用到场景。 */
|
|
5557
|
+
isSkyBoxActive(): boolean;
|
|
5558
|
+
/** 隐藏当前天空;天空盒纹理会立即释放,物理天空可按需保留资源。 */
|
|
5559
|
+
hide(remove?: boolean): void;
|
|
5560
|
+
/** 切换 v3 引擎内置天空预设。 */
|
|
5561
|
+
setPreset(preset: GISSkyPreset): void;
|
|
5562
|
+
/** 增量修改太阳、云层和大气参数。 */
|
|
5563
|
+
setParams(params: GISSkyParams): void;
|
|
5564
|
+
/** 设置天空生成的环境光强度。 */
|
|
5565
|
+
setIntensity(intensity: number): void;
|
|
5566
|
+
/** 返回当前天空是否可见。 */
|
|
5567
|
+
isActive(): boolean;
|
|
5568
|
+
/** 释放 GIS 天空资源,v3 引擎销毁时仍会执行兜底清理。 */
|
|
5569
|
+
dispose(): void;
|
|
5570
|
+
private captureSceneState;
|
|
5571
|
+
private validateSkyBoxOptions;
|
|
5572
|
+
private refreshScene;
|
|
6258
5573
|
}
|
|
6259
5574
|
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
headers?: Readonly<Record<string, string>>;
|
|
6265
|
-
requestAdapter?: GisTilesetRequestAdapter;
|
|
6266
|
-
authentication?: GisCesiumIonTilesetAuthentication;
|
|
5575
|
+
export declare interface GISSkyOptions {
|
|
5576
|
+
preset?: GISSkyPreset;
|
|
5577
|
+
params?: GISSkyParams;
|
|
5578
|
+
intensity?: number;
|
|
6267
5579
|
}
|
|
6268
5580
|
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
5581
|
+
export declare type GISSkyParams = SkyParams_2;
|
|
5582
|
+
|
|
5583
|
+
export declare type GISSkyPreset = SkyPresetName_2;
|
|
5584
|
+
|
|
5585
|
+
declare type GISSource = {
|
|
5586
|
+
type: 'url';
|
|
5587
|
+
url: string;
|
|
5588
|
+
} | {
|
|
5589
|
+
type: 'xyz';
|
|
5590
|
+
url: string;
|
|
5591
|
+
levels?: number;
|
|
5592
|
+
tileDimension?: number;
|
|
5593
|
+
/** 默认 WGS84;高德等中国大陆影像应指定为 GCJ-02。 */
|
|
5594
|
+
coordinateSystem?: GISCoordinateSystem;
|
|
5595
|
+
} | {
|
|
5596
|
+
type: 'cesium-ion';
|
|
5597
|
+
assetId?: string | number;
|
|
5598
|
+
autoRefreshToken?: boolean;
|
|
5599
|
+
};
|
|
5600
|
+
|
|
5601
|
+
declare interface GISView {
|
|
5602
|
+
latitude: number;
|
|
5603
|
+
longitude: number;
|
|
5604
|
+
height?: number;
|
|
6273
5605
|
heading?: number;
|
|
6274
5606
|
pitch?: number;
|
|
6275
5607
|
roll?: number;
|
|
6276
|
-
scale?: number | GisTilesetScale3D;
|
|
6277
|
-
/** Three.js 列主序 4x4 矩阵,在地理 TRS 之后应用。 */
|
|
6278
|
-
matrix?: readonly number[];
|
|
6279
|
-
}
|
|
6280
|
-
|
|
6281
|
-
declare interface GisUrlTilesetConfig extends GisTilesetBaseConfig {
|
|
6282
|
-
provider: 'url';
|
|
6283
|
-
url: string;
|
|
6284
|
-
headers?: Record<string, string>;
|
|
6285
|
-
requestAdapter?: GisTilesetRequestAdapter;
|
|
6286
5608
|
}
|
|
6287
5609
|
|
|
6288
|
-
/**
|
|
6289
|
-
export declare interface
|
|
5610
|
+
/** GIS 场景中的 Three.js 世界坐标。 */
|
|
5611
|
+
export declare interface GISWorldCoordinate {
|
|
6290
5612
|
x: number;
|
|
6291
5613
|
y: number;
|
|
6292
|
-
|
|
6293
|
-
}
|
|
6294
|
-
|
|
6295
|
-
declare interface GisWmsImageryLayerConfig extends GisImageryLayerBase {
|
|
6296
|
-
provider: 'wms';
|
|
6297
|
-
url: string;
|
|
6298
|
-
layers: string[];
|
|
6299
|
-
version?: string;
|
|
6300
|
-
format?: string;
|
|
6301
|
-
transparent?: boolean;
|
|
6302
|
-
}
|
|
6303
|
-
|
|
6304
|
-
declare interface GisWmtsImageryLayerConfig extends GisImageryLayerBase {
|
|
6305
|
-
provider: 'wmts';
|
|
6306
|
-
url: string;
|
|
6307
|
-
layer: string;
|
|
6308
|
-
style?: string;
|
|
6309
|
-
tileMatrixSet: string;
|
|
6310
|
-
format?: string;
|
|
6311
|
-
requestEncoding?: 'KVP' | 'REST';
|
|
6312
|
-
token?: GisCredentialProvider;
|
|
6313
|
-
tokenParameter?: string;
|
|
6314
|
-
projection?: GisProjection;
|
|
6315
|
-
tileMatrixLabels?: readonly string[];
|
|
6316
|
-
dimensions?: Readonly<Record<string, string | number>>;
|
|
6317
|
-
subdomains?: readonly string[];
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
|
-
declare interface GisXyzImageryLayerConfig extends GisImageryLayerBase {
|
|
6321
|
-
provider: 'xyz';
|
|
6322
|
-
url: string;
|
|
6323
|
-
scheme?: 'xyz' | 'tms';
|
|
6324
|
-
projection?: GisProjection;
|
|
6325
|
-
coordinateSystem?: GisCoordinateSystem;
|
|
6326
|
-
headers?: Record<string, string>;
|
|
6327
|
-
query?: Record<string, string>;
|
|
5614
|
+
z: number;
|
|
6328
5615
|
}
|
|
6329
5616
|
|
|
6330
5617
|
declare class Grid {
|
|
@@ -6723,6 +6010,7 @@ declare class Hdr {
|
|
|
6723
6010
|
private currentHdrId;
|
|
6724
6011
|
private isVisible;
|
|
6725
6012
|
private currentIntensity;
|
|
6013
|
+
private currentBackgroundIntensity;
|
|
6726
6014
|
private currentTexture;
|
|
6727
6015
|
private currentEnvironmentTexture;
|
|
6728
6016
|
private skybox;
|
|
@@ -6742,7 +6030,10 @@ declare class Hdr {
|
|
|
6742
6030
|
getCurrentHdrId(): string;
|
|
6743
6031
|
getVisible(): boolean;
|
|
6744
6032
|
setIntensity(intensity: number): void;
|
|
6033
|
+
/** 设置 HDR 背景亮度,不改变场景材质使用的环境光强度。 */
|
|
6034
|
+
setBackgroundIntensity(intensity: number): void;
|
|
6745
6035
|
getIntensity(): number;
|
|
6036
|
+
getBackgroundIntensity(): number;
|
|
6746
6037
|
addHdrItem(item: HdrItem): void;
|
|
6747
6038
|
dispose(): void;
|
|
6748
6039
|
private _loadHdr;
|
|
@@ -6864,6 +6155,7 @@ declare class HoverHighLight {
|
|
|
6864
6155
|
declare class HoverHighLight_2 {
|
|
6865
6156
|
private engine;
|
|
6866
6157
|
private overlayMaterial;
|
|
6158
|
+
private overlayGroup;
|
|
6867
6159
|
private overlayMeshes;
|
|
6868
6160
|
private animState;
|
|
6869
6161
|
private animStartTime;
|
|
@@ -6873,6 +6165,8 @@ declare class HoverHighLight_2 {
|
|
|
6873
6165
|
constructor(engine: any);
|
|
6874
6166
|
showModelNameTag(model: any, originPosition: any): void;
|
|
6875
6167
|
init(): void;
|
|
6168
|
+
/** 同步当前剖切模式使用的平面,保证独立 hover 掩码只包含未被裁掉的几何。 */
|
|
6169
|
+
syncClippingPlanes(planes?: THREE.Plane[]): void;
|
|
6876
6170
|
/**
|
|
6877
6171
|
* 高亮一个或多个网格,在原模型同位置生成轮廓掩码(原模型不受修改)
|
|
6878
6172
|
* @param meshes 目标网格或网格数组,传 null/[] 则触发淡出清除
|
|
@@ -7104,90 +6398,6 @@ export declare interface ILoaderModule {
|
|
|
7104
6398
|
getModel(modelId: string): IModel | undefined;
|
|
7105
6399
|
}
|
|
7106
6400
|
|
|
7107
|
-
/** 影像图层公共控制器,负责 Provider、状态、版权和运行时事务。 */
|
|
7108
|
-
declare class ImageryLayerManager {
|
|
7109
|
-
private readonly options;
|
|
7110
|
-
private readonly records;
|
|
7111
|
-
private readonly reportedRuntimeErrors;
|
|
7112
|
-
private disposed;
|
|
7113
|
-
constructor(options: ImageryLayerManagerOptions);
|
|
7114
|
-
/** 仅保存已校验配置;不会创建数据源或发起请求。 */
|
|
7115
|
-
configure(configs: readonly GisImageryLayerConfig[]): void;
|
|
7116
|
-
/** 初始化阶段解析全部 Provider,供平面瓦片运行时一次接入。 */
|
|
7117
|
-
resolveConfiguredLayers(): Promise<readonly GisRuntimeImageryLayer[]>;
|
|
7118
|
-
/** 将瓦片运行时错误归一化并按图层去重,避免同一故障瓦片持续刷屏。 */
|
|
7119
|
-
reportRuntimeError(id: string, error: unknown): GisError;
|
|
7120
|
-
/** 运行时加载完成后统一提交 ready,避免 Provider 就绪被误认为 GPU 图层就绪。 */
|
|
7121
|
-
markConfiguredLayersReady(): void;
|
|
7122
|
-
add(config: GisImageryLayerConfig): Promise<GisImageryLayerHandle>;
|
|
7123
|
-
update(id: string, patch: GisImageryLayerUpdate): Promise<GisImageryLayerHandle>;
|
|
7124
|
-
replace(id: string, config: GisImageryLayerConfig): Promise<GisImageryLayerHandle>;
|
|
7125
|
-
remove(id: string): Promise<boolean>;
|
|
7126
|
-
get(id: string): GisImageryLayerHandle | null;
|
|
7127
|
-
list(): readonly GisImageryLayerHandle[];
|
|
7128
|
-
clear(): Promise<void>;
|
|
7129
|
-
/** reset 时瓦片运行时已释放,此处只清理控制器快照。 */
|
|
7130
|
-
reset(): void;
|
|
7131
|
-
dispose(): void;
|
|
7132
|
-
private createSource;
|
|
7133
|
-
private createRecord;
|
|
7134
|
-
private toRuntimeLayer;
|
|
7135
|
-
private syncAttribution;
|
|
7136
|
-
private sortedRecords;
|
|
7137
|
-
private snapshot;
|
|
7138
|
-
private requireRecord;
|
|
7139
|
-
private requireRuntime;
|
|
7140
|
-
private normalizeLayerError;
|
|
7141
|
-
private layerError;
|
|
7142
|
-
private assertUsable;
|
|
7143
|
-
}
|
|
7144
|
-
|
|
7145
|
-
declare interface ImageryLayerManagerOptions {
|
|
7146
|
-
providers: GisProviderRegistry;
|
|
7147
|
-
getProviderContext: () => GisProviderContext | null;
|
|
7148
|
-
getRuntime: () => ImageryTileRenderer | null;
|
|
7149
|
-
setAttribution: (entry: GisAttributionEntry) => void;
|
|
7150
|
-
setAttributionVisible: (id: string, visible: boolean) => void;
|
|
7151
|
-
removeAttribution: (id: string) => void;
|
|
7152
|
-
emit: <K extends GisEventType>(type: K, value: GisEventMap[K]) => void;
|
|
7153
|
-
}
|
|
7154
|
-
|
|
7155
|
-
/** 平面影像瓦片渲染器,封装四叉树、LOD、缓存上限和 GPU 释放。 */
|
|
7156
|
-
declare class ImageryTileRenderer {
|
|
7157
|
-
private readonly context;
|
|
7158
|
-
private readonly origin;
|
|
7159
|
-
private readonly errorTarget;
|
|
7160
|
-
private readonly loadSiblings;
|
|
7161
|
-
private readonly maximumCachedTiles;
|
|
7162
|
-
private readonly onLayerError;
|
|
7163
|
-
private readonly onPrimaryChange?;
|
|
7164
|
-
private readonly layers;
|
|
7165
|
-
private disposed;
|
|
7166
|
-
constructor(context: GisModuleContext, origin: {
|
|
7167
|
-
longitude: number;
|
|
7168
|
-
latitude: number;
|
|
7169
|
-
height: number;
|
|
7170
|
-
}, errorTarget: number, loadSiblings: boolean, maximumCachedTiles: number, onLayerError: (id: string, error: Error) => void, onPrimaryChange?: ((tiles: TilesRenderer | null) => void) | undefined);
|
|
7171
|
-
get primary(): TilesRenderer | null;
|
|
7172
|
-
initialize(options: readonly GisRuntimeImageryLayer[]): Promise<void>;
|
|
7173
|
-
add(options: GisRuntimeImageryLayer): Promise<void>;
|
|
7174
|
-
updateLayer(id: string, patch: Partial<Pick<GisRuntimeImageryLayer, 'visible' | 'opacity' | 'zIndex'>>): void;
|
|
7175
|
-
replace(id: string, options: GisRuntimeImageryLayer): Promise<void>;
|
|
7176
|
-
remove(id: string): boolean;
|
|
7177
|
-
update(): void;
|
|
7178
|
-
setCamera(): void;
|
|
7179
|
-
updateResolution(): void;
|
|
7180
|
-
/** 浮动原点切换时同步迁移全部平面图层。 */
|
|
7181
|
-
applyWorldTransform(transform: Matrix4): void;
|
|
7182
|
-
dispose(): void;
|
|
7183
|
-
private updateLayerOrdering;
|
|
7184
|
-
private updateCacheBudgets;
|
|
7185
|
-
private applyModelPresentation;
|
|
7186
|
-
private correctWebGpuUv;
|
|
7187
|
-
private requireLayer;
|
|
7188
|
-
private assertUsable;
|
|
7189
|
-
}
|
|
7190
|
-
|
|
7191
6401
|
/**
|
|
7192
6402
|
* 运行时模型对象接口
|
|
7193
6403
|
*/
|
|
@@ -7197,7 +6407,7 @@ export declare interface IModel {
|
|
|
7197
6407
|
name: string;
|
|
7198
6408
|
visible: boolean;
|
|
7199
6409
|
/** 获取模型的包围盒 */
|
|
7200
|
-
getBoundingBox():
|
|
6410
|
+
getBoundingBox(): Box3;
|
|
7201
6411
|
/** 更新模型矩阵 */
|
|
7202
6412
|
setMatrix(matrix: number[]): void;
|
|
7203
6413
|
}
|
|
@@ -7236,6 +6446,8 @@ declare class InteractionModule {
|
|
|
7236
6446
|
private getNodeGuid;
|
|
7237
6447
|
handleMouseDoubleClick(event: any): void;
|
|
7238
6448
|
private clearModelHighlightBeforeCameraFlight;
|
|
6449
|
+
/** 单击选中后用构件世界包围盒建立控制器速度参照,不改变当前相机姿态。 */
|
|
6450
|
+
private setSelectionReference;
|
|
7239
6451
|
handleMouseClickInstance(raycaster: any): any;
|
|
7240
6452
|
private ensureSelectionBox;
|
|
7241
6453
|
private updateSelectionBox;
|
|
@@ -7330,6 +6542,8 @@ declare class InteractionModule_2 {
|
|
|
7330
6542
|
private getNodeGuid;
|
|
7331
6543
|
handleMouseDoubleClick(event: any): void;
|
|
7332
6544
|
private clearModelHighlightBeforeCameraFlight;
|
|
6545
|
+
/** 单击选中后用构件世界包围盒建立控制器速度参照,不改变当前相机姿态。 */
|
|
6546
|
+
private setSelectionReference;
|
|
7333
6547
|
handleMouseClickInstance(raycaster: any): any;
|
|
7334
6548
|
private ensureSelectionBox;
|
|
7335
6549
|
private updateSelectionBox;
|
|
@@ -7802,16 +7016,16 @@ declare class Label_2 {
|
|
|
7802
7016
|
private pickRawModelIntersection;
|
|
7803
7017
|
}
|
|
7804
7018
|
|
|
7805
|
-
declare type LabelClickCallback = (payload: LabelClickPayload) => void;
|
|
7019
|
+
export declare type LabelClickCallback = (payload: LabelClickPayload) => void;
|
|
7806
7020
|
|
|
7807
|
-
declare interface LabelClickPayload {
|
|
7021
|
+
export declare interface LabelClickPayload {
|
|
7808
7022
|
id: string;
|
|
7809
7023
|
label: LabelInstance;
|
|
7810
7024
|
coordinate: LabelCoordinate;
|
|
7811
7025
|
originalEvent: MouseEvent;
|
|
7812
7026
|
}
|
|
7813
7027
|
|
|
7814
|
-
declare interface LabelCoordinate {
|
|
7028
|
+
export declare interface LabelCoordinate {
|
|
7815
7029
|
x?: number;
|
|
7816
7030
|
y?: number;
|
|
7817
7031
|
z?: number;
|
|
@@ -7820,7 +7034,7 @@ declare interface LabelCoordinate {
|
|
|
7820
7034
|
height?: number;
|
|
7821
7035
|
}
|
|
7822
7036
|
|
|
7823
|
-
declare interface LabelCreateOptions {
|
|
7037
|
+
export declare interface LabelCreateOptions {
|
|
7824
7038
|
id?: string;
|
|
7825
7039
|
coordinate: LabelCoordinate;
|
|
7826
7040
|
icon: string;
|
|
@@ -7838,7 +7052,7 @@ declare interface LabelIconSizeValue {
|
|
|
7838
7052
|
height: number;
|
|
7839
7053
|
}
|
|
7840
7054
|
|
|
7841
|
-
declare interface LabelInstance {
|
|
7055
|
+
export declare interface LabelInstance {
|
|
7842
7056
|
id: string;
|
|
7843
7057
|
coordinate: LabelCoordinate;
|
|
7844
7058
|
icon: string;
|
|
@@ -7849,7 +7063,7 @@ declare interface LabelInstance {
|
|
|
7849
7063
|
element: HTMLDivElement;
|
|
7850
7064
|
}
|
|
7851
7065
|
|
|
7852
|
-
declare interface LabelUpdateOptions {
|
|
7066
|
+
export declare interface LabelUpdateOptions {
|
|
7853
7067
|
coordinate?: LabelCoordinate;
|
|
7854
7068
|
icon?: string;
|
|
7855
7069
|
name?: string;
|
|
@@ -7952,6 +7166,9 @@ declare interface LayoutViewport2d {
|
|
|
7952
7166
|
boundaryEntity?: any;
|
|
7953
7167
|
}
|
|
7954
7168
|
|
|
7169
|
+
/** v2 对外暴露的三档渲染模式名称。 */
|
|
7170
|
+
declare type LegacyRenderMode = 'simple' | 'balance' | 'advanced';
|
|
7171
|
+
|
|
7955
7172
|
declare class Level {
|
|
7956
7173
|
private engine;
|
|
7957
7174
|
private isVisible;
|
|
@@ -8261,8 +7478,14 @@ declare class LightModule {
|
|
|
8261
7478
|
*/
|
|
8262
7479
|
declare class LightModule_2 {
|
|
8263
7480
|
private engine;
|
|
7481
|
+
private ambientLight;
|
|
8264
7482
|
private directionalLight;
|
|
8265
7483
|
private lastBounds;
|
|
7484
|
+
private readonly lightDirection;
|
|
7485
|
+
private readonly boundsCenter;
|
|
7486
|
+
private readonly boundsSize;
|
|
7487
|
+
private readonly lastShadowTarget;
|
|
7488
|
+
private lastShadowHalfSize;
|
|
8266
7489
|
constructor(engine: any);
|
|
8267
7490
|
/** 创建参考项目使用的环境光和主定向光。 */
|
|
8268
7491
|
init(): void;
|
|
@@ -8270,15 +7493,54 @@ declare class LightModule_2 {
|
|
|
8270
7493
|
updateShadowCameraRange(camera: THREE.Camera | null): void;
|
|
8271
7494
|
/** 请求主定向光在下一次场景渲染时重建阴影贴图。 */
|
|
8272
7495
|
requestShadowUpdate(): void;
|
|
8273
|
-
/**
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
7496
|
+
/** 捕获基础灯光状态,供 GIS 等临时场景在退出时无损恢复。 */
|
|
7497
|
+
captureState(): LightModuleState | null;
|
|
7498
|
+
/** 增量应用场景灯光,不重新创建光源或阴影贴图对象。 */
|
|
7499
|
+
applyEnvironment(settings: LightModuleEnvironmentSettings): void;
|
|
7500
|
+
/** 恢复先前捕获的基础灯光状态。 */
|
|
7501
|
+
restoreState(state: LightModuleState | null): void;
|
|
7502
|
+
/** 模型范围变化后刷新缓存,并按当前视区重新拟合定向光阴影视锥。 */
|
|
7503
|
+
updateDirectionalShadow(camera: THREE.Camera | null): void;
|
|
7504
|
+
/** 相机变化时仅使用缓存模型范围更新阴影,避免重复遍历大型场景。 */
|
|
7505
|
+
updateDirectionalShadowView(camera: THREE.Camera | null, force?: boolean): void;
|
|
7506
|
+
/** 估算相机目标深度处的可视半边长。 */
|
|
7507
|
+
private getCameraHalfSize;
|
|
7508
|
+
/** 优先跟随交互中心;漫游控制器没有 target 时改为覆盖相机前方。 */
|
|
7509
|
+
private resolveShadowTarget;
|
|
7510
|
+
/** 仅保留模型沿光照方向实际占用的深度段,提高阴影深度精度。 */
|
|
7511
|
+
private getShadowDepthRange;
|
|
8278
7512
|
/** 获取 v3 当前模型的整体包围盒。 */
|
|
8279
7513
|
private getModelBounds;
|
|
8280
7514
|
}
|
|
8281
7515
|
|
|
7516
|
+
declare interface LightModuleEnvironmentSettings {
|
|
7517
|
+
ambientColor?: THREE.ColorRepresentation;
|
|
7518
|
+
ambientIntensity?: number;
|
|
7519
|
+
directionalColor?: THREE.ColorRepresentation;
|
|
7520
|
+
directionalIntensity?: number;
|
|
7521
|
+
direction?: THREE.Vector3;
|
|
7522
|
+
castShadow?: boolean;
|
|
7523
|
+
shadowMapSize?: number;
|
|
7524
|
+
shadowBias?: number;
|
|
7525
|
+
shadowNormalBias?: number;
|
|
7526
|
+
shadowIntensity?: number;
|
|
7527
|
+
}
|
|
7528
|
+
|
|
7529
|
+
declare interface LightModuleState {
|
|
7530
|
+
ambientColor: number;
|
|
7531
|
+
ambientIntensity: number;
|
|
7532
|
+
directionalColor: number;
|
|
7533
|
+
directionalIntensity: number;
|
|
7534
|
+
direction: THREE.Vector3;
|
|
7535
|
+
position: THREE.Vector3;
|
|
7536
|
+
targetPosition: THREE.Vector3;
|
|
7537
|
+
castShadow: boolean;
|
|
7538
|
+
shadowMapSize: number;
|
|
7539
|
+
shadowBias: number;
|
|
7540
|
+
shadowNormalBias: number;
|
|
7541
|
+
shadowIntensity: number;
|
|
7542
|
+
}
|
|
7543
|
+
|
|
8282
7544
|
/**
|
|
8283
7545
|
* 超链接标注配置
|
|
8284
7546
|
*/
|
|
@@ -8340,6 +7602,12 @@ declare class LinkView2d3d_2 {
|
|
|
8340
7602
|
private applyRotation;
|
|
8341
7603
|
}
|
|
8342
7604
|
|
|
7605
|
+
declare interface Loaded3DTiles {
|
|
7606
|
+
tiles: TilesRenderer;
|
|
7607
|
+
Controls: typeof GlobeControls;
|
|
7608
|
+
cameraFrame: number;
|
|
7609
|
+
}
|
|
7610
|
+
|
|
8343
7611
|
/** 已加载的 octree tile,渲染时每个 tile 会对应一个 THREE.Group。 */
|
|
8344
7612
|
declare interface LoadedCadTile2d {
|
|
8345
7613
|
id: string;
|
|
@@ -8667,6 +7935,51 @@ declare class LoaderModule_2 {
|
|
|
8667
7935
|
private static createLocalModelId;
|
|
8668
7936
|
}
|
|
8669
7937
|
|
|
7938
|
+
/** 负责 GIS 影像与 3D Tiles 数据的创建和插件配置。 */
|
|
7939
|
+
declare class LoaderModule_3 {
|
|
7940
|
+
private readonly engine;
|
|
7941
|
+
private readonly options;
|
|
7942
|
+
private readonly isWebGpuRenderer;
|
|
7943
|
+
private readonly layerManager?;
|
|
7944
|
+
private readonly managedTilesets;
|
|
7945
|
+
private lifecycle;
|
|
7946
|
+
private disposed;
|
|
7947
|
+
private readonly imageConfigs;
|
|
7948
|
+
constructor(engine: EngineKernelV3, options?: GISOptions, isWebGpuRenderer?: boolean, layerManager?: GISLayerManager | undefined);
|
|
7949
|
+
/** 注册附加 Tileset 生命周期回调,业务管理器通过此入口维护校准等状态。 */
|
|
7950
|
+
setTilesetLifecycle(lifecycle: GISLoaderTilesetLifecycle | null): void;
|
|
7951
|
+
/** 加载初始化配置指定的影像,未指定时默认使用 Cesium。 */
|
|
7952
|
+
loadImage(): Promise<Loaded3DTiles>;
|
|
7953
|
+
/** 按内置配置标识加载影像。 */
|
|
7954
|
+
loadImageById(id: GISImageId): Promise<Loaded3DTiles>;
|
|
7955
|
+
/** 按 URL 加载自定义 3D Tiles 影像。 */
|
|
7956
|
+
loadImageCustomize(url: string): Promise<Loaded3DTiles>;
|
|
7957
|
+
/** 当前地形由 3D Tiles 影像一并提供。 */
|
|
7958
|
+
loadTerrain(): Promise<Loaded3DTiles>;
|
|
7959
|
+
/** 在当前 GIS 底图上叠加通用 3D Tiles,并接入统一渲染生命周期。 */
|
|
7960
|
+
loadTileset(url: string, options?: GISLoadTilesetOptions): Promise<TilesRenderer>;
|
|
7961
|
+
/** 移除附加的 3D Tiles,并释放其缓存与 GPU 资源。 */
|
|
7962
|
+
removeTileset(tiles: TilesRenderer): boolean;
|
|
7963
|
+
/** 等待附加 Tileset 就绪,并把相机调整到可完整观察模型的位置。 */
|
|
7964
|
+
flyToTileset(tiles: TilesRenderer, options?: GISFlyToTilesetOptions): Promise<void>;
|
|
7965
|
+
/** 更新全部附加瓦片的 LOD 调度。 */
|
|
7966
|
+
update(): void;
|
|
7967
|
+
/** 同步全部附加瓦片使用的屏幕分辨率。 */
|
|
7968
|
+
updateResolution(): void;
|
|
7969
|
+
/** 释放 LoaderModule 管理的附加瓦片;主底图仍由 GIS 实例释放。 */
|
|
7970
|
+
dispose(): void;
|
|
7971
|
+
/** 创建 TilesRenderer,并注册官方示例使用的扩展插件。 */
|
|
7972
|
+
load3dtiles(source?: GISSource): Promise<Loaded3DTiles>;
|
|
7973
|
+
private resolveLocalOrigin;
|
|
7974
|
+
/** 将高德瓦片的 GCJ-02 投影适配到引擎统一使用的 WGS84 地表。 */
|
|
7975
|
+
private correctGcj02Overlay;
|
|
7976
|
+
private registerHeightOffset;
|
|
7977
|
+
/** 根瓦片加载完成后再冻结校准基准,避免使用尚未建立的包围球锚点。 */
|
|
7978
|
+
private registerTilesetReady;
|
|
7979
|
+
private waitForBoundingSphere;
|
|
7980
|
+
private assertUsable;
|
|
7981
|
+
}
|
|
7982
|
+
|
|
8670
7983
|
/**
|
|
8671
7984
|
* Gaussian 加载模块。
|
|
8672
7985
|
* 负责加载、卸载和登记 .ply / .splat / .ksplat / .spz 场景。
|
|
@@ -10064,7 +9377,6 @@ declare class ModelEdge_2 {
|
|
|
10064
9377
|
private explodeHidden;
|
|
10065
9378
|
private groupVisibleBeforeExplode;
|
|
10066
9379
|
private highlightVisibleBeforeExplode;
|
|
10067
|
-
private lastReportedOpacity;
|
|
10068
9380
|
private getModelEntry;
|
|
10069
9381
|
/** 判断模型是否允许加载边线;旧模型记录未包含该字段时按允许处理。 */
|
|
10070
9382
|
private shouldLoadModelEdge;
|
|
@@ -11104,6 +10416,34 @@ declare interface ModelPoseOptions_2 {
|
|
|
11104
10416
|
forwardAxis?: THREE.Vector3Tuple;
|
|
11105
10417
|
}
|
|
11106
10418
|
|
|
10419
|
+
/** 将 v3 普通 BIM 模型根分组定位到地球表面的指定经纬度与朝向。 */
|
|
10420
|
+
export declare class ModelPositionManager {
|
|
10421
|
+
private readonly engine;
|
|
10422
|
+
private tiles;
|
|
10423
|
+
private readonly layerManager?;
|
|
10424
|
+
private readonly calibrationManager?;
|
|
10425
|
+
private readonly records;
|
|
10426
|
+
private readonly inverseParentMatrix;
|
|
10427
|
+
constructor(engine: EngineKernelV3, tiles: TilesRenderer, layerManager?: GISLayerManager | undefined, calibrationManager?: GISModelCalibrationManager | undefined);
|
|
10428
|
+
/** 切换底图后更新地理参考,已有 BIM 模型的世界定位保持不变。 */
|
|
10429
|
+
setTiles(tiles: TilesRenderer): void;
|
|
10430
|
+
/** 定位已加载模型;模型本地 +Y 为上方,heading 从正北向东顺时针增加。 */
|
|
10431
|
+
setPosition(url: string, position: GISModelPosition): ResolvedGISModelPosition;
|
|
10432
|
+
/** 模型未加载时先通过 v3 Loader 加载,再应用地理定位。 */
|
|
10433
|
+
loadAndPosition(url: string, position: GISModelPosition, loadOptions?: LoadModelOptions): Promise<ResolvedGISModelPosition>;
|
|
10434
|
+
/** 获取指定模型最近一次由本管理器应用的定位信息。 */
|
|
10435
|
+
getPosition(url: string): ResolvedGISModelPosition | null;
|
|
10436
|
+
/** 恢复模型定位前的根分组矩阵。 */
|
|
10437
|
+
resetPosition(url: string): boolean;
|
|
10438
|
+
/** 释放内部记录;模型资源由引擎统一管理。 */
|
|
10439
|
+
dispose(): void;
|
|
10440
|
+
private requireModelGroup;
|
|
10441
|
+
private resolvePosition;
|
|
10442
|
+
private assertUrl;
|
|
10443
|
+
private normalizeAngle;
|
|
10444
|
+
private getLayerId;
|
|
10445
|
+
}
|
|
10446
|
+
|
|
11107
10447
|
declare class ModelProperties {
|
|
11108
10448
|
private engine;
|
|
11109
10449
|
extended: Map<string, any>;
|
|
@@ -11652,6 +10992,10 @@ declare class OneClickEncoding_2 {
|
|
|
11652
10992
|
chat(str: string): Promise<any>;
|
|
11653
10993
|
}
|
|
11654
10994
|
|
|
10995
|
+
declare type OrbitCenterResolver = ThirdPersonPlacementResolver;
|
|
10996
|
+
|
|
10997
|
+
declare type OrbitCenterResolver_2 = ThirdPersonPlacementResolver_2;
|
|
10998
|
+
|
|
11655
10999
|
declare class Pan2dControls extends THREE.EventDispatcher {
|
|
11656
11000
|
object: THREE.OrthographicCamera;
|
|
11657
11001
|
domElement: HTMLElement;
|
|
@@ -12767,6 +12111,11 @@ declare class RangeScale_2 {
|
|
|
12767
12111
|
dispose(): void;
|
|
12768
12112
|
}
|
|
12769
12113
|
|
|
12114
|
+
export declare interface RegisterBimCalibrationOptions {
|
|
12115
|
+
id?: string;
|
|
12116
|
+
name?: string;
|
|
12117
|
+
}
|
|
12118
|
+
|
|
12770
12119
|
/** 渲染中间态,block 展开后先统一转成这种结构,再按图层和颜色合批。 */
|
|
12771
12120
|
declare interface RenderItem2d {
|
|
12772
12121
|
kind: RenderKind2d;
|
|
@@ -12793,7 +12142,7 @@ declare type RenderKind2d = 'line' | 'text' | 'hatch' | 'image';
|
|
|
12793
12142
|
|
|
12794
12143
|
declare type RenderMode = 'simple' | 'balance' | 'advanced';
|
|
12795
12144
|
|
|
12796
|
-
declare type RenderMode_2 =
|
|
12145
|
+
declare type RenderMode_2 = RenderQualityInput;
|
|
12797
12146
|
|
|
12798
12147
|
declare class RenderModule {
|
|
12799
12148
|
private engine;
|
|
@@ -13039,6 +12388,9 @@ declare class RenderModuleGaussian {
|
|
|
13039
12388
|
|
|
13040
12389
|
declare type RenderQualityEffectState = Record<QualityEffect, boolean>;
|
|
13041
12390
|
|
|
12391
|
+
/** v3 原生数字等级与 v2 三档模式共用的输入类型。 */
|
|
12392
|
+
declare type RenderQualityInput = RenderQualityLevel | LegacyRenderMode;
|
|
12393
|
+
|
|
13042
12394
|
export declare type RenderQualityLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
13043
12395
|
|
|
13044
12396
|
declare type RenderQualityParameters = {
|
|
@@ -13070,8 +12422,7 @@ export declare interface ResolvedAutoExposureOptions {
|
|
|
13070
12422
|
highPercentile: number;
|
|
13071
12423
|
}
|
|
13072
12424
|
|
|
13073
|
-
|
|
13074
|
-
export declare function resolveHeightReference(position: GisPosition, heightReference: GisHeightReference, sampleTerrainHeight: GisTerrainHeightSampler, options?: GisHeightResolutionOptions): Promise<GisHeightResolution>;
|
|
12425
|
+
export declare type ResolvedGISModelPosition = Required<GISModelPosition>;
|
|
13075
12426
|
|
|
13076
12427
|
/**
|
|
13077
12428
|
* 解析 SDK 内置 public 资源 URL。绝对 URL 和 data/blob URL 原样返回。
|
|
@@ -13334,9 +12685,6 @@ declare class SceneModuleGaussian {
|
|
|
13334
12685
|
dispose(): void;
|
|
13335
12686
|
}
|
|
13336
12687
|
|
|
13337
|
-
/** 将 V3 场景坐标还原为 ENU。 */
|
|
13338
|
-
export declare function sceneToEnu(position: GisScenePosition): GisEnuPosition;
|
|
13339
|
-
|
|
13340
12688
|
export declare interface SdkAuthOptions {
|
|
13341
12689
|
endpoint: string;
|
|
13342
12690
|
token?: string;
|
|
@@ -13881,7 +13229,7 @@ declare class Setting_2 {
|
|
|
13881
13229
|
setSettings(data: Partial<EngineSettings_2>): Promise<void>;
|
|
13882
13230
|
/** 閲嶇疆鎵€鏈夎缃负榛樿鍊?*/
|
|
13883
13231
|
resetToDefault(): Promise<void>;
|
|
13884
|
-
/** 设置 1 至 12
|
|
13232
|
+
/** 设置 1 至 12 的手动等级,或使用 v2 的 simple、balance、advanced 三档模式。 */
|
|
13885
13233
|
setRenderMode(mode: RenderMode_2): void;
|
|
13886
13234
|
/** 璁剧疆瀵规瘮搴︼紙0~100锛?*/
|
|
13887
13235
|
setContrast(value: number): void;
|
|
@@ -14209,146 +13557,21 @@ declare class ThemeManager {
|
|
|
14209
13557
|
dispose(): void;
|
|
14210
13558
|
}
|
|
14211
13559
|
|
|
14212
|
-
declare interface
|
|
14213
|
-
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
}
|
|
14217
|
-
|
|
14218
|
-
declare type TilesetLifecycleUpdate = {
|
|
14219
|
-
kind: 'phase';
|
|
14220
|
-
phase: GisTilesetPhase;
|
|
14221
|
-
} | {
|
|
14222
|
-
kind: 'progress';
|
|
14223
|
-
progress: GisTileProgressEvent;
|
|
14224
|
-
};
|
|
14225
|
-
|
|
14226
|
-
/** 3D Tiles 公共控制器,管理多实例配置、状态、范围、飞行和运行期操作。 */
|
|
14227
|
-
declare class TilesetManager {
|
|
14228
|
-
private readonly options;
|
|
14229
|
-
private readonly records;
|
|
14230
|
-
private readonly reportedRuntimeErrors;
|
|
14231
|
-
private defaults;
|
|
14232
|
-
private disposed;
|
|
14233
|
-
constructor(options: TilesetManagerOptions);
|
|
14234
|
-
/** 仅保存已校验配置,不创建渲染器或发起网络请求。 */
|
|
14235
|
-
configure(configs: readonly GisTilesetConfig[], defaults?: Partial<TilesetDefaults>): void;
|
|
14236
|
-
/** 初始化阶段通过统一 Provider 解析 URL 与 ion 数据源。 */
|
|
14237
|
-
resolveConfiguredLayers(): Promise<readonly GisRuntimeTilesetLayer[]>;
|
|
14238
|
-
/** 运行期添加独立 tileset;返回时渲染器已注册,元数据仍可能处于加载中。 */
|
|
14239
|
-
add(config: GisTilesetConfig): Promise<GisTilesetLayerHandle>;
|
|
14240
|
-
/** 热更新显隐、LOD、请求并发和地理校准参数。 */
|
|
14241
|
-
update(id: string, patch: GisTilesetLayerUpdate): Promise<GisTilesetLayerHandle>;
|
|
14242
|
-
/** 返回根元数据就绪后的场景/WGS84 包围球。 */
|
|
14243
|
-
getBounds(id: string): GisTilesetBounds | null;
|
|
14244
|
-
/** 飞行到 tileset 包围球;元数据未就绪时返回明确状态错误。 */
|
|
14245
|
-
flyTo(id: string, options?: GisTilesetFlyToOptions): Promise<void>;
|
|
14246
|
-
/** 返回当前运行时明确验证过的格式与压缩扩展兼容矩阵。 */
|
|
14247
|
-
getFormatCapabilities(): readonly GisTilesetFormatCapability[];
|
|
14248
|
-
/** 接收渲染层生命周期更新,并映射为稳定公开状态与事件。 */
|
|
14249
|
-
reportLifecycle(id: string, update: TilesetLifecycleUpdate): void;
|
|
14250
|
-
/** 移除单个 tileset,并同步清理版权、凭据和错误快照。 */
|
|
14251
|
-
remove(id: string): Promise<boolean>;
|
|
14252
|
-
get(id: string): GisTilesetLayerHandle | null;
|
|
14253
|
-
list(): readonly GisTilesetLayerHandle[];
|
|
14254
|
-
clear(): Promise<void>;
|
|
14255
|
-
/** 将运行期加载错误归一化并按图层去重。 */
|
|
14256
|
-
reportRuntimeError(id: string, error: unknown): GisError;
|
|
14257
|
-
reset(): void;
|
|
14258
|
-
dispose(): void;
|
|
14259
|
-
private createRecord;
|
|
14260
|
-
private beginLoading;
|
|
14261
|
-
private createRuntimeLayer;
|
|
14262
|
-
private createSource;
|
|
14263
|
-
private syncAttribution;
|
|
14264
|
-
private snapshot;
|
|
14265
|
-
private createProgress;
|
|
14266
|
-
private failRecord;
|
|
14267
|
-
private validateRuntimeSettings;
|
|
14268
|
-
private releaseCredential;
|
|
14269
|
-
private requireRecord;
|
|
14270
|
-
private requireRuntime;
|
|
14271
|
-
private normalizeLayerError;
|
|
14272
|
-
private layerError;
|
|
14273
|
-
private assertUsable;
|
|
13560
|
+
declare interface ThirdPersonPlacementHit {
|
|
13561
|
+
point: THREE.Vector3;
|
|
13562
|
+
normal?: THREE.Vector3;
|
|
13563
|
+
distance?: number;
|
|
14274
13564
|
}
|
|
14275
13565
|
|
|
14276
|
-
declare interface
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
sceneToGeographic: (position: {
|
|
14281
|
-
x: number;
|
|
14282
|
-
y: number;
|
|
14283
|
-
z: number;
|
|
14284
|
-
}) => {
|
|
14285
|
-
longitude: number;
|
|
14286
|
-
latitude: number;
|
|
14287
|
-
height: number;
|
|
14288
|
-
};
|
|
14289
|
-
flyToBounds: (bounds: GisTilesetBounds, options?: GisTilesetFlyToOptions) => Promise<void>;
|
|
14290
|
-
setAttribution: (entry: GisAttributionEntry) => void;
|
|
14291
|
-
setAttributionVisible: (id: string, visible: boolean) => void;
|
|
14292
|
-
removeAttribution: (id: string) => void;
|
|
14293
|
-
emit: <K extends GisEventType>(type: K, value: GisEventMap[K]) => void;
|
|
13566
|
+
declare interface ThirdPersonPlacementHit_2 {
|
|
13567
|
+
point: THREE.Vector3;
|
|
13568
|
+
normal?: THREE.Vector3;
|
|
13569
|
+
distance?: number;
|
|
14294
13570
|
}
|
|
14295
13571
|
|
|
14296
|
-
|
|
14297
|
-
declare class TilesetRenderer {
|
|
14298
|
-
private readonly context;
|
|
14299
|
-
private readonly origin;
|
|
14300
|
-
private readonly options;
|
|
14301
|
-
private readonly onLayerError;
|
|
14302
|
-
private readonly onLifecycleUpdate;
|
|
14303
|
-
private readonly onPrimaryChange?;
|
|
14304
|
-
private readonly records;
|
|
14305
|
-
private readonly transformComposer;
|
|
14306
|
-
private readonly transformMatrix;
|
|
14307
|
-
private readonly boundsSphere;
|
|
14308
|
-
private currentCamera;
|
|
14309
|
-
private disposed;
|
|
14310
|
-
constructor(context: GisModuleContext, origin: Required<GisPosition>, options: TilesetRendererOptions, onLayerError: (id: string, error: Error) => void, onLifecycleUpdate: (id: string, update: TilesetLifecycleUpdate) => void, onPrimaryChange?: ((tiles: TilesRenderer | null) => void) | undefined);
|
|
14311
|
-
/** 返回首个已注册 tileset,供兼容相机和表面查询逻辑使用。 */
|
|
14312
|
-
get primary(): TilesRenderer | null;
|
|
14313
|
-
/** 按配置顺序创建全部实例;单实例失败由上层 Manager 隔离。 */
|
|
14314
|
-
initialize(layers: readonly GisRuntimeTilesetLayer[]): Promise<void>;
|
|
14315
|
-
/** 创建独立 TilesRenderer、放置根节点、解码器、缓存和生命周期跟踪器。 */
|
|
14316
|
-
add(layer: GisRuntimeTilesetLayer): Promise<void>;
|
|
14317
|
-
/** 热更新不会重建数据源或丢弃已加载 GPU 资源。 */
|
|
14318
|
-
updateLayer(id: string, patch: Partial<Pick<GisRuntimeTilesetLayer, 'visible' | 'maximumScreenSpaceError' | 'maximumCachedTiles' | 'requestConcurrency' | 'transform'>>): void;
|
|
14319
|
-
/** 返回已加载根 tileset 的世界空间包围球;元数据未就绪时返回 null。 */
|
|
14320
|
-
getBounds(id: string): GisSceneBounds | null;
|
|
14321
|
-
/** 卸载单个实例并立即取消请求、解除监听、释放解码器及 GPU 资源。 */
|
|
14322
|
-
remove(id: string): boolean;
|
|
14323
|
-
/** 仅调度可见实例,隐藏图层不产生持续遍历开销。 */
|
|
14324
|
-
update(): void;
|
|
14325
|
-
/** 相机对象发生替换时,从全部实例解绑旧相机并绑定新相机。 */
|
|
14326
|
-
setCamera(): void;
|
|
14327
|
-
/** 同步所有实例的物理像素分辨率,保证 SSE 在高 DPI 下正确。 */
|
|
14328
|
-
updateResolution(): void;
|
|
14329
|
-
/** 浮动原点切换时在同一事务内迁移全部业务放置根节点。 */
|
|
14330
|
-
applyWorldTransform(transform: Readonly<Matrix4>): void;
|
|
14331
|
-
/** 返回内部实例仅供 GIS 运行时兼容入口使用。 */
|
|
14332
|
-
getRenderer(id: string): TilesRenderer | null;
|
|
14333
|
-
/** 释放所有实例,销毁后禁止再次添加。 */
|
|
14334
|
-
dispose(): void;
|
|
14335
|
-
private registerIonPlugin;
|
|
14336
|
-
private registerReorientationPlugin;
|
|
14337
|
-
private applyPlacement;
|
|
14338
|
-
private requireRecord;
|
|
14339
|
-
private assertUsable;
|
|
14340
|
-
}
|
|
13572
|
+
declare type ThirdPersonPlacementResolver = (raycaster: THREE.Raycaster) => ThirdPersonPlacementHit | null;
|
|
14341
13573
|
|
|
14342
|
-
declare
|
|
14343
|
-
dracoDecoderPath?: string;
|
|
14344
|
-
loadSiblings: boolean;
|
|
14345
|
-
creasedNormals: boolean;
|
|
14346
|
-
creaseAngle: number;
|
|
14347
|
-
fade: boolean;
|
|
14348
|
-
resolveCredential?: (sourceId: string, forceRefresh?: boolean) => Promise<string>;
|
|
14349
|
-
markCredentialExpired?: (sourceId: string) => void;
|
|
14350
|
-
geographicToScene: (position: GisPosition, target: Vector3) => Vector3;
|
|
14351
|
-
}
|
|
13574
|
+
declare type ThirdPersonPlacementResolver_2 = (raycaster: THREE.Raycaster) => ThirdPersonPlacementHit_2 | null;
|
|
14352
13575
|
|
|
14353
13576
|
/** TRAA 参数。 */
|
|
14354
13577
|
export declare interface TRAAPostProcessingSettings {
|
|
@@ -14385,6 +13608,7 @@ declare interface ViewBounds {
|
|
|
14385
13608
|
|
|
14386
13609
|
declare class ViewCube {
|
|
14387
13610
|
private engine;
|
|
13611
|
+
private homeBoundingBoxProvider;
|
|
14388
13612
|
cubeTool: any;
|
|
14389
13613
|
mainViewPort: any;
|
|
14390
13614
|
constructor(engine: any);
|
|
@@ -14393,6 +13617,8 @@ declare class ViewCube {
|
|
|
14393
13617
|
show(): void;
|
|
14394
13618
|
CameraGoHome(time: number): void;
|
|
14395
13619
|
cameraGoHome(time: number): void;
|
|
13620
|
+
setHomeBoundingBoxProvider(provider: (() => THREE.Box3 | null) | null): void;
|
|
13621
|
+
getHomeBoundingBox(): THREE.Box3 | null | undefined;
|
|
14396
13622
|
zoomToModel(box: any, time?: number): void;
|
|
14397
13623
|
zoomToModels(m: any): void;
|
|
14398
13624
|
flyToModels(ms?: any[]): void;
|
|
@@ -14420,6 +13646,7 @@ declare class ViewCube2d {
|
|
|
14420
13646
|
|
|
14421
13647
|
declare class ViewCube_2 {
|
|
14422
13648
|
private engine;
|
|
13649
|
+
private homeBoundingBoxProvider;
|
|
14423
13650
|
cubeTool: any;
|
|
14424
13651
|
mainViewPort: any;
|
|
14425
13652
|
constructor(engine: any);
|
|
@@ -14428,6 +13655,8 @@ declare class ViewCube_2 {
|
|
|
14428
13655
|
show(): void;
|
|
14429
13656
|
CameraGoHome(time: number): void;
|
|
14430
13657
|
cameraGoHome(time: number): void;
|
|
13658
|
+
setHomeBoundingBoxProvider(provider: (() => THREE.Box3 | null) | null): void;
|
|
13659
|
+
getHomeBoundingBox(): THREE.Box3 | null | undefined;
|
|
14431
13660
|
zoomToModel(box: any, time?: number): void;
|
|
14432
13661
|
zoomToModels(m: any): void;
|
|
14433
13662
|
flyToModels(ms?: any[]): void;
|
|
@@ -14641,18 +13870,6 @@ declare class WebGPUSectionFace extends SectionFace {
|
|
|
14641
13870
|
dispose(): void;
|
|
14642
13871
|
}
|
|
14643
13872
|
|
|
14644
|
-
/** 将 Web Mercator 米制坐标转换为 WGS84。 */
|
|
14645
|
-
export declare function webMercatorToWgs84(position: GisWebMercatorPosition): Required<GisPosition>;
|
|
14646
|
-
|
|
14647
|
-
/** 将 WGS84 经纬高转换为 ECEF 地心地固坐标。 */
|
|
14648
|
-
export declare function wgs84ToEcef(position: GisPosition): GisEcefPosition;
|
|
14649
|
-
|
|
14650
|
-
/** WGS84 到局部 ENU 的组合转换。 */
|
|
14651
|
-
export declare function wgs84ToEnu(position: GisPosition, origin: GisPosition): GisEnuPosition;
|
|
14652
|
-
|
|
14653
|
-
/** 将 WGS84 投影为标准 Web Mercator;极区纬度钳制到 EPSG:3857 有效范围。 */
|
|
14654
|
-
export declare function wgs84ToWebMercator(position: GisPosition): GisWebMercatorPosition;
|
|
14655
|
-
|
|
14656
13873
|
/**
|
|
14657
13874
|
* 世界坐标与屏幕坐标转换工具类
|
|
14658
13875
|
* 提供世界坐标(3D空间坐标)与屏幕坐标(2D像素坐标)之间的双向转换功能
|