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