earthsdk3-cesium 3.7.0-beta.15 → 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.
- package/dist/earthsdk3-cesium.iife.js +171 -1995
- package/dist/earthsdk3-cesium.js +21268 -19160
- package/dist/earthsdk3-cesium.umd.cjs +126 -120
- package/dist/types/CzmObjects/base/InnerClass/CzmImagery/extends/MVTImageryProviderVector.d.ts +72 -0
- package/dist/types/CzmObjects/base/InnerClass/XbsjGroundPolylinePrimitive/GroundPolylinePrimitive.d.ts +148 -0
- package/dist/types/CzmObjects/general/CzmESMVTLayer/index.d.ts +2 -0
- package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/XbsjPolylineGeometry.d.ts +3 -0
- package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/xbsjCreateODLinesPrimitive.d.ts +29 -0
- package/dist/types/CzmObjects/general/CzmESVideoFusion/XbsjCameraVideo/XbsjCameraVideo.d.ts +18 -0
- package/dist/types/CzmObjects/general/CzmESViewShed/XbsjViewshed/XbsjViewshed.d.ts +16 -0
- package/dist/types/ESCesiumViewer/BackGroundImage/BackGroundImage.d.ts +5 -0
- package/dist/types/ESCesiumViewer/LocalSkyBox/SkyAtmosphere.d.ts +14 -0
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/AvoidanceManager.d.ts +12 -3
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenLayer.d.ts +5 -4
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenObject.d.ts +12 -1
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/index.d.ts +2 -0
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/StyleManager.d.ts +2 -0
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/TileLoader.d.ts +5 -6
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/TileNode.d.ts +20 -5
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/{TilesCache..d.ts → TilesCache.d.ts} +9 -4
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/index.d.ts +12 -6
- package/dist/types/ESCesiumViewer/ViewerExtensions/VectorTilesManager/utils.d.ts +3 -0
- package/dist/types/ESCesiumViewer/initCesiumViewer/fixGoogleEarth/cesiumFixGoogleEarth.d.ts +1 -0
- package/dist/types/ESCesiumViewer/initCesiumViewer/fixLabel.d.ts +5 -0
- package/dist/types/ESCesiumViewer/initCesiumViewer/fixLabelCollection.d.ts +8 -0
- package/dist/types/ESJTypesCzm/czmObject/CzmBillboard.d.ts +4 -0
- package/dist/types/ESJTypesCzm/czmObject/CzmLabel.d.ts +7 -0
- package/dist/types/__declares/cesium.d.ts +434 -0
- package/dist/types/utils/czmUtils/todo/generateCartesianArc/czm/generateCartesianArc.d.ts +8 -0
- package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/index.d.ts +37 -0
- package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/lib/spline.d.ts +62 -0
- package/package.json +2 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatFS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatSorter.d.ts +0 -10
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatTextureGenerator.d.ts +0 -10
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatVS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageFS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageVS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/ModelFS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/ModelVS.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileStyle.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileset.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixFrustuCommands.d.ts +0 -4
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixGeometryPipelineStage.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixGltfLoader.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModel.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModel3DTileContent.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelDrawCommands.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelRuntimePrimitive.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixModelUtility.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPassGaussianSplatting.d.ts +0 -3
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPixelFormat.d.ts +0 -3
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixPrimitiveLoadPlan.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixScene.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixShaderProgram.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixTexture.d.ts +0 -8
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixVertexArray.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixVertexAttributeSemantic.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixView.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixcreateUniform.d.ts +0 -23
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/index.d.ts +0 -1
- package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/passGaussianSplats.d.ts +0 -2
- package/dist/types/ESCesiumViewer/initCesiumViewer/fixCesium1_83.d.ts +0 -1
|
@@ -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;
|
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
// cesium声明文件补充
|
|
2
|
+
// 注意此声明文件不全,用到哪儿写到哪儿
|
|
3
|
+
// vtxf 20211215
|
|
4
|
+
import * as Cesium from "cesium";
|
|
5
|
+
declare module 'cesium' {
|
|
6
|
+
interface Destroyable {
|
|
7
|
+
isDestroyed(): boolean;
|
|
8
|
+
destroy(): undefined;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Context {
|
|
12
|
+
defaultTexture: Texture;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
type TextureOptions = {
|
|
17
|
+
context: Context;
|
|
18
|
+
pixelFormat?: number;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
flipY?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const enum MipmapHint {
|
|
25
|
+
DONT_CARE = WebGLConstants.DONT_CARE,
|
|
26
|
+
FASTEST = WebGLConstants.FASTEST,
|
|
27
|
+
NICEST = WebGLConstants.NICEST,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Texture extends Destroyable {
|
|
31
|
+
copyFrom(options: {
|
|
32
|
+
// arrayBufferView: ArrayBufferView,
|
|
33
|
+
// width: number;
|
|
34
|
+
// height: number;
|
|
35
|
+
source: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
arrayBufferView: ArrayBufferView;
|
|
39
|
+
} | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement;
|
|
40
|
+
xOffset?: number;
|
|
41
|
+
yOffset?: number;
|
|
42
|
+
skipColorSpaceConversion?: boolean; // false
|
|
43
|
+
}): void;
|
|
44
|
+
|
|
45
|
+
generateMipmap(hint: MipmapHint): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var Texture: {
|
|
49
|
+
prototype: Texture;
|
|
50
|
+
new(options: TextureOptions): Texture;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
interface Scene {
|
|
54
|
+
context: Context;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface AttributeLocations {
|
|
58
|
+
[k: string]: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const enum BufferUsage {
|
|
62
|
+
STREAM_DRAW = WebGLConstants.STREAM_DRAW,
|
|
63
|
+
STATIC_DRAW = WebGLConstants.STATIC_DRAW,
|
|
64
|
+
DYNAMIC_DRAW = WebGLConstants.DYNAMIC_DRAW,
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface VertexArrayOptions {
|
|
68
|
+
context: Context;
|
|
69
|
+
attributes: {
|
|
70
|
+
index: number,
|
|
71
|
+
vertexBuffer: Buffer,
|
|
72
|
+
componentsPerAttribute: number,
|
|
73
|
+
componentDatatype: ComponentDatatype,
|
|
74
|
+
normalize?: boolean, // false
|
|
75
|
+
}[];
|
|
76
|
+
attributeLocations: AttributeLocations;
|
|
77
|
+
bufferUsage: BufferUsage;
|
|
78
|
+
indexBuffer?: Buffer;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
namespace ComponentDatatype {
|
|
82
|
+
function createTypedArray(componentDatatype: ComponentDatatype, valuesOrLength: number | number[]): Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface VertexArray extends Destroyable {
|
|
86
|
+
isDestroyed(): boolean;
|
|
87
|
+
destroy(): undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var VertexArray: {
|
|
91
|
+
prototype: VertexArray;
|
|
92
|
+
new(options: VertexArrayOptions): VertexArray;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// interface ShaderProgramOptions {
|
|
96
|
+
// gl: WebGLRenderingContext | WebGL2RenderingContext;
|
|
97
|
+
// // debugShaders: boolean;
|
|
98
|
+
// vertexShaderText: string;
|
|
99
|
+
// fragmentShaderText: string;
|
|
100
|
+
// attributeLocations: AttributeLocations;
|
|
101
|
+
// }
|
|
102
|
+
|
|
103
|
+
interface ShaderProgram extends Destroyable {
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// var ShaderProgram: {
|
|
108
|
+
// prototype: ShaderProgram;
|
|
109
|
+
// new(options: ShaderProgramOptions): ShaderProgram;
|
|
110
|
+
// }
|
|
111
|
+
|
|
112
|
+
interface ShaderSource {
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
var ShaderSource: {
|
|
117
|
+
prototype: ShaderSource;
|
|
118
|
+
new(options: {
|
|
119
|
+
defines?: string[];
|
|
120
|
+
sources: string[];
|
|
121
|
+
includeBuiltIns?: boolean;
|
|
122
|
+
}): ShaderSource;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
namespace ShaderProgram {
|
|
126
|
+
function fromCache(options: {
|
|
127
|
+
context: Context,
|
|
128
|
+
vertexShaderSource: ShaderSource,
|
|
129
|
+
fragmentShaderSource: ShaderSource,
|
|
130
|
+
attributeLocations: AttributeLocations,
|
|
131
|
+
}): ShaderProgram;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
interface UniformMap {
|
|
135
|
+
[k: string]: () => Texture | number | Cartesian2 | Cartesian3 | Cartesian4;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface RenderState {
|
|
139
|
+
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
interface RenderStateOptions {
|
|
143
|
+
frontFace?: WindingOrder, // WindingOrder.COUNTER_CLOCKWISE,
|
|
144
|
+
cull?: {
|
|
145
|
+
enabled?: boolean, // false
|
|
146
|
+
face?: CullFace, // CullFace.BACK
|
|
147
|
+
},
|
|
148
|
+
lineWidth?: number, // 1
|
|
149
|
+
polygonOffset?: {
|
|
150
|
+
enabled?: boolean, // false
|
|
151
|
+
factor?: number, // 0,
|
|
152
|
+
units?: number, // 0
|
|
153
|
+
},
|
|
154
|
+
scissorTest?: {
|
|
155
|
+
enabled?: boolean, // false,
|
|
156
|
+
rectangle?: {
|
|
157
|
+
x?: number, // 0,
|
|
158
|
+
y?: number, // 0,
|
|
159
|
+
width?: number, // 0,
|
|
160
|
+
height?: number, // 0
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
depthRange?: {
|
|
164
|
+
near?: number, // 0,
|
|
165
|
+
far?: number, // 1
|
|
166
|
+
},
|
|
167
|
+
depthTest?: {
|
|
168
|
+
enabled?: boolean; // false,
|
|
169
|
+
func?: DepthFunction; //DepthFunction.LESS
|
|
170
|
+
},
|
|
171
|
+
colorMask?: {
|
|
172
|
+
red?: boolean, // true,
|
|
173
|
+
green?: boolean, // true,
|
|
174
|
+
blue?: boolean, // true,
|
|
175
|
+
alpha?: boolean, // true
|
|
176
|
+
},
|
|
177
|
+
depthMask?: boolean, // true,
|
|
178
|
+
stencilMask?: number, // ~0
|
|
179
|
+
blending?: {
|
|
180
|
+
enabled?: boolean, // false,
|
|
181
|
+
color?: {
|
|
182
|
+
red?: number, // 0.0,
|
|
183
|
+
green?: number, // 0.0,
|
|
184
|
+
blue?: number, // 0.0,
|
|
185
|
+
alpha?: number, // 0.0
|
|
186
|
+
},
|
|
187
|
+
equationRgb?: BlendEquation, // BlendEquation.ADD,
|
|
188
|
+
equationAlpha?: BlendEquation, // BlendEquation.ADD,
|
|
189
|
+
functionSourceRgb?: BlendFunction, // BlendFunction.ONE,
|
|
190
|
+
functionSourceAlpha?: BlendFunction, // BlendFunction.ONE,
|
|
191
|
+
functionDestinationRgb?: BlendFunction, // BlendFunction.ZERO,
|
|
192
|
+
functionDestinationAlpha?: BlendFunction, // BlendFunction.ZERO
|
|
193
|
+
},
|
|
194
|
+
stencilTest?: {
|
|
195
|
+
enabled?: boolean, // false,
|
|
196
|
+
frontFunction?: StencilFunction, // StencilFunction.ALWAYS,
|
|
197
|
+
backFunction?: StencilFunction, // StencilFunction.ALWAYS,
|
|
198
|
+
reference?: number; // 0,
|
|
199
|
+
mask?: number; // ~0,
|
|
200
|
+
frontOperation?: {
|
|
201
|
+
fail?: StencilOperation, // StencilOperation.KEEP,
|
|
202
|
+
zFail?: StencilOperation, // StencilOperation.KEEP,
|
|
203
|
+
zPass?: StencilOperation, // StencilOperation.KEEP
|
|
204
|
+
},
|
|
205
|
+
backOperation?: {
|
|
206
|
+
fail?: StencilOperation, // StencilOperation.KEEP,
|
|
207
|
+
zFail?: StencilOperation, // StencilOperation.KEEP,
|
|
208
|
+
zPass?: StencilOperation, // StencilOperation.KEEP
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
sampleCoverage?: {
|
|
212
|
+
enabled?: boolean, // false,
|
|
213
|
+
value?: number, // 1.0,
|
|
214
|
+
invert?: boolean, // false
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
namespace RenderState {
|
|
219
|
+
function fromCache(options: RenderStateOptions): RenderState;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
namespace Appearance {
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @param translucent 是否是透明的?透明对象的depthMask设为false,blending设为ALPHA_BLEND
|
|
226
|
+
* @param closed 是否为封闭体,如果是封闭体,会开启背面裁剪 cull { enabled: true, face: CullFace.BACK }
|
|
227
|
+
* @param existing 是否和一个已存在的RenderState进行合并,已存在的RenderState不做修改
|
|
228
|
+
*/
|
|
229
|
+
function getDefaultRenderState(translucent: boolean, closed: boolean, existing?: RenderStateOptions): RenderStateOptions;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
const enum Pass {
|
|
234
|
+
ENVIRONMENT = 0,
|
|
235
|
+
COMPUTE = 1,
|
|
236
|
+
GLOBE = 2,
|
|
237
|
+
TERRAIN_CLASSIFICATION = 3,
|
|
238
|
+
CESIUM_3D_TILE = 4,
|
|
239
|
+
CESIUM_3D_TILE_CLASSIFICATION = 5,
|
|
240
|
+
CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW = 6,
|
|
241
|
+
OPAQUE = 7,
|
|
242
|
+
TRANSLUCENT = 8,
|
|
243
|
+
OVERLAY = 9,
|
|
244
|
+
NUMBER_OF_PASSES = 10,
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// interface DrawCommandOptions
|
|
248
|
+
|
|
249
|
+
interface PickId {
|
|
250
|
+
key: number;
|
|
251
|
+
color: Cesium.Color;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
interface DrawCommand {
|
|
255
|
+
boundingVolume: BoundingRectangle | BoundingSphere | OrientedBoundingBox | undefined;
|
|
256
|
+
orientedBoundingBox: OrientedBoundingBox | undefined;
|
|
257
|
+
cull: boolean; // deafult true
|
|
258
|
+
occlude: boolean; // default true
|
|
259
|
+
modelMatrix: Cesium.Matrix4 | undefined; // default undefined
|
|
260
|
+
primitiveType: PrimitiveType; // default TRIANGLES
|
|
261
|
+
vertexArray: VertexArray | undefined; // default undefined
|
|
262
|
+
count: number | undefined;
|
|
263
|
+
offset: number; // default 0
|
|
264
|
+
instanceCount: number; // default 0
|
|
265
|
+
shaderProgram: ShaderProgram | undefined; // default undefined
|
|
266
|
+
castShadows: boolean; // default false
|
|
267
|
+
receiveShadows: boolean; // default false
|
|
268
|
+
uniformMap: UniformMap | undefined; // default undefine
|
|
269
|
+
renderState: RenderState | undefined; // default undefined
|
|
270
|
+
// framebuffer: FrameB
|
|
271
|
+
pass: Pass | undefined; // default undefined
|
|
272
|
+
executeInClosestFrustum: boolean;
|
|
273
|
+
owner: Object | undefined;
|
|
274
|
+
debugShowBoundingVolume: boolean;
|
|
275
|
+
debugOverlappingFrustums: number;
|
|
276
|
+
pickId: string | undefined;
|
|
277
|
+
pickOnly: boolean;
|
|
278
|
+
depthForTranslucentClassification: boolean;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
var DrawCommand: {
|
|
282
|
+
prototype: DrawCommand;
|
|
283
|
+
new(options: {
|
|
284
|
+
// boundingVolume: BoundingVoluem;
|
|
285
|
+
cull?: boolean;
|
|
286
|
+
occlude?: boolean;
|
|
287
|
+
modelMatrix: Matrix4;
|
|
288
|
+
primitiveType?: PrimitiveType; // TRIANGLES
|
|
289
|
+
vertexArray: VertexArray;
|
|
290
|
+
count?: number;
|
|
291
|
+
offset?: number;
|
|
292
|
+
instanceCount?: number; // 0
|
|
293
|
+
shaderProgram: ShaderProgram;
|
|
294
|
+
uniformMap?: UniformMap;
|
|
295
|
+
renderState: RenderState;
|
|
296
|
+
// framebuffer: ;
|
|
297
|
+
pass: Pass;
|
|
298
|
+
executeInClosestFrustum: boolean;
|
|
299
|
+
owner?: any;
|
|
300
|
+
debugShowBoundingVolume?: boolean;
|
|
301
|
+
castShadows?: boolean; // false;
|
|
302
|
+
receiveShadows?: boolean; // false
|
|
303
|
+
pickId?: string;
|
|
304
|
+
pickOnly?: boolean; // false
|
|
305
|
+
depthForTranslucentClassification?: boolean; // false
|
|
306
|
+
boundingVolume?: BoundingRectangle | BoundingSphere | OrientedBoundingBox;
|
|
307
|
+
orientedBoundingBox?: OrientedBoundingBox;
|
|
308
|
+
}): DrawCommand;
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
interface ShadowMap {
|
|
312
|
+
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface FrameState {
|
|
316
|
+
context: Context;
|
|
317
|
+
commandList: DrawCommand[];
|
|
318
|
+
shadowMaps: ShadowMap[];
|
|
319
|
+
// brdfLutGenerator
|
|
320
|
+
// environmentMap
|
|
321
|
+
// sphericalHarmonicCoefficients
|
|
322
|
+
// specularEnvironmentMaps
|
|
323
|
+
mode: SceneMode;
|
|
324
|
+
morphTime: number;
|
|
325
|
+
frameNumber: number; // 0
|
|
326
|
+
newFrame: boolean;
|
|
327
|
+
time: JulianDate;
|
|
328
|
+
// jobScheduler
|
|
329
|
+
// mapProjection
|
|
330
|
+
camera: Camera;
|
|
331
|
+
cameraUnderground: boolean;
|
|
332
|
+
// globeTranslucencyState
|
|
333
|
+
// cullingVolume
|
|
334
|
+
// occluder
|
|
335
|
+
maximumScreenSpaceError: number; // 2
|
|
336
|
+
pixelRatio: number; // 1.0
|
|
337
|
+
passes: {
|
|
338
|
+
render: boolean;
|
|
339
|
+
pick: boolean;
|
|
340
|
+
depth: boolean;
|
|
341
|
+
postProcess: boolean;
|
|
342
|
+
offscreen: boolean;
|
|
343
|
+
};
|
|
344
|
+
// creditDisplay
|
|
345
|
+
afterRender: (() => void)[];
|
|
346
|
+
scene3DOnly: boolean;
|
|
347
|
+
// fog: FrameState.Fog
|
|
348
|
+
terrainExaggeration: number; // 1.0
|
|
349
|
+
imagerySplitPosition: number;
|
|
350
|
+
// frustumSplits
|
|
351
|
+
// light
|
|
352
|
+
// minimumDisableDepthTestDistance
|
|
353
|
+
// invertClassification
|
|
354
|
+
useLogDepth: boolean;
|
|
355
|
+
// tilesetPassState
|
|
356
|
+
minimumTerrainHeight: number; // 0.0
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
interface Buffer {
|
|
360
|
+
copyFromArrayView(arrayView: ArrayBufferView, offsetInBytes?: number): void;
|
|
361
|
+
readonly sizeInBytes: number;
|
|
362
|
+
readonly usage: BufferUsage;
|
|
363
|
+
isDestroyed(): boolean;
|
|
364
|
+
destroy(): undefined;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// const enum IndexDatatype {
|
|
368
|
+
// /**
|
|
369
|
+
// * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
|
|
370
|
+
// * of an element in <code>Uint8Array</code>.
|
|
371
|
+
// */
|
|
372
|
+
// UNSIGNED_BYTE = WebGLConstants.UNSIGNED_BYTE,
|
|
373
|
+
// /**
|
|
374
|
+
// * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
|
|
375
|
+
// * of an element in <code>Uint16Array</code>.
|
|
376
|
+
// */
|
|
377
|
+
// UNSIGNED_SHORT = WebGLConstants.UNSIGNED_SHORT,
|
|
378
|
+
// /**
|
|
379
|
+
// * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
|
|
380
|
+
// * of an element in <code>Uint32Array</code>.
|
|
381
|
+
// */
|
|
382
|
+
// UNSIGNED_INT = WebGLConstants.UNSIGNED_INT
|
|
383
|
+
// }
|
|
384
|
+
|
|
385
|
+
interface IndexBuffer extends Buffer {
|
|
386
|
+
indexDatatype: IndexDatatype;
|
|
387
|
+
bytesPerIndex: number;
|
|
388
|
+
numberOfIndices: number;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
namespace Buffer {
|
|
392
|
+
function createVertexBuffer(options: {
|
|
393
|
+
context: Context;
|
|
394
|
+
typedArray: ArrayBufferView;
|
|
395
|
+
usage: BufferUsage;
|
|
396
|
+
}): Buffer;
|
|
397
|
+
|
|
398
|
+
function createIndexBuffer(options: {
|
|
399
|
+
context: Context;
|
|
400
|
+
typedArray: Uint8Array | Uint16Array | Uint32Array;
|
|
401
|
+
usage: BufferUsage;
|
|
402
|
+
indexDatatype: IndexDatatype;
|
|
403
|
+
}): IndexBuffer;
|
|
404
|
+
}
|
|
405
|
+
interface RectangleCollisionChecker {
|
|
406
|
+
_tree: any;
|
|
407
|
+
insert(id: string, rectangle: Cesium.Rectangle): void;
|
|
408
|
+
remove(id: string, rectangle: Cesium.Rectangle): void;
|
|
409
|
+
collides(rectangle: Cesium.Rectangle): boolean;
|
|
410
|
+
}
|
|
411
|
+
var RectangleCollisionChecker: {
|
|
412
|
+
prototype: RectangleCollisionChecker;
|
|
413
|
+
new(): RectangleCollisionChecker;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
interface MaterialCache {
|
|
417
|
+
_materials: Record<string, any>;
|
|
418
|
+
addMaterial(type: string, materialTemplate: any): void;
|
|
419
|
+
getMaterial(type: string): any | undefined;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
// 或者扩展 Material 类型
|
|
423
|
+
namespace Material {
|
|
424
|
+
let XbsjPolylineArrow: string;
|
|
425
|
+
const _materialCache: MaterialCache
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
interface QuadtreeTile {
|
|
429
|
+
x: number,
|
|
430
|
+
y: number,
|
|
431
|
+
level: number,
|
|
432
|
+
rectangle: Cesium.Rectangle;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Feature, LineString, Properties } from "@turf/helpers";
|
|
2
|
+
/**
|
|
3
|
+
* Takes a {@link LineString|line} and returns a curved version
|
|
4
|
+
* by applying a [Bezier spline](http://en.wikipedia.org/wiki/B%C3%A9zier_spline)
|
|
5
|
+
* algorithm.
|
|
6
|
+
*
|
|
7
|
+
* The bezier spline implementation is by [Leszek Rybicki](http://leszek.rybicki.cc/).
|
|
8
|
+
*
|
|
9
|
+
* @name bezierSpline
|
|
10
|
+
* @param {Feature<LineString>} line input LineString
|
|
11
|
+
* @param {Object} [options={}] Optional parameters
|
|
12
|
+
* @param {Object} [options.properties={}] Translate properties to output
|
|
13
|
+
* @param {number} [options.resolution=10000] time in milliseconds between points
|
|
14
|
+
* @param {number} [options.sharpness=0.85] a measure of how curvy the path should be between splines
|
|
15
|
+
* @returns {Feature<LineString>} curved line
|
|
16
|
+
* @example
|
|
17
|
+
* var line = turf.lineString([
|
|
18
|
+
* [-76.091308, 18.427501],
|
|
19
|
+
* [-76.695556, 18.729501],
|
|
20
|
+
* [-76.552734, 19.40443],
|
|
21
|
+
* [-74.61914, 19.134789],
|
|
22
|
+
* [-73.652343, 20.07657],
|
|
23
|
+
* [-73.157958, 20.210656]
|
|
24
|
+
* ]);
|
|
25
|
+
*
|
|
26
|
+
* var curved = turf.bezierSpline(line);
|
|
27
|
+
*
|
|
28
|
+
* //addToMap
|
|
29
|
+
* var addToMap = [line, curved]
|
|
30
|
+
* curved.properties = { stroke: '#0F0' };
|
|
31
|
+
*/
|
|
32
|
+
declare function bezier<P = Properties>(line: Feature<LineString> | LineString, options?: {
|
|
33
|
+
properties?: P;
|
|
34
|
+
resolution?: number;
|
|
35
|
+
sharpness?: number;
|
|
36
|
+
}): Feature<LineString, P>;
|
|
37
|
+
export default bezier;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export interface Point {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
z: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* BezierSpline
|
|
8
|
+
* https://github.com/leszekr/bezier-spline-js
|
|
9
|
+
*
|
|
10
|
+
* @private
|
|
11
|
+
* @copyright
|
|
12
|
+
* Copyright (c) 2013 Leszek Rybicki
|
|
13
|
+
*
|
|
14
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
* in the Software without restriction, including without limitation the rights
|
|
17
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
* furnished to do so, subject to the following conditions:
|
|
20
|
+
*
|
|
21
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
* copies or substantial portions of the Software.
|
|
23
|
+
*
|
|
24
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
* SOFTWARE.
|
|
31
|
+
*/
|
|
32
|
+
export default class Spline {
|
|
33
|
+
duration: number;
|
|
34
|
+
points: Point[];
|
|
35
|
+
sharpness: number;
|
|
36
|
+
centers: Point[];
|
|
37
|
+
controls: Array<[Point, Point]>;
|
|
38
|
+
stepLength: number;
|
|
39
|
+
length: number;
|
|
40
|
+
delay: number;
|
|
41
|
+
steps: number[];
|
|
42
|
+
constructor(options?: any);
|
|
43
|
+
/**
|
|
44
|
+
* Caches an array of equidistant (more or less) points on the curve.
|
|
45
|
+
*/
|
|
46
|
+
cacheSteps(mindist: number): number[];
|
|
47
|
+
/**
|
|
48
|
+
* returns angle and speed in the given point in the curve
|
|
49
|
+
*/
|
|
50
|
+
vector(t: number): {
|
|
51
|
+
angle: number;
|
|
52
|
+
speed: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Gets the position of the point, given time.
|
|
56
|
+
*
|
|
57
|
+
* WARNING: The speed is not constant. The time it takes between control points is constant.
|
|
58
|
+
*
|
|
59
|
+
* For constant speed, use Spline.steps[i];
|
|
60
|
+
*/
|
|
61
|
+
pos(time: number): Point;
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3-cesium",
|
|
3
|
-
"version": "3.7.0-beta.
|
|
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.
|
|
41
|
+
"earthsdk3": "3.7.0-beta.15"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/delaunator": "^5.0.2",
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatFS.d.ts
DELETED
|
@@ -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;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatSorter.d.ts
DELETED
|
@@ -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;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatVS.d.ts
DELETED
|
@@ -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;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageFS.d.ts
DELETED
|
@@ -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;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GeometryStageVS.d.ts
DELETED
|
@@ -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;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileStyle.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function fixCesium3DTileStyle(): void;
|
package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/fixCesium3DTileset.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function fixCesium3DTileset(): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function fixGeometryPipelineStage(): void;
|