earthsdk3-cesium 3.7.0-beta.16 → 3.7.0-beta.17

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.
Files changed (53) hide show
  1. package/dist/earthsdk3-cesium.iife.js +171 -1995
  2. package/dist/earthsdk3-cesium.js +21261 -19159
  3. package/dist/earthsdk3-cesium.umd.cjs +127 -121
  4. package/dist/types/CzmObjects/base/InnerClass/CzmImagery/extends/MVTImageryProviderVector.d.ts +72 -0
  5. package/dist/types/CzmObjects/general/CzmESMVTLayer/index.d.ts +2 -0
  6. package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/AvoidanceManager.d.ts +12 -3
  7. package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenLayer.d.ts +5 -4
  8. package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenObject.d.ts +12 -1
  9. package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/index.d.ts +2 -0
  10. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/StyleManager.d.ts +2 -0
  11. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/TileLoader.d.ts +5 -6
  12. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/TileNode.d.ts +20 -5
  13. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/{TilesCache..d.ts → TilesCache.d.ts} +9 -4
  14. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/index.d.ts +12 -6
  15. package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/utils.d.ts +3 -0
  16. package/dist/types/ESCesiumViewer/initCesiumViewer/fixLabel.d.ts +5 -0
  17. package/dist/types/ESCesiumViewer/initCesiumViewer/fixLabelCollection.d.ts +8 -0
  18. package/dist/types/ESJTypesCzm/czmObject/CzmBillboard.d.ts +4 -0
  19. package/dist/types/ESJTypesCzm/czmObject/CzmLabel.d.ts +7 -0
  20. package/package.json +2 -2
  21. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatFS.d.ts +0 -2
  22. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatPipelineStage.d.ts +0 -12
  23. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatSorter.d.ts +0 -10
  24. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatTextureGenerator.d.ts +0 -10
  25. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatTexturePipelineStage.d.ts +0 -11
  26. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatVS.d.ts +0 -2
  27. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageFS.d.ts +0 -2
  28. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageVS.d.ts +0 -2
  29. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/ModelFS.d.ts +0 -2
  30. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/ModelVS.d.ts +0 -2
  31. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileStyle.d.ts +0 -1
  32. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileset.d.ts +0 -1
  33. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixFrustuCommands.d.ts +0 -4
  34. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixGeometryPipelineStage.d.ts +0 -1
  35. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixGltfLoader.d.ts +0 -1
  36. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModel.d.ts +0 -1
  37. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModel3DTileContent.d.ts +0 -1
  38. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelDrawCommands.d.ts +0 -1
  39. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelRuntimePrimitive.d.ts +0 -1
  40. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelUtility.d.ts +0 -1
  41. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPassGaussianSplatting.d.ts +0 -3
  42. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPixelFormat.d.ts +0 -3
  43. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPrimitiveLoadPlan.d.ts +0 -1
  44. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixScene.d.ts +0 -1
  45. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixShaderProgram.d.ts +0 -1
  46. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixTexture.d.ts +0 -8
  47. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixVertexArray.d.ts +0 -1
  48. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixVertexAttributeSemantic.d.ts +0 -1
  49. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixView.d.ts +0 -1
  50. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixcreateUniform.d.ts +0 -23
  51. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/index.d.ts +0 -1
  52. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/passGaussianSplats.d.ts +0 -2
  53. package/dist/types/ESCesiumViewer/initCesiumViewer/fixCesium1_83.d.ts +0 -1
@@ -0,0 +1,72 @@
1
+ import { Credit, Event, WebMercatorTilingScheme, DefaultProxy, GeographicTilingScheme, Resource } from "cesium";
2
+ import { MVTImageryProviderOptions, StyleSpecification } from "./type";
3
+ import { Viewer } from "cesium";
4
+ import { SceneObjectKey } from "earthsdk3";
5
+ import { VectorTilesManager } from "../../../../../ESCesiumViewer/ViewerExtensions/VectorTilesManager";
6
+ declare class MVTImageryProviderVector {
7
+ viewer?: Viewer;
8
+ esSceneObjectId?: SceneObjectKey;
9
+ vectorTileManager?: VectorTilesManager;
10
+ ready: boolean;
11
+ readyPromise?: Promise<boolean>;
12
+ rectangle: any;
13
+ tileSize: number;
14
+ tileWidth: number;
15
+ tileHeight: number;
16
+ maximumLevel: number;
17
+ minimumLevel: number;
18
+ tileDiscardPolicy: undefined;
19
+ credit: Credit;
20
+ proxy: DefaultProxy;
21
+ layerStyle: {
22
+ [xx: string]: any;
23
+ }[];
24
+ hasAlphaChannel: boolean;
25
+ sourceFilter: any;
26
+ tilingScheme: WebMercatorTilingScheme | GeographicTilingScheme;
27
+ private _destroyed;
28
+ private _error;
29
+ private _accessToken;
30
+ private _enablePickFeatures;
31
+ /**
32
+ * create a MVTImageryProviderVector Object
33
+ * @param {MVTImageryProviderOptions} options MVTImageryProviderVector options as follow:
34
+ * @param {Resource | string | StyleSpecification} options.style - mapbox style object or url Resource.
35
+ * @param {string} options.accessToken - mapbox style accessToken.
36
+ * @param {RequestTransformFunction} options.transformRequest - use transformRequest to modify tile requests.
37
+ * @param {Number} [options.tileSize = 256] - can be 256 or 512. defaults to 256.
38
+ * @param {Number} [options.maximumLevel = 18] - if cesium zoom level exceeds maximumLevel, layer will be invisible, defaults to 18.
39
+ * @param {Number} [options.minimumLevel = 0] - if cesium zoom level belows minimumLevel, layer will be invisible, defaults to 0.
40
+ * @param {Boolean} [options.showCanvas = false] - if show canvas for debug.
41
+ * @param {Boolean} [options.enablePickFeatures = true] - enable pickFeatures or not, defaults to true.
42
+ * @param {Function} options.sourceFilter - sourceFilter is used to filter which source participate in pickFeature process.
43
+ * @param {WebMercatorTilingScheme | GeographicTilingScheme} [options.tilingScheme = WebMercatorTilingScheme] - Cesium tilingScheme, defaults to WebMercatorTilingScheme(EPSG: 3857).
44
+ * @param {Credit} options.credit - A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
45
+ * @example
46
+ * const imageryProvider = new MVTImageryProviderVector({
47
+ style: 'https://demotiles.maplibre.org/style.json'
48
+ });
49
+ */
50
+ constructor(options: MVTImageryProviderOptions & {
51
+ /**
52
+ * Deprecated
53
+ *
54
+ * You can use fromUrl instead
55
+ * @example
56
+ * const provider = await MVTImageryProviderVector.fromUrl(url)
57
+ */
58
+ style: string | Resource | StyleSpecification;
59
+ });
60
+ get isDestroyed(): boolean;
61
+ /**
62
+ * Gets an event that will be raised if an error is encountered during processing.
63
+ * @memberof GeoJsonDataSource.prototype
64
+ * @type {Event}
65
+ */
66
+ get errorEvent(): Event<(...args: any[]) => void>;
67
+ static fromUrl(url: Resource | string | StyleSpecification, options?: MVTImageryProviderOptions): Promise<MVTImageryProviderVector>;
68
+ requestImage(x: number, y: number, level: number, releaseTile?: boolean): Promise<HTMLImageElement | HTMLCanvasElement | any> | undefined;
69
+ pickFeatures(x: number, y: number, zoom: number, longitude: number, latitude: number): undefined;
70
+ destroy(): void;
71
+ }
72
+ export default MVTImageryProviderVector;
@@ -1,6 +1,7 @@
1
1
  import { CzmESVisualObject } from "../../base";
