@maptalks/gpu 0.110.0

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.
@@ -0,0 +1,2603 @@
1
+ /// <reference types="@webgpu/types" />
2
+ /*!
3
+ * @maptalks/gpu v0.110.0
4
+ * LICENSE : UNLICENSED
5
+ * (c) 2016-2025 maptalks.com
6
+ */
7
+ import REGL, { Texture, Texture2DOptions, TextureImageData, Regl, Texture2D as Texture2D$1, Uniforms } from '@maptalks/regl';
8
+ export { default as createREGL } from '@maptalks/regl';
9
+ import * as gl_matrix from 'gl-matrix';
10
+ import { vec3, mat4, glMatrix, mat2, mat2d, mat3, quat, quat2, vec2, vec4 } from 'gl-matrix';
11
+ export { mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 } from 'gl-matrix';
12
+ import * as maptalks from 'maptalks';
13
+ import { Polygon, LayerJSONType, MixinConstructor, Extent } from 'maptalks';
14
+ export { GLContext } from '@maptalks/fusiongl';
15
+ export { default as earcut } from 'earcut';
16
+ export { default as color } from 'color';
17
+
18
+ declare const TerrainLayer_base: {
19
+ new (...args: any[]): {
20
+ _maskProjViewMatrix: gl_matrix.mat4;
21
+ _maskExtentInWorld: [number, number, number, number];
22
+ removeMask(masks: any): any;
23
+ setMask(masks: any): any;
24
+ onAdd(): void;
25
+ getMasks(): any;
26
+ onGeometryEvent(param: any): void;
27
+ identifyMask(point: any, options: any): any[];
28
+ remove(): void;
29
+ updateMask(extent: any): {
30
+ projViewMatrix: gl_matrix.mat4;
31
+ extentInWorld: [number, number, number, number];
32
+ };
33
+ getProjViewMatrixInOrtho(extent: any): {
34
+ mapExtent: any;
35
+ projViewMatrix: gl_matrix.mat4;
36
+ };
37
+ updateMaskExtent(): void;
38
+ getMaskExtent(): {
39
+ extent: maptalks.Extent;
40
+ ratio: number;
41
+ minHeight: any;
42
+ };
43
+ };
44
+ } & typeof maptalks.TileLayer;
45
+ declare class TerrainLayer extends TerrainLayer_base {
46
+ constructor(id: any, options: any);
47
+ onAdd(): void;
48
+ getTileUrl(x: any, y: any, z: any): string;
49
+ _skuToken: string;
50
+ _createSkuToken(): string;
51
+ _getExaggeration(): any;
52
+ setSkinLayers(skinLayers: any): void;
53
+ _skinLayers: any;
54
+ getSkinTiles(layer: any): {
55
+ tileGrids: any[];
56
+ count: number;
57
+ };
58
+ getSkinLayer(index: any): any;
59
+ getSkinLayers(): any;
60
+ getSkinCount(): any;
61
+ queryTerrainByProjCoord(prjCoord: any, out: any): any;
62
+ queryTileTerrainByProjCoord(prjCoord: any, tileId: any, tileIndex: any, out: any): any;
63
+ queryTileTerrainByPointAtRes(point: any, res: any, tileId: any, tileIndex: any, out: any): any;
64
+ queryTerrain(coordinate: any, out: any): any;
65
+ queryTileMesh(tile: any, cb: any): void;
66
+ getTerrainTiles(layer: any, tileInfo: any): any;
67
+ isTerrainTileLoaded(tileId: any): boolean;
68
+ updateMaterial(mat: any): void;
69
+ setMaterial(mat: any): void;
70
+ _createTileNode(x: any, y: any, z: any, idx: any, idy: any, res: any, error: any, parentId: any, extent2d: any, tileId: any): {
71
+ parent: any;
72
+ layer: string;
73
+ x: any;
74
+ y: any;
75
+ z: any;
76
+ idx: any;
77
+ idy: any;
78
+ res: any;
79
+ extent2d: any;
80
+ id: any;
81
+ url: string;
82
+ offset: any;
83
+ error: any;
84
+ children: any[];
85
+ };
86
+ }
87
+
88
+ declare class GraphicsFramebuffer {
89
+ device: GraphicsDevice;
90
+ options: any;
91
+ width: number;
92
+ height: number;
93
+ constructor(device: any, options: any);
94
+ get color(): GraphicsTexture[];
95
+ resize(width: any, height: any): void;
96
+ _update(): void;
97
+ getRenderPassDescriptor(): GPURenderPassDescriptor;
98
+ setClearOptions(options: any): void;
99
+ _resetClearOptions(): void;
100
+ destroy(): void;
101
+ }
102
+
103
+ declare class GraphicsDevice {
104
+ wgpu: GPUDevice;
105
+ context: GPUCanvasContext;
106
+ adapter: GPUAdapter;
107
+ gltfManager?: any;
108
+ _supportedFormats: any;
109
+ constructor(device: GPUDevice, context: GPUCanvasContext, adapter: GPUAdapter);
110
+ hasExtension(extension: any): boolean;
111
+ getCommandEncoder(): GPUCommandEncoder;
112
+ endCommandEncoder(): void;
113
+ getDefaultFramebuffer(): GraphicsFramebuffer;
114
+ getRenderPassEncoder(fbo: GraphicsFramebuffer): GPURenderPassEncoder;
115
+ addCommandBuffer(commandBuffer: GPUCommandBuffer, front: boolean): void;
116
+ submit(): void;
117
+ buffer(options: any): any;
118
+ framebuffer(width: any, height: any): GraphicsFramebuffer;
119
+ texture(config: any): GraphicsTexture;
120
+ clear(options: any): void;
121
+ read(options: any): any;
122
+ destroy(): void;
123
+ }
124
+
125
+ declare class GraphicsTexture {
126
+ texture: GPUTexture;
127
+ device: GraphicsDevice;
128
+ config: any;
129
+ constructor(device: GraphicsDevice, config: any);
130
+ get width(): any;
131
+ get height(): any;
132
+ updateFilter(): void;
133
+ _clearBindGroups(): void;
134
+ resize(width: any, height: any): void;
135
+ update(config: any): void;
136
+ getView(): GPUTextureView;
137
+ addBindGroup(bindGroup: any): void;
138
+ destroy(): void;
139
+ }
140
+
141
+ type UrlModifierFunction = (url: string) => string;
142
+ type TypedArray = Uint8Array | Uint16Array | Uint32Array | Int8Array | Int16Array | Float32Array;
143
+ type NumberArray = TypedArray | number[];
144
+ type AttributeData = NumberArray | any;
145
+ type GeometryDesc = {
146
+ 'positionSize'?: number;
147
+ 'primitive'?: REGL.PrimitiveType;
148
+ 'positionAttribute'?: string;
149
+ 'normalAttribute'?: string;
150
+ 'uv0Attribute'?: string;
151
+ 'uv1Attribute'?: string;
152
+ 'color0Attribute'?: string;
153
+ 'colorAttribute'?: string;
154
+ 'tangentAttribute'?: string;
155
+ 'pickingIdAttribute'?: string;
156
+ 'textureCoordMatrixAttribute'?: string;
157
+ 'altitudeAttribute'?: string;
158
+ 'fillEmptyDataInMissingAttribute'?: boolean;
159
+ 'static'?: boolean;
160
+ };
161
+ type AttributeKey = {
162
+ key: string;
163
+ };
164
+ type ActiveAttributes = {
165
+ name: string;
166
+ type: number;
167
+ }[] & AttributeKey;
168
+ type ShaderUniformValue = number | boolean | string | NumberArray | null | ShaderUniformTexture;
169
+ type ShaderUniformTexture = AbstractTexture | Texture | GraphicsTexture;
170
+ type ShaderUniforms = {
171
+ meshConfig?: MeshOptions;
172
+ primitive?: REGL.PrimitiveType;
173
+ } & {
174
+ [_: string]: ShaderUniformValue;
175
+ };
176
+ type ShaderDefines = {
177
+ [_: string]: number | string;
178
+ };
179
+ type MeshOptions = {
180
+ transparent?: boolean;
181
+ bloom?: boolean;
182
+ ssr?: boolean;
183
+ castShadow?: boolean;
184
+ picking?: boolean;
185
+ disableVAO?: boolean;
186
+ };
187
+ type AttributeBufferData = {
188
+ buffer?: REGL.Buffer;
189
+ data?: NumberArray;
190
+ divisor?: number;
191
+ };
192
+ type AttributeType = NumberArray | REGL.Buffer | AttributeBufferData;
193
+ type InstancedAttribute = Record<string, AttributeType>;
194
+ type ImageObject = {
195
+ array: TextureImageData;
196
+ width: number;
197
+ height: number;
198
+ };
199
+ type TextureConfig = {
200
+ url?: string;
201
+ image?: ImageObject;
202
+ hdr?: boolean;
203
+ /**
204
+ * hdr 纹理的最大 RGBMRange,默认为9
205
+ * @english
206
+ * max RGBMRange for hdr texture, default is 9
207
+ */
208
+ maxRange?: number;
209
+ promise?: Promise<any>;
210
+ persistent?: boolean;
211
+ compare?: GPUCompareFunction;
212
+ } & Texture2DOptions;
213
+
214
+ type HandlerFnResultType = {
215
+ type: string;
216
+ target: any;
217
+ [propName: string]: any;
218
+ };
219
+ type BaseEventParamsType = {
220
+ type?: string;
221
+ target?: any;
222
+ [propName: string]: any;
223
+ };
224
+ type HandlerFn = (result?: HandlerFnResultType) => void | boolean;
225
+
226
+ type CachedResource = {
227
+ image: any;
228
+ count: number;
229
+ };
230
+ type PromiseResource = {
231
+ url: string;
232
+ data: any;
233
+ };
234
+ declare class InnerResourceLoader {
235
+ defaultTexture?: Uint8Array;
236
+ defaultCubeTexture: number[];
237
+ urlModifier?: UrlModifierFunction;
238
+ resources: Record<string, CachedResource>;
239
+ constructor(DEFAULT_TEXTURE: Uint8Array, urlModifier?: UrlModifierFunction);
240
+ setURLModifier(urlModifier: UrlModifierFunction): void;
241
+ get(url: string | string[]): Promise<PromiseResource[]> | Promise<PromiseResource>;
242
+ getArrayBuffer(url: string | string[]): Promise<PromiseResource | PromiseResource[]>;
243
+ disposeRes(url: string | string[]): this;
244
+ isLoading(): boolean;
245
+ getDefaultTexture(url: string | string[]): Uint8Array | number[];
246
+ }
247
+ declare const ResourceLoader_base: {
248
+ new (...args: any[]): {
249
+ _events: Record<string, BaseEventParamsType>;
250
+ on(type: string, handler: HandlerFn): any;
251
+ once(type: string, handler: HandlerFn): any;
252
+ off(type: string, handler: HandlerFn): any;
253
+ fire(type: string, params?: BaseEventParamsType): any;
254
+ _wrapOnce(type: string, handler: HandlerFn): (params: any) => void;
255
+ };
256
+ } & typeof InnerResourceLoader;
257
+ declare class ResourceLoader extends ResourceLoader_base {
258
+ }
259
+ //# sourceMappingURL=ResourceLoader.d.ts.map
260
+
261
+ declare class Base$1 {
262
+ }
263
+ declare const AbstractTexture_base: {
264
+ new (...args: any[]): {
265
+ _events: Record<string, BaseEventParamsType>;
266
+ on(type: string, handler: HandlerFn): any;
267
+ once(type: string, handler: HandlerFn): any;
268
+ off(type: string, handler: HandlerFn): any;
269
+ fire(type: string, params?: BaseEventParamsType): any;
270
+ _wrapOnce(type: string, handler: HandlerFn): (params: any) => void;
271
+ };
272
+ } & typeof Base$1;
273
+ /**
274
+ * Abstract Texture
275
+ * Common methods for Texture2D and TextureCube
276
+ * @abstract
277
+ */
278
+ declare class AbstractTexture extends AbstractTexture_base {
279
+ config: TextureConfig;
280
+ promise?: Promise<any>;
281
+ resLoader: ResourceLoader;
282
+ dirty?: boolean;
283
+ constructor(config: any, resLoader?: any);
284
+ onLoad(data: any): void;
285
+ isReady(): boolean;
286
+ set(k: string, v: any): this;
287
+ get(k: string): any;
288
+ createREGLTexture(regl: Regl): null | Texture2D$1;
289
+ getREGLTexture(regl: any): any;
290
+ getMemorySize(): number;
291
+ _update(): void;
292
+ dispose(): void;
293
+ }
294
+
295
+ declare class BoundingBox {
296
+ min: vec3;
297
+ max: vec3;
298
+ vertex?: vec3[];
299
+ center: vec3;
300
+ constructor(min?: vec3, max?: vec3);
301
+ static copy(out: BoundingBox, bbox: BoundingBox): BoundingBox;
302
+ combine(bbox: number[] | BoundingBox): this;
303
+ dirty(): this;
304
+ /**
305
+ * Get center of the bounding box
306
+ * @returns {Number[]} center
307
+ */
308
+ getCenter(): vec3;
309
+ /**
310
+ * 判断BBox是否包含给定的坐标
311
+ * @english
312
+ * If contain point entirely
313
+ * @param point
314
+ */
315
+ containPoint(p: number): boolean;
316
+ /**
317
+ * BBox的值是否是Infinite
318
+ * @english
319
+ * If bounding box is finite
320
+ */
321
+ isFinite(): boolean;
322
+ updateVertex(): vec3[];
323
+ copy(out: BoundingBox): BoundingBox;
324
+ equals(box: BoundingBox): boolean;
325
+ transform(positionMatrix: any, modelMatrix: any): this;
326
+ }
327
+ //# sourceMappingURL=BoundingBox.d.ts.map
328
+
329
+ declare class Geometry {
330
+ static createElementBuffer(device: any, elements: any): any;
331
+ static createBuffer(device: any, data: any, name?: string): any;
332
+ static padGPUBufferAlignment(array: TypedArray, vertexCount: number): TypedArray;
333
+ data: Record<string, AttributeData>;
334
+ elements: any;
335
+ desc: GeometryDesc;
336
+ semantic: Record<string, string>;
337
+ count: number;
338
+ properties: any;
339
+ indices: NumberArray;
340
+ boundingBox: BoundingBox;
341
+ count1?: number;
342
+ offset?: number;
343
+ constructor(data: AttributeData, elements: any, count?: number, desc?: GeometryDesc);
344
+ set version(v: number);
345
+ get version(): number;
346
+ getBuffer(name: string): any;
347
+ getAttrData(activeAttributes: ActiveAttributes): any;
348
+ getREGLData(regl: any, activeAttributes: ActiveAttributes, disableVAO: boolean): AttributeData;
349
+ generateBuffers(device: any): void;
350
+ getVertexCount(): number;
351
+ getColor0Size(): number;
352
+ /**
353
+ * 手动设置geometry的buffer,用于多个属性共用一个ArrayBuffer(interleaved)
354
+ * @param {String} key - 属性
355
+ * @param {ArrayBuffer|REGLBuffer} data - 数据
356
+ */
357
+ deleteData(name: string): this;
358
+ /**
359
+ * Replace data or refill attribute data buffer
360
+ * @param {String} name - data's name
361
+ * @param {Number[] | Object} data - data to update
362
+ * @returns this
363
+ */
364
+ updateData(name: string, data: AttributeData): this;
365
+ _updateGPUBuffer(buffer: GPUBuffer, data: AttributeData): any;
366
+ updateSubData(name: string, data: AttributeData, offset: number): this;
367
+ getPrimitive(): REGL.PrimitiveType;
368
+ getElements(): any;
369
+ setElements(elements: any, count: number): this;
370
+ isIndexedElements(): boolean;
371
+ deleteElements(): this;
372
+ setDrawCount(count: number): this;
373
+ getDrawCount(): number;
374
+ setDrawOffset(offset: number): this;
375
+ getDrawOffset(): number;
376
+ dispose(): void;
377
+ isDisposed(): boolean;
378
+ /**
379
+ * Update boundingBox of Geometry
380
+ */
381
+ updateBoundingBox(): void;
382
+ createTangent(name?: string): void;
383
+ createNormal(name?: string): void;
384
+ /**
385
+ * Create barycentric attribute data
386
+ * @param {String} name - attribute name for barycentric attribute
387
+ */
388
+ createBarycentric(name?: string): void;
389
+ /**
390
+ * Build unique vertex data for each attribute
391
+ */
392
+ buildUniqueVertex(): void;
393
+ getMemorySize(): number;
394
+ getElementsType(elements: NumberArray): "uint8" | "uint32" | "uint16";
395
+ getCommandKey(device: any): string;
396
+ getBufferDescriptor(vertexInfo: any): any[];
397
+ }
398
+
399
+ declare class EdgeGeometry extends Geometry {
400
+ constructor(data: AttributeData, elements: any, count: number, desc?: GeometryDesc);
401
+ }
402
+
403
+ declare class Base {
404
+ }
405
+ declare const Material_base: {
406
+ new (...args: any[]): {
407
+ _events: Record<string, BaseEventParamsType>;
408
+ on(type: string, handler: HandlerFn): any;
409
+ once(type: string, handler: HandlerFn): any;
410
+ off(type: string, handler: HandlerFn): any;
411
+ fire(type: string, params?: BaseEventParamsType): any;
412
+ _wrapOnce(type: string, handler: HandlerFn): (params: any) => void;
413
+ };
414
+ } & typeof Base;
415
+ declare class Material extends Material_base {
416
+ uniforms: ShaderUniforms;
417
+ refCount: number;
418
+ unlit: boolean;
419
+ constructor(uniforms?: ShaderUniforms, defaultUniforms?: ShaderUniforms);
420
+ set version(v: number);
421
+ get version(): number;
422
+ get propVersion(): number;
423
+ set doubleSided(value: boolean);
424
+ get doubleSided(): boolean;
425
+ getUniforms(device: any): ShaderUniforms;
426
+ getMemorySize(): number;
427
+ isReady(): boolean;
428
+ hasUniform(k: string): any;
429
+ setUniform(k: string, v: ShaderUniformValue): this;
430
+ getUniform(k: string): ShaderUniformValue;
431
+ set(k: string, v: ShaderUniformValue, isDispose?: boolean): this;
432
+ setFunctionUniform(k: string, fn: () => ShaderUniformValue): this;
433
+ hasFunctionUniform(k: string): boolean;
434
+ get(k: string): ShaderUniformValue;
435
+ isDirty(): boolean;
436
+ /**
437
+ * Get shader defines
438
+ * @return {Object}
439
+ */
440
+ appendDefines(defines: ShaderDefines, _geometry: Geometry): ShaderDefines;
441
+ hasSkinAnimation(): boolean;
442
+ isTexture(k: string): boolean;
443
+ dispose(): void;
444
+ isDisposed(): boolean;
445
+ getUniformKeys(): string;
446
+ }
447
+
448
+ declare class WireFrameMaterial extends Material {
449
+ constructor(uniforms: ShaderUniforms);
450
+ }
451
+ //# sourceMappingURL=WireFrameMaterial.d.ts.map
452
+
453
+ declare class StandardMaterial extends Material {
454
+ constructor(uniforms: ShaderUniforms);
455
+ appendDefines(defines: ShaderDefines, geometry: Geometry): ShaderDefines;
456
+ }
457
+ //# sourceMappingURL=StandardMaterial.d.ts.map
458
+
459
+ declare class PhongMaterial extends Material {
460
+ constructor(uniforms: ShaderUniforms);
461
+ static convertFrom(standardMaterial: StandardMaterial): PhongMaterial;
462
+ appendDefines(defines: ShaderDefines, geometry: Geometry): ShaderDefines;
463
+ }
464
+ //# sourceMappingURL=PhongMaterial.d.ts.map
465
+
466
+ declare class StandardLiteMaterial extends Material {
467
+ constructor(uniforms: ShaderUniforms);
468
+ appendDefines(defines: ShaderDefines, geometry: Geometry): ShaderDefines;
469
+ }
470
+ //# sourceMappingURL=StandardLiteMaterial.d.ts.map
471
+
472
+ declare const PhongSpecularGlossinessMaterial_base: {
473
+ new (...args: any[]): {
474
+ appendDefines(defines: ShaderDefines, geometry: Geometry): ShaderDefines;
475
+ };
476
+ } & typeof PhongMaterial;
477
+ declare class PhongSpecularGlossinessMaterial extends PhongSpecularGlossinessMaterial_base {
478
+ }
479
+ //# sourceMappingURL=PhongSpecularGlossinessMaterial.d.ts.map
480
+
481
+ type DynamicBufferAllocation = {
482
+ storage?: ArrayBuffer;
483
+ gpuBuffer?: GPUBuffer;
484
+ offset?: number;
485
+ size?: number;
486
+ };
487
+ declare class DynamicBufferPool {
488
+ /**
489
+ * Allocation size of the underlying buffers.
490
+ *
491
+ */
492
+ bufferSize: number;
493
+ /**
494
+ * Internally allocated gpu buffers.
495
+ *
496
+ */
497
+ poolBuffers: DynamicBufferAllocation[];
498
+ usedBuffers: DynamicBufferAllocation[];
499
+ /**
500
+ * @type {DynamicBufferAllocation|null}
501
+ */
502
+ activeBuffer: DynamicBufferAllocation;
503
+ device: GPUDevice;
504
+ bufferAlignment: number;
505
+ /**
506
+ * Create the system of dynamic buffers.
507
+ *
508
+ * @param device - The graphics device.
509
+ * @param bufferSize - The size of the underlying large buffers.
510
+ * @param bufferAlignment - Alignment of each allocation.
511
+ */
512
+ constructor(device: GPUDevice, bufferSize: number, bufferAlignment: number);
513
+ /**
514
+ * Destroy the system of dynamic buffers.
515
+ */
516
+ destroy(): void;
517
+ /**
518
+ * Allocate an aligned space of the given size from a dynamic buffer.
519
+ *
520
+ * @param {DynamicBufferAllocation} allocation - The allocation info to fill.
521
+ * @param {number} size - The size of the allocation.
522
+ */
523
+ alloc(allocation: any, size: any): void;
524
+ createBuffer(device: GPUDevice, size: number): GPUBuffer;
525
+ scheduleSubmit(): void;
526
+ submit(): void;
527
+ }
528
+
529
+ declare class DynamicOffsets {
530
+ items: any[];
531
+ offsets: number[];
532
+ index: number;
533
+ constructor();
534
+ reset(): void;
535
+ addItem(binding: any, offset: any): void;
536
+ addItems(items: any[]): void;
537
+ getItems(): any[];
538
+ getDynamicOffsets(): number[];
539
+ }
540
+
541
+ declare class DynamicBuffer {
542
+ bindgroupMapping: any;
543
+ dynamicOffsets: number[];
544
+ pool: DynamicBufferPool;
545
+ allocation: DynamicBufferAllocation;
546
+ version: number;
547
+ constructor(bindgroupMapping: any, pool: DynamicBufferPool);
548
+ writeBuffer(uniformValues: Record<string, ShaderUniformValue>, dynamicOffsets: DynamicOffsets): void;
549
+ _fillValue(type: any, buffer: any, offset: any, size: any, value: any): void;
550
+ dispose(): void;
551
+ }
552
+
553
+ declare class BindGroupFormat {
554
+ bytes: number;
555
+ uuid: number;
556
+ name: string;
557
+ constructor(name: any, bindGroupMapping: any, minUniformBufferOffsetAlignment: any);
558
+ getShaderUniforms(): any;
559
+ getMeshUniforms(): any;
560
+ _parse(bindGroupMapping: any): void;
561
+ createBindGroup(device: GraphicsDevice, mesh: Mesh$1, shaderUniforms: ShaderUniforms, layout: GPUBindGroupLayout, shaderBuffer: DynamicBuffer, meshBuffer: DynamicBuffer): GPUBindGroup;
562
+ dispose(): void;
563
+ }
564
+
565
+ /**
566
+ * Config:
567
+ * transparent, castShadow
568
+ */
569
+ declare class Mesh$1 {
570
+ uuid: number;
571
+ transparent: boolean;
572
+ bloom: boolean;
573
+ ssr: boolean;
574
+ needUpdateShadow: boolean;
575
+ picking: boolean;
576
+ disableVAO: boolean;
577
+ properties: any;
578
+ uniforms: ShaderUniforms;
579
+ dirtyDefines?: boolean;
580
+ parent?: Mesh$1;
581
+ constructor(geometry: Geometry, material?: Material, config?: MeshOptions);
582
+ set material(v: Material);
583
+ get material(): Material;
584
+ set version(v: number);
585
+ get version(): number;
586
+ get geometry(): Geometry;
587
+ set geometry(geo: Geometry);
588
+ set localTransform(m: mat4);
589
+ get localTransform(): mat4;
590
+ set positionMatrix(m: mat4);
591
+ get positionMatrix(): mat4;
592
+ get config(): MeshOptions;
593
+ get defines(): ShaderDefines;
594
+ set defines(v: ShaderDefines);
595
+ get castShadow(): boolean;
596
+ set castShadow(v: boolean);
597
+ setMaterial(material: Material): this;
598
+ setParent(parent: Mesh$1): this;
599
+ setLocalTransform(transform: mat4): this;
600
+ setPositionMatrix(matrix: mat4): void;
601
+ setUniform(k: string, v: ShaderUniformValue): this;
602
+ setFunctionUniform(k: string, fn: () => ShaderUniformValue): this;
603
+ hasFunctionUniform(k: string): boolean;
604
+ hasUniform(k: string): boolean;
605
+ getUniform(k: string): ShaderUniformValue;
606
+ getDefines(): ShaderDefines;
607
+ setDefines(defines: ShaderDefines): this;
608
+ hasSkinAnimation(): boolean;
609
+ getCommandKey(device: any): string;
610
+ getRenderProps(device: any): ShaderUniforms;
611
+ appendGeoAttributes(props: any, device: any, activeAttributes: any): void;
612
+ getUniforms(device: any): ShaderUniforms;
613
+ getMaterial(): Material;
614
+ getElements(): any;
615
+ dispose(): this;
616
+ isValid(): boolean;
617
+ getBoundingBox(): [vec3, vec3];
618
+ updateBoundingBox(): void;
619
+ getMemorySize(): number;
620
+ getWorldTransform(): any;
621
+ _meshBuffer: Record<string, DynamicBuffer>;
622
+ writeDynamicBuffer(commandUID: number, renderProps: any, bindGroupMapping: BindGroupFormat, pool: DynamicBufferPool, dynamicOffsets: DynamicOffsets): DynamicBuffer;
623
+ getBindGroup(key: any): GPUBindGroup;
624
+ setBindGroup(key: any, bindGroup: any): this;
625
+ getShaderFnValues(shaderUID: number): GPUBindGroup;
626
+ setShaderFnValues(shaderUID: number, fnValues: any): this;
627
+ }
628
+
629
+ declare class InstancedMesh extends Mesh$1 {
630
+ instancedData: InstancedAttribute;
631
+ constructor(instancedData: InstancedAttribute, instanceCount: number, geometry: Geometry, material?: Material, config?: MeshOptions);
632
+ get instanceCount(): number;
633
+ set instanceCount(count: number);
634
+ getMemorySize(): number;
635
+ getDefines(): ShaderDefines;
636
+ getCommandKey(device: any): string;
637
+ updateInstancedData(name: string, data: any): this;
638
+ getInstancedBuffer(name: string): any;
639
+ generateInstancedBuffers(device: any): this;
640
+ getRenderProps(regl: Regl): ShaderUniforms;
641
+ disposeInstancedData(): void;
642
+ getBufferDescriptor(vertexInfo: any): any[];
643
+ }
644
+
645
+ declare class Scene {
646
+ sortedMeshes: {
647
+ opaques?: Mesh$1[];
648
+ transparents?: Mesh$1[];
649
+ };
650
+ sortFunction?: (a: Mesh$1, b: Mesh$1) => number;
651
+ meshes?: Mesh$1[];
652
+ constructor(meshes: any);
653
+ setMeshes(meshes?: Mesh$1 | Mesh$1[]): this;
654
+ addMesh(mesh: Mesh$1 | Mesh$1[]): this;
655
+ removeMesh(mesh?: Mesh$1 | Mesh$1[]): this;
656
+ getMeshes(): Mesh$1[];
657
+ clear(): this;
658
+ dirty(): this;
659
+ sortMeshes(cameraPosition?: vec3): void;
660
+ getSortedMeshes(): {
661
+ opaques?: Mesh$1[];
662
+ transparents?: Mesh$1[];
663
+ };
664
+ }
665
+ //# sourceMappingURL=Scene.d.ts.map
666
+
667
+ /**
668
+ * A basic renderer to render meshes in fashion of forward rendering
669
+ */
670
+ declare class Renderer {
671
+ device: any;
672
+ constructor(device: any);
673
+ render(shader: any, uniforms: Uniforms, scene: Scene, framebuffer: REGL.Framebuffer): number;
674
+ clear(options: REGL.ClearOptions): void;
675
+ }
676
+ //# sourceMappingURL=Renderer.d.ts.map
677
+
678
+ /**
679
+ * config properties:
680
+ * https://github.com/regl-project/regl/blob/gh-pages/API.md#textures
681
+ */
682
+ declare class Texture2D extends AbstractTexture {
683
+ _version: number;
684
+ get version(): number;
685
+ set version(version: number);
686
+ onLoad({ data }: {
687
+ data: any;
688
+ }): void;
689
+ setConfig(config: any): void;
690
+ setMinFilter(value: number): void;
691
+ setMagFilter(value: number): void;
692
+ createREGLTexture(regl: Regl): REGL.Texture2D;
693
+ _checkNPOT(regl: any): void;
694
+ }
695
+
696
+ declare class Plane extends Geometry {
697
+ constructor(z?: number);
698
+ }
699
+ //# sourceMappingURL=Plane.d.ts.map
700
+
701
+ /**
702
+ * 对象是否是字符串
703
+ * @english
704
+ * Check whether the object is a string
705
+ * @param obj
706
+ */
707
+ declare function isString(obj: any): boolean;
708
+ /**
709
+ * 对象是否是null或undefined
710
+ * @english
711
+ * Whether the object is null or undefined.
712
+ * @param obj - object
713
+ */
714
+ declare function isNil(obj: any): boolean;
715
+ declare function defined(obj: any): boolean;
716
+ /**
717
+ * 对象是否是函数
718
+ * @english
719
+ * Check whether the object is a function
720
+ * @param obj
721
+ */
722
+ declare function isFunction(obj: any): boolean;
723
+ /**
724
+ * 将后续所有对象属性合并到第一个dest对象中
725
+ * @english
726
+ * Merges the properties of sources into destination object.
727
+ * @param dest - object to extend
728
+ * @param src - sources
729
+ */
730
+ declare function extend(dest: any, ...src: any[]): any;
731
+ /**
732
+ * 将后续所有对象属性合并到第一个dest对象中,但忽略undefined或null的属性
733
+ * @english
734
+ * Merges the properties of sources into destination object without nil properties.
735
+ * @param dest - object to extend
736
+ * @param src - sources
737
+ */
738
+ declare function extendWithoutNil(dest: any, ...args: any[]): any;
739
+ /**
740
+ * 检查是否是个数值
741
+ * @english
742
+ * Whether val is a number and not a NaN.
743
+ * @param val - val
744
+ */
745
+ declare function isNumber(val: any): boolean;
746
+ /**
747
+ * 计算值的log2
748
+ * @english
749
+ * compute value's log2
750
+ * @param x - value to log
751
+ * @returns
752
+ */
753
+ declare function log2(x: number): number;
754
+ /**
755
+ * 归一化数组
756
+ * @english
757
+ * normalize a number array
758
+ * @param out - array receives result
759
+ * @param arr - array
760
+ * @returns out
761
+ */
762
+ declare function normalize(out: NumberArray, arr: ArrayLike<number>): NumberArray;
763
+ /**
764
+ * 两个数值之间的比例推算
765
+ *
766
+ * @english
767
+ * Interpolate between two number.
768
+ *
769
+ * @param from - from value
770
+ * @param to - to value
771
+ * @param t - interpolation factor between 0 and 1
772
+ * @returns interpolated value
773
+ */
774
+ declare function interpolate(a: number, b: number, t: number): number;
775
+ /**
776
+ * 检查对象是否是数组或者类型数组
777
+ * @english
778
+ * Check if is an Array or a TypedArray
779
+ * @param arr - input object
780
+ * @returns
781
+ */
782
+ declare function isArray(arr: any): boolean;
783
+ declare function getArrayCtor(arr: any): ArrayConstructor | Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor;
784
+ /**
785
+ * 对两个矢量执行线性推算
786
+ *
787
+ * @english
788
+ * Performs a linear interpolation between two number's
789
+ *
790
+ * @param out - the receiving vector
791
+ * @param a - the first operand
792
+ * @param b - the second operand
793
+ * @param t - interpolation amount, in the range [0-1], between the two inputs
794
+ * @returns out
795
+ */
796
+ declare function lerp(out: NumberArray, a: NumberArray, b: NumberArray, t: number): NumberArray;
797
+ /**
798
+ * 将input数组的值设置给out
799
+ * @english
800
+ * Set input array's value to out
801
+ * @param out - the receiving array
802
+ * @param input - input array
803
+ * @returns out
804
+ */
805
+ declare function set(out: NumberArray, input: NumberArray): NumberArray;
806
+ /**
807
+ * 根据Position的最大值,选择一个合适的TypedArray
808
+ * @english
809
+ * Choose a TypedArray for position according to its max value
810
+ * @param max - position's max value
811
+ * @returns
812
+ */
813
+ declare function getPosArrayType(max: number): Int8ArrayConstructor | Int16ArrayConstructor | Float32ArrayConstructor;
814
+ /**
815
+ * n大于max时返回max,n小于min时返回min,否则返回n
816
+ * @english
817
+ * Clamp input value between min and max
818
+ * @param n - input value
819
+ * @param min - min value
820
+ * @param max - max value
821
+ */
822
+ declare function clamp(n: number, min: number, max: number): number;
823
+ /**
824
+ * 检查当前环境是否支持VAO
825
+ * @english
826
+ * Check if current context supports VAO
827
+ * @param regl regl context
828
+ * @returns
829
+ */
830
+ declare function isSupportVAO(regl: any): any;
831
+ /**
832
+ * Object.hasOwnProperty的包装方法
833
+ * @english
834
+ * Check if object hasOwnProperty of property
835
+ * @param obj - object
836
+ * @param prop - property
837
+ * @returns
838
+ */
839
+ declare function hasOwn(obj: any, prop: string): any;
840
+ /**
841
+ * 获取buffer的byte大小
842
+ * @english
843
+ * Get buffer's size in bytes
844
+ * @param buffer
845
+ */
846
+ declare function getBufferSize(buffer: AttributeBufferData | AttributeType): number;
847
+ /**
848
+ * 获取regl texture对象的bytes大小
849
+ * @english
850
+ * Get regl texture size in bytes
851
+ * @param tex - regl rexture
852
+ * @returns
853
+ */
854
+ declare function getTexMemorySize(tex: REGL.Texture): number;
855
+ /**
856
+ * 获取regl texture的byte width
857
+ * @english
858
+ * Get regl texture's byte width
859
+ * @param type - regl texture's type
860
+ * @returns
861
+ */
862
+ declare function getTextureByteWidth(type: any): 4 | 1 | 2 | 0;
863
+ /**
864
+ * 获取regl texture 的channels数量
865
+ * @english
866
+ * Get regl texture's number of channels
867
+ * @param format - regl texture's format
868
+ * @returns
869
+ */
870
+ declare function getTextureChannels(format: any): 4 | 1 | 2 | 3;
871
+ /**
872
+ * 检查该attribute数据是否处于interleaved数据中
873
+ * @english
874
+ * Check if this attribute data is in interleaved stride
875
+ * @param dataObj attribute object
876
+ * @returns
877
+ */
878
+ declare function isInStride(dataObj: any): boolean;
879
+ /**
880
+ * 检查该attribute数据是否是interleaved
881
+ * @english
882
+ * Check if this attribute data is an interleaved data
883
+ * @param dataObj attribute object
884
+ * @returns
885
+ */
886
+ declare function isInterleaved(dataObj: any): boolean;
887
+ /**
888
+ * 获取该webgl上下文支持的压缩纹理格式
889
+ * @english
890
+ * Get webgl context's supported formats for compressed texture
891
+ * @param gl
892
+ * @returns
893
+ */
894
+ declare function getSupportedFormats(gl: WebGL2RenderingContext | WebGLRenderingContext | GPUDevice): {
895
+ etc: boolean;
896
+ etc1: boolean;
897
+ s3tc: boolean;
898
+ pvrtc: boolean;
899
+ astc: boolean;
900
+ bc7: boolean;
901
+ };
902
+ /**
903
+ * 获取字符串的hash值
904
+ * @english
905
+ * Get string's hash code
906
+ * @param s input string
907
+ * @returns
908
+ */
909
+ declare function hashCode(s: string): number;
910
+ /**
911
+ * 值是否是2的n次幂
912
+ * @english
913
+ * Get the nearest power of 2 that is less than this value
914
+ * @param value - input value
915
+ * @returns
916
+ */
917
+ declare function isPowerOfTwo(value: number): boolean;
918
+ declare function resizeToPowerOfTwo(image: HTMLImageElement | NumberArray, width?: number, height?: number): NumberArray | HTMLCanvasElement | HTMLImageElement;
919
+ declare function supportNPOT(regl: any): boolean;
920
+ declare function isTextureDestroyed(texture: any): boolean;
921
+
922
+ declare const Util_d_clamp: typeof clamp;
923
+ declare const Util_d_defined: typeof defined;
924
+ declare const Util_d_extend: typeof extend;
925
+ declare const Util_d_extendWithoutNil: typeof extendWithoutNil;
926
+ declare const Util_d_getArrayCtor: typeof getArrayCtor;
927
+ declare const Util_d_getBufferSize: typeof getBufferSize;
928
+ declare const Util_d_getPosArrayType: typeof getPosArrayType;
929
+ declare const Util_d_getSupportedFormats: typeof getSupportedFormats;
930
+ declare const Util_d_getTexMemorySize: typeof getTexMemorySize;
931
+ declare const Util_d_getTextureByteWidth: typeof getTextureByteWidth;
932
+ declare const Util_d_getTextureChannels: typeof getTextureChannels;
933
+ declare const Util_d_hasOwn: typeof hasOwn;
934
+ declare const Util_d_hashCode: typeof hashCode;
935
+ declare const Util_d_interpolate: typeof interpolate;
936
+ declare const Util_d_isArray: typeof isArray;
937
+ declare const Util_d_isFunction: typeof isFunction;
938
+ declare const Util_d_isInStride: typeof isInStride;
939
+ declare const Util_d_isInterleaved: typeof isInterleaved;
940
+ declare const Util_d_isNil: typeof isNil;
941
+ declare const Util_d_isNumber: typeof isNumber;
942
+ declare const Util_d_isPowerOfTwo: typeof isPowerOfTwo;
943
+ declare const Util_d_isString: typeof isString;
944
+ declare const Util_d_isSupportVAO: typeof isSupportVAO;
945
+ declare const Util_d_isTextureDestroyed: typeof isTextureDestroyed;
946
+ declare const Util_d_lerp: typeof lerp;
947
+ declare const Util_d_log2: typeof log2;
948
+ declare const Util_d_normalize: typeof normalize;
949
+ declare const Util_d_resizeToPowerOfTwo: typeof resizeToPowerOfTwo;
950
+ declare const Util_d_set: typeof set;
951
+ declare const Util_d_supportNPOT: typeof supportNPOT;
952
+ declare namespace Util_d {
953
+ export { Util_d_clamp as clamp, Util_d_defined as defined, Util_d_extend as extend, Util_d_extendWithoutNil as extendWithoutNil, Util_d_getArrayCtor as getArrayCtor, Util_d_getBufferSize as getBufferSize, Util_d_getPosArrayType as getPosArrayType, Util_d_getSupportedFormats as getSupportedFormats, Util_d_getTexMemorySize as getTexMemorySize, Util_d_getTextureByteWidth as getTextureByteWidth, Util_d_getTextureChannels as getTextureChannels, Util_d_hasOwn as hasOwn, Util_d_hashCode as hashCode, Util_d_interpolate as interpolate, Util_d_isArray as isArray, Util_d_isFunction as isFunction, Util_d_isInStride as isInStride, Util_d_isInterleaved as isInterleaved, Util_d_isNil as isNil, Util_d_isNumber as isNumber, Util_d_isPowerOfTwo as isPowerOfTwo, Util_d_isString as isString, Util_d_isSupportVAO as isSupportVAO, Util_d_isTextureDestroyed as isTextureDestroyed, Util_d_lerp as lerp, Util_d_log2 as log2, Util_d_normalize as normalize, Util_d_resizeToPowerOfTwo as resizeToPowerOfTwo, Util_d_set as set, Util_d_supportNPOT as supportNPOT };
954
+ }
955
+
956
+ declare function parseRGBE(arrayBuffer: ArrayBufferLike, exposure?: number): {
957
+ width: number;
958
+ height: number;
959
+ pixels: any;
960
+ };
961
+ //# sourceMappingURL=HDR.d.ts.map
962
+
963
+ declare const GL_NEAREST = 9728;
964
+ declare const GL_LINEAR = 9729;
965
+ declare const GL_LINEAR_MIPMAP_LINEAR = 9987;
966
+ declare const MAG_FILTER = 10240;
967
+ declare const MIN_FILTER = 10241;
968
+
969
+ declare const WebGLConstants_d_GL_LINEAR: typeof GL_LINEAR;
970
+ declare const WebGLConstants_d_GL_LINEAR_MIPMAP_LINEAR: typeof GL_LINEAR_MIPMAP_LINEAR;
971
+ declare const WebGLConstants_d_GL_NEAREST: typeof GL_NEAREST;
972
+ declare const WebGLConstants_d_MAG_FILTER: typeof MAG_FILTER;
973
+ declare const WebGLConstants_d_MIN_FILTER: typeof MIN_FILTER;
974
+ declare namespace WebGLConstants_d {
975
+ export { WebGLConstants_d_GL_LINEAR as GL_LINEAR, WebGLConstants_d_GL_LINEAR_MIPMAP_LINEAR as GL_LINEAR_MIPMAP_LINEAR, WebGLConstants_d_GL_NEAREST as GL_NEAREST, WebGLConstants_d_MAG_FILTER as MAG_FILTER, WebGLConstants_d_MIN_FILTER as MIN_FILTER };
976
+ }
977
+
978
+ declare namespace _default$2 {
979
+ /**
980
+ * Register a new shader segment for includes for 3rd parties
981
+ * @param {String} name key name
982
+ * @param {String} source shader segment source
983
+ */
984
+ function register(name: string, source: string): void;
985
+ /**
986
+ * Compile the given source, replace #include with registered shader sources
987
+ * @param {String} source source to compile
988
+ */
989
+ function compile(source: string): any;
990
+ function get(name: any): any;
991
+ }
992
+ //# sourceMappingURL=ShaderLib.d.ts.map
993
+
994
+ declare const _default$1: {
995
+ register(name: any, segment: any): void;
996
+ /**
997
+ * Compile the given source, replace #include with registered shader sources
998
+ * @param {String} source source to compile
999
+ */
1000
+ compile(source: any, defines: any): any;
1001
+ get(name: any): any;
1002
+ };
1003
+ //# sourceMappingURL=WgslShaderLib.d.ts.map
1004
+
1005
+ declare class GLShader {
1006
+ vert: string;
1007
+ frag: string;
1008
+ wgslVert: string;
1009
+ wgslFrag: string;
1010
+ uid: number;
1011
+ version: number;
1012
+ extraCommandProps: any;
1013
+ name: string;
1014
+ constructor({ vert, frag, wgslVert, wgslFrag, uniforms, defines, extraCommandProps, name }: {
1015
+ vert: any;
1016
+ frag: any;
1017
+ wgslVert: any;
1018
+ wgslFrag: any;
1019
+ uniforms: any;
1020
+ defines: any;
1021
+ extraCommandProps: any;
1022
+ name: any;
1023
+ });
1024
+ set shaderDefines(defines: Record<string, string | number>);
1025
+ get shaderDefines(): Record<string, string | number>;
1026
+ setDefines(defines: any): void;
1027
+ /**
1028
+ * The framebuffer object to render to
1029
+ * Set to null to render to default display
1030
+ * @param framebuffer
1031
+ */
1032
+ setFramebuffer(framebuffer: any): this;
1033
+ run(regl: any, command: any, props: any): any;
1034
+ getShaderCommandKey(device: any, mesh: any, uniformValues: any): string;
1035
+ getVersion(regl: any, source: any): "" | "#version 300 es\n" | "#version 100\n";
1036
+ getActiveVars(regl: any, vert: any, frag: any, hash: any): any;
1037
+ _insertDefines(source: any, defines: any): string;
1038
+ createMeshCommand(regl: any, mesh: any, commandProps?: {}, _uniformValues?: any): any;
1039
+ dispose(): void;
1040
+ /**
1041
+ * Get shader's context uniforms values
1042
+ * @param {Object} meshProps - mesh uniforms
1043
+ */
1044
+ appendDescUniforms(regl: any, meshProps: any): any;
1045
+ /**
1046
+ * Set or get context uniform to or from the shader
1047
+ * @returns {this}
1048
+ */
1049
+ setUniforms(uniforms: any): this;
1050
+ _compileSource(): void;
1051
+ }
1052
+ declare class GPUShader extends GLShader {
1053
+ getShaderCommandKey(device: any, mesh: any, renderProps: any): any;
1054
+ createMeshCommand(device: any, mesh: Mesh$1, commandProps: any, renderProps: any): any;
1055
+ _compileWGSLSource(defines: any): {
1056
+ vert: any;
1057
+ frag: any;
1058
+ };
1059
+ run(deviceOrRegl: any, command: any, props: any): any;
1060
+ _getCurrentRenderPassEncoder(device: GraphicsDevice): GPURenderPassEncoder;
1061
+ setFramebuffer(framebuffer: any): this;
1062
+ dispose(): void;
1063
+ }
1064
+
1065
+ declare class MeshShader extends GPUShader {
1066
+ draw(device: any, meshes: any): number;
1067
+ _ensureContextDefines(v: any): void;
1068
+ _runFilter(m: any): any;
1069
+ getMeshCommand(device: any, mesh: any, renderProps: any): any;
1070
+ _cmdKeys: {};
1071
+ }
1072
+ //# sourceMappingURL=MeshShader.d.ts.map
1073
+
1074
+ declare class WireframeShader extends MeshShader {
1075
+ constructor(config?: {});
1076
+ }
1077
+ //# sourceMappingURL=WireframeShader.d.ts.map
1078
+
1079
+ declare class PhongShader extends MeshShader {
1080
+ constructor(config?: {});
1081
+ getGeometryDefines(geometry: any): {
1082
+ HAS_TANGENT: number;
1083
+ HAS_NORMAL: number;
1084
+ };
1085
+ }
1086
+ //# sourceMappingURL=PhongShader.d.ts.map
1087
+
1088
+ declare class PointLineShader extends MeshShader {
1089
+ constructor(config?: {});
1090
+ }
1091
+ //# sourceMappingURL=PointLineShader.d.ts.map
1092
+
1093
+ declare class QuadShader extends MeshShader {
1094
+ constructor(config: any);
1095
+ draw(regl: any): number;
1096
+ getMeshCommand(regl: any): any;
1097
+ _createQuadMesh(regl: any): void;
1098
+ _quadMesh: Mesh$1[];
1099
+ }
1100
+ //# sourceMappingURL=QuadShader.d.ts.map
1101
+
1102
+ declare class FxaaShader extends QuadShader {
1103
+ constructor();
1104
+ getMeshCommand(regl: any, mesh: any): any;
1105
+ }
1106
+ //# sourceMappingURL=FxaaShader.d.ts.map
1107
+
1108
+ declare class BoxBlurShader extends QuadShader {
1109
+ constructor({ blurOffset }: {
1110
+ blurOffset: any;
1111
+ });
1112
+ _blurOffset: any;
1113
+ getMeshCommand(regl: any, mesh: any): any;
1114
+ }
1115
+ //# sourceMappingURL=BoxBlurShader.d.ts.map
1116
+
1117
+ declare class ImageShader extends MeshShader {
1118
+ constructor(config: any);
1119
+ getMeshCommand(regl: any, mesh: any): any;
1120
+ }
1121
+ //# sourceMappingURL=ImageShader.d.ts.map
1122
+
1123
+ declare class PostProcessShader extends QuadShader {
1124
+ constructor();
1125
+ getMeshCommand(regl: any, mesh: any): any;
1126
+ }
1127
+ //# sourceMappingURL=PostProcessShader.d.ts.map
1128
+
1129
+ declare class Jitter {
1130
+ constructor(ratio: any);
1131
+ _frameNum: number;
1132
+ _ratio: any;
1133
+ _avg: number[];
1134
+ getRatio(): any;
1135
+ setRatio(ratio: any): void;
1136
+ getAverage(): number[];
1137
+ reset(): void;
1138
+ getJitter(out: any): any;
1139
+ frame(): void;
1140
+ getSampleCount(): number;
1141
+ }
1142
+ //# sourceMappingURL=Jitter.d.ts.map
1143
+
1144
+ declare class BlurPass {
1145
+ constructor(regl: any, inputRGBM: any, level?: number);
1146
+ _regl: any;
1147
+ _renderer: Renderer;
1148
+ _inputRGBM: any;
1149
+ _level: number;
1150
+ render(sourceTex: any, luminThreshold: any): {
1151
+ blurTex0: any;
1152
+ blurTex1: any;
1153
+ blurTex2: any;
1154
+ blurTex3: any;
1155
+ blurTex4: any;
1156
+ };
1157
+ _blur(curTex: any, luminThreshold: any): void;
1158
+ _blurUniforms: {
1159
+ rgbmRange: number;
1160
+ blurDir: number[];
1161
+ outSize: number[];
1162
+ pixelRatio: number[];
1163
+ outputSize: number[];
1164
+ };
1165
+ _blurOnce(shader: any, inputTex: any, output0: any, output1: any, sizeRatio: any, luminThreshold: any): void;
1166
+ dispose(): void;
1167
+ _createTextures(tex: any): void;
1168
+ _blur00Tex: any;
1169
+ _blur00FBO: any;
1170
+ _blur01Tex: any;
1171
+ _blur01FBO: any;
1172
+ _blur10Tex: any;
1173
+ _blur10FBO: any;
1174
+ _blur11Tex: any;
1175
+ _blur11FBO: any;
1176
+ _blur20Tex: any;
1177
+ _blur20FBO: any;
1178
+ _blur21Tex: any;
1179
+ _blur21FBO: any;
1180
+ _blur30Tex: any;
1181
+ _blur30FBO: any;
1182
+ _blur31Tex: any;
1183
+ _blur31FBO: any;
1184
+ _blur40Tex: any;
1185
+ _blur40FBO: any;
1186
+ _blur41Tex: any;
1187
+ _blur41FBO: any;
1188
+ _blur50Tex: any;
1189
+ _blur50FBO: any;
1190
+ _blur51Tex: any;
1191
+ _blur51FBO: any;
1192
+ _blur60Tex: any;
1193
+ _blur60FBO: any;
1194
+ _blur61Tex: any;
1195
+ _blur61FBO: any;
1196
+ _createColorTex(curTex: any, w: any, h: any): any;
1197
+ _createBlurFBO(tex: any): any;
1198
+ _initShaders(): void;
1199
+ _blur0Shader: QuadShader;
1200
+ _blur1Shader: QuadShader;
1201
+ _blur2Shader: QuadShader;
1202
+ _blur3Shader: QuadShader;
1203
+ _blur4Shader: QuadShader;
1204
+ _blur5Shader: QuadShader;
1205
+ _blur6Shader: QuadShader;
1206
+ }
1207
+ //# sourceMappingURL=BlurPass.d.ts.map
1208
+
1209
+ declare class BloomPass {
1210
+ constructor(regl: any);
1211
+ _regl: any;
1212
+ _renderer: Renderer;
1213
+ render(sourceTex: any, bloomTex: any, bloomThreshold: any, bloomFactor: any, bloomRadius: any, noAaSource: any, pointSource: any, enableAA: any, paintToScreen: any): any;
1214
+ _combine(sourceTex: any, blurTexes: any, inputTex: any, bloomFactor: any, bloomRadius: any, noAaSource: any, pointSource: any, enableAA: any, paintToScreen: any): any;
1215
+ _combineUniforms: {
1216
+ bloomFactor: number;
1217
+ bloomRadius: number;
1218
+ rgbmRange: number;
1219
+ TextureBloomBlur1: any;
1220
+ TextureBloomBlur2: any;
1221
+ TextureBloomBlur3: any;
1222
+ TextureBloomBlur4: any;
1223
+ TextureBloomBlur5: any;
1224
+ TextureInput: any;
1225
+ TextureSource: any;
1226
+ outputSize: number[];
1227
+ };
1228
+ dispose(): void;
1229
+ _createTextures(tex: any): void;
1230
+ _combineTex: any;
1231
+ _combineFBO: any;
1232
+ _createColorTex(curTex: any, w: any, h: any, dataType: any): any;
1233
+ _createBlurFBO(tex: any): any;
1234
+ _initShaders(): void;
1235
+ _blurPass: BlurPass;
1236
+ _combineShader: QuadShader;
1237
+ }
1238
+ //# sourceMappingURL=BloomPass.d.ts.map
1239
+
1240
+ declare class CopyDepthShader extends QuadShader {
1241
+ constructor();
1242
+ getMeshCommand(regl: any, mesh: any): any;
1243
+ }
1244
+ //# sourceMappingURL=CopyDepthShader.d.ts.map
1245
+
1246
+ declare class SsrPass {
1247
+ static getUniformDeclares(): ({
1248
+ name: string;
1249
+ type: string;
1250
+ fn: (context: any, props: any) => mat4;
1251
+ length?: undefined;
1252
+ } | {
1253
+ name: string;
1254
+ type: string;
1255
+ length: number;
1256
+ fn: (context: any, props: any) => number[][];
1257
+ })[];
1258
+ static getDefines(): {
1259
+ HAS_SSR: number;
1260
+ };
1261
+ constructor(regl: any);
1262
+ _regl: any;
1263
+ _renderer: Renderer;
1264
+ _inputRGBM: number;
1265
+ setup(sourceTex: any): void;
1266
+ getSSRUniforms(map: any, factor: any, quality: any): {
1267
+ TextureDepth: any;
1268
+ TextureReflected: any;
1269
+ ssrFactor: any;
1270
+ ssrQuality: any;
1271
+ outSize: any[];
1272
+ fov: number;
1273
+ prevProjViewMatrix: any;
1274
+ cameraWorldMatrix: any;
1275
+ };
1276
+ genMipMap(sourceTex: any, depthTex: any, projViewMatrix: any): any;
1277
+ _projViewMatrix: any[];
1278
+ getPrevProjViewMatrix(): any[];
1279
+ copyDepthTex(depthTex: any): any;
1280
+ _depthCopy: any;
1281
+ _depthCopyFBO: any;
1282
+ _depthCopied: boolean;
1283
+ _mipmap(inputTex: any): void;
1284
+ _blurUniforms: {
1285
+ rgbmRange: number;
1286
+ outputSize: number[];
1287
+ };
1288
+ getMipmapTexture(): any;
1289
+ _outputTex: any;
1290
+ dispose(): void;
1291
+ _initShaders(): void;
1292
+ _copyDepthShader: CopyDepthShader;
1293
+ _ssrQuadShader: QuadShader;
1294
+ _createTextures(sourceTex: any): void;
1295
+ _targetFBO: any;
1296
+ }
1297
+ //# sourceMappingURL=SsrPass.d.ts.map
1298
+
1299
+ declare class HeatmapShader extends MeshShader {
1300
+ constructor(config: any);
1301
+ }
1302
+ //# sourceMappingURL=HeatmapShader.d.ts.map
1303
+
1304
+ declare class SkyboxShader extends MeshShader {
1305
+ constructor();
1306
+ /**
1307
+ * @param inputRGBM 输入的cubemap是否是rgbm格式
1308
+ * @param mode 模式,0: ambient模式, 1: lod模式
1309
+ */
1310
+ setMode(toneMapping: any, mode: any): this;
1311
+ _meshDefines: {
1312
+ TONE_MAPPING: number;
1313
+ USE_AMBIENT: number;
1314
+ };
1315
+ draw(regl: any): number;
1316
+ _createSkyboxMesh(regl: any): void;
1317
+ _skyboxMesh: Mesh$1[];
1318
+ }
1319
+ //# sourceMappingURL=SkyboxShader.d.ts.map
1320
+
1321
+ declare class HeatmapDisplayShader extends MeshShader {
1322
+ constructor(viewport: any, config: any);
1323
+ }
1324
+
1325
+ declare class WaterShader extends MeshShader {
1326
+ constructor(config?: {});
1327
+ }
1328
+ //# sourceMappingURL=WaterShader.d.ts.map
1329
+
1330
+ declare class CopyShader extends QuadShader {
1331
+ constructor();
1332
+ getMeshCommand(regl: any, mesh: any): any;
1333
+ }
1334
+ //# sourceMappingURL=CopyShader.d.ts.map
1335
+
1336
+ declare class EdgeShader extends MeshShader {
1337
+ constructor(config?: {});
1338
+ }
1339
+ //# sourceMappingURL=EdgeShader.d.ts.map
1340
+
1341
+ declare class StandardLiteShader extends MeshShader {
1342
+ constructor(config?: {});
1343
+ }
1344
+ //# sourceMappingURL=StandardLiteShader.d.ts.map
1345
+
1346
+ declare class EffectShader extends QuadShader {
1347
+ constructor();
1348
+ }
1349
+ //# sourceMappingURL=EffectShader.d.ts.map
1350
+
1351
+ declare class FogPass {
1352
+ constructor(regl: any, viewport: any, layer: any);
1353
+ _regl: any;
1354
+ _layer: any;
1355
+ _viewport: any;
1356
+ _init(): void;
1357
+ _shader: MeshShader;
1358
+ _fbo: any;
1359
+ _scene: Scene;
1360
+ renderer: Renderer;
1361
+ render(meshes: any, options: any): any;
1362
+ dispose(): void;
1363
+ _resize(): void;
1364
+ }
1365
+ //# sourceMappingURL=FogPass.d.ts.map
1366
+
1367
+ declare class FogShader extends QuadShader {
1368
+ constructor();
1369
+ }
1370
+ //# sourceMappingURL=FogShader.d.ts.map
1371
+
1372
+ declare class RainRipplePass {
1373
+ constructor(regl: any, viewport: any);
1374
+ _regl: any;
1375
+ _viewport: any;
1376
+ _init(): void;
1377
+ _shader: MeshShader;
1378
+ _fbo: any;
1379
+ _scene: Scene;
1380
+ renderer: Renderer;
1381
+ _transformRipples(map: any): void;
1382
+ _createRipplesMask(map: any): Mesh$1;
1383
+ _fixZoom: any;
1384
+ render(map: any, options: any): any;
1385
+ _mesh: any;
1386
+ dispose(): void;
1387
+ _resize(): void;
1388
+ }
1389
+
1390
+ declare class ExtentPass {
1391
+ constructor(regl: any, viewport: any);
1392
+ regl: any;
1393
+ _viewport: any;
1394
+ renderer: Renderer;
1395
+ _init(): void;
1396
+ _maskColorFbo: any;
1397
+ _maskModeFbo: any;
1398
+ _maskColorShader: MeshShader;
1399
+ _maskModeShader: MeshShader;
1400
+ _scene: Scene;
1401
+ render(meshes: any, projViewMatrix: any): {
1402
+ colorExtent: any;
1403
+ modeExtent: any;
1404
+ };
1405
+ _resize(): void;
1406
+ dispose(): void;
1407
+ }
1408
+ //# sourceMappingURL=ExtentPass.d.ts.map
1409
+
1410
+ declare class ScanEffectPass {
1411
+ constructor(regl: any, viewport: any, layer: any);
1412
+ _regl: any;
1413
+ _layer: any;
1414
+ _viewport: any;
1415
+ _effectsLength: number;
1416
+ _init(): void;
1417
+ _fbo: any;
1418
+ _scene: Scene;
1419
+ renderer: Renderer;
1420
+ render(meshes: any, options: any): any;
1421
+ _shader: MeshShader;
1422
+ _createFragSource(effectInfos: any): string;
1423
+ _updateUniforms(uniforms: any, effectInfos: any): void;
1424
+ dispose(): void;
1425
+ _resize(): void;
1426
+ }
1427
+ //# sourceMappingURL=ScanEffectPass.d.ts.map
1428
+
1429
+ declare class GLTFPack {
1430
+ constructor(gltf: any, regl: any);
1431
+ gltf: any;
1432
+ regl: any;
1433
+ geometries: any[];
1434
+ _emptyTexture: any;
1435
+ getMeshesInfo(): any[];
1436
+ getGLTFBBox(): {
1437
+ min: number[];
1438
+ max: number[];
1439
+ };
1440
+ _createSkins(skins: any): void;
1441
+ _skinMap: {};
1442
+ _createTextures(textures: any): void;
1443
+ _textureMap: {};
1444
+ _checkBaseColorFactor(): void;
1445
+ _checkBaseColorFactorAlpha(): boolean;
1446
+ dispose(): void;
1447
+ updateAnimation(time: any, loop: any, speed: any, animationName: any, startTime: any, nodeMatrixMap: any, skinMap: any, animationNodes: any): void;
1448
+ _isFirstLoop(time: any, speed: any, animationName: any, startTime: any): boolean;
1449
+ hasSkinAnimation(): boolean;
1450
+ _updateNodeMatrix(animationName: any, time: any, node: any, parentNodeMatrix: any, nodeMatrixMap: any, animationNodes: any): void;
1451
+ _updateNodeTRS(node: any, time: any, animationName: any): void;
1452
+ _updateMorph(node: any, weights: any): void;
1453
+ _parserNode(node: any, geometries: any, parentNodeMatrix: any): void;
1454
+ _isAnimation: boolean;
1455
+ _createMaterialInfo(materialIndex: any): {
1456
+ baseColorTexture: any;
1457
+ khr_offset: any;
1458
+ khr_rotation: any;
1459
+ khr_scale: any;
1460
+ baseColorFactor: any;
1461
+ metallicRoughnessTexture: any;
1462
+ metallicFactor: any;
1463
+ roughnessFactor: any;
1464
+ name: string;
1465
+ normalTexture: any;
1466
+ occlusionTexture: any;
1467
+ emissiveTexture: any;
1468
+ emissiveFactor: any;
1469
+ alphaCutoff: any;
1470
+ doubleSided: any;
1471
+ alphaMode: any;
1472
+ };
1473
+ _createExtralInfo(material: any): {
1474
+ doubleSided: any;
1475
+ alphaMode: any;
1476
+ };
1477
+ _getTexture(texInfo: any): any;
1478
+ _toTexture(texture: any): any;
1479
+ /**
1480
+ *
1481
+ * @param map
1482
+ * @param from
1483
+ * @param to
1484
+ * @param dist
1485
+ * @param rotationZ 模型绕Z轴旋转角度,弧度
1486
+ * @param rotationXY 模型绕Z轴与线段的交叉轴的旋转角度,弧度
1487
+ * @param gltfScale
1488
+ * @param projectionScale
1489
+ * @param options
1490
+ * @returns
1491
+ */
1492
+ arrangeAlongLine(from: any, to: any, xyDist: any, gltfScale: any, projectionScale: any, options: any): {
1493
+ coordinates: any;
1494
+ t: number;
1495
+ scale: number[];
1496
+ rotation: number[];
1497
+ rotationZ: number;
1498
+ rotationXY: number;
1499
+ }[];
1500
+ calModelHeightScale(out: any, modelHeight: any): vec3;
1501
+ _calBoxWidth(scale: any, options: any): any;
1502
+ _getRotationZ(from: any, to: any): number;
1503
+ _getRotationXY(xyDist: any, zDist: any): number;
1504
+ }
1505
+
1506
+ declare function load(url: any, options: any): any;
1507
+ declare function exportGLTFPack(gltf: any, regl: any): GLTFPack;
1508
+ declare function loadGLTF(root: any, gltf: any, loaderOptions: any): any;
1509
+
1510
+ declare const GLTFHelper_d_exportGLTFPack: typeof exportGLTFPack;
1511
+ declare const GLTFHelper_d_load: typeof load;
1512
+ declare const GLTFHelper_d_loadGLTF: typeof loadGLTF;
1513
+ declare namespace GLTFHelper_d {
1514
+ export { GLTFHelper_d_exportGLTFPack as exportGLTFPack, GLTFHelper_d_load as load, GLTFHelper_d_loadGLTF as loadGLTF };
1515
+ }
1516
+
1517
+ declare class GLTFManager {
1518
+ constructor(regl: any, options: any);
1519
+ regl: any;
1520
+ resourceMap: {};
1521
+ options: any;
1522
+ getGLTF(url: any): any;
1523
+ loginGLTF(url: any, requestor: any): void;
1524
+ logoutGLTF(url: any): void;
1525
+ isSimpleModel(url: any): any;
1526
+ addSimpleModel(id: any, gltfData: any): void;
1527
+ removeSimpleModel(id: any): void;
1528
+ _exportGLTFResource(gltf: any, url: any, useUniqueREGLBuffer?: boolean): {
1529
+ bbox: {
1530
+ min: number[];
1531
+ max: number[];
1532
+ };
1533
+ gltfPack: GLTFPack;
1534
+ resources: any[];
1535
+ json: any;
1536
+ refCount: any;
1537
+ };
1538
+ fetchGLTF(url: any): any;
1539
+ _loadGLTFModel(url: any): any;
1540
+ }
1541
+
1542
+ declare function getPrimitive(mode: any): string;
1543
+ declare function getMaterialType(type: any): any;
1544
+ declare function getArrayType(array: any): "uint8" | "float" | "uint16" | "int8" | "int16";
1545
+ declare function getMaterialFormat(format: any): any;
1546
+ declare function getTextureMagFilter(filter: any): any;
1547
+ declare function getTextureMinFilter(filter: any): any;
1548
+ declare function getTextureWrap(wrap: any): any;
1549
+ declare function getUniqueREGLBuffer(regl: any, data: any, options: any): any;
1550
+ declare function getUniqueTexture(regl: any, texConfig: any): any;
1551
+
1552
+ declare const REGLHelper_d_getArrayType: typeof getArrayType;
1553
+ declare const REGLHelper_d_getMaterialFormat: typeof getMaterialFormat;
1554
+ declare const REGLHelper_d_getMaterialType: typeof getMaterialType;
1555
+ declare const REGLHelper_d_getPrimitive: typeof getPrimitive;
1556
+ declare const REGLHelper_d_getTextureMagFilter: typeof getTextureMagFilter;
1557
+ declare const REGLHelper_d_getTextureMinFilter: typeof getTextureMinFilter;
1558
+ declare const REGLHelper_d_getTextureWrap: typeof getTextureWrap;
1559
+ declare const REGLHelper_d_getUniqueREGLBuffer: typeof getUniqueREGLBuffer;
1560
+ declare const REGLHelper_d_getUniqueTexture: typeof getUniqueTexture;
1561
+ declare namespace REGLHelper_d {
1562
+ export { REGLHelper_d_getArrayType as getArrayType, REGLHelper_d_getMaterialFormat as getMaterialFormat, REGLHelper_d_getMaterialType as getMaterialType, REGLHelper_d_getPrimitive as getPrimitive, REGLHelper_d_getTextureMagFilter as getTextureMagFilter, REGLHelper_d_getTextureMinFilter as getTextureMinFilter, REGLHelper_d_getTextureWrap as getTextureWrap, REGLHelper_d_getUniqueREGLBuffer as getUniqueREGLBuffer, REGLHelper_d_getUniqueTexture as getUniqueTexture };
1563
+ }
1564
+
1565
+ /**
1566
+ * {
1567
+ * envTexture,
1568
+ * envCubeSize,
1569
+ * irradianceCubeSize,
1570
+ * sampleSize,
1571
+ * roughnessLevels,
1572
+ * prefilterCubeSize,
1573
+ * dfgSize
1574
+ * }
1575
+ * @param regl - regl
1576
+ * @param config - config
1577
+ */
1578
+ declare function createIBLMaps(regl: any, config?: {}): {
1579
+ envMap: any;
1580
+ isHDR: boolean;
1581
+ prefilterMap: any;
1582
+ };
1583
+ declare function generateDFGLUT(device: any, size: any, sampleSize: any, roughnessLevels: any): any;
1584
+ declare function supportFloat16(regl: any): any;
1585
+
1586
+ declare const PBRHelper_createIBLMaps: typeof createIBLMaps;
1587
+ declare const PBRHelper_generateDFGLUT: typeof generateDFGLUT;
1588
+ declare const PBRHelper_supportFloat16: typeof supportFloat16;
1589
+ declare namespace PBRHelper {
1590
+ export { PBRHelper_createIBLMaps as createIBLMaps, PBRHelper_generateDFGLUT as generateDFGLUT, PBRHelper_supportFloat16 as supportFloat16 };
1591
+ }
1592
+
1593
+ declare const StandardSpecularGlossinessMaterial_base: {
1594
+ new (...args: any[]): {
1595
+ appendDefines(defines: ShaderDefines, geometry: Geometry): ShaderDefines;
1596
+ };
1597
+ } & typeof StandardMaterial;
1598
+ declare class StandardSpecularGlossinessMaterial extends StandardSpecularGlossinessMaterial_base {
1599
+ }
1600
+ //# sourceMappingURL=StandardSpecularGlossinessMaterial.d.ts.map
1601
+
1602
+ declare class StandardShader extends MeshShader {
1603
+ constructor(config?: {});
1604
+ getGeometryDefines(geometry: any): {
1605
+ HAS_TANGENT: number;
1606
+ HAS_NORMAL: number;
1607
+ HAS_COLOR: number;
1608
+ HAS_COLOR0: number;
1609
+ COLOR0_SIZE: any;
1610
+ };
1611
+ }
1612
+ //# sourceMappingURL=StandardShader.d.ts.map
1613
+
1614
+ declare class StandardDepthShader extends MeshShader {
1615
+ constructor(config?: {});
1616
+ }
1617
+ //# sourceMappingURL=StandardDepthShader.d.ts.map
1618
+
1619
+ declare function loginIBLResOnCanvas(canvas: any, regl: any, map: any): {
1620
+ dfgLUT: any;
1621
+ iblTexes: any;
1622
+ };
1623
+ declare function getIBLResOnCanvas(canvas: any): {
1624
+ dfgLUT: any;
1625
+ iblTexes: any;
1626
+ };
1627
+ declare function logoutIBLResOnCanvas(canvas: any, map: any): void;
1628
+ declare function getPBRUniforms(map: any, iblTexes: any, dfgLUT: any, ssr: any, jitter: any): any;
1629
+ declare function createIBLTextures(regl: any, map: any): {
1630
+ prefilterMap: any;
1631
+ envMap: any;
1632
+ sh: any;
1633
+ };
1634
+ declare function disposeIBLTextures(iblTexes: any): void;
1635
+ declare function isSupported(regl: any): any;
1636
+
1637
+ declare const PBRUtils_createIBLTextures: typeof createIBLTextures;
1638
+ declare const PBRUtils_disposeIBLTextures: typeof disposeIBLTextures;
1639
+ declare const PBRUtils_getIBLResOnCanvas: typeof getIBLResOnCanvas;
1640
+ declare const PBRUtils_getPBRUniforms: typeof getPBRUniforms;
1641
+ declare const PBRUtils_isSupported: typeof isSupported;
1642
+ declare const PBRUtils_loginIBLResOnCanvas: typeof loginIBLResOnCanvas;
1643
+ declare const PBRUtils_logoutIBLResOnCanvas: typeof logoutIBLResOnCanvas;
1644
+ declare namespace PBRUtils {
1645
+ export { PBRUtils_createIBLTextures as createIBLTextures, PBRUtils_disposeIBLTextures as disposeIBLTextures, PBRUtils_getIBLResOnCanvas as getIBLResOnCanvas, PBRUtils_getPBRUniforms as getPBRUniforms, PBRUtils_isSupported as isSupported, PBRUtils_loginIBLResOnCanvas as loginIBLResOnCanvas, PBRUtils_logoutIBLResOnCanvas as logoutIBLResOnCanvas };
1646
+ }
1647
+
1648
+ declare class BoxShadowBlurShader extends QuadShader {
1649
+ constructor({ blurOffset }: {
1650
+ blurOffset: any;
1651
+ });
1652
+ _blurOffset: any;
1653
+ getMeshCommand(regl: any, mesh: any): any;
1654
+ }
1655
+ //# sourceMappingURL=BoxShadowBlurShader.d.ts.map
1656
+
1657
+ declare class ShadowMapShader extends MeshShader {
1658
+ constructor(defines: any);
1659
+ filter(mesh: any): any;
1660
+ }
1661
+ //# sourceMappingURL=ShadowMapShader.d.ts.map
1662
+
1663
+ declare class ShadowPass {
1664
+ constructor(renderer: any, { width, height, blurOffset, defines }: {
1665
+ width: any;
1666
+ height: any;
1667
+ blurOffset: any;
1668
+ defines: any;
1669
+ });
1670
+ renderer: any;
1671
+ width: any;
1672
+ height: any;
1673
+ blurOffset: any;
1674
+ render(scene: any, { cameraProjViewMatrix, lightDir, farPlane, cameraLookAt }: {
1675
+ cameraProjViewMatrix: any;
1676
+ lightDir: any;
1677
+ farPlane: any;
1678
+ cameraLookAt: any;
1679
+ }): {
1680
+ lightProjViewMatrix: any;
1681
+ shadowMap: any;
1682
+ depthFBO: any;
1683
+ blurFBO: any;
1684
+ };
1685
+ resize(width: any, height: any): this;
1686
+ _renderShadow(scene: any, cameraProjViewMatrix: any, lightDir: any, farPlane: any, cameraLookAt: any): any;
1687
+ boxBlurShader: BoxShadowBlurShader;
1688
+ _init(defines: any): void;
1689
+ depthTex: any;
1690
+ shadowMapShader: ShadowMapShader;
1691
+ depthFBO: any;
1692
+ blurTex: any;
1693
+ blurFBO: any;
1694
+ dispose(): void;
1695
+ }
1696
+ //# sourceMappingURL=ShadowPass.d.ts.map
1697
+
1698
+ declare class ShadowDisplayShader extends MeshShader {
1699
+ constructor(defines: any);
1700
+ getMeshCommand(regl: any, mesh: any): any;
1701
+ }
1702
+ //# sourceMappingURL=ShadowDisplayShader.d.ts.map
1703
+
1704
+ declare class FBORayPicking {
1705
+ constructor(renderer: any, { name, vert, wgslVert, uniforms, defines, extraCommandProps, enableStencil }: {
1706
+ name: any;
1707
+ vert: any;
1708
+ wgslVert: any;
1709
+ uniforms: any;
1710
+ defines: any;
1711
+ extraCommandProps: any;
1712
+ enableStencil: any;
1713
+ }, fbo: any, map: any);
1714
+ _renderer: any;
1715
+ _fbo: any;
1716
+ _map: any;
1717
+ _name: any;
1718
+ _vert: any;
1719
+ _wgslVert: any;
1720
+ _uniforms: any;
1721
+ _defines: any;
1722
+ _extraCommandProps: any;
1723
+ _currentMeshes: any[];
1724
+ _init(): void;
1725
+ _shader0: MeshShader;
1726
+ _shader2: MeshShader;
1727
+ _shader1: MeshShader;
1728
+ _depthShader: MeshShader;
1729
+ _scene: Scene;
1730
+ _scene1: Scene;
1731
+ filter(): boolean;
1732
+ /**
1733
+ * Render meshes to fbo for further picking
1734
+ * @param {Mesh[]} meshes - meshes to render
1735
+ * @param {Object} uniforms - uniform values
1736
+ * @param {Boolean} once - if it's an one time rendering which can gain some performance improvement
1737
+ */
1738
+ render(meshes: Mesh[], uniforms: any, once?: boolean): this;
1739
+ _currentShader: any;
1740
+ pickAll(x: any, y: any, tolerance: any, uniforms: any, options: any): {
1741
+ meshId: any;
1742
+ pickingId: any;
1743
+ point: number[];
1744
+ coordinate: any[];
1745
+ }[];
1746
+ pick(x: any, y: any, tolerance: any, uniforms: any, options?: {}): {
1747
+ meshId: any;
1748
+ pickingId: any;
1749
+ point: number[];
1750
+ coordinate: any[];
1751
+ } | {
1752
+ pickingId: any;
1753
+ meshId: any;
1754
+ point: any;
1755
+ coordinate?: undefined;
1756
+ };
1757
+ _pick(x: any, y: any, tolerance: any, uniforms: any, options?: {}): {
1758
+ pickingId: any;
1759
+ meshId: any;
1760
+ point: any;
1761
+ meshIds?: undefined;
1762
+ pickingIds?: undefined;
1763
+ coords?: undefined;
1764
+ points?: undefined;
1765
+ width?: undefined;
1766
+ height?: undefined;
1767
+ } | {
1768
+ meshIds: any[];
1769
+ pickingIds: any[];
1770
+ coords: any[][];
1771
+ points: number[][];
1772
+ width: number;
1773
+ height: number;
1774
+ pickingId?: undefined;
1775
+ meshId?: undefined;
1776
+ point?: undefined;
1777
+ };
1778
+ _convertPickPoint(point: any): any[];
1779
+ clear(): this;
1780
+ getMeshAt(idx: any): any;
1781
+ getRenderedMeshes(): any[];
1782
+ dispose(): void;
1783
+ _getWorldPos(x: any, y: any, depth: any, viewMatrix: any, projMatrix: any): number[];
1784
+ _getPickingId(x: any, y: any, width: any, height: any, pixels: any, meshes: any, uniforms: any): any[];
1785
+ _pickDepth(x: any, y: any, width: any, height: any, pixels: any, meshes: any, uniforms: any): number[];
1786
+ _packData(data: any, shader: any): {
1787
+ meshId: any;
1788
+ pickingId: any;
1789
+ };
1790
+ _clearFbo(framebuffer: any): void;
1791
+ _getShader(meshes: any, once: any): MeshShader;
1792
+ _getFBO1(): any;
1793
+ _fbo1: any;
1794
+ _getParams(px: any, py: any, tolerance: any, fbo: any): {
1795
+ px: any;
1796
+ py: any;
1797
+ width: number;
1798
+ height: number;
1799
+ };
1800
+ getPickingVert(): any;
1801
+ getPickingWGSLVert(): any;
1802
+ getUniformDeclares(): any;
1803
+ }
1804
+
1805
+ declare const KEY_DISPOSED = "__reshader_disposed";
1806
+ declare const WEBGL_EXTENSIONS: string[];
1807
+ declare const WEBGL_OPTIONAL_EXTENSIONS: string[];
1808
+ declare const ERROR_NOT_IMPLEMENTED = "not implemented";
1809
+
1810
+ declare const Constants_d_ERROR_NOT_IMPLEMENTED: typeof ERROR_NOT_IMPLEMENTED;
1811
+ declare const Constants_d_KEY_DISPOSED: typeof KEY_DISPOSED;
1812
+ declare const Constants_d_WEBGL_EXTENSIONS: typeof WEBGL_EXTENSIONS;
1813
+ declare const Constants_d_WEBGL_OPTIONAL_EXTENSIONS: typeof WEBGL_OPTIONAL_EXTENSIONS;
1814
+ declare namespace Constants_d {
1815
+ export { Constants_d_ERROR_NOT_IMPLEMENTED as ERROR_NOT_IMPLEMENTED, Constants_d_KEY_DISPOSED as KEY_DISPOSED, Constants_d_WEBGL_EXTENSIONS as WEBGL_EXTENSIONS, Constants_d_WEBGL_OPTIONAL_EXTENSIONS as WEBGL_OPTIONAL_EXTENSIONS };
1816
+ }
1817
+
1818
+ declare class KHRTechniquesWebglManager {
1819
+ constructor(regl: any, extraCommandProps: any, resLoader: any);
1820
+ _regl: any;
1821
+ _khrShaders: {};
1822
+ _commandProps: any;
1823
+ _resLoader: any;
1824
+ getExcludeFilter(): (mesh: any) => boolean;
1825
+ /**
1826
+ * 遍历Shader
1827
+ *
1828
+ * */
1829
+ forEachShader(cb: any): void;
1830
+ createMesh(primitive: any, gltf: any, excludeElementsInVAO: any, useWebGL2: any): {
1831
+ geometry: Geometry;
1832
+ material: Material;
1833
+ };
1834
+ _createGeometry(gltfMesh: any, attributeSemantics: any, excludeElementsInVAO: any, shaderHash: any): Geometry;
1835
+ _getTexture(texInfo: any): Texture2D;
1836
+ _createTechniqueShader(hash: any, extension: any, techIndex: any, extraCommandProps: any, useWebGL2: any): {
1837
+ shader: MeshShader;
1838
+ filter: (mesh: any) => boolean;
1839
+ uniformSemantics: {};
1840
+ attributeSemantics: {};
1841
+ };
1842
+ dispose(): void;
1843
+ }
1844
+
1845
+ /*!
1846
+ * codes from GEngine
1847
+ * https://github.com/GEngine-js/GEngine/blob/e9c0e2c4a28cc6b9fec133c75958b80115e53a63/src/shader/WGSLParseDefines.ts
1848
+ * ISC License
1849
+ */
1850
+
1851
+ declare function WGSLParseDefines(shader: string, meshDefines: ShaderDefines): string;
1852
+ declare function getDefineConditionValue(define: any, defines: any, usedDefines: any): any;
1853
+
1854
+ declare const WGSLParseDefines_d_WGSLParseDefines: typeof WGSLParseDefines;
1855
+ declare const WGSLParseDefines_d_getDefineConditionValue: typeof getDefineConditionValue;
1856
+ declare namespace WGSLParseDefines_d {
1857
+ export { WGSLParseDefines_d_WGSLParseDefines as WGSLParseDefines, WGSLParseDefines_d_getDefineConditionValue as getDefineConditionValue };
1858
+ }
1859
+
1860
+ declare const HDR: {
1861
+ parseHDR: typeof parseRGBE;
1862
+ };
1863
+
1864
+ declare const pbr: {
1865
+ PBRHelper: typeof PBRHelper;
1866
+ StandardMaterial: typeof StandardMaterial;
1867
+ StandardSpecularGlossinessMaterial: typeof StandardSpecularGlossinessMaterial;
1868
+ StandardShader: typeof StandardShader;
1869
+ StandardDepthShader: typeof StandardDepthShader;
1870
+ PBRUtils: typeof PBRUtils;
1871
+ };
1872
+
1873
+ declare const earcut: any;
1874
+ //# sourceMappingURL=index.d.ts.map
1875
+
1876
+ type index_d_AbstractTexture = AbstractTexture;
1877
+ declare const index_d_AbstractTexture: typeof AbstractTexture;
1878
+ type index_d_BloomPass = BloomPass;
1879
+ declare const index_d_BloomPass: typeof BloomPass;
1880
+ type index_d_BoundingBox = BoundingBox;
1881
+ declare const index_d_BoundingBox: typeof BoundingBox;
1882
+ type index_d_BoxBlurShader = BoxBlurShader;
1883
+ declare const index_d_BoxBlurShader: typeof BoxBlurShader;
1884
+ type index_d_CopyShader = CopyShader;
1885
+ declare const index_d_CopyShader: typeof CopyShader;
1886
+ type index_d_EdgeGeometry = EdgeGeometry;
1887
+ declare const index_d_EdgeGeometry: typeof EdgeGeometry;
1888
+ type index_d_EdgeShader = EdgeShader;
1889
+ declare const index_d_EdgeShader: typeof EdgeShader;
1890
+ type index_d_ExtentPass = ExtentPass;
1891
+ declare const index_d_ExtentPass: typeof ExtentPass;
1892
+ type index_d_FBORayPicking = FBORayPicking;
1893
+ declare const index_d_FBORayPicking: typeof FBORayPicking;
1894
+ type index_d_FogPass = FogPass;
1895
+ declare const index_d_FogPass: typeof FogPass;
1896
+ type index_d_FogShader = FogShader;
1897
+ declare const index_d_FogShader: typeof FogShader;
1898
+ type index_d_FxaaShader = FxaaShader;
1899
+ declare const index_d_FxaaShader: typeof FxaaShader;
1900
+ type index_d_GLTFManager = GLTFManager;
1901
+ declare const index_d_GLTFManager: typeof GLTFManager;
1902
+ type index_d_Geometry = Geometry;
1903
+ declare const index_d_Geometry: typeof Geometry;
1904
+ type index_d_GraphicsDevice = GraphicsDevice;
1905
+ declare const index_d_GraphicsDevice: typeof GraphicsDevice;
1906
+ type index_d_GraphicsFramebuffer = GraphicsFramebuffer;
1907
+ declare const index_d_GraphicsFramebuffer: typeof GraphicsFramebuffer;
1908
+ type index_d_GraphicsTexture = GraphicsTexture;
1909
+ declare const index_d_GraphicsTexture: typeof GraphicsTexture;
1910
+ declare const index_d_HDR: typeof HDR;
1911
+ type index_d_HeatmapDisplayShader = HeatmapDisplayShader;
1912
+ declare const index_d_HeatmapDisplayShader: typeof HeatmapDisplayShader;
1913
+ type index_d_HeatmapShader = HeatmapShader;
1914
+ declare const index_d_HeatmapShader: typeof HeatmapShader;
1915
+ type index_d_ImageShader = ImageShader;
1916
+ declare const index_d_ImageShader: typeof ImageShader;
1917
+ type index_d_InstancedMesh = InstancedMesh;
1918
+ declare const index_d_InstancedMesh: typeof InstancedMesh;
1919
+ type index_d_Jitter = Jitter;
1920
+ declare const index_d_Jitter: typeof Jitter;
1921
+ type index_d_KHRTechniquesWebglManager = KHRTechniquesWebglManager;
1922
+ declare const index_d_KHRTechniquesWebglManager: typeof KHRTechniquesWebglManager;
1923
+ type index_d_Material = Material;
1924
+ declare const index_d_Material: typeof Material;
1925
+ type index_d_MeshShader = MeshShader;
1926
+ declare const index_d_MeshShader: typeof MeshShader;
1927
+ type index_d_PhongMaterial = PhongMaterial;
1928
+ declare const index_d_PhongMaterial: typeof PhongMaterial;
1929
+ type index_d_PhongShader = PhongShader;
1930
+ declare const index_d_PhongShader: typeof PhongShader;
1931
+ type index_d_PhongSpecularGlossinessMaterial = PhongSpecularGlossinessMaterial;
1932
+ declare const index_d_PhongSpecularGlossinessMaterial: typeof PhongSpecularGlossinessMaterial;
1933
+ type index_d_Plane = Plane;
1934
+ declare const index_d_Plane: typeof Plane;
1935
+ type index_d_PointLineShader = PointLineShader;
1936
+ declare const index_d_PointLineShader: typeof PointLineShader;
1937
+ type index_d_PostProcessShader = PostProcessShader;
1938
+ declare const index_d_PostProcessShader: typeof PostProcessShader;
1939
+ type index_d_QuadShader = QuadShader;
1940
+ declare const index_d_QuadShader: typeof QuadShader;
1941
+ type index_d_Renderer = Renderer;
1942
+ declare const index_d_Renderer: typeof Renderer;
1943
+ type index_d_ResourceLoader = ResourceLoader;
1944
+ declare const index_d_ResourceLoader: typeof ResourceLoader;
1945
+ type index_d_ScanEffectPass = ScanEffectPass;
1946
+ declare const index_d_ScanEffectPass: typeof ScanEffectPass;
1947
+ type index_d_Scene = Scene;
1948
+ declare const index_d_Scene: typeof Scene;
1949
+ type index_d_ShadowDisplayShader = ShadowDisplayShader;
1950
+ declare const index_d_ShadowDisplayShader: typeof ShadowDisplayShader;
1951
+ type index_d_ShadowMapShader = ShadowMapShader;
1952
+ declare const index_d_ShadowMapShader: typeof ShadowMapShader;
1953
+ type index_d_ShadowPass = ShadowPass;
1954
+ declare const index_d_ShadowPass: typeof ShadowPass;
1955
+ type index_d_SkyboxShader = SkyboxShader;
1956
+ declare const index_d_SkyboxShader: typeof SkyboxShader;
1957
+ type index_d_SsrPass = SsrPass;
1958
+ declare const index_d_SsrPass: typeof SsrPass;
1959
+ type index_d_StandardLiteMaterial = StandardLiteMaterial;
1960
+ declare const index_d_StandardLiteMaterial: typeof StandardLiteMaterial;
1961
+ type index_d_StandardLiteShader = StandardLiteShader;
1962
+ declare const index_d_StandardLiteShader: typeof StandardLiteShader;
1963
+ type index_d_Texture2D = Texture2D;
1964
+ declare const index_d_Texture2D: typeof Texture2D;
1965
+ type index_d_WaterShader = WaterShader;
1966
+ declare const index_d_WaterShader: typeof WaterShader;
1967
+ type index_d_WireFrameMaterial = WireFrameMaterial;
1968
+ declare const index_d_WireFrameMaterial: typeof WireFrameMaterial;
1969
+ type index_d_WireframeShader = WireframeShader;
1970
+ declare const index_d_WireframeShader: typeof WireframeShader;
1971
+ declare const index_d_earcut: typeof earcut;
1972
+ declare const index_d_glMatrix: typeof glMatrix;
1973
+ declare const index_d_mat2: typeof mat2;
1974
+ declare const index_d_mat2d: typeof mat2d;
1975
+ declare const index_d_mat3: typeof mat3;
1976
+ declare const index_d_mat4: typeof mat4;
1977
+ declare const index_d_pbr: typeof pbr;
1978
+ declare const index_d_quat: typeof quat;
1979
+ declare const index_d_quat2: typeof quat2;
1980
+ declare const index_d_vec2: typeof vec2;
1981
+ declare const index_d_vec3: typeof vec3;
1982
+ declare const index_d_vec4: typeof vec4;
1983
+ declare namespace index_d {
1984
+ export { index_d_AbstractTexture as AbstractTexture, index_d_BloomPass as BloomPass, index_d_BoundingBox as BoundingBox, index_d_BoxBlurShader as BoxBlurShader, Constants_d as Constants, index_d_CopyShader as CopyShader, index_d_EdgeGeometry as EdgeGeometry, index_d_EdgeShader as EdgeShader, index_d_ExtentPass as ExtentPass, index_d_FBORayPicking as FBORayPicking, index_d_FogPass as FogPass, index_d_FogShader as FogShader, index_d_FxaaShader as FxaaShader, GLTFHelper_d as GLTFHelper, index_d_GLTFManager as GLTFManager, index_d_Geometry as Geometry, index_d_GraphicsDevice as GraphicsDevice, index_d_GraphicsFramebuffer as GraphicsFramebuffer, index_d_GraphicsTexture as GraphicsTexture, index_d_HDR as HDR, index_d_HeatmapDisplayShader as HeatmapDisplayShader, index_d_HeatmapShader as HeatmapShader, index_d_ImageShader as ImageShader, index_d_InstancedMesh as InstancedMesh, index_d_Jitter as Jitter, index_d_KHRTechniquesWebglManager as KHRTechniquesWebglManager, index_d_Material as Material, Mesh$1 as Mesh, index_d_MeshShader as MeshShader, index_d_PhongMaterial as PhongMaterial, index_d_PhongShader as PhongShader, index_d_PhongSpecularGlossinessMaterial as PhongSpecularGlossinessMaterial, index_d_Plane as Plane, index_d_PointLineShader as PointLineShader, index_d_PostProcessShader as PostProcessShader, index_d_QuadShader as QuadShader, REGLHelper_d as REGLHelper, RainRipplePass as RainRipplesPass, index_d_Renderer as Renderer, index_d_ResourceLoader as ResourceLoader, index_d_ScanEffectPass as ScanEffectPass, EffectShader as ScanEffectShader, index_d_Scene as Scene, GPUShader as Shader, _default$2 as ShaderLib, index_d_ShadowDisplayShader as ShadowDisplayShader, index_d_ShadowMapShader as ShadowMapShader, index_d_ShadowPass as ShadowPass, index_d_SkyboxShader as SkyboxShader, index_d_SsrPass as SsrPass, index_d_StandardLiteMaterial as StandardLiteMaterial, index_d_StandardLiteShader as StandardLiteShader, index_d_Texture2D as Texture2D, Util_d as Util, WGSLParseDefines_d as WGSLParseDefines, index_d_WaterShader as WaterShader, WebGLConstants_d as WebGLConstants, _default$1 as WgslShaderLib, index_d_WireFrameMaterial as WireFrameMaterial, index_d_WireframeShader as WireframeShader, index_d_earcut as earcut, index_d_glMatrix as glMatrix, index_d_mat2 as mat2, index_d_mat2d as mat2d, index_d_mat3 as mat3, index_d_mat4 as mat4, index_d_pbr as pbr, index_d_quat as quat, index_d_quat2 as quat2, index_d_vec2 as vec2, index_d_vec3 as vec3, index_d_vec4 as vec4 };
1985
+ }
1986
+
1987
+ declare class Mask extends Polygon {
1988
+ getMode(): any;
1989
+ remove(): this;
1990
+ getMesh(regl: any, ratio: any, minHeight: any): any;
1991
+ _mesh: any;
1992
+ setCoordinates(coordinates: any): this;
1993
+ _createGeometry(regl: any): Geometry | {
1994
+ geometry: Geometry;
1995
+ copyGeometry: Geometry;
1996
+ };
1997
+ _createPOSITION(data: any, hasHeight: any): {
1998
+ positions: number[];
1999
+ uvs: number[];
2000
+ triangles: any;
2001
+ };
2002
+ _createTexcoords(vertices: any, dimension: any): number[];
2003
+ _createBilinearPOSITON(data: any): {
2004
+ positions: number[];
2005
+ uvs: number[];
2006
+ triangles: number[];
2007
+ };
2008
+ _positions: any[];
2009
+ clearMesh(): void;
2010
+ maskGeoJSON: any;
2011
+ _getMaskMode(): any;
2012
+ _getMaskColor(): any;
2013
+ _altitudeToPoint(altitude?: number): number;
2014
+ _setLocalTransform(mesh: any): void;
2015
+ _dispose(): void;
2016
+ containsPoint(coordinate: any): boolean;
2017
+ _contains(coordinates: any, coordinate: any): boolean;
2018
+ _calArea(coordinates: any): number;
2019
+ }
2020
+
2021
+ declare class GroupGLLayer extends maptalks.Layer {
2022
+ /**
2023
+ * Reproduce a GroupGLLayer from layer's profile JSON.
2024
+ * @param {Object} layerJSON - layer's profile JSON
2025
+ * @return {GroupGLLayer}
2026
+ * @static
2027
+ * @private
2028
+ * @function
2029
+ */
2030
+ static fromJSON(layerJSON: object): GroupGLLayer;
2031
+ options: GroupGLLayerOptions;
2032
+ layers: maptalks.Layer[];
2033
+ /**
2034
+ * @param id - layer's id
2035
+ * @param layers - layers to add
2036
+ * @param [options=null] - construct options
2037
+ */
2038
+ constructor(id: string, layers: maptalks.Layer[], options: GroupGLLayerOptions);
2039
+ sortLayersByZIndex(): void;
2040
+ setSceneConfig(sceneConfig: GroupGLLayerSceneConfig): this;
2041
+ getSceneConfig(): GroupGLLayerSceneConfig;
2042
+ getGroundConfig(): SceneGround;
2043
+ getWeatherConfig(): SceneWeather;
2044
+ getScanEffectConfig(): ScanEffect;
2045
+ /**
2046
+ * Add a new Layer.
2047
+ * @param layer - new layer
2048
+ * @param index - index to insert
2049
+ * @returns {GroupGLLayer} this
2050
+ */
2051
+ addLayer(layer: maptalks.Layer, index?: number): this;
2052
+ removeLayer(layer: maptalks.Layer): this;
2053
+ clearLayers(): this;
2054
+ getPolygonOffsetCount(): number;
2055
+ /**
2056
+ * Get children TileLayer
2057
+ * @returns {TileLayer[]}
2058
+ */
2059
+ getLayers(): maptalks.Layer[];
2060
+ /**
2061
+ * 导出GroupGLLayer的序列化JSON对象,可以用于反序列化为一个GroupGLLayer对象。
2062
+ * @english
2063
+ * Export the GroupGLLayer's profile json. <br>
2064
+ * Layer's profile is a snapshot of the layer in JSON format. <br>
2065
+ * It can be used to reproduce the instance by [fromJSON]{@link Layer#fromJSON} method
2066
+ * @return layer's profile JSON
2067
+ */
2068
+ toJSON(): LayerJSONType;
2069
+ onLoadEnd(): void;
2070
+ onRemove(): void;
2071
+ getChildLayer(id: string): maptalks.Layer | null;
2072
+ getLayer(id: string): maptalks.Layer | null;
2073
+ addAnalysis(analysis: Analysis): void;
2074
+ removeAnalysis(analysis: Analysis): void;
2075
+ clearAnalysis(): void;
2076
+ /**
2077
+ * 查询给定坐标上的数据要素
2078
+ *
2079
+ * @english
2080
+ * Identify the geometries on the given coordinate
2081
+ * @param coordinate - coordinate to identify
2082
+ * @param options - options
2083
+ * @return
2084
+ */
2085
+ identify(coordinate: maptalks.Coordinate, options: object): any[];
2086
+ /**
2087
+ * 查询给定容器坐标(containerPoint)上的数据要素
2088
+ * @english
2089
+ * Identify the data at the given point
2090
+ * @param point - container point to identify
2091
+ * @param options - the identify options
2092
+ **/
2093
+ identifyAtPoint(point: maptalks.Point, options?: any): any[];
2094
+ getTerrain(): TerrainOptions | undefined | null;
2095
+ setTerrain(info: TerrainOptions | null): this;
2096
+ removeTerrain(): this;
2097
+ updateTerrainMaterial(mat: object): void;
2098
+ queryTerrain(coord: maptalks.Coordinate, out: QueryHitResult): QueryHitResult;
2099
+ queryTerrainAtPoint(containerPoint: maptalks.Point): any;
2100
+ query3DTilesAtPoint(containerPoint: maptalks.Point): maptalks.Coordinate;
2101
+ _queryRayCast(containerPoint: maptalks.Point, meshes: any[]): any;
2102
+ queryTerrainByProjCoord(projCoord: maptalks.Coordinate, out: QueryHitResult): QueryHitResult;
2103
+ getTerrainLayer(): TerrainLayer | undefined;
2104
+ fire(...args: any[]): void;
2105
+ }
2106
+ type TerrainOptions = {
2107
+ type: 'mapbox' | 'tianditu' | 'cesium' | 'cesium-ion';
2108
+ urlTemplate: string;
2109
+ spatialReference?: string;
2110
+ shader?: 'lit' | 'default';
2111
+ subdomains?: string[];
2112
+ tileSystem?: number[];
2113
+ tileSize?: number;
2114
+ zoomOffset?: number;
2115
+ requireSkuToken?: boolean;
2116
+ depthMask?: boolean;
2117
+ depthFunc?: ComparisonOperatorType;
2118
+ blendSrc?: BlendingFunction;
2119
+ blendDst?: BlendingFunction;
2120
+ material?: object;
2121
+ masks?: Mask[];
2122
+ };
2123
+ type QueryHitResult = [number | null, 0 | 1];
2124
+ type GroupGLLayerOptions = {
2125
+ renderer?: 'gl';
2126
+ antialias?: true;
2127
+ extensions?: string[];
2128
+ single?: boolean;
2129
+ onlyWebGL1?: boolean;
2130
+ optionalExtensions?: string[];
2131
+ forceRenderOnZooming?: true;
2132
+ forceRenderOnMoving?: true;
2133
+ forceRenderOnRotating?: true;
2134
+ viewMoveThreshold?: number;
2135
+ geometryEvents?: boolean;
2136
+ multiSamples?: number;
2137
+ forceRedrawPerFrame?: boolean;
2138
+ sceneConfig?: GroupGLLayerSceneConfig;
2139
+ terrain?: TerrainOptions;
2140
+ };
2141
+ declare enum SkyboxMode {
2142
+ AMBIENT = 0,
2143
+ REALISTIC = 1
2144
+ }
2145
+ type SceneEnvironment = {
2146
+ enable: boolean;
2147
+ mode?: SkyboxMode;
2148
+ level?: 0 | 1 | 2 | 3;
2149
+ brightness?: number;
2150
+ };
2151
+ type SceneGround = {
2152
+ enable?: boolean;
2153
+ renderPlugin: {
2154
+ type: 'lit' | 'fill';
2155
+ };
2156
+ symbol: {
2157
+ ssr?: true;
2158
+ material?: any;
2159
+ polygonFill?: number[];
2160
+ polygonOpacity?: number;
2161
+ };
2162
+ };
2163
+ type SceneWeather = {
2164
+ enable?: boolean;
2165
+ fog?: {
2166
+ enable?: boolean;
2167
+ start?: number;
2168
+ end?: number;
2169
+ color?: number[];
2170
+ };
2171
+ rain?: {
2172
+ enable?: boolean;
2173
+ density?: number;
2174
+ windDirectionX?: number;
2175
+ windDirectionY?: number;
2176
+ rainTexture: string;
2177
+ };
2178
+ snow?: {
2179
+ enable?: boolean;
2180
+ };
2181
+ };
2182
+ type ScanEffectItem = {
2183
+ center: maptalks.Coordinate;
2184
+ radius: number;
2185
+ speed: number;
2186
+ color: number[];
2187
+ };
2188
+ type ScanEffect = {
2189
+ enable?: boolean;
2190
+ effects: ScanEffectItem[];
2191
+ };
2192
+ type SceneShadow = {
2193
+ enable?: boolean;
2194
+ type?: 'esm';
2195
+ quality?: 'low' | 'medium' | 'high';
2196
+ opacity?: number;
2197
+ color?: number[];
2198
+ blurOffset?: number;
2199
+ };
2200
+ type ScenePostProcess = {
2201
+ enable?: boolean;
2202
+ antialias?: {
2203
+ enable?: boolean;
2204
+ };
2205
+ ssr?: {
2206
+ enable?: boolean;
2207
+ };
2208
+ sharpen?: {
2209
+ enable?: boolean;
2210
+ factor?: number;
2211
+ };
2212
+ bloom?: {
2213
+ enable?: boolean;
2214
+ factor?: number;
2215
+ threshold?: number;
2216
+ radius?: number;
2217
+ };
2218
+ outline: {
2219
+ enable?: boolean;
2220
+ highlightFactor?: number;
2221
+ outlineFactor?: number;
2222
+ outlineWidth?: number;
2223
+ outlineColor?: number[];
2224
+ };
2225
+ scanEffect?: ScanEffect;
2226
+ };
2227
+ type GroupGLLayerSceneConfig = {
2228
+ environment?: SceneEnvironment;
2229
+ shadow?: SceneShadow;
2230
+ ground?: SceneGround;
2231
+ weather?: SceneWeather;
2232
+ postProcess?: ScenePostProcess;
2233
+ };
2234
+
2235
+ declare class GroundPainter {
2236
+ renderer: Renderer;
2237
+ static getGroundTransform(out: any, map: any): any;
2238
+ constructor(regl: any, layer: any);
2239
+ needToRedraw(): any;
2240
+ getMap(): any;
2241
+ getSymbol(): any;
2242
+ isEnable(): any;
2243
+ paint(context: any): boolean;
2244
+ _isInSSRPhase(context: any): boolean;
2245
+ update(): void;
2246
+ setToRedraw(): void;
2247
+ dispose(): void;
2248
+ _getShader(): any;
2249
+ _getUniformValues(context: any): any;
2250
+ _getCommonUniforms(context: any): any;
2251
+ _setIncludeUniformValues(uniforms: any, context: any): void;
2252
+ _disposeIblTextures(): void;
2253
+ _init(): void;
2254
+ _getExtraCommandProps(): {
2255
+ viewport: {
2256
+ x: number;
2257
+ y: number;
2258
+ width: () => any;
2259
+ height: () => any;
2260
+ };
2261
+ cull: {
2262
+ enable: boolean;
2263
+ };
2264
+ depth: {
2265
+ enable: boolean;
2266
+ mask: () => any;
2267
+ range: () => any;
2268
+ func: string;
2269
+ };
2270
+ blend: {
2271
+ enable: boolean;
2272
+ func: {
2273
+ src: string;
2274
+ dst: string;
2275
+ };
2276
+ equation: string;
2277
+ };
2278
+ polygonOffset: {
2279
+ enable: boolean;
2280
+ offset: {
2281
+ factor: (context: any, props: any) => any;
2282
+ units: (context: any, props: any) => any;
2283
+ };
2284
+ };
2285
+ };
2286
+ _hasIBL(): boolean;
2287
+ _createGround(): void;
2288
+ _transformGround(): void;
2289
+ _getGroundDefines(context: any): any;
2290
+ _updateMaterial(): void;
2291
+ _onMaterialComplete(): void;
2292
+ _createPatternTexture(image: any): any;
2293
+ _parseColor(c: any): any;
2294
+ _getUVOffsetAnim(): any;
2295
+ getRenderMeshes(): Mesh$1[];
2296
+ }
2297
+ //# sourceMappingURL=GroundPainter.d.ts.map
2298
+
2299
+ declare const canvasCompatible: <T extends maptalks.MixinConstructor>(Base: T) => {
2300
+ new (...args: any[]): {
2301
+ [x: string]: any;
2302
+ createContext(): void;
2303
+ clearContext(): void;
2304
+ };
2305
+ } & T;
2306
+ //# sourceMappingURL=CanvasCompatible.d.ts.map
2307
+
2308
+ declare function clearShowOnly(mesh: any): void;
2309
+ declare function showOnly(regl: any, mesh: any, items: any, timestamp: any, feaIdIndiceMap: any): void;
2310
+ declare function clearHighlight(mesh: any): void;
2311
+ declare function highlightMesh(regl: any, mesh: any, highlighted: any, timestamp: any, feaIdIndiceMap: any): void;
2312
+ declare function deleteHighlightBloomMesh(mesh: any): void;
2313
+
2314
+ declare const highlight_d_clearHighlight: typeof clearHighlight;
2315
+ declare const highlight_d_clearShowOnly: typeof clearShowOnly;
2316
+ declare const highlight_d_deleteHighlightBloomMesh: typeof deleteHighlightBloomMesh;
2317
+ declare const highlight_d_highlightMesh: typeof highlightMesh;
2318
+ declare const highlight_d_showOnly: typeof showOnly;
2319
+ declare namespace highlight_d {
2320
+ export { highlight_d_clearHighlight as clearHighlight, highlight_d_clearShowOnly as clearShowOnly, highlight_d_deleteHighlightBloomMesh as deleteHighlightBloomMesh, highlight_d_highlightMesh as highlightMesh, highlight_d_showOnly as showOnly };
2321
+ }
2322
+
2323
+ declare function fillIncludes(defines: any, uniformDeclares: any, context: any): void;
2324
+ declare function setIncludeUniformValues(uniforms: any, context: any): void;
2325
+
2326
+ declare const context_d_fillIncludes: typeof fillIncludes;
2327
+ declare const context_d_setIncludeUniformValues: typeof setIncludeUniformValues;
2328
+ declare namespace context_d {
2329
+ export { context_d_fillIncludes as fillIncludes, context_d_setIncludeUniformValues as setIncludeUniformValues };
2330
+ }
2331
+
2332
+ declare class HeatmapProcess {
2333
+ constructor(regl: any, sceneConfig: any, layer: any, colorStops: any, stencil: any, polygonOffset: any);
2334
+ renderer: Renderer;
2335
+ sceneConfig: any;
2336
+ _layer: any;
2337
+ _colorStops: any;
2338
+ _stencil: any;
2339
+ _polygonOffset: any;
2340
+ _outputSize: any[];
2341
+ render(scene: any, uniforms: any, fbo: any): number;
2342
+ dispose(): void;
2343
+ _createColorRamp(): void;
2344
+ _rampCanvas: HTMLCanvasElement;
2345
+ _rampCtx: CanvasRenderingContext2D;
2346
+ _colorRampTex: any;
2347
+ _check(): void;
2348
+ _init(): void;
2349
+ _createGround(): void;
2350
+ _ground: Mesh$1;
2351
+ _groundScene: Scene;
2352
+ _transformGround(): void;
2353
+ _createHeatmapTex(): void;
2354
+ _heatmapFBO: any;
2355
+ _createShader(): void;
2356
+ _heatmapShader: HeatmapShader;
2357
+ _displayShader: HeatmapDisplayShader;
2358
+ }
2359
+
2360
+ declare function export_default<T extends MixinConstructor>(Base: T): {
2361
+ new (...args: any[]): {
2362
+ _maskProjViewMatrix: mat4;
2363
+ _maskExtentInWorld: [number, number, number, number];
2364
+ removeMask(masks: undefined | null | any): any;
2365
+ setMask(masks: any): any;
2366
+ onAdd(): void;
2367
+ getMasks(): any;
2368
+ onGeometryEvent(param: any): void;
2369
+ identifyMask(point: any, options: any): any[];
2370
+ remove(): void;
2371
+ updateMask(extent: any): {
2372
+ projViewMatrix: mat4;
2373
+ extentInWorld: [number, number, number, number];
2374
+ };
2375
+ getProjViewMatrixInOrtho(extent: any): {
2376
+ mapExtent: any;
2377
+ projViewMatrix: mat4;
2378
+ };
2379
+ updateMaskExtent(): void;
2380
+ getMaskExtent(): {
2381
+ extent: Extent;
2382
+ ratio: number;
2383
+ minHeight: any;
2384
+ };
2385
+ };
2386
+ } & T;
2387
+
2388
+ declare function _default(Base: any): {
2389
+ new (): {
2390
+ [x: string]: any;
2391
+ setMask(extent: any, projViewMatrix: any, ratio: any, minHeight: any): void;
2392
+ viewport: {
2393
+ x: number;
2394
+ y: number;
2395
+ width: () => any;
2396
+ height: () => any;
2397
+ };
2398
+ _extentPass: ExtentPass;
2399
+ needToRedraw(): boolean;
2400
+ getMaskUniforms(): any;
2401
+ getMaskDefines(): {};
2402
+ _maskDefines: {};
2403
+ updateMaskDefines(mesh: any): void;
2404
+ _clearMask(): void;
2405
+ _deleteMaskUniforms(): void;
2406
+ };
2407
+ [x: string]: any;
2408
+ };
2409
+
2410
+ declare class ClipMask extends Mask {
2411
+ constructor(coordinates: any, options: any);
2412
+ _createMesh(regl: any): Mesh$1;
2413
+ _updateUniforms(mesh: any, ratio: any, minHeight: any): void;
2414
+ setHeightRange(heightRange: any): void;
2415
+ getHeightRange(): any;
2416
+ _getHeightRange(): number[];
2417
+ _setDefines(mesh: any): void;
2418
+ }
2419
+
2420
+ declare class ClipInsideMask extends ClipMask {
2421
+ _mode: string;
2422
+ }
2423
+
2424
+ declare class ClipOutsideMask extends ClipMask {
2425
+ _mode: string;
2426
+ }
2427
+
2428
+ declare class FlatMask extends Mask {
2429
+ constructor(coordinates: any, options: any);
2430
+ setFlatheight(flatHeight: any): void;
2431
+ _createMesh(regl: any): Mesh$1;
2432
+ _updateUniforms(mesh: any): void;
2433
+ _setDefines(mesh: any): void;
2434
+ _getHeightRange(): any[];
2435
+ }
2436
+
2437
+ declare class FlatInsideMask$1 extends FlatMask {
2438
+ _mode: string;
2439
+ }
2440
+
2441
+ declare class FlatInsideMask extends FlatMask {
2442
+ _mode: string;
2443
+ }
2444
+
2445
+ declare class ColorMask extends Mask {
2446
+ constructor(coordinates: any, options: any);
2447
+ _mode: string;
2448
+ setHeightRange(heightRange: any): void;
2449
+ _createMesh(regl: any): Mesh$1;
2450
+ _updateUniforms(mesh: any, ratio: any, minHeight: any): void;
2451
+ _setDefines(mesh: any): void;
2452
+ _getHeightRange(): number[];
2453
+ }
2454
+
2455
+ declare class VideoMask extends Mask {
2456
+ constructor(coordinates: any, options: any);
2457
+ _mode: string;
2458
+ play(): void;
2459
+ pause(): void;
2460
+ setAudio(audio: any): void;
2461
+ setUrl(url: any): void;
2462
+ getState(): string;
2463
+ _createMesh(regl: any): Mesh$1;
2464
+ _copyMesh: Mesh$1;
2465
+ _updateUniforms(mesh: any): void;
2466
+ _setDefines(mesh: any): void;
2467
+ _createVideoTexture(regl: any): any;
2468
+ _createVideo(): void;
2469
+ _videoState: string;
2470
+ _video: HTMLElement;
2471
+ _update(): void;
2472
+ _needUpdate(): boolean;
2473
+ }
2474
+
2475
+ declare class ImageMask extends Mask {
2476
+ /**
2477
+ * @param {Object} options.url image resource url
2478
+ */
2479
+ constructor(coordinates: any, options: any);
2480
+ _mode: string;
2481
+ setUrl(url: any): void;
2482
+ _createMesh(regl: any): Mesh$1;
2483
+ _copyMesh: Mesh$1;
2484
+ _updateUniforms(mesh: any): void;
2485
+ _setDefines(mesh: any): void;
2486
+ _createTexture(imageTexture: any): void;
2487
+ getBBox(): [vec3, vec3];
2488
+ }
2489
+
2490
+ declare class ElevateMask extends FlatMask {
2491
+ _mode: string;
2492
+ setElevation(elevation: any): void;
2493
+ }
2494
+
2495
+ declare class BoxClipMask extends ClipMask {
2496
+ _position: any;
2497
+ setPosition(position: any): void;
2498
+ getPosition(): any;
2499
+ setWidth(width: any): void;
2500
+ setLength(length: any): void;
2501
+ setHeight(height: any): void;
2502
+ setRotation(rotation: any): void;
2503
+ _updateCoordinates(): void;
2504
+ _generateCoordinates(map: any, center: any, length: any, width: any, height: any, rotation: any): {
2505
+ coordinates: any[][];
2506
+ heightRange: any[];
2507
+ };
2508
+ _rotatePoint(points: any, center: any, rotation: any): any;
2509
+ }
2510
+
2511
+ declare class BoxInsideClipper extends BoxClipMask {
2512
+ _mode: string;
2513
+ }
2514
+
2515
+ declare class BoxOutsideClipper extends BoxClipMask {
2516
+ _mode: string;
2517
+ }
2518
+
2519
+ declare class RayCaster {
2520
+ constructor(from: any, to: any, isLngLat?: boolean);
2521
+ _from: any;
2522
+ _to: any;
2523
+ _isLngLat: boolean;
2524
+ setFromPoint(from: any): void;
2525
+ setToPoint(to: any): void;
2526
+ test(meshes: any, map: any, options?: {}): {
2527
+ mesh: any;
2528
+ coordinates: {
2529
+ coordinate: any;
2530
+ indices: any[];
2531
+ normal: vec3;
2532
+ }[];
2533
+ }[];
2534
+ _testMesh(mesh: any, ray: any, map: any, positions: any, altitudes: any, indices: any, dim: any, matrix: any, count: any): {
2535
+ coordinate: any;
2536
+ indices: any[];
2537
+ normal: vec3;
2538
+ }[];
2539
+ _toWorldPosition(out: any, map: any, pos: any, altitude: any, matrix: any): any;
2540
+ _testIntersection(out: any, triangle: any, ray: any): any;
2541
+ _checkBBox(bbox: any, ray: any): any;
2542
+ }
2543
+
2544
+ declare class Measure3DTool extends maptalks.DrawTool {
2545
+ constructor(options: any);
2546
+ _drawCoordinates: any[];
2547
+ addTo(map: any): this;
2548
+ _map: any;
2549
+ _addHelperLayer(): void;
2550
+ _afterEnable(): void;
2551
+ _afterDisable(): void;
2552
+ _getPickedCoordinate(e: any): any;
2553
+ _msOnDrawStart(e: any): void;
2554
+ _first: boolean;
2555
+ _msOnDrawVertex(e: any): void;
2556
+ _msOnMouseMove(e: any): void;
2557
+ _msOnDrawEnd(e: any): void;
2558
+ _drawEnd(): void;
2559
+ _helperGeometry: any;
2560
+ _label: any;
2561
+ remove(): void;
2562
+ clear(): void;
2563
+ }
2564
+
2565
+ declare class Distance3DTool extends Measure3DTool {
2566
+ _helperLayer: maptalks.DrawToolLayer;
2567
+ _markerLayer: maptalks.DrawToolLayer;
2568
+ _drawVertexMarker(): void;
2569
+ _drawLabel(): void;
2570
+ _getUnitContent(length: any): string;
2571
+ _measure: any;
2572
+ _units: string;
2573
+ _addHelperGeometry(coordinate: any): void;
2574
+ getMeasureResult(): any;
2575
+ }
2576
+
2577
+ declare class Area3DTool extends Measure3DTool {
2578
+ _helperLayer: maptalks.DrawToolLayer;
2579
+ _markerLayer: maptalks.DrawToolLayer;
2580
+ _drawVertexMarker(): void;
2581
+ _getPolygonCoordinates(coordinates: any): any;
2582
+ _drawLabel(): void;
2583
+ _getUnitContent(area: any): string;
2584
+ _measure: any;
2585
+ _units: string;
2586
+ _addHelperGeometry(coordinate: any): void;
2587
+ _polygon: maptalks.Polygon;
2588
+ getMeasureResult(): number;
2589
+ }
2590
+
2591
+ declare class Height3DTool extends Measure3DTool {
2592
+ _helperLayer: maptalks.DrawToolLayer;
2593
+ _markerLayer: maptalks.DrawToolLayer;
2594
+ _drawVertexMarker(): void;
2595
+ _drawLabel(coordinates: any, distances: any): void;
2596
+ _getUnitContent(length: any): string;
2597
+ _measure: any;
2598
+ _units: string;
2599
+ _addHelperGeometry(coordinate: any): void;
2600
+ getMeasureResult(): any;
2601
+ }
2602
+
2603
+ export { Area3DTool, BoxInsideClipper as BoxInsideClipMask, BoxOutsideClipper as BoxOutsideClipMask, canvasCompatible as CanvasCompatible, ClipInsideMask, ClipOutsideMask, ColorMask, context_d as ContextUtil, Distance3DTool, ElevateMask, FlatInsideMask$1 as FlatInsideMask, FlatInsideMask as FlatOutsideMask, GroundPainter, GroupGLLayer, HeatmapProcess, Height3DTool, highlight_d as HighlightUtil, ImageMask, export_default as MaskLayerMixin, _default as MaskRendererMixin, Measure3DTool, RayCaster, VideoMask, index_d as reshader };