ol 10.1.1-dev.1724341529501 → 10.1.1-dev.1724487165147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ol.d.ts +4 -0
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/layer/Flow.d.ts +199 -0
- package/layer/Flow.d.ts.map +1 -0
- package/layer/Flow.js +504 -0
- package/layer/WebGLTile.d.ts +5 -1
- package/layer/WebGLTile.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/webgl/FlowLayer.d.ts +247 -0
- package/renderer/webgl/FlowLayer.d.ts.map +1 -0
- package/renderer/webgl/FlowLayer.js +496 -0
- package/renderer/webgl/TileLayer.d.ts +7 -5
- package/renderer/webgl/TileLayer.d.ts.map +1 -1
- package/renderer/webgl/TileLayer.js +3 -3
- package/renderer/webgl/TileLayerBase.d.ts +5 -0
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
- package/renderer/webgl/TileLayerBase.js +9 -0
- package/util.js +1 -1
- package/webgl/Buffer.d.ts +5 -1
- package/webgl/Buffer.d.ts.map +1 -1
- package/webgl/Buffer.js +12 -1
- package/webgl/Helper.d.ts +22 -5
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +81 -18
- package/webgl/PostProcessingPass.d.ts +3 -0
- package/webgl/PostProcessingPass.d.ts.map +1 -1
- package/webgl/PostProcessingPass.js +7 -0
package/webgl/Helper.d.ts
CHANGED
|
@@ -408,6 +408,15 @@ declare class WebGLHelper extends Disposable {
|
|
|
408
408
|
* @param {boolean} [enableDepth] If true, enables depth testing.
|
|
409
409
|
*/
|
|
410
410
|
prepareDraw(frameState: import("../Map.js").FrameState, disableAlphaBlend?: boolean | undefined, enableDepth?: boolean | undefined): void;
|
|
411
|
+
/**
|
|
412
|
+
* @param {WebGLFramebuffer|null} frameBuffer The frame buffer.
|
|
413
|
+
* @param {WebGLTexture} [texture] The texture.
|
|
414
|
+
*/
|
|
415
|
+
bindFrameBuffer(frameBuffer: WebGLFramebuffer | null, texture?: WebGLTexture | undefined): void;
|
|
416
|
+
/**
|
|
417
|
+
* Bind the frame buffer from the initial render.
|
|
418
|
+
*/
|
|
419
|
+
bindInitialFrameBuffer(): void;
|
|
411
420
|
/**
|
|
412
421
|
* Prepare a program to use a texture.
|
|
413
422
|
* @param {WebGLTexture} texture The texture.
|
|
@@ -415,6 +424,13 @@ declare class WebGLHelper extends Disposable {
|
|
|
415
424
|
* @param {string} uniformName The corresponding uniform name.
|
|
416
425
|
*/
|
|
417
426
|
bindTexture(texture: WebGLTexture, slot: number, uniformName: string): void;
|
|
427
|
+
/**
|
|
428
|
+
* Set up an attribute array buffer for use in the vertex shader.
|
|
429
|
+
* @param {import("./Buffer").default} buffer The buffer.
|
|
430
|
+
* @param {string} attributeName The attribute name.
|
|
431
|
+
* @param {number} size The number of components per attribute vertex.
|
|
432
|
+
*/
|
|
433
|
+
bindAttribute(buffer: import("./Buffer").default, attributeName: string, size: number): void;
|
|
418
434
|
/**
|
|
419
435
|
* Clear the render target & bind it for future draw operations.
|
|
420
436
|
* This is similar to `prepareDraw`, only post processes will not be applied.
|
|
@@ -466,9 +482,9 @@ declare class WebGLHelper extends Disposable {
|
|
|
466
482
|
* Set up a program for use. The program will be set as the current one. Then, the uniforms used
|
|
467
483
|
* in the program will be set based on the current frame state and the helper configuration.
|
|
468
484
|
* @param {WebGLProgram} program Program.
|
|
469
|
-
* @param {import("../Map.js").FrameState} frameState Frame state.
|
|
485
|
+
* @param {import("../Map.js").FrameState} [frameState] Frame state.
|
|
470
486
|
*/
|
|
471
|
-
useProgram(program: WebGLProgram, frameState
|
|
487
|
+
useProgram(program: WebGLProgram, frameState?: import("../Map.js").FrameState | undefined): void;
|
|
472
488
|
/**
|
|
473
489
|
* Will attempt to compile a vertex or fragment shader based on source
|
|
474
490
|
* On error, the shader will be returned but
|
|
@@ -567,14 +583,15 @@ declare class WebGLHelper extends Disposable {
|
|
|
567
583
|
/**
|
|
568
584
|
* Will create or reuse a given webgl texture and apply the given size. If no image data
|
|
569
585
|
* specified, the texture will be empty, otherwise image data will be used and the `size`
|
|
570
|
-
* parameter will be ignored.
|
|
586
|
+
* parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.
|
|
571
587
|
* Note: wrap parameters are set to clamp to edge, min filter is set to linear.
|
|
572
588
|
* @param {Array<number>} size Expected size of the texture
|
|
573
|
-
* @param {ImageData|HTMLImageElement|HTMLCanvasElement}
|
|
589
|
+
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture
|
|
574
590
|
* @param {WebGLTexture} [texture] Existing texture to reuse
|
|
591
|
+
* @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.
|
|
575
592
|
* @return {WebGLTexture} The generated texture
|
|
576
593
|
*/
|
|
577
|
-
createTexture(size: Array<number>, data
|
|
594
|
+
createTexture(size: Array<number>, data: ImageData | HTMLImageElement | HTMLCanvasElement | Uint8Array | null, texture?: WebGLTexture | undefined, nearest?: boolean | undefined): WebGLTexture;
|
|
578
595
|
}
|
|
579
596
|
import Disposable from '../Disposable.js';
|
|
580
597
|
//# sourceMappingURL=Helper.d.ts.map
|
package/webgl/Helper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Helper.d.ts","sourceRoot":"","sources":["Helper.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Helper.d.ts","sourceRoot":"","sources":["Helper.js"],"names":[],"mappings":"AA6qCA;;;;GAIG;AACH,oDAHW,KAAK,CAAC,oBAAoB,CAAC,GAC1B,MAAM,CASjB;;;;yBA5pCS,MAAM;;;;;;;;;6BAUN,MAAM;;;;;;;;;;;;;;;;4BAiBN,MAAM;;;;;;;;;;;;YAjCF,OAAO,aAAa,EAAE,OAAO;;;;iBAC7B,WAAW;;;;;;;;;UA4CX,MAAM;;;;UACN,MAAM;;;;;;;;kCAOP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MAAM,GACL,YAAY,CA4CvB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACL,oBAAoB,CAY/B;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACL,MAAM,CAYjB;IAED;;;;;;OAMG;IACH,oCAJW,OAAO,WAAW,EAAE,UAAU,aAC9B,OAAO,cAAc,EAAE,SAAS,GAC/B,OAAO,cAAc,EAAE,SAAS,CAkB3C;IAED;;;;OAIG;IACH,8BAHW,MAAM,SACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,6BAHW,MAAM,SACN,KAAK,CAAC,MAAM,CAAC,QAIvB;IAED;;;;OAIG;IACH,6BAHW,MAAM,SACN,KAAK,CAAC,MAAM,CAAC,QAIvB;IAED;;;;OAIG;IACH,+BAHW,MAAM,SACN,KAAK,CAAC,MAAM,CAAC,QAIvB;IAED;;;;;;;;;OASG;IACH,8BAQC;IAED;;;;;OAKG;IACH,6BAFW,KAAK,CAAC,oBAAoB,CAAC,QAgBrC;IAED;;;;OAIG;IACH,+BAKC;IAED;;;OAGG;IACH,mCAEC;IAED;;;OAGG;IACH,sBAFY,OAAO,CAIlB;IAED;;;;;;;;;;OAUG;IACH,oBANW,KAAK,CAAC,MAAM,CAAC,QACb,SAAS,GAAC,gBAAgB,GAAC,iBAAiB,GAAC,UAAU,GAAC,IAAI,sEAG3D,YAAY,CAgDvB;CACF;uBAvqCsB,kBAAkB"}
|
package/webgl/Helper.js
CHANGED
|
@@ -527,12 +527,8 @@ class WebGLHelper extends Disposable {
|
|
|
527
527
|
* @param {import("./Buffer.js").default} buf Buffer.
|
|
528
528
|
*/
|
|
529
529
|
deleteBuffer(buf) {
|
|
530
|
-
const gl = this.gl_;
|
|
531
530
|
const bufferKey = getUid(buf);
|
|
532
|
-
|
|
533
|
-
if (bufferCacheEntry && !gl.isContextLost()) {
|
|
534
|
-
gl.deleteBuffer(bufferCacheEntry.webGlBuffer);
|
|
535
|
-
}
|
|
531
|
+
// Note: gl.deleteBuffer is not called here since we let WebGL garbage collect it automatically
|
|
536
532
|
delete this.bufferCache_[bufferKey];
|
|
537
533
|
}
|
|
538
534
|
|
|
@@ -602,6 +598,41 @@ class WebGLHelper extends Disposable {
|
|
|
602
598
|
}
|
|
603
599
|
}
|
|
604
600
|
|
|
601
|
+
/**
|
|
602
|
+
* @param {WebGLFramebuffer|null} frameBuffer The frame buffer.
|
|
603
|
+
* @param {WebGLTexture} [texture] The texture.
|
|
604
|
+
*/
|
|
605
|
+
bindFrameBuffer(frameBuffer, texture) {
|
|
606
|
+
const gl = this.getGL();
|
|
607
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
|
|
608
|
+
if (texture) {
|
|
609
|
+
gl.framebufferTexture2D(
|
|
610
|
+
gl.FRAMEBUFFER,
|
|
611
|
+
gl.COLOR_ATTACHMENT0,
|
|
612
|
+
gl.TEXTURE_2D,
|
|
613
|
+
texture,
|
|
614
|
+
0,
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Bind the frame buffer from the initial render.
|
|
621
|
+
*/
|
|
622
|
+
bindInitialFrameBuffer() {
|
|
623
|
+
const gl = this.getGL();
|
|
624
|
+
const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();
|
|
625
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
|
|
626
|
+
const texture = this.postProcessPasses_[0].getRenderTargetTexture();
|
|
627
|
+
gl.framebufferTexture2D(
|
|
628
|
+
gl.FRAMEBUFFER,
|
|
629
|
+
gl.COLOR_ATTACHMENT0,
|
|
630
|
+
gl.TEXTURE_2D,
|
|
631
|
+
texture,
|
|
632
|
+
0,
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
|
|
605
636
|
/**
|
|
606
637
|
* Prepare a program to use a texture.
|
|
607
638
|
* @param {WebGLTexture} texture The texture.
|
|
@@ -615,6 +646,20 @@ class WebGLHelper extends Disposable {
|
|
|
615
646
|
gl.uniform1i(this.getUniformLocation(uniformName), slot);
|
|
616
647
|
}
|
|
617
648
|
|
|
649
|
+
/**
|
|
650
|
+
* Set up an attribute array buffer for use in the vertex shader.
|
|
651
|
+
* @param {import("./Buffer").default} buffer The buffer.
|
|
652
|
+
* @param {string} attributeName The attribute name.
|
|
653
|
+
* @param {number} size The number of components per attribute vertex.
|
|
654
|
+
*/
|
|
655
|
+
bindAttribute(buffer, attributeName, size) {
|
|
656
|
+
const gl = this.getGL();
|
|
657
|
+
this.bindBuffer(buffer);
|
|
658
|
+
const index = this.getAttributeLocation(attributeName);
|
|
659
|
+
gl.enableVertexAttribArray(index);
|
|
660
|
+
gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);
|
|
661
|
+
}
|
|
662
|
+
|
|
618
663
|
/**
|
|
619
664
|
* Clear the render target & bind it for future draw operations.
|
|
620
665
|
* This is similar to `prepareDraw`, only post processes will not be applied.
|
|
@@ -846,14 +891,16 @@ class WebGLHelper extends Disposable {
|
|
|
846
891
|
* Set up a program for use. The program will be set as the current one. Then, the uniforms used
|
|
847
892
|
* in the program will be set based on the current frame state and the helper configuration.
|
|
848
893
|
* @param {WebGLProgram} program Program.
|
|
849
|
-
* @param {import("../Map.js").FrameState} frameState Frame state.
|
|
894
|
+
* @param {import("../Map.js").FrameState} [frameState] Frame state.
|
|
850
895
|
*/
|
|
851
896
|
useProgram(program, frameState) {
|
|
852
897
|
const gl = this.gl_;
|
|
853
898
|
gl.useProgram(program);
|
|
854
899
|
this.currentProgram_ = program;
|
|
855
|
-
|
|
856
|
-
|
|
900
|
+
if (frameState) {
|
|
901
|
+
this.applyFrameState(frameState);
|
|
902
|
+
this.applyUniforms(frameState);
|
|
903
|
+
}
|
|
857
904
|
}
|
|
858
905
|
|
|
859
906
|
/**
|
|
@@ -1091,25 +1138,45 @@ class WebGLHelper extends Disposable {
|
|
|
1091
1138
|
/**
|
|
1092
1139
|
* Will create or reuse a given webgl texture and apply the given size. If no image data
|
|
1093
1140
|
* specified, the texture will be empty, otherwise image data will be used and the `size`
|
|
1094
|
-
* parameter will be ignored.
|
|
1141
|
+
* parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.
|
|
1095
1142
|
* Note: wrap parameters are set to clamp to edge, min filter is set to linear.
|
|
1096
1143
|
* @param {Array<number>} size Expected size of the texture
|
|
1097
|
-
* @param {ImageData|HTMLImageElement|HTMLCanvasElement}
|
|
1144
|
+
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture
|
|
1098
1145
|
* @param {WebGLTexture} [texture] Existing texture to reuse
|
|
1146
|
+
* @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.
|
|
1099
1147
|
* @return {WebGLTexture} The generated texture
|
|
1100
1148
|
*/
|
|
1101
|
-
createTexture(size, data, texture) {
|
|
1149
|
+
createTexture(size, data, texture, nearest) {
|
|
1102
1150
|
const gl = this.gl_;
|
|
1103
1151
|
texture = texture || gl.createTexture();
|
|
1152
|
+
const filter = nearest ? gl.NEAREST : gl.LINEAR;
|
|
1153
|
+
|
|
1154
|
+
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
1155
|
+
|
|
1156
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);
|
|
1157
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);
|
|
1158
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
1159
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
1104
1160
|
|
|
1105
|
-
// set params & size
|
|
1106
1161
|
const level = 0;
|
|
1107
1162
|
const internalFormat = gl.RGBA;
|
|
1108
1163
|
const border = 0;
|
|
1109
1164
|
const format = gl.RGBA;
|
|
1110
1165
|
const type = gl.UNSIGNED_BYTE;
|
|
1111
|
-
|
|
1112
|
-
if (data) {
|
|
1166
|
+
|
|
1167
|
+
if (data instanceof Uint8Array) {
|
|
1168
|
+
gl.texImage2D(
|
|
1169
|
+
gl.TEXTURE_2D,
|
|
1170
|
+
level,
|
|
1171
|
+
internalFormat,
|
|
1172
|
+
size[0],
|
|
1173
|
+
size[1],
|
|
1174
|
+
border,
|
|
1175
|
+
format,
|
|
1176
|
+
type,
|
|
1177
|
+
data,
|
|
1178
|
+
);
|
|
1179
|
+
} else if (data) {
|
|
1113
1180
|
gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);
|
|
1114
1181
|
} else {
|
|
1115
1182
|
gl.texImage2D(
|
|
@@ -1124,10 +1191,6 @@ class WebGLHelper extends Disposable {
|
|
|
1124
1191
|
null,
|
|
1125
1192
|
);
|
|
1126
1193
|
}
|
|
1127
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
1128
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
1129
|
-
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
1130
|
-
|
|
1131
1194
|
return texture;
|
|
1132
1195
|
}
|
|
1133
1196
|
}
|
|
@@ -115,10 +115,12 @@ declare class WebGLPostProcessingPass {
|
|
|
115
115
|
*/
|
|
116
116
|
private scaleRatio_;
|
|
117
117
|
/**
|
|
118
|
+
* @type {WebGLTexture}
|
|
118
119
|
* @private
|
|
119
120
|
*/
|
|
120
121
|
private renderTargetTexture_;
|
|
121
122
|
/**
|
|
123
|
+
* @type {import('../size.js').Size|null}
|
|
122
124
|
* @private
|
|
123
125
|
*/
|
|
124
126
|
private renderTargetTextureSize_;
|
|
@@ -160,6 +162,7 @@ declare class WebGLPostProcessingPass {
|
|
|
160
162
|
* @private
|
|
161
163
|
*/
|
|
162
164
|
private uniforms_;
|
|
165
|
+
getRenderTargetTexture(): WebGLTexture;
|
|
163
166
|
/**
|
|
164
167
|
* Get the WebGL rendering context
|
|
165
168
|
* @return {WebGLRenderingContext} The rendering context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostProcessingPass.d.ts","sourceRoot":"","sources":["PostProcessingPass.js"],"names":[],"mappings":";;;;;kBAqCc,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;WAUrB,OAAO,UAAU,EAAE,YAAY;;;;cAC/B,oBAAoB;;;;;;AAblC;;;;;;;;GAQG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,
|
|
1
|
+
{"version":3,"file":"PostProcessingPass.d.ts","sourceRoot":"","sources":["PostProcessingPass.js"],"names":[],"mappings":";;;;;kBAqCc,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;WAUrB,OAAO,UAAU,EAAE,YAAY;;;;cAC/B,oBAAoB;;;;;;AAblC;;;;;;;;GAQG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAgHjB;IA7GC;;OAEG;IACH,YAA+B;IAG/B;;OAEG;IACH,oBAA0C;IAE1C;;;OAGG;IACH,6BAA8C;IAE9C;;;OAGG;IACH,iCAAoC;IAEpC;;OAEG;IACH,qBAA0C;IAC1C;;OAEG;IACH,qBAA2C;IAgB3C;;OAEG;IACH,6BAA8C;IAM9C;;OAEG;IACH,oCAAoD;IASpD;;OAEG;IACH,oCAGC;IACD;;OAEG;IACH,qCAGC;IACD;;OAEG;IACH,qCAGC;IACD;;OAEG;IACH,qCAGC;IAED;;;;OAIG;IACH,kBAAmB;IAUrB,uCAEC;IAED;;;OAGG;IACH,SAFY,qBAAqB,CAIhC;IAED;;;;;OAKG;IACH,iBAFW,OAAO,WAAW,EAAE,UAAU,QAoExC;IAED;;;;;;OAMG;IACH,kBALW,OAAO,WAAW,EAAE,UAAU,uEAErB,qBAAqB,QAAE,OAAO,WAAW,EAAE,UAAU,KAAE,IAAI,qCAC3D,qBAAqB,QAAE,OAAO,WAAW,EAAE,UAAU,KAAE,IAAI,qBA6D9E;IAED;;OAEG;IACH,kBAFY,gBAAgB,CAI3B;IAED;;OAEG;IACH,kBAFY,iBAAiB,CAI5B;IAED;;;;OAIG;IACH,sBAwEC;CACF"}
|
|
@@ -115,10 +115,13 @@ class WebGLPostProcessingPass {
|
|
|
115
115
|
this.scaleRatio_ = options.scaleRatio || 1;
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
+
* @type {WebGLTexture}
|
|
118
119
|
* @private
|
|
119
120
|
*/
|
|
120
121
|
this.renderTargetTexture_ = gl.createTexture();
|
|
122
|
+
|
|
121
123
|
/**
|
|
124
|
+
* @type {import('../size.js').Size|null}
|
|
122
125
|
* @private
|
|
123
126
|
*/
|
|
124
127
|
this.renderTargetTextureSize_ = null;
|
|
@@ -211,6 +214,10 @@ class WebGLPostProcessingPass {
|
|
|
211
214
|
});
|
|
212
215
|
}
|
|
213
216
|
|
|
217
|
+
getRenderTargetTexture() {
|
|
218
|
+
return this.renderTargetTexture_;
|
|
219
|
+
}
|
|
220
|
+
|
|
214
221
|
/**
|
|
215
222
|
* Get the WebGL rendering context
|
|
216
223
|
* @return {WebGLRenderingContext} The rendering context.
|