ol 10.3.2-dev.1734966546937 → 10.3.2-dev.1735553764538
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/Tile.d.ts.map +1 -1
- package/Tile.js +4 -0
- package/dist/ol.d.ts +2 -0
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/layer/WebGLPoints.d.ts +9 -2
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLPoints.js +8 -2
- package/layer/WebGLVector.d.ts +5 -5
- package/layer/WebGLVector.d.ts.map +1 -1
- package/layer/WebGLVector.js +2 -2
- package/package.json +1 -1
- package/render/webgl/VectorStyleRenderer.d.ts +21 -6
- package/render/webgl/VectorStyleRenderer.d.ts.map +1 -1
- package/render/webgl/VectorStyleRenderer.js +27 -20
- package/render/webgl/utils.d.ts +15 -0
- package/render/webgl/utils.d.ts.map +1 -1
- package/render/webgl/utils.js +72 -0
- package/renderer/webgl/VectorLayer.d.ts +10 -6
- package/renderer/webgl/VectorLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorLayer.js +8 -7
- package/renderer/webgl/VectorTileLayer.d.ts +10 -6
- package/renderer/webgl/VectorTileLayer.d.ts.map +1 -1
- package/renderer/webgl/VectorTileLayer.js +12 -12
- package/style/flat.d.ts +158 -95
- package/style/flat.d.ts.map +1 -1
- package/style/flat.js +65 -47
- package/util.js +1 -1
- package/webgl/styleparser.d.ts +5 -4
- package/webgl/styleparser.d.ts.map +1 -1
- package/webgl/styleparser.js +21 -19
- package/style/webgl.d.ts +0 -269
- package/style/webgl.d.ts.map +0 -1
- package/style/webgl.js +0 -133
package/layer/WebGLPoints.d.ts
CHANGED
|
@@ -3,7 +3,12 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
3
3
|
/**
|
|
4
4
|
* Literal style to apply to the layer features.
|
|
5
5
|
*/
|
|
6
|
-
style: import("../style/
|
|
6
|
+
style: import("../style/flat.js").FlatStyle;
|
|
7
|
+
/**
|
|
8
|
+
* The filter used
|
|
9
|
+
* to determine if a style applies. If no filter is included, the rule always applies.
|
|
10
|
+
*/
|
|
11
|
+
filter?: import("../expr/expression.js").EncodedExpression | undefined;
|
|
7
12
|
/**
|
|
8
13
|
* Style variables. Each variable must hold a literal value (not
|
|
9
14
|
* an expression). These variables can be used as {@link import ("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
@@ -76,7 +81,9 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
76
81
|
/**
|
|
77
82
|
* @template {import("../source/Vector.js").default<import('../Feature').FeatureLike>} VectorSourceType
|
|
78
83
|
* @typedef {Object} Options
|
|
79
|
-
* @property {import('../style/
|
|
84
|
+
* @property {import('../style/flat.js').FlatStyle} style Literal style to apply to the layer features.
|
|
85
|
+
* @property {import("../expr/expression.js").EncodedExpression} [filter] The filter used
|
|
86
|
+
* to determine if a style applies. If no filter is included, the rule always applies.
|
|
80
87
|
* @property {import('../style/flat.js').StyleVariables} [variables] Style variables. Each variable must hold a literal value (not
|
|
81
88
|
* an expression). These variables can be used as {@link import("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
82
89
|
* using the `['var', 'varName']` operator.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLPoints.d.ts","sourceRoot":"","sources":["WebGLPoints.js"],"names":[],"mappings":";oBAQuF,gBAAgB,SAA1F,OAAQ,qBAAqB,EAAE,OAAO,CAAC,OAAO,YAAY,EAAE,WAAW,CAAE;;;;WAExE,OAAO,
|
|
1
|
+
{"version":3,"file":"WebGLPoints.d.ts","sourceRoot":"","sources":["WebGLPoints.js"],"names":[],"mappings":";oBAQuF,gBAAgB,SAA1F,OAAQ,qBAAqB,EAAE,OAAO,CAAC,OAAO,YAAY,EAAE,WAAW,CAAE;;;;WAExE,OAAO,kBAAkB,EAAE,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,+BALuF,gBAAgB,SAA1F,OAAQ,qBAAqB,EAAE,OAAO,CAAC,OAAO,YAAY,EAAE,WAAW,CAAE;IAMpF;;OAEG;IACH,qBAFW,OAAO,CAAC,gBAAgB,CAAC,EA4BnC;IArBC;;;OAGG;IACH,wBAA8C;IAE9C;;;OAGG;IACH,qBAIC;IAED;;;OAGG;IACH,8BAA0D;IAyB5D;;;OAGG;IACH;;aAGC;CACF;qCAtIoC,kCAAkC;kBAErD,YAAY"}
|
package/layer/WebGLPoints.js
CHANGED
|
@@ -8,7 +8,9 @@ import Layer from './Layer.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* @template {import("../source/Vector.js").default<import('../Feature').FeatureLike>} VectorSourceType
|
|
10
10
|
* @typedef {Object} Options
|
|
11
|
-
* @property {import('../style/
|
|
11
|
+
* @property {import('../style/flat.js').FlatStyle} style Literal style to apply to the layer features.
|
|
12
|
+
* @property {import("../expr/expression.js").EncodedExpression} [filter] The filter used
|
|
13
|
+
* to determine if a style applies. If no filter is included, the rule always applies.
|
|
12
14
|
* @property {import('../style/flat.js').StyleVariables} [variables] Style variables. Each variable must hold a literal value (not
|
|
13
15
|
* an expression). These variables can be used as {@link import("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
14
16
|
* using the `['var', 'varName']` operator.
|
|
@@ -90,7 +92,11 @@ class WebGLPointsLayer extends Layer {
|
|
|
90
92
|
* @private
|
|
91
93
|
* @type {import('../webgl/styleparser.js').StyleParseResult}
|
|
92
94
|
*/
|
|
93
|
-
this.parseResult_ = parseLiteralStyle(
|
|
95
|
+
this.parseResult_ = parseLiteralStyle(
|
|
96
|
+
options.style,
|
|
97
|
+
this.styleVariables_,
|
|
98
|
+
options.filter,
|
|
99
|
+
);
|
|
94
100
|
|
|
95
101
|
/**
|
|
96
102
|
* @private
|
package/layer/WebGLVector.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
56
56
|
/**
|
|
57
57
|
* Layer style.
|
|
58
58
|
*/
|
|
59
|
-
style: import("../style/
|
|
59
|
+
style: import("../style/flat.js").FlatStyleLike;
|
|
60
60
|
/**
|
|
61
61
|
* Style variables. Each variable must hold a literal value (not
|
|
62
62
|
* an expression). These variables can be used as {@link import ("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
@@ -111,7 +111,7 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
111
111
|
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
112
112
|
* be visible.
|
|
113
113
|
* @property {VectorSourceType} [source] Source.
|
|
114
|
-
* @property {import('../style/
|
|
114
|
+
* @property {import('../style/flat.js').FlatStyleLike} style Layer style.
|
|
115
115
|
* @property {import('../style/flat.js').StyleVariables} [variables] Style variables. Each variable must hold a literal value (not
|
|
116
116
|
* an expression). These variables can be used as {@link import("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
117
117
|
* using the `['var', 'varName']` operator.
|
|
@@ -163,10 +163,10 @@ declare class WebGLVectorLayer<VectorSourceType extends import("../source/Vector
|
|
|
163
163
|
updateStyleVariables(variables: import("../style/flat.js").StyleVariables): void;
|
|
164
164
|
/**
|
|
165
165
|
* Set the layer style.
|
|
166
|
-
* @param {import('../style/
|
|
166
|
+
* @param {import('../style/flat.js').FlatStyleLike} style Layer style.
|
|
167
167
|
*/
|
|
168
|
-
setStyle(style: import("../style/
|
|
169
|
-
style: import("../style/
|
|
168
|
+
setStyle(style: import("../style/flat.js").FlatStyleLike): void;
|
|
169
|
+
style: import("../style/flat.js").FlatStyleLike | undefined;
|
|
170
170
|
}
|
|
171
171
|
import WebGLVectorLayerRenderer from '../renderer/webgl/VectorLayer.js';
|
|
172
172
|
import Layer from './Layer.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebGLVector.d.ts","sourceRoot":"","sources":["WebGLVector.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;oBAI1D,gBAAgB,SAAtE,OAAQ,qBAAqB,EAAE,OAAO,CAAC,WAAW,CAAE,+CACb,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqBpC,OAAO,
|
|
1
|
+
{"version":3,"file":"WebGLVector.d.ts","sourceRoot":"","sources":["WebGLVector.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;oBAI1D,gBAAgB,SAAtE,OAAQ,qBAAqB,EAAE,OAAO,CAAC,WAAW,CAAE,+CACb,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAqBpC,OAAO,kBAAkB,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA5BtD;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;;;;;;;;;GAcG;AACH,+BAJmE,gBAAgB,SAAtE,OAAQ,qBAAqB,EAAE,OAAO,CAAC,WAAW,CAAE,+CACb,WAAW,SAAlD,OAAQ,eAAe,EAAE,WAAY;IAIhD;;OAEG;IACH,sBAFW,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAsBhD;IAfC;;;OAGG;IACH,wBAA8C;IAE9C;;OAEG;IACH,eAA2B;IAE3B;;OAEG;IACH,8BAA0D;IAc5D;;;OAGG;IACH,gCAFW,OAAO,kBAAkB,EAAE,cAAc,QAKnD;IAED;;;OAGG;IACH,gBAFW,OAAO,kBAAkB,EAAE,aAAa,QAMlD;IAHC,4DAAkB;CAIrB;qCAlHoC,kCAAkC;kBACrD,YAAY"}
|
package/layer/WebGLVector.js
CHANGED
|
@@ -32,7 +32,7 @@ import Layer from './Layer.js';
|
|
|
32
32
|
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
|
|
33
33
|
* be visible.
|
|
34
34
|
* @property {VectorSourceType} [source] Source.
|
|
35
|
-
* @property {import('../style/
|
|
35
|
+
* @property {import('../style/flat.js').FlatStyleLike} style Layer style.
|
|
36
36
|
* @property {import('../style/flat.js').StyleVariables} [variables] Style variables. Each variable must hold a literal value (not
|
|
37
37
|
* an expression). These variables can be used as {@link import("../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
38
38
|
* using the `['var', 'varName']` operator.
|
|
@@ -108,7 +108,7 @@ class WebGLVectorLayer extends Layer {
|
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Set the layer style.
|
|
111
|
-
* @param {import('../style/
|
|
111
|
+
* @param {import('../style/flat.js').FlatStyleLike} style Layer style.
|
|
112
112
|
*/
|
|
113
113
|
setStyle(style) {
|
|
114
114
|
this.style = style;
|
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ export type ShaderProgram = {
|
|
|
82
82
|
*/
|
|
83
83
|
fragment: string;
|
|
84
84
|
};
|
|
85
|
-
export type
|
|
85
|
+
export type AsShaders = {
|
|
86
86
|
/**
|
|
87
87
|
* Shader builder with the appropriate presets.
|
|
88
88
|
*/
|
|
@@ -101,7 +101,17 @@ export type StyleShaders = {
|
|
|
101
101
|
[x: string]: import("../../webgl/Helper.js").UniformValue;
|
|
102
102
|
} | undefined;
|
|
103
103
|
};
|
|
104
|
-
export type
|
|
104
|
+
export type AsRule = {
|
|
105
|
+
/**
|
|
106
|
+
* Style
|
|
107
|
+
*/
|
|
108
|
+
style: import("../../style/flat.js").FlatStyle;
|
|
109
|
+
/**
|
|
110
|
+
* Filter
|
|
111
|
+
*/
|
|
112
|
+
filter?: import("../../expr/expression.js").EncodedExpression | undefined;
|
|
113
|
+
};
|
|
114
|
+
export type VectorStyle = AsRule | AsShaders;
|
|
105
115
|
/**
|
|
106
116
|
* @typedef {Object} AttributeDefinition A description of a custom attribute to be passed on to the GPU, with a value different
|
|
107
117
|
* for each feature.
|
|
@@ -133,14 +143,19 @@ export type VectorStyle = import("../../style/webgl.js").WebGLStyle | StyleShade
|
|
|
133
143
|
* @property {string} fragment Fragment shader source
|
|
134
144
|
*/
|
|
135
145
|
/**
|
|
136
|
-
* @typedef {Object}
|
|
146
|
+
* @typedef {Object} AsShaders
|
|
137
147
|
* @property {import("../../webgl/ShaderBuilder.js").ShaderBuilder} builder Shader builder with the appropriate presets.
|
|
138
148
|
* @property {AttributeDefinitions} [attributes] Custom attributes made available in the vertex shaders.
|
|
139
149
|
* Default shaders rely on the attributes in {@link Attributes}.
|
|
140
150
|
* @property {UniformDefinitions} [uniforms] Additional uniforms usable in shaders.
|
|
141
151
|
*/
|
|
142
152
|
/**
|
|
143
|
-
* @typedef {
|
|
153
|
+
* @typedef {Object} AsRule
|
|
154
|
+
* @property {import('../../style/flat.js').FlatStyle} style Style
|
|
155
|
+
* @property {import("../../expr/expression.js").EncodedExpression} [filter] Filter
|
|
156
|
+
*/
|
|
157
|
+
/**
|
|
158
|
+
* @typedef {AsRule|AsShaders} VectorStyle
|
|
144
159
|
*/
|
|
145
160
|
/**
|
|
146
161
|
* @classdesc This class is responsible for:
|
|
@@ -161,9 +176,9 @@ declare class VectorStyleRenderer {
|
|
|
161
176
|
* @param {VectorStyle} styleOrShaders Literal style or custom shaders
|
|
162
177
|
* @param {import('../../style/flat.js').StyleVariables} variables Style variables
|
|
163
178
|
* @param {import('../../webgl/Helper.js').default} helper Helper
|
|
164
|
-
* @param {boolean} enableHitDetection Whether to enable the hit detection (needs compatible shader)
|
|
179
|
+
* @param {boolean} [enableHitDetection] Whether to enable the hit detection (needs compatible shader)
|
|
165
180
|
*/
|
|
166
|
-
constructor(styleOrShaders: VectorStyle, variables: import("../../style/flat.js").StyleVariables, helper: import("../../webgl/Helper.js").default, enableHitDetection
|
|
181
|
+
constructor(styleOrShaders: VectorStyle, variables: import("../../style/flat.js").StyleVariables, helper: import("../../webgl/Helper.js").default, enableHitDetection?: boolean);
|
|
167
182
|
/**
|
|
168
183
|
* @private
|
|
169
184
|
* @type {import('../../webgl/Helper.js').default}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStyleRenderer.d.ts","sourceRoot":"","sources":["VectorStyleRenderer.js"],"names":[],"mappings":";;;;yBAmCU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmBF,CAAS,IAAwD,EAAnD,OAAO,yBAAyB,EAAE,iBAAiB,EAAE,IAAmC,EAAnC,OAAO,eAAe,EAAE,WAAW,KAAE,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;oBAW5H,KAAK,CAAC,gBAAgB,CAAC;;;;uBACvB,KAAK,CAAC,gBAAgB,CAAC;;;;kBACvB,KAAK,CAAC,gBAAgB,CAAC;;;;6BACvB,OAAO,oBAAoB,EAAE,SAAS;;;;;;yBAKtC,YAAY,GAAC,IAAI;;;;4BACjB,YAAY,GAAC,IAAI;;;;uBACjB,YAAY,GAAC,IAAI;;;;;;;;;YAKjB,MAAM;;;;cACN,MAAM;;;;;;aAKN,OAAO,8BAA8B,EAAE,aAAa
|
|
1
|
+
{"version":3,"file":"VectorStyleRenderer.d.ts","sourceRoot":"","sources":["VectorStyleRenderer.js"],"names":[],"mappings":";;;;yBAmCU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmBF,CAAS,IAAwD,EAAnD,OAAO,yBAAyB,EAAE,iBAAiB,EAAE,IAAmC,EAAnC,OAAO,eAAe,EAAE,WAAW,KAAE,MAAM,GAAC,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;oBAW5H,KAAK,CAAC,gBAAgB,CAAC;;;;uBACvB,KAAK,CAAC,gBAAgB,CAAC;;;;kBACvB,KAAK,CAAC,gBAAgB,CAAC;;;;6BACvB,OAAO,oBAAoB,EAAE,SAAS;;;;;;yBAKtC,YAAY,GAAC,IAAI;;;;4BACjB,YAAY,GAAC,IAAI;;;;uBACjB,YAAY,GAAC,IAAI;;;;;;;;;YAKjB,MAAM;;;;cACN,MAAM;;;;;;aAKN,OAAO,8BAA8B,EAAE,aAAa;;;;;;;;;;;;;;;;;;;WAQpD,OAAO,qBAAqB,EAAE,SAAS;;;;;;0BAKxC,MAAM,GAAC,SAAS;AAlD7B;;;;;;;GAOG;AAEH;;;GAGG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;GAaG;AACH;IACE;;;;;OAKG;IACH,4BALW,WAAW,aACX,OAAO,qBAAqB,EAAE,cAAc,UAC5C,OAAO,uBAAuB,EAAE,OAAO,uBACvC,OAAO,EAwMjB;IArMC;;;OAGG;IACH,gBAAY;IAEZ;;OAEG;IACH,6BAAgD;IAkBhD;;;OAGG;IACH,qBAAiB;IAEjB;;;OAGG;IACH,uBAAmB;IAEnB;;;OAGG;IACH,uBAAmB;IAEnB;;;OAGG;IACH,iBAAyD;IAEvD;;OAEG;IACH,0BAAgE;IAChE;;OAEG;IACH,4BAAoE;IAGtE;;;OAGG;IACH,mBAA6D;IAE3D;;OAEG;IACH,4BAAoE;IACpE;;OAEG;IACH,8BAAwE;IAG1E;;;OAGG;IACH,mBAA6D;IAE3D;;OAEG;IACH,4BAAoE;IACpE;;OAEG;IACH,8BAAwE;IAc1E;;OAEG;IACH,0BAIC;IACD;;OAEG;IACH,kBAAmC;IASnC;;;OAGG;IACH,+BAOC;IACD;;;OAGG;IACH,kCAqCC;IACD;;;OAGG;IACH,6BAYC;IAKH;;;;OAIG;IACH,+BAJW,OAAO,yBAAyB,EAAE,OAAO,aACzC,OAAO,oBAAoB,EAAE,SAAS,GACrC,OAAO,CAAC,YAAY,CAAC,CAqChC;IAED;;;;;OAKG;IACH,oCA+BC;IAED;;;;;;OAMG;IACH,gCAwEC;IAED;;;;;OAKG;IACH,gBAJW,YAAY,cACZ,OAAO,cAAc,EAAE,UAAU,qBACjC,MAAY,IAAI,QA8B1B;IAED;;;;;;;;OAQG;IACH,wBAkBC;IAED;;;OAGG;IACH,kBAHW,OAAO,uBAAuB,EAAE,OAAO,YACvC,YAAY,QAuCtB;CACF;6BAzkB4B,uBAAuB"}
|
|
@@ -83,7 +83,7 @@ export const Attributes = {
|
|
|
83
83
|
*/
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* @typedef {Object}
|
|
86
|
+
* @typedef {Object} AsShaders
|
|
87
87
|
* @property {import("../../webgl/ShaderBuilder.js").ShaderBuilder} builder Shader builder with the appropriate presets.
|
|
88
88
|
* @property {AttributeDefinitions} [attributes] Custom attributes made available in the vertex shaders.
|
|
89
89
|
* Default shaders rely on the attributes in {@link Attributes}.
|
|
@@ -91,7 +91,13 @@ export const Attributes = {
|
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* @typedef {
|
|
94
|
+
* @typedef {Object} AsRule
|
|
95
|
+
* @property {import('../../style/flat.js').FlatStyle} style Style
|
|
96
|
+
* @property {import("../../expr/expression.js").EncodedExpression} [filter] Filter
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @typedef {AsRule|AsShaders} VectorStyle
|
|
95
101
|
*/
|
|
96
102
|
|
|
97
103
|
/**
|
|
@@ -113,7 +119,7 @@ class VectorStyleRenderer {
|
|
|
113
119
|
* @param {VectorStyle} styleOrShaders Literal style or custom shaders
|
|
114
120
|
* @param {import('../../style/flat.js').StyleVariables} variables Style variables
|
|
115
121
|
* @param {import('../../webgl/Helper.js').default} helper Helper
|
|
116
|
-
* @param {boolean} enableHitDetection Whether to enable the hit detection (needs compatible shader)
|
|
122
|
+
* @param {boolean} [enableHitDetection] Whether to enable the hit detection (needs compatible shader)
|
|
117
123
|
*/
|
|
118
124
|
constructor(styleOrShaders, variables, helper, enableHitDetection) {
|
|
119
125
|
/**
|
|
@@ -125,17 +131,18 @@ class VectorStyleRenderer {
|
|
|
125
131
|
/**
|
|
126
132
|
* @private
|
|
127
133
|
*/
|
|
128
|
-
this.hitDetectionEnabled_ = enableHitDetection;
|
|
129
|
-
|
|
134
|
+
this.hitDetectionEnabled_ = !!enableHitDetection;
|
|
135
|
+
|
|
136
|
+
let asShaders = /** @type {AsShaders} */ (styleOrShaders);
|
|
130
137
|
const isShaders = 'builder' in styleOrShaders;
|
|
131
138
|
if (!isShaders) {
|
|
139
|
+
const asRule = /** @type {AsRule} */ (styleOrShaders);
|
|
132
140
|
const parseResult = parseLiteralStyle(
|
|
133
|
-
|
|
134
|
-
styleOrShaders
|
|
135
|
-
),
|
|
141
|
+
asRule.style,
|
|
136
142
|
variables,
|
|
143
|
+
asRule.filter,
|
|
137
144
|
);
|
|
138
|
-
|
|
145
|
+
asShaders = {
|
|
139
146
|
builder: parseResult.builder,
|
|
140
147
|
attributes: parseResult.attributes,
|
|
141
148
|
uniforms: parseResult.uniforms,
|
|
@@ -164,48 +171,48 @@ class VectorStyleRenderer {
|
|
|
164
171
|
* @type {boolean}
|
|
165
172
|
* @private
|
|
166
173
|
*/
|
|
167
|
-
this.hasFill_ = !!
|
|
174
|
+
this.hasFill_ = !!asShaders.builder.getFillVertexShader();
|
|
168
175
|
if (this.hasFill_) {
|
|
169
176
|
/**
|
|
170
177
|
* @private
|
|
171
178
|
*/
|
|
172
|
-
this.fillVertexShader_ =
|
|
179
|
+
this.fillVertexShader_ = asShaders.builder.getFillVertexShader();
|
|
173
180
|
/**
|
|
174
181
|
* @private
|
|
175
182
|
*/
|
|
176
|
-
this.fillFragmentShader_ =
|
|
183
|
+
this.fillFragmentShader_ = asShaders.builder.getFillFragmentShader();
|
|
177
184
|
}
|
|
178
185
|
|
|
179
186
|
/**
|
|
180
187
|
* @type {boolean}
|
|
181
188
|
* @private
|
|
182
189
|
*/
|
|
183
|
-
this.hasStroke_ = !!
|
|
190
|
+
this.hasStroke_ = !!asShaders.builder.getStrokeVertexShader();
|
|
184
191
|
if (this.hasStroke_) {
|
|
185
192
|
/**
|
|
186
193
|
* @private
|
|
187
194
|
*/
|
|
188
|
-
this.strokeVertexShader_ =
|
|
195
|
+
this.strokeVertexShader_ = asShaders.builder.getStrokeVertexShader();
|
|
189
196
|
/**
|
|
190
197
|
* @private
|
|
191
198
|
*/
|
|
192
|
-
this.strokeFragmentShader_ =
|
|
199
|
+
this.strokeFragmentShader_ = asShaders.builder.getStrokeFragmentShader();
|
|
193
200
|
}
|
|
194
201
|
|
|
195
202
|
/**
|
|
196
203
|
* @type {boolean}
|
|
197
204
|
* @private
|
|
198
205
|
*/
|
|
199
|
-
this.hasSymbol_ = !!
|
|
206
|
+
this.hasSymbol_ = !!asShaders.builder.getSymbolVertexShader();
|
|
200
207
|
if (this.hasSymbol_) {
|
|
201
208
|
/**
|
|
202
209
|
* @private
|
|
203
210
|
*/
|
|
204
|
-
this.symbolVertexShader_ =
|
|
211
|
+
this.symbolVertexShader_ = asShaders.builder.getSymbolVertexShader();
|
|
205
212
|
/**
|
|
206
213
|
* @private
|
|
207
214
|
*/
|
|
208
|
-
this.symbolFragmentShader_ =
|
|
215
|
+
this.symbolFragmentShader_ = asShaders.builder.getSymbolFragmentShader();
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
const hitDetectionAttributes = this.hitDetectionEnabled_
|
|
@@ -225,12 +232,12 @@ class VectorStyleRenderer {
|
|
|
225
232
|
this.customAttributes_ = Object.assign(
|
|
226
233
|
{},
|
|
227
234
|
hitDetectionAttributes,
|
|
228
|
-
|
|
235
|
+
asShaders.attributes,
|
|
229
236
|
);
|
|
230
237
|
/**
|
|
231
238
|
* @private
|
|
232
239
|
*/
|
|
233
|
-
this.uniforms_ =
|
|
240
|
+
this.uniforms_ = asShaders.uniforms;
|
|
234
241
|
|
|
235
242
|
const customAttributesDesc = Object.entries(this.customAttributes_).map(
|
|
236
243
|
([name, value]) => ({
|
package/render/webgl/utils.d.ts
CHANGED
|
@@ -82,7 +82,22 @@ export function colorEncodeId(id: number, array?: Array<number>): Array<number>;
|
|
|
82
82
|
* @return {number} Decoded id
|
|
83
83
|
*/
|
|
84
84
|
export function colorDecodeId(color: Array<number>): number;
|
|
85
|
+
/**
|
|
86
|
+
* @typedef {import('./VectorStyleRenderer.js').AsShaders} StyleAsShaders
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* @typedef {import('./VectorStyleRenderer.js').AsRule} StyleAsRule
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Takes in either a Flat Style or an array of shaders (used as input for the webgl vector layer classes)
|
|
93
|
+
* and breaks it down into separate styles to be used by the VectorStyleRenderer class.
|
|
94
|
+
* @param {import('../../style/flat.js').FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders} style Flat style or shaders
|
|
95
|
+
* @return {Array<StyleAsShaders | StyleAsRule>} Separate styles as shaders or rules with a single flat style and a filter
|
|
96
|
+
*/
|
|
97
|
+
export function breakDownFlatStyle(style: import("../../style/flat.js").FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders): Array<StyleAsShaders | StyleAsRule>;
|
|
85
98
|
export const LINESTRING_ANGLE_COSINE_CUTOFF: 0.985;
|
|
99
|
+
export type StyleAsShaders = import("./VectorStyleRenderer.js").AsShaders;
|
|
100
|
+
export type StyleAsRule = import("./VectorStyleRenderer.js").AsRule;
|
|
86
101
|
/**
|
|
87
102
|
* An object holding positions both in an index and a vertex buffer.
|
|
88
103
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;GAYG;AACH,yDAXW,YAAY,gBACZ,MAAM,gBACN,YAAY,eACZ,WAAW,wBACX,MAAM,oBACN,eAAe,GACd,eAAe,CAgE1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wDAdW,YAAY,qBACZ,MAAM,mBACN,MAAM,sBACN,MAAM,GAAC,IAAI,qBACX,MAAM,GAAC,IAAI,eACX,KAAK,CAAC,MAAM,CAAC,cACb,KAAK,CAAC,MAAM,CAAC,oBACb,KAAK,CAAC,MAAM,CAAC,oBACb,OAAO,oBAAoB,EAAE,SAAS,iBACtC,MAAM,0BACN,MAAM,GACL;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAgM1C;AAED;;;;;;;;;GASG;AACH,6DARW,YAAY,qBACZ,MAAM,eACN,KAAK,CAAC,MAAM,CAAC,cACb,KAAK,CAAC,MAAM,CAAC,wBACb,MAAM,GACL,MAAM,CA0CjB;AAED;;;;GAIG;AACH,qCAFY,SAAS,CAUpB;AAED;;;;;;GAMG;AACH,kCAJW,MAAM,UACN,KAAK,CAAC,MAAM,CAAC,GACZ,KAAK,CAAC,MAAM,CAAC,CAWxB;AAED;;;;;GAKG;AACH,qCAHW,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAWjB;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;GAYG;AACH,yDAXW,YAAY,gBACZ,MAAM,gBACN,YAAY,eACZ,WAAW,wBACX,MAAM,oBACN,eAAe,GACd,eAAe,CAgE1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wDAdW,YAAY,qBACZ,MAAM,mBACN,MAAM,sBACN,MAAM,GAAC,IAAI,qBACX,MAAM,GAAC,IAAI,eACX,KAAK,CAAC,MAAM,CAAC,cACb,KAAK,CAAC,MAAM,CAAC,oBACb,KAAK,CAAC,MAAM,CAAC,oBACb,OAAO,oBAAoB,EAAE,SAAS,iBACtC,MAAM,0BACN,MAAM,GACL;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAgM1C;AAED;;;;;;;;;GASG;AACH,6DARW,YAAY,qBACZ,MAAM,eACN,KAAK,CAAC,MAAM,CAAC,cACb,KAAK,CAAC,MAAM,CAAC,wBACb,MAAM,GACL,MAAM,CA0CjB;AAED;;;;GAIG;AACH,qCAFY,SAAS,CAUpB;AAED;;;;;;GAMG;AACH,kCAJW,MAAM,UACN,KAAK,CAAC,MAAM,CAAC,GACZ,KAAK,CAAC,MAAM,CAAC,CAWxB;AAED;;;;;GAKG;AACH,qCAHW,KAAK,CAAC,MAAM,CAAC,GACZ,MAAM,CAWjB;AAED;;GAEG;AACH;;GAEG;AAEH;;;;;GAKG;AACH,0CAHW,OAAO,qBAAqB,EAAE,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,cAAc,GACnF,KAAK,CAAC,cAAc,GAAG,WAAW,CAAC,CA2D9C;AAhfD,6CAA8C,KAAK,CAAC;6BA2avC,OAAO,0BAA0B,EAAE,SAAS;0BAG5C,OAAO,0BAA0B,EAAE,MAAM;;;;;;;;oBAtaxC,MAAM;;;;mBACN,MAAM"}
|
package/render/webgl/utils.js
CHANGED
|
@@ -430,3 +430,75 @@ export function colorDecodeId(color) {
|
|
|
430
430
|
id += Math.round(color[3] * mult);
|
|
431
431
|
return id;
|
|
432
432
|
}
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @typedef {import('./VectorStyleRenderer.js').AsShaders} StyleAsShaders
|
|
436
|
+
*/
|
|
437
|
+
/**
|
|
438
|
+
* @typedef {import('./VectorStyleRenderer.js').AsRule} StyleAsRule
|
|
439
|
+
*/
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Takes in either a Flat Style or an array of shaders (used as input for the webgl vector layer classes)
|
|
443
|
+
* and breaks it down into separate styles to be used by the VectorStyleRenderer class.
|
|
444
|
+
* @param {import('../../style/flat.js').FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders} style Flat style or shaders
|
|
445
|
+
* @return {Array<StyleAsShaders | StyleAsRule>} Separate styles as shaders or rules with a single flat style and a filter
|
|
446
|
+
*/
|
|
447
|
+
export function breakDownFlatStyle(style) {
|
|
448
|
+
// possible cases:
|
|
449
|
+
// - single shader
|
|
450
|
+
// - multiple shaders
|
|
451
|
+
// - single style
|
|
452
|
+
// - multiple styles
|
|
453
|
+
// - multiple rules
|
|
454
|
+
const asArray = Array.isArray(style) ? style : [style];
|
|
455
|
+
|
|
456
|
+
// if array of rules: break rules into separate styles, compute "else" filters
|
|
457
|
+
if ('style' in asArray[0]) {
|
|
458
|
+
/** @type {Array<StyleAsRule>} */
|
|
459
|
+
const styles = [];
|
|
460
|
+
const rules = /** @type {Array<import('../../style/flat.js').Rule>} */ (
|
|
461
|
+
asArray
|
|
462
|
+
);
|
|
463
|
+
const previousFilters = [];
|
|
464
|
+
for (const rule of rules) {
|
|
465
|
+
const ruleStyles = Array.isArray(rule.style) ? rule.style : [rule.style];
|
|
466
|
+
/** @type {import("../../expr/expression.js").EncodedExpression} */
|
|
467
|
+
let currentFilter = rule.filter;
|
|
468
|
+
if (rule.else && previousFilters.length) {
|
|
469
|
+
currentFilter = [
|
|
470
|
+
'all',
|
|
471
|
+
...previousFilters.map((filter) => ['!', filter]),
|
|
472
|
+
];
|
|
473
|
+
if (rule.filter) {
|
|
474
|
+
currentFilter.push(rule.filter);
|
|
475
|
+
}
|
|
476
|
+
if (currentFilter.length < 3) {
|
|
477
|
+
currentFilter = currentFilter[1];
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
if (rule.filter) {
|
|
481
|
+
previousFilters.push(rule.filter);
|
|
482
|
+
}
|
|
483
|
+
/** @type {Array<StyleAsRule>} */
|
|
484
|
+
const stylesWithFilters = ruleStyles.map((style) => ({
|
|
485
|
+
style,
|
|
486
|
+
...(currentFilter && {filter: currentFilter}),
|
|
487
|
+
}));
|
|
488
|
+
styles.push(...stylesWithFilters);
|
|
489
|
+
}
|
|
490
|
+
return styles;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// if array of shaders: return as is
|
|
494
|
+
if ('builder' in asArray[0]) {
|
|
495
|
+
return /** @type {Array<StyleAsShaders>} */ (asArray);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return asArray.map(
|
|
499
|
+
(style) =>
|
|
500
|
+
/** @type {StyleAsRule} */ ({
|
|
501
|
+
style,
|
|
502
|
+
}),
|
|
503
|
+
);
|
|
504
|
+
}
|
|
@@ -13,16 +13,17 @@ export const Uniforms: {
|
|
|
13
13
|
HIT_DETECTION: string;
|
|
14
14
|
};
|
|
15
15
|
export default WebGLVectorLayerRenderer;
|
|
16
|
-
export type
|
|
16
|
+
export type StyleAsShaders = import("../../render/webgl/VectorStyleRenderer.js").AsShaders;
|
|
17
|
+
export type StyleAsRule = import("../../render/webgl/VectorStyleRenderer.js").AsRule;
|
|
17
18
|
export type Options = {
|
|
18
19
|
/**
|
|
19
20
|
* A CSS class name to set to the canvas element.
|
|
20
21
|
*/
|
|
21
22
|
className?: string | undefined;
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
+
* Flat vector style; also accepts shaders
|
|
24
25
|
*/
|
|
25
|
-
style:
|
|
26
|
+
style: import("../../style/flat.js").FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders;
|
|
26
27
|
/**
|
|
27
28
|
* Style variables
|
|
28
29
|
*/
|
|
@@ -40,12 +41,15 @@ export type Options = {
|
|
|
40
41
|
postProcesses?: import("./Layer.js").PostProcessesOptions[] | undefined;
|
|
41
42
|
};
|
|
42
43
|
/**
|
|
43
|
-
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').
|
|
44
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsShaders} StyleAsShaders
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsRule} StyleAsRule
|
|
44
48
|
*/
|
|
45
49
|
/**
|
|
46
50
|
* @typedef {Object} Options
|
|
47
51
|
* @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.
|
|
48
|
-
* @property {
|
|
52
|
+
* @property {import('../../style/flat.js').FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders} style Flat vector style; also accepts shaders
|
|
49
53
|
* @property {Object<string, number|Array<number>|string|boolean>} variables Style variables
|
|
50
54
|
* @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will
|
|
51
55
|
* prevent all hit detection on the layer.
|
|
@@ -124,7 +128,7 @@ declare class WebGLVectorLayerRenderer extends WebGLLayerRenderer<any> {
|
|
|
124
128
|
*/
|
|
125
129
|
private styleVariables_;
|
|
126
130
|
/**
|
|
127
|
-
* @type {Array<
|
|
131
|
+
* @type {Array<StyleAsRule | StyleAsShaders>}
|
|
128
132
|
* @private
|
|
129
133
|
*/
|
|
130
134
|
private styles_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;EAKE;;
|
|
1
|
+
{"version":3,"file":"VectorLayer.d.ts","sourceRoot":"","sources":["VectorLayer.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;EAKE;;6BAGW,OAAO,2CAA2C,EAAE,SAAS;0BAG7D,OAAO,2CAA2C,EAAE,MAAM;;;;;;;;;WAMzD,OAAO,qBAAqB,EAAE,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,cAAc;;;;;;;;;;;;;;;;;AAVlG;;GAEG;AACH;;GAEG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;OAGG;IACH,mBAHW,OAAO,sBAAsB,EAAE,OAAO,WACtC,OAAO,EA0GjB;IA5FC;;;OAGG;IACH,6BAAwD;IAExD;;;OAGG;IACH,yBAAqB;IAErB;;OAEG;IACH,wBAAyB;IAEzB;;OAEG;IACH,wBAAoC;IAEpC;;;;;;OAMG;IACH,0BAA0C;IAE1C;;OAEG;IACH,mBAAwB;IACxB;;OAEG;IACH,sBAAsC;IACtC;;OAEG;IACH,iBAA4B;IAE5B;;;OAGG;IACH,oCAAoD;IAEpD;;;OAGG;IACH,wBAAyB;IAEzB;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,wBAAyB;IAEzB;;;OAGG;IACH,iBAAkB;IAIlB;;OAEG;IACH,eAAsC;IAEtC;;;OAGG;IACH,8BAAkC;IAElC;;;OAGG;IACH,0BAA6B;IAG/B;;;OAGG;IACH,4BAoCC;IAED;;;OAGG;IACH,sBAGC;IAED;;OAEG;IACH,yBAWC;IAED;;OAEG;IACH,mCAMC;IAoBD;;;;OAIG;IACH,kCAGC;IAED;;;OAGG;IACH,oCAGC;IAED;;;OAGG;IACH,mCAGC;IAED;;OAEG;IACH,kCAEC;IAED;;;OAGG;IACH,uBAsBC;IAED;;;;;OAKG;IACH,iCAJW,OAAO,cAAc,EAAE,UAAU,GAChC,WAAW,CA+BtB;IAwED;;;;;;;OAOG;IACH,yBANW,OAAO,cAAc,EAAE,UAAU,mBACjC,OAAO,cACP,MAAM,YACN,MAAM,cACN,MAAM,QAuChB;IA0CD;;;OAGG;IACH,wBAFW,OAAO,2CAA2C,EAAE,YAAY,QAkB1E;CAkBF;+BAliB8B,YAAY"}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../../proj.js';
|
|
15
15
|
import MixedGeometryBatch from '../../render/webgl/MixedGeometryBatch.js';
|
|
16
16
|
import VectorStyleRenderer from '../../render/webgl/VectorStyleRenderer.js';
|
|
17
|
-
import {colorDecodeId} from '../../render/webgl/utils.js';
|
|
17
|
+
import {breakDownFlatStyle, colorDecodeId} from '../../render/webgl/utils.js';
|
|
18
18
|
import VectorEventType from '../../source/VectorEventType.js';
|
|
19
19
|
import {
|
|
20
20
|
apply as applyTransform,
|
|
@@ -41,13 +41,16 @@ export const Uniforms = {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').
|
|
44
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsShaders} StyleAsShaders
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsRule} StyleAsRule
|
|
45
48
|
*/
|
|
46
49
|
|
|
47
50
|
/**
|
|
48
51
|
* @typedef {Object} Options
|
|
49
52
|
* @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.
|
|
50
|
-
* @property {
|
|
53
|
+
* @property {import('../../style/flat.js').FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders} style Flat vector style; also accepts shaders
|
|
51
54
|
* @property {Object<string, number|Array<number>|string|boolean>} variables Style variables
|
|
52
55
|
* @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will
|
|
53
56
|
* prevent all hit detection on the layer.
|
|
@@ -146,7 +149,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
|
|
|
146
149
|
this.styleVariables_ = {};
|
|
147
150
|
|
|
148
151
|
/**
|
|
149
|
-
* @type {Array<
|
|
152
|
+
* @type {Array<StyleAsRule | StyleAsShaders>}
|
|
150
153
|
* @private
|
|
151
154
|
*/
|
|
152
155
|
this.styles_ = [];
|
|
@@ -231,9 +234,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer {
|
|
|
231
234
|
*/
|
|
232
235
|
applyOptions_(options) {
|
|
233
236
|
this.styleVariables_ = options.variables;
|
|
234
|
-
this.styles_ =
|
|
235
|
-
? options.style
|
|
236
|
-
: [options.style];
|
|
237
|
+
this.styles_ = breakDownFlatStyle(options.style);
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
/**
|
|
@@ -16,12 +16,13 @@ export namespace Attributes {
|
|
|
16
16
|
let POSITION: string;
|
|
17
17
|
}
|
|
18
18
|
export default WebGLVectorTileLayerRenderer;
|
|
19
|
-
export type
|
|
19
|
+
export type StyleAsShaders = import("../../render/webgl/VectorStyleRenderer.js").AsShaders;
|
|
20
|
+
export type StyleAsRule = import("../../render/webgl/VectorStyleRenderer.js").AsRule;
|
|
20
21
|
export type Options = {
|
|
21
22
|
/**
|
|
22
|
-
*
|
|
23
|
+
* Flat vector style; also accepts shaders
|
|
23
24
|
*/
|
|
24
|
-
style:
|
|
25
|
+
style: import("../../style/flat.js").FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders;
|
|
25
26
|
/**
|
|
26
27
|
* Style variables. Each variable must hold a literal value (not
|
|
27
28
|
* an expression). These variables can be used as {@link import ("../../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
@@ -42,11 +43,14 @@ export type Options = {
|
|
|
42
43
|
};
|
|
43
44
|
export type LayerType = import("../../layer/BaseTile.js").default<any, any>;
|
|
44
45
|
/**
|
|
45
|
-
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').
|
|
46
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsShaders} StyleAsShaders
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* @typedef {import('../../render/webgl/VectorStyleRenderer.js').AsRule} StyleAsRule
|
|
46
50
|
*/
|
|
47
51
|
/**
|
|
48
52
|
* @typedef {Object} Options
|
|
49
|
-
* @property {
|
|
53
|
+
* @property {import('../../style/flat.js').FlatStyleLike | Array<StyleAsShaders> | StyleAsShaders} style Flat vector style; also accepts shaders
|
|
50
54
|
* @property {import('../../style/flat.js').StyleVariables} [variables] Style variables. Each variable must hold a literal value (not
|
|
51
55
|
* an expression). These variables can be used as {@link import("../../expr/expression.js").ExpressionValue expressions} in the styles properties
|
|
52
56
|
* using the `['var', 'varName']` operator.
|
|
@@ -74,7 +78,7 @@ declare class WebGLVectorTileLayerRenderer extends WebGLBaseTileLayerRenderer<im
|
|
|
74
78
|
*/
|
|
75
79
|
private hitDetectionEnabled_;
|
|
76
80
|
/**
|
|
77
|
-
* @type {Array<
|
|
81
|
+
* @type {Array<StyleAsRule | StyleAsShaders>}
|
|
78
82
|
* @private
|
|
79
83
|
*/
|
|
80
84
|
private styles_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VectorTileLayer.d.ts","sourceRoot":"","sources":["VectorTileLayer.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;;EAIE;;;;;6BAOW,OAAO,2CAA2C,EAAE,SAAS;0BAG7D,OAAO,2CAA2C,EAAE,MAAM;;;;;WAKzD,OAAO,qBAAqB,EAAE,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,GAAG,cAAc;;;;;;;;;;;;;;;;;;;;AATlG;;GAEG;AACH;;GAEG;AAEH;;;;;;;;;GASG;AAEH;;GAEG;AAEH;;;;GAIG;AACH;IACE;;;OAGG;IACH,uBAHW,SAAS,WACT,OAAO,EAuFjB;IA5EC;;;OAGG;IACH,6BAAwD;IAExD;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,wBAA8C;IAE9C;;;OAGG;IACH,wBAAyB;IAEzB;;;;;;OAMG;IACH,oCAAoD;IAEpD;;OAEG;IACH,sBAAsC;IACtC;;OAEG;IACH,iBAA4B;IAE5B;;;OAGG;IACH,wBAA2B;IAE3B;;OAEG;IACH,yBAGC;IAGD;;;OAGG;IACH,4BAMC;IAED;;;OAGG;IACH,yBAAqB;IAKvB;;;OAGG;IACH,wBAHW,OAAO,QAWjB;IAED;;;OAGG;IACH,sBAEC;IAED;;OAEG;IACH,yBAwCC;IAED;;OAEG;IACH,sBAYC;IAUD;;OAEG;IACH,8DAWC;IAED;;OAEG;IACH,uEAMC;IAED;;OAEG;IACH,yDA0BC;IAED;;OAEG;IACH,4FAeC;IAED;;;;;;;OAOG;IACH,uBAoBC;IAED;;OAEG;IACH,sNA4BC;IAED;;;OAGG;IACH,4BAFW,OAAO,cAAc,EAAE,UAAU,QAEd;CAS/B;uCAzXM,oBAAoB;yBALF,6BAA6B"}
|