@deck.gl/extensions 9.0.12 → 9.0.13
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/brushing/brushing-extension.d.ts.map +1 -1
- package/dist/brushing/brushing-extension.js +2 -9
- package/dist/brushing/shader-module.d.ts.map +1 -1
- package/dist/brushing/shader-module.js +0 -8
- package/dist/collision-filter/collision-filter-extension.d.ts.map +1 -1
- package/dist/collision-filter/collision-filter-extension.js +2 -5
- package/dist/collision-filter/shader-module.d.ts.map +1 -1
- package/dist/collision-filter/shader-module.js +0 -8
- package/dist/data-filter/data-filter-extension.d.ts.map +1 -1
- package/dist/data-filter/data-filter-extension.js +4 -18
- package/dist/data-filter/shader-module.d.ts +0 -12
- package/dist/data-filter/shader-module.d.ts.map +1 -1
- package/dist/data-filter/shader-module.js +10 -22
- package/dist/dist.dev.js +30 -114
- package/dist/fill-style/fill-style-extension.d.ts.map +1 -1
- package/dist/fill-style/fill-style-extension.js +6 -27
- package/dist/fill-style/shader-module.d.ts.map +1 -1
- package/dist/fill-style/shader-module.js +6 -15
- package/dist/index.cjs +30 -112
- package/dist/index.cjs.map +2 -2
- package/dist.min.js +36 -73
- package/package.json +2 -2
- package/src/brushing/brushing-extension.ts +2 -9
- package/src/brushing/shader-module.ts +0 -8
- package/src/collision-filter/collision-filter-extension.ts +2 -5
- package/src/collision-filter/shader-module.ts +0 -8
- package/src/data-filter/data-filter-extension.ts +4 -18
- package/src/data-filter/shader-module.ts +10 -37
- package/src/fill-style/fill-style-extension.ts +6 -27
- package/src/fill-style/shader-module.ts +6 -16
|
@@ -167,15 +167,8 @@ export default class DataFilterExtension extends LayerExtension<
|
|
|
167
167
|
filterValues: {
|
|
168
168
|
size: filterSize,
|
|
169
169
|
type: fp64 ? 'float64' : 'float32',
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
filterValues: {
|
|
173
|
-
divisor: 0
|
|
174
|
-
},
|
|
175
|
-
instanceFilterValues: {
|
|
176
|
-
divisor: 1
|
|
177
|
-
}
|
|
178
|
-
}
|
|
170
|
+
stepMode: 'dynamic',
|
|
171
|
+
accessor: 'getFilterValue'
|
|
179
172
|
}
|
|
180
173
|
});
|
|
181
174
|
}
|
|
@@ -184,19 +177,12 @@ export default class DataFilterExtension extends LayerExtension<
|
|
|
184
177
|
attributeManager.add({
|
|
185
178
|
filterCategoryValues: {
|
|
186
179
|
size: categorySize,
|
|
180
|
+
stepMode: 'dynamic',
|
|
187
181
|
accessor: 'getFilterCategory',
|
|
188
182
|
transform:
|
|
189
183
|
categorySize === 1
|
|
190
184
|
? d => extension._getCategoryKey.call(this, d, 0)
|
|
191
|
-
: d => d.map((x, i) => extension._getCategoryKey.call(this, x, i))
|
|
192
|
-
shaderAttributes: {
|
|
193
|
-
filterCategoryValues: {
|
|
194
|
-
divisor: 0
|
|
195
|
-
},
|
|
196
|
-
instanceFilterCategoryValues: {
|
|
197
|
-
divisor: 1
|
|
198
|
-
}
|
|
199
|
-
}
|
|
185
|
+
: d => d.map((x, i) => extension._getCategoryKey.call(this, x, i))
|
|
200
186
|
}
|
|
201
187
|
});
|
|
202
188
|
}
|
|
@@ -25,20 +25,6 @@ export type Defines = {
|
|
|
25
25
|
* Enable 64-bit precision in numeric filter.
|
|
26
26
|
*/
|
|
27
27
|
DATAFILTER_DOUBLE?: boolean;
|
|
28
|
-
|
|
29
|
-
// Defines derived in shader
|
|
30
|
-
/**
|
|
31
|
-
* Numeric filter attribute
|
|
32
|
-
*/
|
|
33
|
-
DATAFILTER_ATTRIB?: 'filterValues' | 'instanceFilterValues';
|
|
34
|
-
/**
|
|
35
|
-
* Numeric filter attribute (low bits). Only used when `DATAFILTER_DOUBLE = true`
|
|
36
|
-
*/
|
|
37
|
-
DATAFILTER_ATTRIB_64LOW?: 'filterValues64Low' | 'instanceFilterValues64Low';
|
|
38
|
-
/**
|
|
39
|
-
* Category filter attribute
|
|
40
|
-
*/
|
|
41
|
-
DATACATEGORY_ATTRIB?: 'filterCategoryValues' | 'instanceFilterCategoryValues';
|
|
42
28
|
};
|
|
43
29
|
|
|
44
30
|
const vs = glsl`
|
|
@@ -53,17 +39,9 @@ uniform ivec4 filter_categoryBitMask;
|
|
|
53
39
|
uniform DATAFILTER_TYPE filter_softMax;
|
|
54
40
|
uniform DATAFILTER_TYPE filter_max;
|
|
55
41
|
|
|
56
|
-
|
|
57
|
-
#define DATAFILTER_ATTRIB filterValues
|
|
58
|
-
#define DATAFILTER_ATTRIB_64LOW filterValues64Low
|
|
59
|
-
#else
|
|
60
|
-
#define DATAFILTER_ATTRIB instanceFilterValues
|
|
61
|
-
#define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low
|
|
62
|
-
#endif
|
|
63
|
-
|
|
64
|
-
in DATAFILTER_TYPE DATAFILTER_ATTRIB;
|
|
42
|
+
in DATAFILTER_TYPE filterValues;
|
|
65
43
|
#ifdef DATAFILTER_DOUBLE
|
|
66
|
-
in DATAFILTER_TYPE
|
|
44
|
+
in DATAFILTER_TYPE filterValues64Low;
|
|
67
45
|
|
|
68
46
|
uniform DATAFILTER_TYPE filter_min64High;
|
|
69
47
|
uniform DATAFILTER_TYPE filter_max64High;
|
|
@@ -72,12 +50,7 @@ uniform ivec4 filter_categoryBitMask;
|
|
|
72
50
|
|
|
73
51
|
|
|
74
52
|
#ifdef DATACATEGORY_TYPE
|
|
75
|
-
|
|
76
|
-
#define DATACATEGORY_ATTRIB filterCategoryValues
|
|
77
|
-
#else
|
|
78
|
-
#define DATACATEGORY_ATTRIB instanceFilterCategoryValues
|
|
79
|
-
#endif
|
|
80
|
-
in DATACATEGORY_TYPE DATACATEGORY_ATTRIB;
|
|
53
|
+
in DATACATEGORY_TYPE filterCategoryValues;
|
|
81
54
|
#endif
|
|
82
55
|
|
|
83
56
|
out float dataFilter_value;
|
|
@@ -119,7 +92,7 @@ float dataFilter_reduceValue(vec4 value) {
|
|
|
119
92
|
}
|
|
120
93
|
#endif
|
|
121
94
|
|
|
122
|
-
#ifdef
|
|
95
|
+
#ifdef DATACATEGORY_TYPE
|
|
123
96
|
void dataFilter_setCategoryValue(DATACATEGORY_TYPE category) {
|
|
124
97
|
#if DATACATEGORY_CHANNELS == 1 // One 128-bit mask
|
|
125
98
|
int dataFilter_masks = filter_categoryBitMask[int(category / 32.0)];
|
|
@@ -223,19 +196,19 @@ const inject = {
|
|
|
223
196
|
'vs:#main-start': glsl`
|
|
224
197
|
dataFilter_value = 1.0;
|
|
225
198
|
if (filter_enabled) {
|
|
226
|
-
#ifdef
|
|
199
|
+
#ifdef DATAFILTER_TYPE
|
|
227
200
|
#ifdef DATAFILTER_DOUBLE
|
|
228
201
|
dataFilter_setValue(
|
|
229
|
-
|
|
230
|
-
|
|
202
|
+
filterValues - filter_min64High + filterValues64Low,
|
|
203
|
+
filterValues - filter_max64High + filterValues64Low
|
|
231
204
|
);
|
|
232
205
|
#else
|
|
233
|
-
dataFilter_setValue(
|
|
206
|
+
dataFilter_setValue(filterValues, filterValues);
|
|
234
207
|
#endif
|
|
235
208
|
#endif
|
|
236
209
|
|
|
237
|
-
#ifdef
|
|
238
|
-
dataFilter_setCategoryValue(
|
|
210
|
+
#ifdef DATACATEGORY_TYPE
|
|
211
|
+
dataFilter_setCategoryValue(filterCategoryValues);
|
|
239
212
|
#endif
|
|
240
213
|
}
|
|
241
214
|
`,
|
|
@@ -110,41 +110,20 @@ export default class FillStyleExtension extends LayerExtension<FillStyleExtensio
|
|
|
110
110
|
attributeManager!.add({
|
|
111
111
|
fillPatternFrames: {
|
|
112
112
|
size: 4,
|
|
113
|
+
stepMode: 'dynamic',
|
|
113
114
|
accessor: 'getFillPattern',
|
|
114
|
-
transform: extension.getPatternFrame.bind(this)
|
|
115
|
-
shaderAttributes: {
|
|
116
|
-
fillPatternFrames: {
|
|
117
|
-
divisor: 0
|
|
118
|
-
},
|
|
119
|
-
instanceFillPatternFrames: {
|
|
120
|
-
divisor: 1
|
|
121
|
-
}
|
|
122
|
-
}
|
|
115
|
+
transform: extension.getPatternFrame.bind(this)
|
|
123
116
|
},
|
|
124
117
|
fillPatternScales: {
|
|
125
118
|
size: 1,
|
|
119
|
+
stepMode: 'dynamic',
|
|
126
120
|
accessor: 'getFillPatternScale',
|
|
127
|
-
defaultValue: 1
|
|
128
|
-
shaderAttributes: {
|
|
129
|
-
fillPatternScales: {
|
|
130
|
-
divisor: 0
|
|
131
|
-
},
|
|
132
|
-
instanceFillPatternScales: {
|
|
133
|
-
divisor: 1
|
|
134
|
-
}
|
|
135
|
-
}
|
|
121
|
+
defaultValue: 1
|
|
136
122
|
},
|
|
137
123
|
fillPatternOffsets: {
|
|
138
124
|
size: 2,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
fillPatternOffsets: {
|
|
142
|
-
divisor: 0
|
|
143
|
-
},
|
|
144
|
-
instanceFillPatternOffsets: {
|
|
145
|
-
divisor: 1
|
|
146
|
-
}
|
|
147
|
-
}
|
|
125
|
+
stepMode: 'dynamic',
|
|
126
|
+
accessor: 'getFillPatternOffset'
|
|
148
127
|
}
|
|
149
128
|
});
|
|
150
129
|
}
|
|
@@ -9,19 +9,9 @@ import {glsl} from '../utils/syntax-tags';
|
|
|
9
9
|
* fill pattern shader module
|
|
10
10
|
*/
|
|
11
11
|
const patternVs = glsl`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#define FILL_PATTERN_OFFSET_ATTRIB fillPatternOffsets
|
|
16
|
-
#else
|
|
17
|
-
#define FILL_PATTERN_FRAME_ATTRIB instanceFillPatternFrames
|
|
18
|
-
#define FILL_PATTERN_SCALE_ATTRIB instanceFillPatternScales
|
|
19
|
-
#define FILL_PATTERN_OFFSET_ATTRIB instanceFillPatternOffsets
|
|
20
|
-
#endif
|
|
21
|
-
|
|
22
|
-
in vec4 FILL_PATTERN_FRAME_ATTRIB;
|
|
23
|
-
in float FILL_PATTERN_SCALE_ATTRIB;
|
|
24
|
-
in vec2 FILL_PATTERN_OFFSET_ATTRIB;
|
|
12
|
+
in vec4 fillPatternFrames;
|
|
13
|
+
in float fillPatternScales;
|
|
14
|
+
in vec2 fillPatternOffsets;
|
|
25
15
|
|
|
26
16
|
uniform bool fill_patternEnabled;
|
|
27
17
|
uniform vec2 fill_patternTextureSize;
|
|
@@ -52,9 +42,9 @@ const inject = {
|
|
|
52
42
|
|
|
53
43
|
'vs:DECKGL_FILTER_COLOR': glsl`
|
|
54
44
|
if (fill_patternEnabled) {
|
|
55
|
-
fill_patternBounds =
|
|
56
|
-
fill_patternPlacement.xy =
|
|
57
|
-
fill_patternPlacement.zw =
|
|
45
|
+
fill_patternBounds = fillPatternFrames / vec4(fill_patternTextureSize, fill_patternTextureSize);
|
|
46
|
+
fill_patternPlacement.xy = fillPatternOffsets;
|
|
47
|
+
fill_patternPlacement.zw = fillPatternScales * fillPatternFrames.zw;
|
|
58
48
|
}
|
|
59
49
|
`,
|
|
60
50
|
|