@metagl/sdk-render 1.0.12 → 1.0.14

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.
@@ -1,6 +1,7 @@
1
- import * as Cesium from 'cesium';
1
+ import * as Cesium$1 from 'cesium';
2
2
  import { Cartesian3, Color, Viewer, PostProcessStage, Cartesian4, Rectangle, Primitive, Cesium3DTileset, ClippingPolygonCollection } from 'cesium';
3
3
  import { Render as Render$1 } from '@/system/RenderCore';
4
+ import { VectorTileset } from '@metagl/sdk-mbtiles';
4
5
 
5
6
  /**
6
7
  * RenderSystem
@@ -1480,7 +1481,7 @@ declare class LayerSystem implements RenderSystem {
1480
1481
  }
1481
1482
 
1482
1483
  interface ViewshedConfig {
1483
- position: Cesium.Cartesian3;
1484
+ position: Cesium$1.Cartesian3;
1484
1485
  heading: number;
1485
1486
  pitch: number;
1486
1487
  distance: number;
@@ -1490,8 +1491,8 @@ interface ViewshedConfig {
1490
1491
  texelSnap?: boolean;
1491
1492
  minHeight?: number;
1492
1493
  near?: number;
1493
- visibleColor?: Cesium.Color;
1494
- hiddenColor?: Cesium.Color;
1494
+ visibleColor?: Cesium$1.Color;
1495
+ hiddenColor?: Cesium$1.Color;
1495
1496
  }
1496
1497
  /**
1497
1498
  * 视域分析系统 - 支持多视域实例和多视锥体模式
@@ -1559,7 +1560,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
1559
1560
  /**
1560
1561
  * 使用 direction 和 up 向量更新视域方向(参考 DirectionCameraBinding)
1561
1562
  */
1562
- updateViewshedOrientation(id: string, position: Cesium.Cartesian3, direction: Cesium.Cartesian3, up: Cesium.Cartesian3): void;
1563
+ updateViewshedOrientation(id: string, position: Cesium$1.Cartesian3, direction: Cesium$1.Cartesian3, up: Cesium$1.Cartesian3): void;
1563
1564
  /**
1564
1565
  * 更新可视距离
1565
1566
  */
@@ -1659,7 +1660,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
1659
1660
  }
1660
1661
 
