ol 10.6.2-dev.1750922991910 → 10.6.2-dev.1751277211647
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 +0 -2
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/layer/WebGLVectorTile.d.ts.map +1 -1
- package/layer/WebGLVectorTile.js +1 -0
- package/package.json +1 -1
- package/render/webgl/VectorStyleRenderer.d.ts +64 -111
- package/render/webgl/VectorStyleRenderer.d.ts.map +1 -1
- package/render/webgl/VectorStyleRenderer.js +268 -287
- package/render/webgl/style.d.ts +0 -15
- package/render/webgl/style.d.ts.map +1 -1
- package/render/webgl/style.js +0 -72
- package/renderer/webgl/TileLayerBase.d.ts.map +1 -1
- package/renderer/webgl/TileLayerBase.js +1 -4
- package/renderer/webgl/VectorLayer.d.ts +13 -12
- package/renderer/webgl/VectorLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorLayer.js +38 -53
- package/renderer/webgl/VectorTileLayer.d.ts +10 -10
- package/renderer/webgl/VectorTileLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorTileLayer.js +38 -57
- package/util.js +1 -1
- package/webgl/Helper.d.ts +2 -2
- package/webgl/Helper.d.ts.map +1 -1
- package/webgl/Helper.js +11 -8
- package/webgl/TileGeometry.d.ts +5 -10
- package/webgl/TileGeometry.d.ts.map +1 -1
- package/webgl/TileGeometry.js +28 -44
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLVectorTile.d.ts","sourceRoot":"","sources":["WebGLVectorTile.js"],"names":[],"mappings":";;;;iCAOa,CAAC,IACD,CAAC,SAAS,OAAO,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,OAAO,eAAe,EAAE,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK;oBAItD,oBAAoB,SAA9E,OAAQ,yBAAyB,EAAE,OAAO,CAAC,WAAW,CAA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,WAAY;IAIhD;;OAEG;IACH,sBAFW,OAAO,CAAC,oBAAoB,EAAE,WAAW,CAAC,EAsBpD;IAfC;;;OAGG;IACH,wBAA8C;IAE9C;;OAEG;IACH,eAA2B;IAE3B;;OAEG;IACH,8BAA0D;IAe5D;;;OAGG;IACH,gCAFW,OAAO,kBAAkB,EAAE,cAAc,QAKnD;IAED;;;OAGG;IACH,gBAFW,OAAO,kBAAkB,EAAE,aAAa,QAMlD;CACF;yCAnHwC,sCAAsC;0BACrD,eAAe"}
|
package/layer/WebGLVectorTile.js
CHANGED
package/package.json
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breaks down a vector style into an array of prebuilt shader builders with attributes and uniforms
|
|
3
|
+
* @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} style Vector style
|
|
4
|
+
* @param {import('../../style/flat.js').StyleVariables} variables Style variables
|
|
5
|
+
* @return {Array<StyleShaders>} Array of style shaders
|
|
6
|
+
*/
|
|
7
|
+
export function convertStyleToShaders(style: FlatStyleLike | StyleShaders | Array<StyleShaders>, variables: import("../../style/flat.js").StyleVariables): Array<StyleShaders>;
|
|
1
8
|
/**
|
|
2
9
|
* Names of attributes made available to the vertex shader.
|
|
3
10
|
* Please note: changing these *will* break custom shaders!
|
|
@@ -82,36 +89,42 @@ export type ShaderProgram = {
|
|
|
82
89
|
*/
|
|
83
90
|
fragment: string;
|
|
84
91
|
};
|
|
85
|
-
export type
|
|
92
|
+
export type StyleShaders = import("./style.js").StyleParseResult;
|
|
93
|
+
export type FlatStyleLike = import("../../style/flat.js").FlatStyleLike;
|
|
94
|
+
export type FlatStyle = import("../../style/flat.js").FlatStyle;
|
|
95
|
+
export type FlatStyleRule = import("../../style/flat.js").Rule;
|
|
96
|
+
export type SubRenderPass = {
|
|
97
|
+
/**
|
|
98
|
+
* Vertex shader
|
|
99
|
+
*/
|
|
100
|
+
vertexShader: string;
|
|
86
101
|
/**
|
|
87
|
-
*
|
|
102
|
+
* Fragment shader
|
|
88
103
|
*/
|
|
89
|
-
|
|
104
|
+
fragmentShader: string;
|
|
90
105
|
/**
|
|
91
|
-
*
|
|
92
|
-
* Default shaders rely on the attributes in {@link Attributes}.
|
|
106
|
+
* Attributes description
|
|
93
107
|
*/
|
|
94
|
-
|
|
95
|
-
[x: string]: AttributeDefinition;
|
|
96
|
-
} | undefined;
|
|
108
|
+
attributesDesc: Array<import("../../webgl/Helper.js").AttributeDescription>;
|
|
97
109
|
/**
|
|
98
|
-
*
|
|
110
|
+
* Program; this has to be recreated if the helper is lost/changed
|
|
99
111
|
*/
|
|
100
|
-
|
|
101
|
-
[x: string]: import("../../webgl/Helper.js").UniformValue;
|
|
102
|
-
} | undefined;
|
|
112
|
+
program?: WebGLProgram | undefined;
|
|
103
113
|
};
|
|
104
|
-
export type
|
|
114
|
+
export type RenderPass = {
|
|
105
115
|
/**
|
|
106
|
-
*
|
|
116
|
+
* Fill render pass; undefined if no fill in pass
|
|
107
117
|
*/
|
|
108
|
-
|
|
118
|
+
fillRenderPass?: SubRenderPass | undefined;
|
|
109
119
|
/**
|
|
110
|
-
*
|
|
120
|
+
* Stroke render pass; undefined if no stroke in pass
|
|
111
121
|
*/
|
|
112
|
-
|
|
122
|
+
strokeRenderPass?: SubRenderPass | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Symbol render pass; undefined if no symbol in pass
|
|
125
|
+
*/
|
|
126
|
+
symbolRenderPass?: SubRenderPass | undefined;
|
|
113
127
|
};
|
|
114
|
-
export type VectorStyle = AsRule | AsShaders;
|
|
115
128
|
/**
|
|
116
129
|
* @typedef {Object} AttributeDefinition A description of a custom attribute to be passed on to the GPU, with a value different
|
|
117
130
|
* for each feature.
|
|
@@ -143,43 +156,49 @@ export type VectorStyle = AsRule | AsShaders;
|
|
|
143
156
|
* @property {string} fragment Fragment shader source
|
|
144
157
|
*/
|
|
145
158
|
/**
|
|
146
|
-
* @typedef {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*
|
|
150
|
-
* @property {UniformDefinitions} [uniforms] Additional uniforms usable in shaders.
|
|
159
|
+
* @typedef {import('./style.js').StyleParseResult} StyleShaders
|
|
160
|
+
*/
|
|
161
|
+
/**
|
|
162
|
+
* @typedef {import('../../style/flat.js').FlatStyleLike} FlatStyleLike
|
|
151
163
|
*/
|
|
152
164
|
/**
|
|
153
|
-
* @typedef {
|
|
154
|
-
* @property {import('../../style/flat.js').FlatStyle} style Style
|
|
155
|
-
* @property {import("../../expr/expression.js").EncodedExpression} [filter] Filter
|
|
165
|
+
* @typedef {import('../../style/flat.js').FlatStyle} FlatStyle
|
|
156
166
|
*/
|
|
157
167
|
/**
|
|
158
|
-
* @typedef {
|
|
168
|
+
* @typedef {import('../../style/flat.js').Rule} FlatStyleRule
|
|
169
|
+
*/
|
|
170
|
+
/**
|
|
171
|
+
* @typedef {Object} SubRenderPass
|
|
172
|
+
* @property {string} vertexShader Vertex shader
|
|
173
|
+
* @property {string} fragmentShader Fragment shader
|
|
174
|
+
* @property {Array<import('../../webgl/Helper.js').AttributeDescription>} attributesDesc Attributes description
|
|
175
|
+
* @property {WebGLProgram} [program] Program; this has to be recreated if the helper is lost/changed
|
|
176
|
+
*/
|
|
177
|
+
/**
|
|
178
|
+
* @typedef {Object} RenderPass
|
|
179
|
+
* @property {SubRenderPass} [fillRenderPass] Fill render pass; undefined if no fill in pass
|
|
180
|
+
* @property {SubRenderPass} [strokeRenderPass] Stroke render pass; undefined if no stroke in pass
|
|
181
|
+
* @property {SubRenderPass} [symbolRenderPass] Symbol render pass; undefined if no symbol in pass
|
|
159
182
|
*/
|
|
160
183
|
/**
|
|
161
184
|
* @classdesc This class is responsible for:
|
|
162
|
-
* 1.
|
|
185
|
+
* 1. generating WebGL buffers according to a provided style, using a MixedGeometryBatch as input
|
|
163
186
|
* 2. rendering geometries contained in said buffers
|
|
164
187
|
*
|
|
165
|
-
* A
|
|
166
|
-
*
|
|
167
|
-
* A VectorStyleRenderer instance can be created either from a literal style or from shaders using either
|
|
168
|
-
* `VectorStyleRenderer.fromStyle` or `VectorStyleRenderer.fromShaders`. The shaders should not be provided explicitly
|
|
169
|
-
* but instead as a preconfigured ShaderBuilder instance.
|
|
188
|
+
* A VectorStyleRenderer instance can be created either from a literal style or from shaders.
|
|
189
|
+
* The shaders should not be provided explicitly but instead as a preconfigured ShaderBuilder instance.
|
|
170
190
|
*
|
|
171
191
|
* The `generateBuffers` method returns a promise resolving to WebGL buffers that are intended to be rendered by the
|
|
172
192
|
* same renderer.
|
|
173
193
|
*/
|
|
174
194
|
declare class VectorStyleRenderer {
|
|
175
195
|
/**
|
|
176
|
-
* @param {
|
|
196
|
+
* @param {FlatStyleLike|StyleShaders|Array<StyleShaders>} styles Vector styles expressed as flat styles, flat style rules or style shaders
|
|
177
197
|
* @param {import('../../style/flat.js').StyleVariables} variables Style variables
|
|
178
198
|
* @param {import('../../webgl/Helper.js').default} helper Helper
|
|
179
199
|
* @param {boolean} [enableHitDetection] Whether to enable the hit detection (needs compatible shader)
|
|
180
|
-
* @param {import("../../expr/expression.js").ExpressionValue} [filter] Optional filter expression
|
|
181
200
|
*/
|
|
182
|
-
constructor(
|
|
201
|
+
constructor(styles: FlatStyleLike | StyleShaders | Array<StyleShaders>, variables: import("../../style/flat.js").StyleVariables, helper: import("../../webgl/Helper.js").default, enableHitDetection?: boolean);
|
|
183
202
|
/**
|
|
184
203
|
* @private
|
|
185
204
|
* @type {import('../../webgl/Helper.js').default}
|
|
@@ -190,94 +209,28 @@ declare class VectorStyleRenderer {
|
|
|
190
209
|
*/
|
|
191
210
|
private hitDetectionEnabled_;
|
|
192
211
|
/**
|
|
193
|
-
* @
|
|
194
|
-
* @type {WebGLProgram}
|
|
195
|
-
*/
|
|
196
|
-
private fillProgram_;
|
|
197
|
-
/**
|
|
198
|
-
* @private
|
|
199
|
-
* @type {WebGLProgram}
|
|
200
|
-
*/
|
|
201
|
-
private strokeProgram_;
|
|
202
|
-
/**
|
|
203
|
-
* @private
|
|
204
|
-
* @type {WebGLProgram}
|
|
205
|
-
*/
|
|
206
|
-
private symbolProgram_;
|
|
207
|
-
/**
|
|
208
|
-
* @type {boolean}
|
|
209
|
-
* @private
|
|
210
|
-
*/
|
|
211
|
-
private hasFill_;
|
|
212
|
-
/**
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
private fillVertexShader_;
|
|
216
|
-
/**
|
|
217
|
-
* @private
|
|
218
|
-
*/
|
|
219
|
-
private fillFragmentShader_;
|
|
220
|
-
/**
|
|
221
|
-
* @type {boolean}
|
|
222
|
-
* @private
|
|
223
|
-
*/
|
|
224
|
-
private hasStroke_;
|
|
225
|
-
/**
|
|
226
|
-
* @private
|
|
227
|
-
*/
|
|
228
|
-
private strokeVertexShader_;
|
|
229
|
-
/**
|
|
212
|
+
* @type {Array<StyleShaders>}
|
|
230
213
|
* @private
|
|
231
214
|
*/
|
|
232
|
-
private
|
|
233
|
-
/**
|
|
234
|
-
* @type {boolean}
|
|
235
|
-
* @private
|
|
236
|
-
*/
|
|
237
|
-
private hasSymbol_;
|
|
238
|
-
/**
|
|
239
|
-
* @private
|
|
240
|
-
*/
|
|
241
|
-
private symbolVertexShader_;
|
|
242
|
-
/**
|
|
243
|
-
* @private
|
|
244
|
-
*/
|
|
245
|
-
private symbolFragmentShader_;
|
|
246
|
-
/**
|
|
247
|
-
* @type {function(import('../../Feature.js').FeatureLike): boolean}
|
|
248
|
-
* @private
|
|
249
|
-
*/
|
|
250
|
-
private featureFilter_;
|
|
215
|
+
private styleShaders;
|
|
251
216
|
/**
|
|
217
|
+
* @type {AttributeDefinitions}
|
|
252
218
|
* @private
|
|
253
219
|
*/
|
|
254
220
|
private customAttributes_;
|
|
255
221
|
/**
|
|
222
|
+
@type {UniformDefinitions}
|
|
256
223
|
* @private
|
|
257
224
|
*/
|
|
258
225
|
private uniforms_;
|
|
259
226
|
/**
|
|
260
|
-
* @type {Array<
|
|
261
|
-
* @private
|
|
262
|
-
*/
|
|
263
|
-
private polygonAttributesDesc_;
|
|
264
|
-
/**
|
|
265
|
-
* @type {Array<import('../../webgl/Helper.js').AttributeDescription>}
|
|
266
|
-
* @private
|
|
267
|
-
*/
|
|
268
|
-
private lineStringAttributesDesc_;
|
|
269
|
-
/**
|
|
270
|
-
* @type {Array<import('../../webgl/Helper.js').AttributeDescription>}
|
|
271
|
-
* @private
|
|
272
|
-
*/
|
|
273
|
-
private pointAttributesDesc_;
|
|
274
|
-
/**
|
|
275
|
-
* Will apply the style filter when generating geometry batches (if it can be evaluated outside a map context)
|
|
276
|
-
* @param {import("../../expr/expression.js").ExpressionValue} filter Style filter
|
|
277
|
-
* @return {function(import('../../Feature.js').FeatureLike): boolean} Feature filter
|
|
227
|
+
* @type {Array<RenderPass>}
|
|
278
228
|
* @private
|
|
279
229
|
*/
|
|
280
|
-
private
|
|
230
|
+
private renderPasses_;
|
|
231
|
+
hasFill_: boolean;
|
|
232
|
+
hasStroke_: boolean;
|
|
233
|
+
hasSymbol_: boolean;
|
|
281
234
|
/**
|
|
282
235
|
* @param {import('./MixedGeometryBatch.js').default} geometryBatch Geometry batch
|
|
283
236
|
* @param {import("../../transform.js").Transform} transform Transform to apply to coordinates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStyleRenderer.d.ts","sourceRoot":"","sources":["VectorStyleRenderer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VectorStyleRenderer.d.ts","sourceRoot":"","sources":["VectorStyleRenderer.js"],"names":[],"mappings":"AAmkBA;;;;;GAKG;AACH,6CAJW,aAAa,GAAC,YAAY,GAAC,KAAK,CAAC,YAAY,CAAC,aAC9C,OAAO,qBAAqB,EAAE,cAAc,GAC3C,KAAK,CAAC,YAAY,CAAC,CAuD9B;;;;;yBA3lBS,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmBF,CAAS,IAAwD,EAAnD,OAAO,yBAAyB,EAAE,iBAAiB,EAAE,IAAmC,EAAnC,OAAO,eAAe,EAAE,W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