2
2
  import { ESCesiumViewer } from "../../../ESCesiumViewer";
3
3
  import { ESMVTLayer } from "../../../ESObjects";
4
+ import { Event } from "earthsdk3";
4
5
  export declare class CzmESMVTLayer extends CzmESVisualObject<ESMVTLayer> {
5
6
  static readonly type: string;
6
7
  private _czmImagery;
@@ -13,6 +14,7 @@ export declare class CzmESMVTLayer extends CzmESVisualObject<ESMVTLayer> {
13
14
  pointJson: any[];
14
15
  otherJson: any[];
15
16
  };
17
+ mvtLayerJsonChanged: Event<[]>;
16
18
  constructor(sceneObject: ESMVTLayer, czmViewer: ESCesiumViewer);
17
19
  flyTo(duration: number | undefined, id: number): boolean;
18
20
  flyIn(duration: number | undefined, id: number): boolean;
@@ -1,4 +1,4 @@
1
- import { Destroyable, ESJScreenLayerInfo, ESJScreenRules } from "earthsdk3";
1
+ import { Destroyable, ESJScreenLayerInfo } from "earthsdk3";
2
2
  import * as Cesium from "cesium";
3
3
  import { ScreenManager } from ".";
4
4
  /**
@@ -10,19 +10,28 @@ import { ScreenManager } from ".";
10
10
  export declare class AvoidanceManager extends Destroyable {
11
11
  rectangleCollisionCheck: Cesium.RectangleCollisionChecker;
12
12
  screenManager: ScreenManager;
13
- enable: boolean;
14
13
  forceRebuildNext: boolean;
15
14
  avoidanceLayers: string[];
15
+ customLayers: string[];
16
16
  private _processingQueue;
17
17
  private _isProcessing;
18
+ /** 单帧最多处理多少个对象,适当调大可以加快收敛,调小可以减轻单帧压力 */
18
19
  private BATCH_SIZE;
20
+ /** 总共参与避让计算的对象上限,超过后只保留优先级最高的一部分(zOrder 最大) */
21
+ private MAX_OBJECTS;
22
+ /** 屏幕网格大小(像素),用于做候选抽样,保证一块区域内只保留少量候选点 */
23
+ private GRID_SIZE;
24
+ /** 每个网格 cell 内最多参与避让的对象数量 */
25
+ private MAX_PER_CELL;
19
26
  private _cache;
20
27
  private _lastCameraState;
28
+ /** 摄像机移动触发全量重建的阈值,适当调大避免频繁 clear 树 */
21
29
  private CAMERA_MOVE_THRESHOLD;
22
30
  constructor(screenManager: ScreenManager);
23
31
  update(): void;
24
32
  setAvoidanceLayer(): void;
25
- updateAvoidanceLayer(avoidance: ESJScreenRules['avoidance'], layer?: ESJScreenLayerInfo['layer']): void;
33
+ add(layer?: ESJScreenLayerInfo['layer']): void;
34
+ remove(layer?: ESJScreenLayerInfo['layer']): void;
26
35
  private _shouldForceRebuild;
27
36
  private _updateLastCameraState;
28
37
  private _buildProcessingQueue;
@@ -2,18 +2,19 @@ import { Destroyable, SceneObjectKey } from "earthsdk3";
2
2
  import * as Cesium from "cesium";
3
3
  import { ESJScreenObjectInfo } from "earthsdk3";
4
4
  import { CzmBillboard, CzmLabel, ESCesiumViewer, ScreenManager } from "../../../index";
5
- import { ScreenObject, ScreenObjectType } from "./ScreenObject";
5
+ import { ScreenObject, ScreenObjectKey, ScreenObjectType } from "./ScreenObject";
6
6
  /**
7
7
  * 管理一类对象(同图层)
8
8
  * 负责增删改 ScreenObject
9
9
  * 提供快速访问索引 objects: Map<SceneObjectKey, ScreenObject>
10
10
  */
11
11
  export declare class ScreenLayer extends Destroyable {
12
- objects: Map<SceneObjectKey, ScreenObject>;
13
- screenManager: ScreenManager;
12
+ protected screenManager: ScreenManager;
13
+ protected screenManagerLayerName: string;
14
+ objects: Map<ScreenObjectKey, ScreenObject>;
14
15
  czmViewer: ESCesiumViewer;
15
16
  viewer: Cesium.Viewer;
16
- constructor(screenManager: ScreenManager);
17
+ constructor(screenManager: ScreenManager, screenManagerLayerName: string);
17
18
  /**
18
19
  * 检查图层是否包含有效对象
19
20
  * @returns 如果图层中存在有效对象则返回 true,否则返回 false
@@ -2,6 +2,7 @@ import { Destroyable, Event, SceneObjectKey } from "earthsdk3";
2
2
  import * as Cesium from 'cesium';
3
3
  export declare const ScreenObjectTypes: readonly ["label", "billboard", "rectangle"];
4
4
  export type ScreenObjectType = typeof ScreenObjectTypes[number];
5
+ export type ScreenObjectKey = string;
5
6
  /**
6
7
  * 储存相同位置下的对象的信息
7
8
  * 代表一个场景对象
@@ -12,7 +13,10 @@ export type ScreenObjectType = typeof ScreenObjectTypes[number];
12
13
  */
13
14
  export declare class ScreenObject extends Destroyable {
14
15
  id: string;
15
- position: Cesium.Cartesian3;
16
+ private _position;
17
+ get position(): Cesium.Cartesian3;
18
+ set position(value: Cesium.Cartesian3);
19
+ get positionChanged(): import("earthsdk3").Listener<[Cesium.Cartesian3, Cesium.Cartesian3]>;
16
20
  label: Cesium.Label | undefined;
17
21
  billboard: Cesium.Billboard | undefined;
18
22
  rectangle: Record<string, any> | undefined;
@@ -20,9 +24,16 @@ export declare class ScreenObject extends Destroyable {
20
24
  labelRefCount: number;
21
25
  billboardRefCount: number;
22
26
  rectangleRefCount: number;
27
+ labelIgnorePlacement: boolean;
28
+ billboardIgnorePlacement: boolean;
29
+ rectangleIgnorePlacement: boolean;
30
+ labelAllowOverlap: boolean;
31
+ billboardAllowOverlap: boolean;
32
+ rectangleAllowOverlap: boolean;
23
33
  private _showEvent;
24
34
  get showEvent(): Event<[boolean]>;
25
35
  show(show: boolean): void;
26
36
  constructor(id: SceneObjectKey, position: Cesium.Cartesian3);
27
37
  updateShow(show: boolean): void;
38
+ updatePosition(position: Cesium.Cartesian3): void;
28
39
  }
@@ -20,6 +20,8 @@ export declare class ScreenManager extends Destroyable {
20
20
  collectionMap: Record<ScreenObjectType, any>;
21
21
  private _refreshEvent;
22
22
  get refreshEvent(): Event<[]>;
23
+ /** 是否已经在本帧调度了 refresh,防止一帧内被调用成千上万次 */
24
+ private _refreshScheduled;
23
25
  refresh(): void;
24
26
  constructor(_czmViewer: ESCesiumViewer);
25
27
  getLayer(layerName: string): ScreenLayer;
@@ -2,6 +2,7 @@ import { Destroyable, SceneObjectKey } from "earthsdk3";
2
2
  import { CzmESMVTLayer, CzmLabel } from '../../../index';
3
3
  import { BackgroundLayerSpecification, LayerSpecification } from "../../../CzmObjects/base/InnerClass/CzmImagery/extends/type";
4
4
  export type LayerStyle = Exclude<LayerSpecification, BackgroundLayerSpecification> & {
5
+ symbolStyle?: any;
5
6
  labelStyle?: any;
6
7
  billboardStyle?: any;
7
8
  polygonStyle?: any;
@@ -9,6 +10,7 @@ export type LayerStyle = Exclude<LayerSpecification, BackgroundLayerSpecificatio
9
10
  };
10
11
  export type mapboxLabel = CzmLabel & {
11
12
  'text-transform'?: string;
13
+ "maxWidth"?: number;
12
14
  };
13
15
  export declare const textTransform: {
14
16
  none: (s: string) => string;
@@ -1,15 +1,14 @@
1
- import { sourceName } from "./index";
1
+ import { sourceName, VectorTilesManager } from "./index";
2
2
  import { Destroyable, SceneObjectKey } from "earthsdk3";
3
3
  import { CzmESMVTLayer } from "../../../CzmObjects";
4
4
  import { TileNode } from './TileNode';
5
- import { TilesCache } from "./TilesCache.";
6
- import { WorkerPool } from "./WorkerPool";
5
+ import { TilesCache } from "./TilesCache";
7
6
  /**
8
7
  * 瓦片加载器
9
8
  * 只负责加载瓦片数据并解析为GeoJson格式
10
9
  */
11
10
  export declare class TileLoader extends Destroyable {
12
- tilesCache: TilesCache;
11
+ vectorTilesManager: VectorTilesManager;
13
12
  /**
14
13
  * 等待请求的瓦片服务
15
14
  */
@@ -23,14 +22,14 @@ export declare class TileLoader extends Destroyable {
23
22
  minzoom?: number;
24
23
  maxzoom?: number;
25
24
  }>>;
26
- workerPool: WorkerPool;
25
+ tilesCache: TilesCache;
27
26
  /**
28
27
  * 切片方案
29
28
  * xyz: 谷歌瓦片方案
30
29
  * tms: 瓦片服务方案
31
30
  */
32
31
  tileSchemes: Map<SceneObjectKey, "xyz" | "tms">;
33
- constructor(tilesCache: TilesCache);
32
+ constructor(vectorTilesManager: VectorTilesManager);
34
33
  add(czmESMVTLayer: CzmESMVTLayer): void;
35
34
  remove(czmESMVTLayer: CzmESMVTLayer): void;
36
35
  fetchTile(sceneObjectId: SceneObjectKey, tileKey: string): Promise<TileNode | undefined>;
@@ -1,5 +1,5 @@
1
1
  import { Destroyable } from "earthsdk3";
2
- import { FeatureDate, layerName, sourceName, TileKey, TileNodeState } from ".";
2
+ import { layerName, sourceName, TileKey, TileNodeState } from ".";
3
3
  export declare class TileNode extends Destroyable {
4
4
  x: number;
5
5
  y: number;
@@ -7,8 +7,23 @@ export declare class TileNode extends Destroyable {
7
7
  tileKey: TileKey;
8
8
  parent: TileNode | null;
9
9
  children: Set<TileNode>;
10
- data: Map<sourceName, Map<layerName, Set<FeatureDate>>>;
11
- state: TileNodeState;
12
- constructor(tileKey: TileKey);
13
- fillParentAndChildren(tileCache: Map<TileKey, TileNode | undefined>): void;
10
+ data: Map<sourceName, Map<layerName, Set<GeoJSON.Feature<Exclude<GeoJSON.Geometry, GeoJSON.GeometryCollection>>>>>;
11
+ private _state;
12
+ get state(): TileNodeState;
13
+ set state(value: TileNodeState);
14
+ get stateChanged(): import("earthsdk3").Listener<[TileNodeState, TileNodeState]>;
15
+ refCount: number;
16
+ lastUsedFrame: number;
17
+ screenIds: Set<string> | null;
18
+ /** 瓦片渲染结果,可以是 Canvas 或 ImageBitmap(优先 ImageBitmap,减少主线程绘制开销) */
19
+ image: HTMLCanvasElement | ImageBitmap | null;
20
+ /** 该瓦片对应的影像渲染 Promise,用于避免重复开启 worker 计算 */
21
+ imagePromise?: Promise<HTMLCanvasElement | ImageBitmap>;
22
+ constructor(tileCache: Map<string, TileNode | undefined>, tileKey: TileKey);
23
+ attachToParent(tileCache: Map<string, TileNode | undefined>): void;
24
+ getParentTileKey(): string | undefined;
25
+ getChildrenTileKeys(): string[];
26
+ idReady(): boolean;
27
+ hasReadyChildren(): boolean;
28
+ allChildrenReady(): boolean;
14
29
  }
@@ -1,5 +1,5 @@
1
1
  import { Destroyable, Event, SceneObjectKey } from "earthsdk3";
2
- import { TileKey } from "./index";
2
+ import { TileKey, VectorTilesManager } from "./index";
3
3
  import { CzmESMVTLayer } from "../../../CzmObjects";
4
4
  import { TileNode } from "./TileNode";
5
5
  /**
@@ -7,18 +7,23 @@ import { TileNode } from "./TileNode";
7
7
  * 缓存请求的xyz瓦片数据,超过缓存数量后,将最旧的瓦片删除
8
8
  */
9
9
  export declare class TilesCache extends Destroyable {
10
+ vectorTilesManager: VectorTilesManager;
10
11
  cache: Map<SceneObjectKey, Map<TileKey, TileNode | undefined>>;
12
+ private _cacheEvent;
13
+ get cacheEvent(): Event<[string, string, TileNode]>;
11
14
  maxSize: number;
12
15
  private _deleteTileEvent;
13
16
  get deleteTileEvent(): Event<[string, string | undefined]>;
14
17
  deleteTile(sceneObjectId: SceneObjectKey, tileKey?: TileKey): void;
15
- constructor();
18
+ constructor(vectorTilesManager: VectorTilesManager);
16
19
  has(sceneObjectId: SceneObjectKey, tileKey?: TileKey): boolean;
17
- get(sceneObjectId: SceneObjectKey): Map<TileKey, TileNode | undefined> | undefined;
20
+ get(sceneObjectId: SceneObjectKey): Map<TileKey, TileNode | undefined>;
18
21
  get(sceneObjectId: SceneObjectKey, tileKey: TileKey): TileNode | undefined;
19
- set(sceneObjectId: SceneObjectKey, tileKey: TileKey, tileNode: TileNode | undefined): void;
22
+ set(sceneObjectId: SceneObjectKey, tileKey: TileKey, tileNode: TileNode): void;
20
23
  remove(sceneObject: SceneObjectKey): void;
21
24
  remove(sceneObject: CzmESMVTLayer): void;
22
25
  remove(sceneObject: SceneObjectKey, tileKey: TileKey): void;
23
26
  remove(sceneObject: CzmESMVTLayer, tileKey: TileKey): void;
27
+ requestImage(sceneObjectId: SceneObjectKey, x: number, y: number, z: number): Promise<HTMLCanvasElement | ImageBitmap>;
28
+ private _requestImageWorker;
24
29
  }
@@ -1,11 +1,12 @@
1
1
  import { Destroyable, SceneObjectKey } from "earthsdk3";
2
- import { TilesCache } from "./TilesCache.";
2
+ import { TilesCache } from "./TilesCache";
3
3
  import { TileLoader } from "./TileLoader";
4
4
  import { TileRenderer } from "./TileRenderer";
5
5
  import { StyleManager } from "./StyleManager";
6
6
  import { EventManager } from "./EventManager";
7
7
  import { CzmESMVTLayer } from "../../../index";
8
8
  import * as Cesium from 'cesium';
9
+ import { WorkerPool } from "./WorkerPool";
9
10
  /**
10
11
  * Viewer Camera/LOD
11
12
  * ↓
@@ -19,11 +20,6 @@ import * as Cesium from 'cesium';
19
20
  * ↓
20
21
  * EventManager 绑定事件
21
22
  */
22
- export interface FeatureDate {
23
- id: string | number;
24
- geometry: any;
25
- properties: Record<string, any>;
26
- }
27
23
  export type TileKey = string;
28
24
  export type sourceName = string;
29
25
  export type layerName = string;
@@ -44,9 +40,19 @@ export declare class VectorTilesManager extends Destroyable {
44
40
  styleManager: StyleManager;
45
41
  eventManager: EventManager;
46
42
  lastImageryTileMap: Map<SceneObjectKey, Set<TileKey>>;
43
+ workerPool: WorkerPool;
44
+ /**
45
+ * 最近一次瓦片集合发生变化的时间,用于避免相机缩放/平移过程中频繁隐藏导致的闪烁
46
+ */
47
+ private lastTilesChangedTime;
48
+ /**
49
+ * 视图稳定多久后才开始真正隐藏旧瓦片(毫秒)
50
+ */
51
+ private readonly hideDelayWhenCameraMoving;
47
52
  constructor(viewer: Cesium.Viewer);
48
53
  add(czmESMVTLayer: CzmESMVTLayer): Promise<void>;
49
54
  remove(czmESMVTLayer: CzmESMVTLayer): void;
50
55
  refreshVisibleTiles(forceUpdate?: boolean): void;
51
56
  updateTiles(tileMap: Map<SceneObjectKey, Set<TileKey>>, forceUpdate?: boolean): void;
57
+ requestImage(sceneObjectId: SceneObjectKey, x: number, y: number, z: number): Promise<HTMLCanvasElement | ImageBitmap>;
52
58
  }
@@ -1,2 +1,5 @@
1
+ import * as Cesium from "cesium";
1
2
  export declare function getMapboxTextField(textField: any, zoom: number): string | string[] | null;
2
3
  export declare function tileDataToGeoJSON(tileData: Record<string, any>): Map<string, Set<any>>;
4
+ export declare function interpolateTextAlongPath(viewer: Cesium.Viewer, positions: Cesium.Cartesian3[], text: string, font: string): Map<Cesium.Cartesian3, Cesium.Cartesian3[]>;
5
+ export declare function wrapByPixel(text: any, maxWidth: any, font: any): string;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 扩展Cesium.Label,增加positions属性,可直接操作单字符位置
3
+ * 传入位置不足时,默认使用label.position
4
+ */
5
+ export declare function fixLabel(): void;
@@ -0,0 +1,8 @@
1
+ import * as Cesium from 'cesium';
2
+ export declare function fixLabelCollection(): void;
3
+ /**
4
+ * 根据传入点数量,对 Cartesian3 数组做均匀插值
5
+ * @param points 原始点数组(至少两个)
6
+ * @param targetCount 目标插值数量(包含起终点)
7
+ */
8
+ export declare function interpolateCartesian3(points: Cesium.Cartesian3[], targetCount: number): Cesium.Cartesian3[];
@@ -1,9 +1,13 @@
1
1
  import * as Cesium from 'cesium';
2
+ import { ESJVector4D } from 'earthsdk3';
2
3
  export type CzmBillboard = Partial<{
3
4
  position: Cesium.Cartesian3;
4
5
  id: any;
5
6
  show: boolean;
6
7
  image: string | HTMLCanvasElement;
8
+ avoidancePadding: ESJVector4D;
9
+ ignorePlacement: boolean;
10
+ allowOverlap: boolean;
7
11
  scale: number;
8
12
  pixelOffset: Cesium.Cartesian2;
9
13
  eyeOffset: Cesium.Cartesian3;
@@ -1,6 +1,13 @@
1
1
  import * as Cesium from "cesium";
2
2
  export type CzmLabel = Partial<{
3
3
  position: Cesium.Cartesian3;
4
+ rotation: number;
5
+ positions: Cesium.Cartesian3[];
6
+ letterSpacing: number;
7
+ textJustify: string;
8
+ avoidancePadding: number;
9
+ ignorePlacement: boolean;
10
+ allowOverlap: boolean;
4
11
  id: any;
5
12
  text: string;
6
13
  show: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "earthsdk3-cesium",
3
- "version": "3.7.0-beta.16",
3
+ "version": "3.7.0-beta.17",
4
4
  "description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
5
5
  "type": "module",
6
6
  "main": "./dist/earthsdk3-cesium.umd.cjs",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "peerDependencies": {
40
40
  "cesium": "1.134.1",
41
- "earthsdk3": "3.7.0-beta.14"
41
+ "earthsdk3": "3.7.0-beta.15"
42
42
  },
43
43
  "dependencies": {
44
44
  "@types/delaunator": "^5.0.2",
@@ -1,2 +0,0 @@
1
- declare const _default: "void gaussianSplatStage(inout vec4 color, in ProcessedAttributes attributes) {\n mediump float A = dot(v_vertPos, v_vertPos);\n if(A > 1.0)\n discard;\n mediump float scale = 4.0;\n mediump float B = exp(-A * scale) * (v_splatColor.a);\n color = vec4(v_splatColor.rgb * B, B);\n}\n\n";
2
- export default _default;
@@ -1,12 +0,0 @@
1
- import * as Cesium from 'cesium';
2
-
3
- declare const GaussianSplatPipelineStage: {
4
- name: string;
5
- process: (
6
- renderResources: any,
7
- primitive: Cesium.Primitive,
8
- frameState: Cesium.FrameState
9
- ) => void;
10
- };
11
-
12
- export default GaussianSplatPipelineStage;
@@ -1,10 +0,0 @@
1
- import { RuntimeError, TaskProcessor } from 'cesium';
2
- declare class GaussianSplatSorter {
3
- static _maxSortingConcurrency: number;
4
- static _sorterTaskProcessor: TaskProcessor | undefined;
5
- static _taskProcessorReady: boolean;
6
- static _error: RuntimeError | undefined;
7
- static _getSorterTaskProcessor: () => TaskProcessor;
8
- static radixSortIndexes: (parameters: any) => Promise<object> | undefined;
9
- }
10
- export default GaussianSplatSorter;
@@ -1,10 +0,0 @@
1
- import { RuntimeError, TaskProcessor } from 'cesium';
2
- declare class GaussianSplatTextureGenerator {
3
- static _maxSortingConcurrency: number;
4
- static _textureTaskProcessor: TaskProcessor | undefined;
5
- static _taskProcessorReady: boolean;
6
- static _error: RuntimeError | undefined;
7
- static _getTextureTaskProcessor: () => TaskProcessor;
8
- static generateFromAttrs: (parameters: any) => Promise<object> | undefined;
9
- }
10
- export default GaussianSplatTextureGenerator;
@@ -1,11 +0,0 @@
1
- import * as Cesium from 'cesium';
2
- declare const GaussianSplatTexturePipelineStage: {
3
- name: string;
4
- process: (
5
- renderResources: any,
6
- primitive: Cesium.Primitive,
7
- frameState: Cesium.FrameState
8
- ) => void;
9
- };
10
-
11
- export default GaussianSplatTexturePipelineStage;
@@ -1,2 +0,0 @@
1
- declare const _default: "#ifndef HAS_SPLAT_TEXTURE\n\nvoid calcCov3D(vec3 scale, vec4 rot, out float[6] cov3D)\n{\n mat3 S = mat3(\n u_splatScale * scale[0], 0, 0,\n 0, u_splatScale * scale[1], 0,\n 0, 0, u_splatScale * scale[2]\n );\n\n float r = rot.w;\n float x = rot.x;\n float y = rot.y;\n float z = rot.z;\n\n // Compute rotation matrix from quaternion\n mat3 R = mat3(\n 1. - 2. * (y * y + z * z),\n 2. * (x * y - r * z),\n 2. * (x * z + r * y),\n 2. * (x * y + r * z),\n 1. - 2. * (x * x + z * z),\n 2. * (y * z - r * x),\n 2. * (x * z - r * y),\n 2. * (y * z + r * x),\n 1. - 2. * (x * x + y * y)\n );\n\n mat3 M = S * R;\n mat3 Sigma = transpose(M) * M;\n\n //we only need part of it, symmetric\n cov3D = float[6](\n Sigma[0][0], Sigma[0][1], Sigma[0][2],\n Sigma[1][1], Sigma[1][2], Sigma[2][2]\n );\n\n}\n\nvec3 calcCov2D(vec3 worldPos, float focal_x, float focal_y, float tan_fovx, float tan_fovy, float[6] cov3D, mat4 viewmatrix) {\n vec4 t = viewmatrix * vec4(worldPos, 1.0);\n\n float limx = 1.3 * tan_fovx;\n float limy = 1.3 * tan_fovy;\n float txtz = t.x / t.z;\n float tytz = t.y / t.z;\n t.x = min(limx, max(-limx, txtz)) * t.z;\n t.y = min(limy, max(-limy, tytz)) * t.z;\n\n mat3 J = mat3(\n focal_x / t.z, 0, -(focal_x * t.x) / (t.z * t.z),\n 0, focal_y / t.z, -(focal_y * t.y) / (t.z * t.z),\n 0, 0, 0\n );\n\n mat3 W = mat3(\n viewmatrix[0][0], viewmatrix[1][0], viewmatrix[2][0],\n viewmatrix[0][1], viewmatrix[1][1], viewmatrix[2][1],\n viewmatrix[0][2], viewmatrix[1][2], viewmatrix[2][2]\n );\n mat3 T = W * J;\n mat3 Vrk = mat3(\n cov3D[0], cov3D[1], cov3D[2],\n cov3D[1], cov3D[3], cov3D[4],\n cov3D[2], cov3D[4], cov3D[5]\n );\n\n mat3 cov = transpose(T) * transpose(Vrk) * T;\n\n cov[0][0] += .3;\n cov[1][1] += .3;\n return vec3(cov[0][0], cov[0][1], cov[1][1]);\n}\n\n\nvoid gaussianSplatStage(ProcessedAttributes attributes, inout vec4 positionClip) {\n mat4 viewMatrix = czm_modelView;\n\n vec4 clipPosition = czm_modelViewProjection * vec4(a_splatPosition,1.0);\n positionClip = clipPosition;\n\n //positionClip *= u_scalingMatrix;\n\n float[6] cov3D;\n calcCov3D(attributes.scale, attributes.rotation, cov3D);\n vec3 cov = calcCov2D(a_splatPosition, u_focalX, u_focalY, u_tan_fovX, u_tan_fovY, cov3D, viewMatrix);\n\n float mid = (cov.x + cov.z) / 2.0;\n float radius = length(vec2((cov.x - cov.z) / 2.0, cov.y));\n float lambda1 = mid + radius, lambda2 = mid - radius;\n\n if(lambda2 < 0.0) return;\n vec2 diagonalVector = normalize(vec2(cov.y, lambda1 - cov.x));\n vec2 v1 = min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector;\n vec2 v2 = min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x);\n\n vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;\n positionClip += vec4((corner.x * v1 + corner.y * v2) * 4.0 / czm_viewport.zw * positionClip.w, 0, 0);\n positionClip.z = clamp(positionClip.z, -abs(positionClip.w), abs(positionClip.w));\n v_vertPos = corner ;\n v_splatColor = a_splatColor;\n}\n\n#else\n\nvec4 calcCovVectors(vec3 worldPos, mat3 Vrk, mat3 viewmatrix) {\n vec4 t = vec4(worldPos, 1.0);\n float focal = czm_viewport.z * czm_projection[0][0];\n\n float J1 = focal / t.z;\n vec2 J2 = -J1 / t.z * t.xy;\n mat3 J = mat3(\n J1, 0.0, J2.x,\n 0.0, J1, J2.y,\n 0.0, 0.0, 0.0\n );\n\n //assuming a uniform scale, should get us close enough\n float scale = length(viewmatrix[0]);\n\n mat3 T = viewmatrix * J;\n mat3 cov = transpose(T) * Vrk * T / (scale*scale);\n\n float diagonal1 = cov[0][0] + .3;\n float offDiagonal = cov[0][1];\n float diagonal2 = cov[1][1] + .3;\n\n float mid = 0.5 * (diagonal1 + diagonal2);\n float radius = length(vec2((diagonal1 - diagonal2) * 0.5, offDiagonal));\n float lambda1 = mid + radius;\n float lambda2 = max(mid - radius, 0.1);\n\n vec2 diagonalVector = normalize(vec2(offDiagonal, lambda1 - diagonal1));\n\n return vec4(\n min(sqrt(2.0 * lambda1), 1024.0) * diagonalVector,\n min(sqrt(2.0 * lambda2), 1024.0) * vec2(diagonalVector.y, -diagonalVector.x)\n );\n}\n\nhighp vec4 discardVec = vec4(0.0, 0.0, 2.0, 1.0);\n\nvoid gaussianSplatStage(ProcessedAttributes attributes, inout vec4 positionClip) {\n uint texIdx = uint(a_splatIndex);\n ivec2 posCoord = ivec2((texIdx & 0x3ffu) << 1, texIdx >> 10);\n vec4 splatPosition = vec4( uintBitsToFloat(uvec4(texelFetch(u_splatAttributeTexture, posCoord, 0))) );\n \n vec4 splatViewPos = czm_modelView * vec4(splatPosition.xyz, 1.0);\n vec4 clipPosition = czm_projection * splatViewPos;\n\n float clip = 1.2 * clipPosition.w;\n if (clipPosition.z < -clip || clipPosition.x < -clip || clipPosition.x > clip ||\n clipPosition.y < -clip || clipPosition.y > clip) {\n positionClip = vec4(0.0, 0.0, 2.0, 1.0);\n return;\n }\n\n ivec2 covCoord = ivec2(((texIdx & 0x3ffu) << 1) | 1u, texIdx >> 10);\n uvec4 covariance = uvec4(texelFetch(u_splatAttributeTexture, covCoord, 0));\n\n positionClip = clipPosition;\n\n vec2 u1 = unpackHalf2x16(covariance.x) ;\n vec2 u2 = unpackHalf2x16(covariance.y);\n vec2 u3 = unpackHalf2x16(covariance.z);\n mat3 Vrk = mat3(u1.x, u1.y, u2.x, u1.y, u2.y, u3.x, u2.x, u3.x, u3.y);\n\n //we can still apply scale here even though cov3d is pre-computed\n Vrk *= u_splatScale;\n\n vec4 covVectors = calcCovVectors(\n splatViewPos.xyz,\n Vrk,\n mat3(transpose(czm_modelView))\n );\n\n if (dot(covVectors.xy, covVectors.xy) < 4.0 && dot(covVectors.zw, covVectors.zw) < 4.0) {\n gl_Position = discardVec;\n return;\n }\n\n vec2 corner = vec2((gl_VertexID << 1) & 2, gl_VertexID & 2) - 1.;\n\n positionClip += vec4((corner.x * covVectors.xy + corner.y * covVectors.zw) / czm_viewport.zw * positionClip.w, 0, 0);\n positionClip.z = clamp(positionClip.z, -abs(positionClip.w), abs(positionClip.w));\n\n v_vertPos = corner ;\n v_splatColor = vec4(covariance.w & 0xffu, (covariance.w >> 8) & 0xffu, (covariance.w >> 16) & 0xffu, (covariance.w >> 24) & 0xffu) / 255.0;\n\n //if tile bounding volumes are shown, increase transparency so we can see the entire box\n #ifdef DEBUG_BOUNDING_VOLUMES\n v_splatColor.a *= 0.08;\n #endif\n}\n\n\n#endif\n";
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: "void geometryStage(out ProcessedAttributes attributes)\n{\n attributes.positionMC = v_positionMC;\n attributes.positionEC = v_positionEC;\n\n #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE)\n attributes.positionWC = v_positionWC;\n #endif\n\n #ifdef HAS_NORMALS\n // renormalize after interpolation\n attributes.normalEC = normalize(v_normalEC);\n #endif\n\n #ifdef HAS_TANGENTS\n attributes.tangentEC = normalize(v_tangentEC);\n #endif\n\n #ifdef HAS_BITANGENTS\n attributes.bitangentEC = normalize(v_bitangentEC);\n #endif\n\n // Everything else is dynamically generated in GeometryPipelineStage\n setDynamicVaryings(attributes);\n}\n";
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: "vec4 geometryStage(inout ProcessedAttributes attributes, mat4 modelView, mat3 normal)\n{\n vec4 computedPosition;\n\n // Compute positions in different coordinate systems\n vec3 positionMC = attributes.positionMC;\n v_positionMC = positionMC;\n v_positionEC = (modelView * vec4(positionMC, 1.0)).xyz;\n\n #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)\n vec3 position2D = attributes.position2D;\n vec3 positionEC = (u_modelView2D * vec4(position2D, 1.0)).xyz;\n computedPosition = czm_projection * vec4(positionEC, 1.0);\n #else\n computedPosition = czm_projection * vec4(v_positionEC, 1.0);\n #endif\n\n // Sometimes the custom shader and/or style needs this\n #if defined(COMPUTE_POSITION_WC_CUSTOM_SHADER) || defined(COMPUTE_POSITION_WC_STYLE) || defined(COMPUTE_POSITION_WC_ATMOSPHERE) || defined(ENABLE_CLIPPING_POLYGONS)\n // Note that this is a 32-bit position which may result in jitter on small\n // scales.\n v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n #endif\n\n #ifdef HAS_NORMALS\n v_normalEC = normalize(normal * attributes.normalMC);\n #endif\n\n #ifdef HAS_TANGENTS\n v_tangentEC = normalize(normal * attributes.tangentMC);\n #endif\n\n #ifdef HAS_BITANGENTS\n v_bitangentEC = normalize(normal * attributes.bitangentMC);\n #endif\n\n // All other varyings need to be dynamically generated in\n // GeometryPipelineStage\n setDynamicVaryings(attributes);\n\n return computedPosition;\n}\n";
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: "\nprecision highp float;\n\nczm_modelMaterial defaultModelMaterial()\n{\n czm_modelMaterial material;\n material.diffuse = vec3(0.0);\n material.specular = vec3(1.0);\n material.roughness = 1.0;\n material.occlusion = 1.0;\n material.normalEC = vec3(0.0, 0.0, 1.0);\n material.emissive = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n\nvec4 handleAlpha(vec3 color, float alpha)\n{\n #ifdef ALPHA_MODE_MASK\n if (alpha < u_alphaCutoff) {\n discard;\n }\n #endif\n\n return vec4(color, alpha);\n}\n\nSelectedFeature selectedFeature;\n\nvoid main()\n{\n #ifdef HAS_POINT_CLOUD_SHOW_STYLE\n if (v_pointCloudShow == 0.0)\n {\n discard;\n }\n #endif\n\n #ifdef HAS_MODEL_SPLITTER\n modelSplitterStage();\n #endif\n\n czm_modelMaterial material = defaultModelMaterial();\n\n ProcessedAttributes attributes;\n geometryStage(attributes);\n\n FeatureIds featureIds;\n featureIdStage(featureIds, attributes);\n\n Metadata metadata;\n MetadataClass metadataClass;\n MetadataStatistics metadataStatistics;\n metadataStage(metadata, metadataClass, metadataStatistics, attributes);\n\n //========================================================================\n // When not picking metadata START\n #ifndef METADATA_PICKING_ENABLED\n\n #ifdef HAS_SELECTED_FEATURE_ID\n selectedFeatureIdStage(selectedFeature, featureIds);\n #endif\n\n #ifndef CUSTOM_SHADER_REPLACE_MATERIAL\n materialStage(material, attributes, selectedFeature);\n #endif\n\n #ifdef HAS_CUSTOM_FRAGMENT_SHADER\n customShaderStage(material, attributes, featureIds, metadata, metadataClass, metadataStatistics);\n #endif\n\n lightingStage(material, attributes);\n\n #ifdef HAS_SELECTED_FEATURE_ID\n cpuStylingStage(material, selectedFeature);\n #endif\n\n #ifdef HAS_MODEL_COLOR\n modelColorStage(material);\n #endif\n\n #ifdef HAS_PRIMITIVE_OUTLINE\n primitiveOutlineStage(material);\n #endif\n\n vec4 color = handleAlpha(material.diffuse, material.alpha);\n\n // When not picking metadata END\n //========================================================================\n #else\n //========================================================================\n // When picking metadata START\n\n vec4 metadataValues = vec4(0.0, 0.0, 0.0, 0.0);\n metadataPickingStage(metadata, metadataClass, metadataValues);\n vec4 color = metadataValues;\n\n #endif\n // When picking metadata END\n //========================================================================\n\n #ifdef HAS_CLIPPING_PLANES\n modelClippingPlanesStage(color);\n #endif\n\n #ifdef ENABLE_CLIPPING_POLYGONS\n modelClippingPolygonsStage();\n #endif\n\n //========================================================================\n // When not picking metadata START\n #ifndef METADATA_PICKING_ENABLED\n\n #if defined(HAS_SILHOUETTE) && defined(HAS_NORMALS)\n silhouetteStage(color);\n #endif\n\n #ifdef HAS_ATMOSPHERE\n atmosphereStage(color, attributes);\n #endif\n\n #ifdef HAS_GAUSSIAN_SPLATS\n gaussianSplatStage(color, attributes);\n #endif\n\n #endif\n // When not picking metadata END\n //========================================================================\n\n out_FragColor = color;\n}\n\n";
2
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: "precision highp float;\n\nczm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {\n czm_modelVertexOutput vsOutput;\n vsOutput.positionMC = positionMC;\n vsOutput.pointSize = 1.0;\n return vsOutput;\n}\n\nvoid main()\n{\n // Initialize the attributes struct with all\n // attributes except quantized ones.\n ProcessedAttributes attributes;\n initializeAttributes(attributes);\n\n // Dequantize the quantized ones and add them to the\n // attributes struct.\n #ifdef USE_DEQUANTIZATION\n dequantizationStage(attributes);\n #endif\n\n #ifdef HAS_MORPH_TARGETS\n morphTargetsStage(attributes);\n #endif\n\n #ifdef HAS_SKINNING\n skinningStage(attributes);\n #endif\n\n #ifdef HAS_PRIMITIVE_OUTLINE\n primitiveOutlineStage();\n #endif\n\n // Compute the bitangent according to the formula in the glTF spec.\n // Normal and tangents can be affected by morphing and skinning, so\n // the bitangent should not be computed until their values are finalized.\n #ifdef HAS_BITANGENTS\n attributes.bitangentMC = normalize(cross(attributes.normalMC, attributes.tangentMC) * attributes.tangentSignMC);\n #endif\n\n FeatureIds featureIds;\n featureIdStage(featureIds, attributes);\n\n #ifdef HAS_SELECTED_FEATURE_ID\n SelectedFeature feature;\n selectedFeatureIdStage(feature, featureIds);\n // Handle any show properties that come from the style.\n cpuStylingStage(attributes.positionMC, feature);\n #endif\n\n #if defined(USE_2D_POSITIONS) || defined(USE_2D_INSTANCING)\n // The scene mode 2D pipeline stage and instancing stage add a different\n // model view matrix to accurately project the model to 2D. However, the\n // output positions and normals should be transformed by the 3D matrices\n // to keep the data the same for the fragment shader.\n mat4 modelView = czm_modelView3D;\n mat3 normal = czm_normal3D;\n #else\n // These are used for individual model projection because they will\n // automatically change based on the scene mode.\n mat4 modelView = czm_modelView;\n mat3 normal = czm_normal;\n #endif\n\n // Update the position for this instance in place\n #ifdef HAS_INSTANCING\n\n // The legacy instance stage is used when rendering i3dm models that\n // encode instances transforms in world space, as opposed to glTF models\n // that use EXT_mesh_gpu_instancing, where instance transforms are encoded\n // in object space.\n #ifdef USE_LEGACY_INSTANCING\n mat4 instanceModelView;\n mat3 instanceModelViewInverseTranspose;\n\n legacyInstancingStage(attributes, instanceModelView, instanceModelViewInverseTranspose);\n\n modelView = instanceModelView;\n normal = instanceModelViewInverseTranspose;\n #else\n instancingStage(attributes);\n #endif\n\n #ifdef USE_PICKING\n v_pickColor = a_pickColor;\n #endif\n\n #endif\n\n Metadata metadata;\n MetadataClass metadataClass;\n MetadataStatistics metadataStatistics;\n metadataStage(metadata, metadataClass, metadataStatistics, attributes);\n\n #ifdef HAS_VERTICAL_EXAGGERATION\n verticalExaggerationStage(attributes);\n #endif\n\n #ifdef HAS_CUSTOM_VERTEX_SHADER\n czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);\n customShaderStage(vsOutput, attributes, featureIds, metadata, metadataClass, metadataStatistics);\n #endif\n\n // Compute the final position in each coordinate system needed.\n // This returns the value that will be assigned to gl_Position.\n vec4 positionClip = geometryStage(attributes, modelView, normal);\n\n // This must go after the geometry stage as it needs v_positionWC\n #ifdef HAS_ATMOSPHERE\n atmosphereStage(attributes);\n #endif\n\n #ifdef ENABLE_CLIPPING_POLYGONS\n modelClippingPolygonsStage(attributes);\n #endif\n\n #ifdef HAS_SILHOUETTE\n silhouetteStage(attributes, positionClip);\n #endif\n\n #ifdef HAS_POINT_CLOUD_SHOW_STYLE\n float show = pointCloudShowStylingStage(attributes, metadata);\n #else\n float show = 1.0;\n #endif\n\n #ifdef HAS_POINT_CLOUD_BACK_FACE_CULLING\n show *= pointCloudBackFaceCullingStage();\n #endif\n\n #ifdef HAS_POINT_CLOUD_COLOR_STYLE\n v_pointCloudColor = pointCloudColorStylingStage(attributes, metadata);\n #endif\n\n #ifdef PRIMITIVE_TYPE_POINTS\n #ifdef HAS_CUSTOM_VERTEX_SHADER\n gl_PointSize = vsOutput.pointSize;\n #elif defined(HAS_POINT_CLOUD_POINT_SIZE_STYLE) || defined(HAS_POINT_CLOUD_ATTENUATION)\n gl_PointSize = pointCloudPointSizeStylingStage(attributes, metadata);\n #else\n gl_PointSize = 1.0;\n #endif\n \n gl_PointSize *= show;\n #endif\n\n #ifdef HAS_GAUSSIAN_SPLATS\n gaussianSplatStage(attributes, positionClip);\n #endif\n\n // Important NOT to compute gl_Position = show * positionClip or we hit:\n // https://github.com/CesiumGS/cesium/issues/11270\n //\n // We will discard points with v_pointCloudShow == 0 in the fragment shader.\n gl_Position = positionClip;\n\n #ifdef HAS_POINT_CLOUD_SHOW_STYLE\n v_pointCloudShow = show;\n #endif\n}\n";
2
- export default _default;
@@ -1 +0,0 @@
1
- export default function fixCesium3DTileStyle(): void;
@@ -1 +0,0 @@
1
- export default function fixCesium3DTileset(): void;
@@ -1,4 +0,0 @@
1
- import * as Cesium from 'cesium';
2
- export declare class FrustumCommandsGaussianSplatting extends Cesium.FrustumCommands {
3
- constructor(near: any, far: any);
4
- }
@@ -1 +0,0 @@
1
- export default function fixGeometryPipelineStage(): void;
@@ -1 +0,0 @@
1
- export default function fixGltfLoader(): void;
@@ -1 +0,0 @@
1
- export default function fixModel(): void;
@@ -1 +0,0 @@
1
- export default function fixModel3DTileContent(): void;
@@ -1 +0,0 @@
1
- export default function fixModelDrawCommands(): void;
@@ -1 +0,0 @@
1
- export default function fixModelRuntimePrimitive(): void;
@@ -1 +0,0 @@
1
- export default function fixModelUtility(): void;
@@ -1,3 +0,0 @@
1
- export declare const PassGaussianSplatting: {
2
- GAUSSIAN_SPLATS: number;
3
- };
@@ -1,3 +0,0 @@
1
- export declare const PixelFormatGaussianSplatting: {
2
- [xx: string | symbol]: any;
3
- };
@@ -1 +0,0 @@
1
- export default function fixPrimitiveLoadPlan(): void;
@@ -1 +0,0 @@
1
- export default function fixScene(): void;
@@ -1 +0,0 @@
1
- export default function fixShaderProgram(): void;
@@ -1,8 +0,0 @@
1
- import * as Cesium from 'cesium';
2
- export declare class TextureGaussianSplatting extends Cesium.Texture {
3
- constructor(options: any);
4
- fromFramebuffer: (options: any) => TextureGaussianSplatting;
5
- copyFrom: (options: any) => void;
6
- copyFromFramebuffer: (xOffset: any, yOffset: any, framebufferXOffset: any, framebufferYOffset: any, width: any, height: any) => void;
7
- generateMipmap: (hint: any) => void;
8
- }
@@ -1 +0,0 @@
1
- export default function fixVertexArray(): void;
@@ -1 +0,0 @@
1
- export declare const VertexAttributeSemanticGaussian: any;