1661
1662
  interface SingleViewshedConfig {
1662
- position: Cesium.Cartesian3;
1663
+ position: Cesium$1.Cartesian3;
1663
1664
  heading: number;
1664
1665
  pitch: number;
1665
1666
  distance: number;
@@ -2473,6 +2474,7 @@ interface RenderConfig {
2473
2474
  machineCode?: string;
2474
2475
  lic?: string;
2475
2476
  rsaPubKey?: string;
2477
+ assetsBasePath?: string;
2476
2478
  directionalLight?: DirectionalLightConfig;
2477
2479
  shadow?: ShadowConfig;
2478
2480
  volumetricClouds?: VolumetricCloudsConfig;
@@ -2679,6 +2681,54 @@ declare class Render {
2679
2681
  destroy(): void;
2680
2682
  }
2681
2683
 
2684
+ /**
2685
+ * 版本信息工具类
2686
+ * 用于在运行时获取 SDK 的版本信息
2687
+ */
2688
+ interface VersionInfo {
2689
+ version: string;
2690
+ buildTime: string;
2691
+ buildMode: string;
2692
+ }
2693
+ /**
2694
+ * 获取 SDK 版本信息
2695
+ * @returns 版本信息对象
2696
+ */
2697
+ declare function getVersionInfo(): VersionInfo;
2698
+ /**
2699
+ * 在控制台打印版本信息
2700
+ */
2701
+ declare function printVersion(): void;
2702
+ /**
2703
+ * 版本信息类
2704
+ */
2705
+ declare class Version {
2706
+ /**
2707
+ * 获取版本号
2708
+ */
2709
+ static get version(): string;
2710
+ /**
2711
+ * 获取构建时间
2712
+ */
2713
+ static get buildTime(): string;
2714
+ /**
2715
+ * 获取构建模式
2716
+ */
2717
+ static get buildMode(): string;
2718
+ /**
2719
+ * 获取完整版本信息
2720
+ */
2721
+ static get info(): VersionInfo;
2722
+ /**
2723
+ * 打印版本信息到控制台
2724
+ */
2725
+ static print(): void;
2726
+ /**
2727
+ * 转换为字符串
2728
+ */
2729
+ static toString(): string;
2730
+ }
2731
+
2682
2732
  declare class RenderControl {
2683
2733
  private viewer;
2684
2734
  private render;
@@ -4618,6 +4668,122 @@ declare class RainSystem {
4618
4668
  private _getParticleSystemMatrix;
4619
4669
  }
4620
4670
 
4671
+ interface VectorTileSystemConfig {
4672
+ enabled?: boolean;
4673
+ style?: string | object;
4674
+ showTileColor?: boolean;
4675
+ workerUrl?: string;
4676
+ maximumActiveTasks?: number;
4677
+ useBillboard?: boolean;
4678
+ }
4679
+ /**
4680
+ * 矢量瓦片系统类
4681
+ * 用于加载和显示Mapbox矢量瓦片
4682
+ * 参考: sdk-mbtiles/examples/index.js
4683
+ */
4684
+ declare class VectorTileSystem {
4685
+ private viewer;
4686
+ private isEnabled;
4687
+ private config;
4688
+ private tileset;
4689
+ private style;
4690
+ constructor(viewer: Cesium.Viewer, config?: VectorTileSystemConfig);
4691
+ /**
4692
+ * 初始化系统
4693
+ */
4694
+ private init;
4695
+ /**
4696
+ * 设置样式并重新加载
4697
+ * @param style Mapbox样式URL或样式对象
4698
+ */
4699
+ setStyle(style: string | object): Promise<void>;
4700
+ /**
4701
+ * 获取当前样式
4702
+ */
4703
+ getStyle(): string | object | null;
4704
+ /**
4705
+ * 设置图层布局属性
4706
+ * @param layerId 图层ID
4707
+ * @param name 属性名
4708
+ * @param value 属性值
4709
+ */
4710
+ setLayoutProperty(layerId: string, name: string, value: any): boolean;
4711
+ /**
4712
+ * 设置图层绘制属性
4713
+ * @param layerId 图层ID
4714
+ * @param name 属性名
4715
+ * @param value 属性值
4716
+ */
4717
+ setPaintProperty(layerId: string, name: string, value: any): boolean;
4718
+ /**
4719
+ * 设置图层过滤器
4720
+ * @param layerId 图层ID
4721
+ * @param filter 过滤器
4722
+ */
4723
+ setFilter(layerId: string, filter: any): boolean;
4724
+ /**
4725
+ * 获取矢量瓦片集实例
4726
+ */
4727
+ getTileset(): VectorTileset | null;
4728
+ /**
4729
+ * 获取就绪状态
4730
+ */
4731
+ isReady(): boolean;
4732
+ /**
4733
+ * 设置显示状态
4734
+ */
4735
+ setVisible(visible: boolean): void;
4736
+ /**
4737
+ * 获取显示状态
4738
+ */
4739
+ getVisible(): boolean;
4740
+ /**
4741
+ * 启用系统
4742
+ */
4743
+ enable(): Promise<void>;
4744
+ /**
4745
+ * 禁用系统
4746
+ */
4747
+ disable(): Promise<void>;
4748
+ /**
4749
+ * 获取启用状态
4750
+ */
4751
+ getStatus(): boolean;
4752
+ /**
4753
+ * 切换启用状态
4754
+ */
4755
+ toggle(): Promise<boolean>;
4756
+ /**
4757
+ * 更新配置
4758
+ */
4759
+ update(newConfig: Partial<VectorTileSystemConfig>): Promise<void>;
4760
+ /**
4761
+ * 获取当前配置
4762
+ */
4763
+ getConfig(): VectorTileSystemConfig;
4764
+ /**
4765
+ * 移除矢量瓦片集
4766
+ */
4767
+ private removeTileset;
4768
+ /**
4769
+ * 销毁系统
4770
+ */
4771
+ destroy(): Promise<void>;
4772
+ }
4773
+
4774
+ /**
4775
+ * 设置全局基础路径(供用户手动配置)
4776
+ */
4777
+ declare function setSdkBasePath(path: string): void;
4778
+ /**
4779
+ * 获取当前基础路径
4780
+ */
4781
+ declare function getSdkBasePath(): string;
4782
+ /**
4783
+ * 解析资源路径
4784
+ */
4785
+ declare function resolveAssetPath(relativePath: string): string;
4786
+
4621
4787
  declare global {
4622
4788
  interface Window {
4623
4789
  LACDT?: Record<string, any>;
@@ -4626,6 +4792,8 @@ declare global {
4626
4792
  }
4627
4793
 
4628
4794
  declare const render: {
4795
+ /** 版本信息 */
4796
+ Version: typeof Version;
4629
4797
  /** 渲染类 */
4630
4798
  Render: typeof Render;
4631
4799
  /** 渲染控制面板 */
@@ -4662,6 +4830,14 @@ declare const render: {
4662
4830
  RainSystem: typeof RainSystem;
4663
4831
  /** 海洋系统 */
4664
4832
  SeaSystem: typeof SeaSystem;
4833
+ /** 矢量瓦片系统 */
4834
+ VectorTileSystem: typeof VectorTileSystem;
4835
+ /** 设置资源基础路径 */
4836
+ setSdkBasePath: typeof setSdkBasePath;
4837
+ /** 获取当前资源基础路径 */
4838
+ getSdkBasePath: typeof getSdkBasePath;
4839
+ /** 解析资源路径 */
4840
+ resolveAssetPath: typeof resolveAssetPath;
4665
4841
  };
4666
4842
 
4667
- export { AtmosphereControl, type AtmosphereScatteringConfig, AtmosphereScatteringSystem, BuildingControl, BuildingSystem, CameraListener, type CameraListenerConfig, CameraListenerSystem, type CameraListenerSystemConfig, type CameraParams, CameraUrlManager, type CameraUrlManagerConfig, type DirectionalLightConfig, type DistanceFogConfig, DistanceFogSystem, EnvironmentControl, FogControl, type HeightFogConfig, HeightFogSystem, LayerControl, LayerSystem, LightingControl, LightingSystem, PlottingControl, type PostProcessingConfig, PostProcessingControl, PostProcessingSystem, RainSystem, Render, type RenderConfig, RenderControl, type SeaConfig, SeaSystem, type ShadowConfig, ShadowControl, ShadowSystem, SidebarControl, TilesetManager, TilesetSearchControl, ToolboxControl, ToolboxSystem, VolumetricCloudControl, type VolumetricCloudsConfig, VolumetricCloudsSystem, type WaterConfig, WaterControl, WaterSystem, type WeatherAreaData, render };
4843
+ export { AtmosphereControl, type AtmosphereScatteringConfig, AtmosphereScatteringSystem, BuildingControl, BuildingSystem, CameraListener, type CameraListenerConfig, CameraListenerSystem, type CameraListenerSystemConfig, type CameraParams, CameraUrlManager, type CameraUrlManagerConfig, type DirectionalLightConfig, type DistanceFogConfig, DistanceFogSystem, EnvironmentControl, FogControl, type HeightFogConfig, HeightFogSystem, LayerControl, LayerSystem, LightingControl, LightingSystem, PlottingControl, type PostProcessingConfig, PostProcessingControl, PostProcessingSystem, RainSystem, Render, type RenderConfig, RenderControl, type SeaConfig, SeaSystem, type ShadowConfig, ShadowControl, ShadowSystem, SidebarControl, TilesetManager, TilesetSearchControl, ToolboxControl, ToolboxSystem, VectorTileSystem, Version, type VersionInfo, VolumetricCloudControl, type VolumetricCloudsConfig, VolumetricCloudsSystem, type WaterConfig, WaterControl, WaterSystem, type WeatherAreaData, getSdkBasePath, getVersionInfo, printVersion, render, resolveAssetPath, setSdkBasePath };
@@ -1,6 +1,7 @@
1
- import * as Cesium from 'cesium';
1
+ import * as Cesium$1 from 'cesium';
2
2
  import { Cartesian3, Color, Viewer, PostProcessStage, Cartesian4, Rectangle, Primitive, Cesium3DTileset, ClippingPolygonCollection } from 'cesium';
3
3
  import { Render as Render$1 } from '@/system/RenderCore';
4
+ import { VectorTileset } from '@metagl/sdk-mbtiles';
4
5
 
5
6
  /**
6
7
  * RenderSystem
@@ -1480,7 +1481,7 @@ declare class LayerSystem implements RenderSystem {
1480
1481
  }
1481
1482
 
1482
1483
  interface ViewshedConfig {
1483
- position: Cesium.Cartesian3;
1484
+ position: Cesium$1.Cartesian3;
1484
1485
  heading: number;
1485
1486
  pitch: number;
1486
1487
  distance: number;
@@ -1490,8 +1491,8 @@ interface ViewshedConfig {
1490
1491
  texelSnap?: boolean;
1491
1492
  minHeight?: number;
1492
1493
  near?: number;
1493
- visibleColor?: Cesium.Color;
1494
- hiddenColor?: Cesium.Color;
1494
+ visibleColor?: Cesium$1.Color;
1495
+ hiddenColor?: Cesium$1.Color;
1495
1496
  }
1496
1497
  /**
1497
1498
  * 视域分析系统 - 支持多视域实例和多视锥体模式
@@ -1559,7 +1560,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
1559
1560
  /**
1560
1561
  * 使用 direction 和 up 向量更新视域方向(参考 DirectionCameraBinding)
1561
1562
  */
1562
- updateViewshedOrientation(id: string, position: Cesium.Cartesian3, direction: Cesium.Cartesian3, up: Cesium.Cartesian3): void;
1563
+ updateViewshedOrientation(id: string, position: Cesium$1.Cartesian3, direction: Cesium$1.Cartesian3, up: Cesium$1.Cartesian3): void;
1563
1564
  /**
1564
1565
  * 更新可视距离
1565
1566
  */
@@ -1659,7 +1660,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
1659
1660
  }
1660
1661
 
1661
1662
  interface SingleViewshedConfig {
1662
- position: Cesium.Cartesian3;
1663
+ position: Cesium$1.Cartesian3;
1663
1664
  heading: number;
1664
1665
  pitch: number;
1665
1666
  distance: number;
@@ -2473,6 +2474,7 @@ interface RenderConfig {
2473
2474
  machineCode?: string;
2474
2475
  lic?: string;
2475
2476
  rsaPubKey?: string;
2477
+ assetsBasePath?: string;
2476
2478
  directionalLight?: DirectionalLightConfig;
2477
2479
  shadow?: ShadowConfig;
2478
2480
  volumetricClouds?: VolumetricCloudsConfig;
@@ -2679,6 +2681,54 @@ declare class Render {
2679
2681
  destroy(): void;
2680
2682
  }
2681
2683
 
2684
+ /**
2685
+ * 版本信息工具类
2686
+ * 用于在运行时获取 SDK 的版本信息
2687
+ */
2688
+ interface VersionInfo {
2689
+ version: string;
2690
+ buildTime: string;
2691
+ buildMode: string;
2692
+ }
2693
+ /**
2694
+ * 获取 SDK 版本信息
2695
+ * @returns 版本信息对象
2696
+ */
2697
+ declare function getVersionInfo(): VersionInfo;
2698
+ /**
2699
+ * 在控制台打印版本信息
2700
+ */
2701
+ declare function printVersion(): void;
2702
+ /**
2703
+ * 版本信息类
2704
+ */
2705
+ declare class Version {
2706
+ /**
2707
+ * 获取版本号
2708
+ */
2709
+ static get version(): string;
2710
+ /**
2711
+ * 获取构建时间
2712
+ */
2713
+ static get buildTime(): string;
2714
+ /**
2715
+ * 获取构建模式
2716
+ */
2717
+ static get buildMode(): string;
2718
+ /**
2719
+ * 获取完整版本信息
2720
+ */
2721
+ static get info(): VersionInfo;
2722
+ /**
2723
+ * 打印版本信息到控制台
2724
+ */
2725
+ static print(): void;
2726
+ /**
2727
+ * 转换为字符串
2728
+ */
2729
+ static toString(): string;
2730
+ }
2731
+
2682
2732
  declare class RenderControl {
2683
2733
  private viewer;
2684
2734
  private render;
@@ -4618,6 +4668,122 @@ declare class RainSystem {
4618
4668
  private _getParticleSystemMatrix;
4619
4669
  }
4620
4670
 
4671
+ interface VectorTileSystemConfig {
4672
+ enabled?: boolean;
4673
+ style?: string | object;
4674
+ showTileColor?: boolean;
4675
+ workerUrl?: string;
4676
+ maximumActiveTasks?: number;
4677
+ useBillboard?: boolean;
4678
+ }
4679
+ /**
4680
+ * 矢量瓦片系统类
4681
+ * 用于加载和显示Mapbox矢量瓦片
4682
+ * 参考: sdk-mbtiles/examples/index.js
4683
+ */
4684
+ declare class VectorTileSystem {
4685
+ private viewer;
4686
+ private isEnabled;
4687
+ private config;
4688
+ private tileset;
4689
+ private style;
4690
+ constructor(viewer: Cesium.Viewer, config?: VectorTileSystemConfig);
4691
+ /**
4692
+ * 初始化系统
4693
+ */
4694
+ private init;
4695
+ /**
4696
+ * 设置样式并重新加载
4697
+ * @param style Mapbox样式URL或样式对象
4698
+ */
4699
+ setStyle(style: string | object): Promise<void>;
4700
+ /**
4701
+ * 获取当前样式
4702
+ */
4703
+ getStyle(): string | object | null;
4704
+ /**
4705
+ * 设置图层布局属性
4706
+ * @param layerId 图层ID
4707
+ * @param name 属性名
4708
+ * @param value 属性值
4709
+ */
4710
+ setLayoutProperty(layerId: string, name: string, value: any): boolean;
4711
+ /**
4712
+ * 设置图层绘制属性
4713
+ * @param layerId 图层ID
4714
+ * @param name 属性名
4715
+ * @param value 属性值
4716
+ */
4717
+ setPaintProperty(layerId: string, name: string, value: any): boolean;
4718
+ /**
4719
+ * 设置图层过滤器
4720
+ * @param layerId 图层ID
4721
+ * @param filter 过滤器
4722
+ */
4723
+ setFilter(layerId: string, filter: any): boolean;
4724
+ /**
4725
+ * 获取矢量瓦片集实例
4726
+ */
4727
+ getTileset(): VectorTileset | null;
4728
+ /**
4729
+ * 获取就绪状态
4730
+ */
4731
+ isReady(): boolean;
4732
+ /**
4733
+ * 设置显示状态
4734
+ */
4735
+ setVisible(visible: boolean): void;
4736
+ /**
4737
+ * 获取显示状态
4738
+ */
4739
+ getVisible(): boolean;
4740
+ /**
4741
+ * 启用系统
4742
+ */
4743
+ enable(): Promise<void>;
4744
+ /**
4745
+ * 禁用系统
4746
+ */
4747
+ disable(): Promise<void>;
4748
+ /**
4749
+ * 获取启用状态
4750
+ */
4751
+ getStatus(): boolean;
4752
+ /**
4753
+ * 切换启用状态
4754
+ */
4755
+ toggle(): Promise<boolean>;
4756
+ /**
4757
+ * 更新配置
4758
+ */
4759
+ update(newConfig: Partial<VectorTileSystemConfig>): Promise<void>;
4760
+ /**
4761
+ * 获取当前配置
4762
+ */
4763
+ getConfig(): VectorTileSystemConfig;
4764
+ /**
4765
+ * 移除矢量瓦片集
4766
+ */
4767
+ private removeTileset;
4768
+ /**
4769
+ * 销毁系统
4770
+ */
4771
+ destroy(): Promise<void>;
4772
+ }
4773
+
4774
+ /**
4775
+ * 设置全局基础路径(供用户手动配置)
4776
+ */
4777
+ declare function setSdkBasePath(path: string): void;
4778
+ /**
4779
+ * 获取当前基础路径
4780
+ */
4781
+ declare function getSdkBasePath(): string;
4782
+ /**
4783
+ * 解析资源路径
4784
+ */
4785
+ declare function resolveAssetPath(relativePath: string): string;
4786
+
4621
4787
  declare global {
4622
4788
  interface Window {
4623
4789
  LACDT?: Record<string, any>;
@@ -4626,6 +4792,8 @@ declare global {
4626
4792
  }
4627
4793
 
4628
4794
  declare const render: {
4795
+ /** 版本信息 */
4796
+ Version: typeof Version;
4629
4797
  /** 渲染类 */
4630
4798
  Render: typeof Render;
4631
4799
  /** 渲染控制面板 */
@@ -4662,6 +4830,14 @@ declare const render: {
4662
4830
  RainSystem: typeof RainSystem;
4663
4831
  /** 海洋系统 */
4664
4832
  SeaSystem: typeof SeaSystem;
4833
+ /** 矢量瓦片系统 */
4834
+ VectorTileSystem: typeof VectorTileSystem;
4835
+ /** 设置资源基础路径 */
4836
+ setSdkBasePath: typeof setSdkBasePath;
4837
+ /** 获取当前资源基础路径 */
4838
+ getSdkBasePath: typeof getSdkBasePath;
4839
+ /** 解析资源路径 */
4840
+ resolveAssetPath: typeof resolveAssetPath;
4665
4841
  };
4666
4842
 
4667
- export { AtmosphereControl, type AtmosphereScatteringConfig, AtmosphereScatteringSystem, BuildingControl, BuildingSystem, CameraListener, type CameraListenerConfig, CameraListenerSystem, type CameraListenerSystemConfig, type CameraParams, CameraUrlManager, type CameraUrlManagerConfig, type DirectionalLightConfig, type DistanceFogConfig, DistanceFogSystem, EnvironmentControl, FogControl, type HeightFogConfig, HeightFogSystem, LayerControl, LayerSystem, LightingControl, LightingSystem, PlottingControl, type PostProcessingConfig, PostProcessingControl, PostProcessingSystem, RainSystem, Render, type RenderConfig, RenderControl, type SeaConfig, SeaSystem, type ShadowConfig, ShadowControl, ShadowSystem, SidebarControl, TilesetManager, TilesetSearchControl, ToolboxControl, ToolboxSystem, VolumetricCloudControl, type VolumetricCloudsConfig, VolumetricCloudsSystem, type WaterConfig, WaterControl, WaterSystem, type WeatherAreaData, render };
4843
+ export { AtmosphereControl, type AtmosphereScatteringConfig, AtmosphereScatteringSystem, BuildingControl, BuildingSystem, CameraListener, type CameraListenerConfig, CameraListenerSystem, type CameraListenerSystemConfig, type CameraParams, CameraUrlManager, type CameraUrlManagerConfig, type DirectionalLightConfig, type DistanceFogConfig, DistanceFogSystem, EnvironmentControl, FogControl, type HeightFogConfig, HeightFogSystem, LayerControl, LayerSystem, LightingControl, LightingSystem, PlottingControl, type PostProcessingConfig, PostProcessingControl, PostProcessingSystem, RainSystem, Render, type RenderConfig, RenderControl, type SeaConfig, SeaSystem, type ShadowConfig, ShadowControl, ShadowSystem, SidebarControl, TilesetManager, TilesetSearchControl, ToolboxControl, ToolboxSystem, VectorTileSystem, Version, type VersionInfo, VolumetricCloudControl, type VolumetricCloudsConfig, VolumetricCloudsSystem, type WaterConfig, WaterControl, WaterSystem, type WeatherAreaData, getSdkBasePath, getVersionInfo, printVersion, render, resolveAssetPath, setSdkBasePath };