@metagl/sdk-render 1.0.10 → 1.0.11
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/README.md +17 -0
- package/README_EN.md +17 -0
- package/amd/lacdt.render.amd.js +56 -51
- package/cjs/lacdt.render.cjs.js +56 -51
- package/cjs/lacdt.render.d.ts +118 -7
- package/esm/lacdt.render.d.ts +118 -7
- package/esm/lacdt.render.js +55 -51
- package/lacdt.render.d.ts +118 -7
- package/lacdt.render.js +56 -51
- package/package.json +1 -1
package/lacdt.render.d.ts
CHANGED
|
@@ -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
|
|
@@ -529,6 +530,12 @@ interface HeightFogConfig {
|
|
|
529
530
|
enabled?: boolean;
|
|
530
531
|
fogByHeight?: Cartesian4;
|
|
531
532
|
fogColor?: Color;
|
|
533
|
+
/** Henyey-Greenstein 前向散射系数 [0,1],默认 0.70 */
|
|
534
|
+
fogG?: number;
|
|
535
|
+
/** 太阳方向散射强度乘数,默认 1.2 */
|
|
536
|
+
fogScattering?: number;
|
|
537
|
+
/** 环境光散射占比 [0,1],默认 0.25 */
|
|
538
|
+
fogAmbient?: number;
|
|
532
539
|
visibility?: FogVisibilityConfig;
|
|
533
540
|
}
|
|
534
541
|
/**
|
|
@@ -1479,7 +1486,7 @@ declare class LayerSystem implements RenderSystem {
|
|
|
1479
1486
|
}
|
|
1480
1487
|
|
|
1481
1488
|
interface ViewshedConfig {
|
|
1482
|
-
position: Cesium.Cartesian3;
|
|
1489
|
+
position: Cesium$1.Cartesian3;
|
|
1483
1490
|
heading: number;
|
|
1484
1491
|
pitch: number;
|
|
1485
1492
|
distance: number;
|
|
@@ -1489,8 +1496,8 @@ interface ViewshedConfig {
|
|
|
1489
1496
|
texelSnap?: boolean;
|
|
1490
1497
|
minHeight?: number;
|
|
1491
1498
|
near?: number;
|
|
1492
|
-
visibleColor?: Cesium.Color;
|
|
1493
|
-
hiddenColor?: Cesium.Color;
|
|
1499
|
+
visibleColor?: Cesium$1.Color;
|
|
1500
|
+
hiddenColor?: Cesium$1.Color;
|
|
1494
1501
|
}
|
|
1495
1502
|
/**
|
|
1496
1503
|
* 视域分析系统 - 支持多视域实例和多视锥体模式
|
|
@@ -1558,7 +1565,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
|
|
|
1558
1565
|
/**
|
|
1559
1566
|
* 使用 direction 和 up 向量更新视域方向(参考 DirectionCameraBinding)
|
|
1560
1567
|
*/
|
|
1561
|
-
updateViewshedOrientation(id: string, position: Cesium.Cartesian3, direction: Cesium.Cartesian3, up: Cesium.Cartesian3): void;
|
|
1568
|
+
updateViewshedOrientation(id: string, position: Cesium$1.Cartesian3, direction: Cesium$1.Cartesian3, up: Cesium$1.Cartesian3): void;
|
|
1562
1569
|
/**
|
|
1563
1570
|
* 更新可视距离
|
|
1564
1571
|
*/
|
|
@@ -1658,7 +1665,7 @@ declare class ViewshedAnalysisSystem implements RenderSystem {
|
|
|
1658
1665
|
}
|
|
1659
1666
|
|
|
1660
1667
|
interface SingleViewshedConfig {
|
|
1661
|
-
position: Cesium.Cartesian3;
|
|
1668
|
+
position: Cesium$1.Cartesian3;
|
|
1662
1669
|
heading: number;
|
|
1663
1670
|
pitch: number;
|
|
1664
1671
|
distance: number;
|
|
@@ -4591,6 +4598,108 @@ declare class RainSystem {
|
|
|
4591
4598
|
private _getParticleSystemMatrix;
|
|
4592
4599
|
}
|
|
4593
4600
|
|
|
4601
|
+
interface VectorTileSystemConfig {
|
|
4602
|
+
enabled?: boolean;
|
|
4603
|
+
style?: string | object;
|
|
4604
|
+
showTileColor?: boolean;
|
|
4605
|
+
workerUrl?: string;
|
|
4606
|
+
maximumActiveTasks?: number;
|
|
4607
|
+
}
|
|
4608
|
+
/**
|
|
4609
|
+
* 矢量瓦片系统类
|
|
4610
|
+
* 用于加载和显示Mapbox矢量瓦片
|
|
4611
|
+
* 参考: sdk-mbtiles/examples/index.js
|
|
4612
|
+
*/
|
|
4613
|
+
declare class VectorTileSystem {
|
|
4614
|
+
private viewer;
|
|
4615
|
+
private isEnabled;
|
|
4616
|
+
private config;
|
|
4617
|
+
private tileset;
|
|
4618
|
+
private style;
|
|
4619
|
+
constructor(viewer: Cesium.Viewer, config?: VectorTileSystemConfig);
|
|
4620
|
+
/**
|
|
4621
|
+
* 初始化系统
|
|
4622
|
+
*/
|
|
4623
|
+
private init;
|
|
4624
|
+
/**
|
|
4625
|
+
* 设置样式并重新加载
|
|
4626
|
+
* @param style Mapbox样式URL或样式对象
|
|
4627
|
+
*/
|
|
4628
|
+
setStyle(style: string | object): Promise<void>;
|
|
4629
|
+
/**
|
|
4630
|
+
* 获取当前样式
|
|
4631
|
+
*/
|
|
4632
|
+
getStyle(): string | object | null;
|
|
4633
|
+
/**
|
|
4634
|
+
* 设置图层布局属性
|
|
4635
|
+
* @param layerId 图层ID
|
|
4636
|
+
* @param name 属性名
|
|
4637
|
+
* @param value 属性值
|
|
4638
|
+
*/
|
|
4639
|
+
setLayoutProperty(layerId: string, name: string, value: any): boolean;
|
|
4640
|
+
/**
|
|
4641
|
+
* 设置图层绘制属性
|
|
4642
|
+
* @param layerId 图层ID
|
|
4643
|
+
* @param name 属性名
|
|
4644
|
+
* @param value 属性值
|
|
4645
|
+
*/
|
|
4646
|
+
setPaintProperty(layerId: string, name: string, value: any): boolean;
|
|
4647
|
+
/**
|
|
4648
|
+
* 设置图层过滤器
|
|
4649
|
+
* @param layerId 图层ID
|
|
4650
|
+
* @param filter 过滤器
|
|
4651
|
+
*/
|
|
4652
|
+
setFilter(layerId: string, filter: any): boolean;
|
|
4653
|
+
/**
|
|
4654
|
+
* 获取矢量瓦片集实例
|
|
4655
|
+
*/
|
|
4656
|
+
getTileset(): VectorTileset | null;
|
|
4657
|
+
/**
|
|
4658
|
+
* 获取就绪状态
|
|
4659
|
+
*/
|
|
4660
|
+
isReady(): boolean;
|
|
4661
|
+
/**
|
|
4662
|
+
* 设置显示状态
|
|
4663
|
+
*/
|
|
4664
|
+
setVisible(visible: boolean): void;
|
|
4665
|
+
/**
|
|
4666
|
+
* 获取显示状态
|
|
4667
|
+
*/
|
|
4668
|
+
getVisible(): boolean;
|
|
4669
|
+
/**
|
|
4670
|
+
* 启用系统
|
|
4671
|
+
*/
|
|
4672
|
+
enable(): Promise<void>;
|
|
4673
|
+
/**
|
|
4674
|
+
* 禁用系统
|
|
4675
|
+
*/
|
|
4676
|
+
disable(): Promise<void>;
|
|
4677
|
+
/**
|
|
4678
|
+
* 获取启用状态
|
|
4679
|
+
*/
|
|
4680
|
+
getStatus(): boolean;
|
|
4681
|
+
/**
|
|
4682
|
+
* 切换启用状态
|
|
4683
|
+
*/
|
|
4684
|
+
toggle(): Promise<boolean>;
|
|
4685
|
+
/**
|
|
4686
|
+
* 更新配置
|
|
4687
|
+
*/
|
|
4688
|
+
update(newConfig: Partial<VectorTileSystemConfig>): Promise<void>;
|
|
4689
|
+
/**
|
|
4690
|
+
* 获取当前配置
|
|
4691
|
+
*/
|
|
4692
|
+
getConfig(): VectorTileSystemConfig;
|
|
4693
|
+
/**
|
|
4694
|
+
* 移除矢量瓦片集
|
|
4695
|
+
*/
|
|
4696
|
+
private removeTileset;
|
|
4697
|
+
/**
|
|
4698
|
+
* 销毁系统
|
|
4699
|
+
*/
|
|
4700
|
+
destroy(): Promise<void>;
|
|
4701
|
+
}
|
|
4702
|
+
|
|
4594
4703
|
declare global {
|
|
4595
4704
|
interface Window {
|
|
4596
4705
|
LACDT?: Record<string, any>;
|
|
@@ -4635,6 +4744,8 @@ declare const render: {
|
|
|
4635
4744
|
RainSystem: typeof RainSystem;
|
|
4636
4745
|
/** 海洋系统 */
|
|
4637
4746
|
SeaSystem: typeof SeaSystem;
|
|
4747
|
+
/** 矢量瓦片系统 */
|
|
4748
|
+
VectorTileSystem: typeof VectorTileSystem;
|
|
4638
4749
|
};
|
|
4639
4750
|
|
|
4640
|
-
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 };
|
|
4751
|
+
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, VolumetricCloudControl, type VolumetricCloudsConfig, VolumetricCloudsSystem, type WaterConfig, WaterControl, WaterSystem, type WeatherAreaData, render };
|