@deck.gl/arcgis 9.4.0-alpha.1 → 9.4.0-beta.1
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/dist.dev.js +1043 -1991
- package/dist/index.cjs +9347 -2280
- package/dist/index.cjs.map +3 -4
- package/dist.min.js +4 -3
- package/package.json +9 -5
package/dist/dist.dev.js
CHANGED
|
@@ -12,11 +12,20 @@ var __exports__ = (() => {
|
|
|
12
12
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
13
|
var __getProtoOf = Object.getPrototypeOf;
|
|
14
14
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __esm = (fn, res) => function __init() {
|
|
16
|
-
|
|
15
|
+
var __esm = (fn, res, err) => function __init() {
|
|
16
|
+
if (err) throw err[0];
|
|
17
|
+
try {
|
|
18
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw err = [e], e;
|
|
21
|
+
}
|
|
17
22
|
};
|
|
18
23
|
var __commonJS = (cb, mod3) => function __require() {
|
|
19
|
-
|
|
24
|
+
try {
|
|
25
|
+
return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;
|
|
26
|
+
} catch (e) {
|
|
27
|
+
throw mod3 = 0, e;
|
|
28
|
+
}
|
|
20
29
|
};
|
|
21
30
|
var __export = (target2, all) => {
|
|
22
31
|
for (var name in all)
|
|
@@ -55,668 +64,6 @@ var __exports__ = (() => {
|
|
|
55
64
|
}
|
|
56
65
|
});
|
|
57
66
|
|
|
58
|
-
// ../../node_modules/@luma.gl/webgl/dist/constants/webgl-constants.js
|
|
59
|
-
var GLEnum;
|
|
60
|
-
var init_webgl_constants = __esm({
|
|
61
|
-
"../../node_modules/@luma.gl/webgl/dist/constants/webgl-constants.js"() {
|
|
62
|
-
(function(GLEnum2) {
|
|
63
|
-
GLEnum2[GLEnum2["DEPTH_BUFFER_BIT"] = 256] = "DEPTH_BUFFER_BIT";
|
|
64
|
-
GLEnum2[GLEnum2["STENCIL_BUFFER_BIT"] = 1024] = "STENCIL_BUFFER_BIT";
|
|
65
|
-
GLEnum2[GLEnum2["COLOR_BUFFER_BIT"] = 16384] = "COLOR_BUFFER_BIT";
|
|
66
|
-
GLEnum2[GLEnum2["POINTS"] = 0] = "POINTS";
|
|
67
|
-
GLEnum2[GLEnum2["LINES"] = 1] = "LINES";
|
|
68
|
-
GLEnum2[GLEnum2["LINE_LOOP"] = 2] = "LINE_LOOP";
|
|
69
|
-
GLEnum2[GLEnum2["LINE_STRIP"] = 3] = "LINE_STRIP";
|
|
70
|
-
GLEnum2[GLEnum2["TRIANGLES"] = 4] = "TRIANGLES";
|
|
71
|
-
GLEnum2[GLEnum2["TRIANGLE_STRIP"] = 5] = "TRIANGLE_STRIP";
|
|
72
|
-
GLEnum2[GLEnum2["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN";
|
|
73
|
-
GLEnum2[GLEnum2["ZERO"] = 0] = "ZERO";
|
|
74
|
-
GLEnum2[GLEnum2["ONE"] = 1] = "ONE";
|
|
75
|
-
GLEnum2[GLEnum2["SRC_COLOR"] = 768] = "SRC_COLOR";
|
|
76
|
-
GLEnum2[GLEnum2["ONE_MINUS_SRC_COLOR"] = 769] = "ONE_MINUS_SRC_COLOR";
|
|
77
|
-
GLEnum2[GLEnum2["SRC_ALPHA"] = 770] = "SRC_ALPHA";
|
|
78
|
-
GLEnum2[GLEnum2["ONE_MINUS_SRC_ALPHA"] = 771] = "ONE_MINUS_SRC_ALPHA";
|
|
79
|
-
GLEnum2[GLEnum2["DST_ALPHA"] = 772] = "DST_ALPHA";
|
|
80
|
-
GLEnum2[GLEnum2["ONE_MINUS_DST_ALPHA"] = 773] = "ONE_MINUS_DST_ALPHA";
|
|
81
|
-
GLEnum2[GLEnum2["DST_COLOR"] = 774] = "DST_COLOR";
|
|
82
|
-
GLEnum2[GLEnum2["ONE_MINUS_DST_COLOR"] = 775] = "ONE_MINUS_DST_COLOR";
|
|
83
|
-
GLEnum2[GLEnum2["SRC_ALPHA_SATURATE"] = 776] = "SRC_ALPHA_SATURATE";
|
|
84
|
-
GLEnum2[GLEnum2["CONSTANT_COLOR"] = 32769] = "CONSTANT_COLOR";
|
|
85
|
-
GLEnum2[GLEnum2["ONE_MINUS_CONSTANT_COLOR"] = 32770] = "ONE_MINUS_CONSTANT_COLOR";
|
|
86
|
-
GLEnum2[GLEnum2["CONSTANT_ALPHA"] = 32771] = "CONSTANT_ALPHA";
|
|
87
|
-
GLEnum2[GLEnum2["ONE_MINUS_CONSTANT_ALPHA"] = 32772] = "ONE_MINUS_CONSTANT_ALPHA";
|
|
88
|
-
GLEnum2[GLEnum2["FUNC_ADD"] = 32774] = "FUNC_ADD";
|
|
89
|
-
GLEnum2[GLEnum2["FUNC_SUBTRACT"] = 32778] = "FUNC_SUBTRACT";
|
|
90
|
-
GLEnum2[GLEnum2["FUNC_REVERSE_SUBTRACT"] = 32779] = "FUNC_REVERSE_SUBTRACT";
|
|
91
|
-
GLEnum2[GLEnum2["BLEND_EQUATION"] = 32777] = "BLEND_EQUATION";
|
|
92
|
-
GLEnum2[GLEnum2["BLEND_EQUATION_RGB"] = 32777] = "BLEND_EQUATION_RGB";
|
|
93
|
-
GLEnum2[GLEnum2["BLEND_EQUATION_ALPHA"] = 34877] = "BLEND_EQUATION_ALPHA";
|
|
94
|
-
GLEnum2[GLEnum2["BLEND_DST_RGB"] = 32968] = "BLEND_DST_RGB";
|
|
95
|
-
GLEnum2[GLEnum2["BLEND_SRC_RGB"] = 32969] = "BLEND_SRC_RGB";
|
|
96
|
-
GLEnum2[GLEnum2["BLEND_DST_ALPHA"] = 32970] = "BLEND_DST_ALPHA";
|
|
97
|
-
GLEnum2[GLEnum2["BLEND_SRC_ALPHA"] = 32971] = "BLEND_SRC_ALPHA";
|
|
98
|
-
GLEnum2[GLEnum2["BLEND_COLOR"] = 32773] = "BLEND_COLOR";
|
|
99
|
-
GLEnum2[GLEnum2["ARRAY_BUFFER_BINDING"] = 34964] = "ARRAY_BUFFER_BINDING";
|
|
100
|
-
GLEnum2[GLEnum2["ELEMENT_ARRAY_BUFFER_BINDING"] = 34965] = "ELEMENT_ARRAY_BUFFER_BINDING";
|
|
101
|
-
GLEnum2[GLEnum2["LINE_WIDTH"] = 2849] = "LINE_WIDTH";
|
|
102
|
-
GLEnum2[GLEnum2["ALIASED_POINT_SIZE_RANGE"] = 33901] = "ALIASED_POINT_SIZE_RANGE";
|
|
103
|
-
GLEnum2[GLEnum2["ALIASED_LINE_WIDTH_RANGE"] = 33902] = "ALIASED_LINE_WIDTH_RANGE";
|
|
104
|
-
GLEnum2[GLEnum2["CULL_FACE_MODE"] = 2885] = "CULL_FACE_MODE";
|
|
105
|
-
GLEnum2[GLEnum2["FRONT_FACE"] = 2886] = "FRONT_FACE";
|
|
106
|
-
GLEnum2[GLEnum2["DEPTH_RANGE"] = 2928] = "DEPTH_RANGE";
|
|
107
|
-
GLEnum2[GLEnum2["DEPTH_WRITEMASK"] = 2930] = "DEPTH_WRITEMASK";
|
|
108
|
-
GLEnum2[GLEnum2["DEPTH_CLEAR_VALUE"] = 2931] = "DEPTH_CLEAR_VALUE";
|
|
109
|
-
GLEnum2[GLEnum2["DEPTH_FUNC"] = 2932] = "DEPTH_FUNC";
|
|
110
|
-
GLEnum2[GLEnum2["STENCIL_CLEAR_VALUE"] = 2961] = "STENCIL_CLEAR_VALUE";
|
|
111
|
-
GLEnum2[GLEnum2["STENCIL_FUNC"] = 2962] = "STENCIL_FUNC";
|
|
112
|
-
GLEnum2[GLEnum2["STENCIL_FAIL"] = 2964] = "STENCIL_FAIL";
|
|
113
|
-
GLEnum2[GLEnum2["STENCIL_PASS_DEPTH_FAIL"] = 2965] = "STENCIL_PASS_DEPTH_FAIL";
|
|
114
|
-
GLEnum2[GLEnum2["STENCIL_PASS_DEPTH_PASS"] = 2966] = "STENCIL_PASS_DEPTH_PASS";
|
|
115
|
-
GLEnum2[GLEnum2["STENCIL_REF"] = 2967] = "STENCIL_REF";
|
|
116
|
-
GLEnum2[GLEnum2["STENCIL_VALUE_MASK"] = 2963] = "STENCIL_VALUE_MASK";
|
|
117
|
-
GLEnum2[GLEnum2["STENCIL_WRITEMASK"] = 2968] = "STENCIL_WRITEMASK";
|
|
118
|
-
GLEnum2[GLEnum2["STENCIL_BACK_FUNC"] = 34816] = "STENCIL_BACK_FUNC";
|
|
119
|
-
GLEnum2[GLEnum2["STENCIL_BACK_FAIL"] = 34817] = "STENCIL_BACK_FAIL";
|
|
120
|
-
GLEnum2[GLEnum2["STENCIL_BACK_PASS_DEPTH_FAIL"] = 34818] = "STENCIL_BACK_PASS_DEPTH_FAIL";
|
|
121
|
-
GLEnum2[GLEnum2["STENCIL_BACK_PASS_DEPTH_PASS"] = 34819] = "STENCIL_BACK_PASS_DEPTH_PASS";
|
|
122
|
-
GLEnum2[GLEnum2["STENCIL_BACK_REF"] = 36003] = "STENCIL_BACK_REF";
|
|
123
|
-
GLEnum2[GLEnum2["STENCIL_BACK_VALUE_MASK"] = 36004] = "STENCIL_BACK_VALUE_MASK";
|
|
124
|
-
GLEnum2[GLEnum2["STENCIL_BACK_WRITEMASK"] = 36005] = "STENCIL_BACK_WRITEMASK";
|
|
125
|
-
GLEnum2[GLEnum2["VIEWPORT"] = 2978] = "VIEWPORT";
|
|
126
|
-
GLEnum2[GLEnum2["SCISSOR_BOX"] = 3088] = "SCISSOR_BOX";
|
|
127
|
-
GLEnum2[GLEnum2["COLOR_CLEAR_VALUE"] = 3106] = "COLOR_CLEAR_VALUE";
|
|
128
|
-
GLEnum2[GLEnum2["COLOR_WRITEMASK"] = 3107] = "COLOR_WRITEMASK";
|
|
129
|
-
GLEnum2[GLEnum2["UNPACK_ALIGNMENT"] = 3317] = "UNPACK_ALIGNMENT";
|
|
130
|
-
GLEnum2[GLEnum2["PACK_ALIGNMENT"] = 3333] = "PACK_ALIGNMENT";
|
|
131
|
-
GLEnum2[GLEnum2["MAX_TEXTURE_SIZE"] = 3379] = "MAX_TEXTURE_SIZE";
|
|
132
|
-
GLEnum2[GLEnum2["MAX_VIEWPORT_DIMS"] = 3386] = "MAX_VIEWPORT_DIMS";
|
|
133
|
-
GLEnum2[GLEnum2["SUBPIXEL_BITS"] = 3408] = "SUBPIXEL_BITS";
|
|
134
|
-
GLEnum2[GLEnum2["RED_BITS"] = 3410] = "RED_BITS";
|
|
135
|
-
GLEnum2[GLEnum2["GREEN_BITS"] = 3411] = "GREEN_BITS";
|
|
136
|
-
GLEnum2[GLEnum2["BLUE_BITS"] = 3412] = "BLUE_BITS";
|
|
137
|
-
GLEnum2[GLEnum2["ALPHA_BITS"] = 3413] = "ALPHA_BITS";
|
|
138
|
-
GLEnum2[GLEnum2["DEPTH_BITS"] = 3414] = "DEPTH_BITS";
|
|
139
|
-
GLEnum2[GLEnum2["STENCIL_BITS"] = 3415] = "STENCIL_BITS";
|
|
140
|
-
GLEnum2[GLEnum2["POLYGON_OFFSET_UNITS"] = 10752] = "POLYGON_OFFSET_UNITS";
|
|
141
|
-
GLEnum2[GLEnum2["POLYGON_OFFSET_FACTOR"] = 32824] = "POLYGON_OFFSET_FACTOR";
|
|
142
|
-
GLEnum2[GLEnum2["TEXTURE_BINDING_2D"] = 32873] = "TEXTURE_BINDING_2D";
|
|
143
|
-
GLEnum2[GLEnum2["SAMPLE_BUFFERS"] = 32936] = "SAMPLE_BUFFERS";
|
|
144
|
-
GLEnum2[GLEnum2["SAMPLES"] = 32937] = "SAMPLES";
|
|
145
|
-
GLEnum2[GLEnum2["SAMPLE_COVERAGE_VALUE"] = 32938] = "SAMPLE_COVERAGE_VALUE";
|
|
146
|
-
GLEnum2[GLEnum2["SAMPLE_COVERAGE_INVERT"] = 32939] = "SAMPLE_COVERAGE_INVERT";
|
|
147
|
-
GLEnum2[GLEnum2["COMPRESSED_TEXTURE_FORMATS"] = 34467] = "COMPRESSED_TEXTURE_FORMATS";
|
|
148
|
-
GLEnum2[GLEnum2["VENDOR"] = 7936] = "VENDOR";
|
|
149
|
-
GLEnum2[GLEnum2["RENDERER"] = 7937] = "RENDERER";
|
|
150
|
-
GLEnum2[GLEnum2["VERSION"] = 7938] = "VERSION";
|
|
151
|
-
GLEnum2[GLEnum2["IMPLEMENTATION_COLOR_READ_TYPE"] = 35738] = "IMPLEMENTATION_COLOR_READ_TYPE";
|
|
152
|
-
GLEnum2[GLEnum2["IMPLEMENTATION_COLOR_READ_FORMAT"] = 35739] = "IMPLEMENTATION_COLOR_READ_FORMAT";
|
|
153
|
-
GLEnum2[GLEnum2["BROWSER_DEFAULT_WEBGL"] = 37444] = "BROWSER_DEFAULT_WEBGL";
|
|
154
|
-
GLEnum2[GLEnum2["STATIC_DRAW"] = 35044] = "STATIC_DRAW";
|
|
155
|
-
GLEnum2[GLEnum2["STREAM_DRAW"] = 35040] = "STREAM_DRAW";
|
|
156
|
-
GLEnum2[GLEnum2["DYNAMIC_DRAW"] = 35048] = "DYNAMIC_DRAW";
|
|
157
|
-
GLEnum2[GLEnum2["ARRAY_BUFFER"] = 34962] = "ARRAY_BUFFER";
|
|
158
|
-
GLEnum2[GLEnum2["ELEMENT_ARRAY_BUFFER"] = 34963] = "ELEMENT_ARRAY_BUFFER";
|
|
159
|
-
GLEnum2[GLEnum2["BUFFER_SIZE"] = 34660] = "BUFFER_SIZE";
|
|
160
|
-
GLEnum2[GLEnum2["BUFFER_USAGE"] = 34661] = "BUFFER_USAGE";
|
|
161
|
-
GLEnum2[GLEnum2["CURRENT_VERTEX_ATTRIB"] = 34342] = "CURRENT_VERTEX_ATTRIB";
|
|
162
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_ENABLED"] = 34338] = "VERTEX_ATTRIB_ARRAY_ENABLED";
|
|
163
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_SIZE"] = 34339] = "VERTEX_ATTRIB_ARRAY_SIZE";
|
|
164
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_STRIDE"] = 34340] = "VERTEX_ATTRIB_ARRAY_STRIDE";
|
|
165
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_TYPE"] = 34341] = "VERTEX_ATTRIB_ARRAY_TYPE";
|
|
166
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_NORMALIZED"] = 34922] = "VERTEX_ATTRIB_ARRAY_NORMALIZED";
|
|
167
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_POINTER"] = 34373] = "VERTEX_ATTRIB_ARRAY_POINTER";
|
|
168
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"] = 34975] = "VERTEX_ATTRIB_ARRAY_BUFFER_BINDING";
|
|
169
|
-
GLEnum2[GLEnum2["CULL_FACE"] = 2884] = "CULL_FACE";
|
|
170
|
-
GLEnum2[GLEnum2["FRONT"] = 1028] = "FRONT";
|
|
171
|
-
GLEnum2[GLEnum2["BACK"] = 1029] = "BACK";
|
|
172
|
-
GLEnum2[GLEnum2["FRONT_AND_BACK"] = 1032] = "FRONT_AND_BACK";
|
|
173
|
-
GLEnum2[GLEnum2["BLEND"] = 3042] = "BLEND";
|
|
174
|
-
GLEnum2[GLEnum2["DEPTH_TEST"] = 2929] = "DEPTH_TEST";
|
|
175
|
-
GLEnum2[GLEnum2["DITHER"] = 3024] = "DITHER";
|
|
176
|
-
GLEnum2[GLEnum2["POLYGON_OFFSET_FILL"] = 32823] = "POLYGON_OFFSET_FILL";
|
|
177
|
-
GLEnum2[GLEnum2["SAMPLE_ALPHA_TO_COVERAGE"] = 32926] = "SAMPLE_ALPHA_TO_COVERAGE";
|
|
178
|
-
GLEnum2[GLEnum2["SAMPLE_COVERAGE"] = 32928] = "SAMPLE_COVERAGE";
|
|
179
|
-
GLEnum2[GLEnum2["SCISSOR_TEST"] = 3089] = "SCISSOR_TEST";
|
|
180
|
-
GLEnum2[GLEnum2["STENCIL_TEST"] = 2960] = "STENCIL_TEST";
|
|
181
|
-
GLEnum2[GLEnum2["NO_ERROR"] = 0] = "NO_ERROR";
|
|
182
|
-
GLEnum2[GLEnum2["INVALID_ENUM"] = 1280] = "INVALID_ENUM";
|
|
183
|
-
GLEnum2[GLEnum2["INVALID_VALUE"] = 1281] = "INVALID_VALUE";
|
|
184
|
-
GLEnum2[GLEnum2["INVALID_OPERATION"] = 1282] = "INVALID_OPERATION";
|
|
185
|
-
GLEnum2[GLEnum2["OUT_OF_MEMORY"] = 1285] = "OUT_OF_MEMORY";
|
|
186
|
-
GLEnum2[GLEnum2["CONTEXT_LOST_WEBGL"] = 37442] = "CONTEXT_LOST_WEBGL";
|
|
187
|
-
GLEnum2[GLEnum2["CW"] = 2304] = "CW";
|
|
188
|
-
GLEnum2[GLEnum2["CCW"] = 2305] = "CCW";
|
|
189
|
-
GLEnum2[GLEnum2["DONT_CARE"] = 4352] = "DONT_CARE";
|
|
190
|
-
GLEnum2[GLEnum2["FASTEST"] = 4353] = "FASTEST";
|
|
191
|
-
GLEnum2[GLEnum2["NICEST"] = 4354] = "NICEST";
|
|
192
|
-
GLEnum2[GLEnum2["GENERATE_MIPMAP_HINT"] = 33170] = "GENERATE_MIPMAP_HINT";
|
|
193
|
-
GLEnum2[GLEnum2["BYTE"] = 5120] = "BYTE";
|
|
194
|
-
GLEnum2[GLEnum2["UNSIGNED_BYTE"] = 5121] = "UNSIGNED_BYTE";
|
|
195
|
-
GLEnum2[GLEnum2["SHORT"] = 5122] = "SHORT";
|
|
196
|
-
GLEnum2[GLEnum2["UNSIGNED_SHORT"] = 5123] = "UNSIGNED_SHORT";
|
|
197
|
-
GLEnum2[GLEnum2["INT"] = 5124] = "INT";
|
|
198
|
-
GLEnum2[GLEnum2["UNSIGNED_INT"] = 5125] = "UNSIGNED_INT";
|
|
199
|
-
GLEnum2[GLEnum2["FLOAT"] = 5126] = "FLOAT";
|
|
200
|
-
GLEnum2[GLEnum2["DOUBLE"] = 5130] = "DOUBLE";
|
|
201
|
-
GLEnum2[GLEnum2["DEPTH_COMPONENT"] = 6402] = "DEPTH_COMPONENT";
|
|
202
|
-
GLEnum2[GLEnum2["ALPHA"] = 6406] = "ALPHA";
|
|
203
|
-
GLEnum2[GLEnum2["RGB"] = 6407] = "RGB";
|
|
204
|
-
GLEnum2[GLEnum2["RGBA"] = 6408] = "RGBA";
|
|
205
|
-
GLEnum2[GLEnum2["LUMINANCE"] = 6409] = "LUMINANCE";
|
|
206
|
-
GLEnum2[GLEnum2["LUMINANCE_ALPHA"] = 6410] = "LUMINANCE_ALPHA";
|
|
207
|
-
GLEnum2[GLEnum2["UNSIGNED_SHORT_4_4_4_4"] = 32819] = "UNSIGNED_SHORT_4_4_4_4";
|
|
208
|
-
GLEnum2[GLEnum2["UNSIGNED_SHORT_5_5_5_1"] = 32820] = "UNSIGNED_SHORT_5_5_5_1";
|
|
209
|
-
GLEnum2[GLEnum2["UNSIGNED_SHORT_5_6_5"] = 33635] = "UNSIGNED_SHORT_5_6_5";
|
|
210
|
-
GLEnum2[GLEnum2["FRAGMENT_SHADER"] = 35632] = "FRAGMENT_SHADER";
|
|
211
|
-
GLEnum2[GLEnum2["VERTEX_SHADER"] = 35633] = "VERTEX_SHADER";
|
|
212
|
-
GLEnum2[GLEnum2["COMPILE_STATUS"] = 35713] = "COMPILE_STATUS";
|
|
213
|
-
GLEnum2[GLEnum2["DELETE_STATUS"] = 35712] = "DELETE_STATUS";
|
|
214
|
-
GLEnum2[GLEnum2["LINK_STATUS"] = 35714] = "LINK_STATUS";
|
|
215
|
-
GLEnum2[GLEnum2["VALIDATE_STATUS"] = 35715] = "VALIDATE_STATUS";
|
|
216
|
-
GLEnum2[GLEnum2["ATTACHED_SHADERS"] = 35717] = "ATTACHED_SHADERS";
|
|
217
|
-
GLEnum2[GLEnum2["ACTIVE_ATTRIBUTES"] = 35721] = "ACTIVE_ATTRIBUTES";
|
|
218
|
-
GLEnum2[GLEnum2["ACTIVE_UNIFORMS"] = 35718] = "ACTIVE_UNIFORMS";
|
|
219
|
-
GLEnum2[GLEnum2["MAX_VERTEX_ATTRIBS"] = 34921] = "MAX_VERTEX_ATTRIBS";
|
|
220
|
-
GLEnum2[GLEnum2["MAX_VERTEX_UNIFORM_VECTORS"] = 36347] = "MAX_VERTEX_UNIFORM_VECTORS";
|
|
221
|
-
GLEnum2[GLEnum2["MAX_VARYING_VECTORS"] = 36348] = "MAX_VARYING_VECTORS";
|
|
222
|
-
GLEnum2[GLEnum2["MAX_COMBINED_TEXTURE_IMAGE_UNITS"] = 35661] = "MAX_COMBINED_TEXTURE_IMAGE_UNITS";
|
|
223
|
-
GLEnum2[GLEnum2["MAX_VERTEX_TEXTURE_IMAGE_UNITS"] = 35660] = "MAX_VERTEX_TEXTURE_IMAGE_UNITS";
|
|
224
|
-
GLEnum2[GLEnum2["MAX_TEXTURE_IMAGE_UNITS"] = 34930] = "MAX_TEXTURE_IMAGE_UNITS";
|
|
225
|
-
GLEnum2[GLEnum2["MAX_FRAGMENT_UNIFORM_VECTORS"] = 36349] = "MAX_FRAGMENT_UNIFORM_VECTORS";
|
|
226
|
-
GLEnum2[GLEnum2["SHADER_TYPE"] = 35663] = "SHADER_TYPE";
|
|
227
|
-
GLEnum2[GLEnum2["SHADING_LANGUAGE_VERSION"] = 35724] = "SHADING_LANGUAGE_VERSION";
|
|
228
|
-
GLEnum2[GLEnum2["CURRENT_PROGRAM"] = 35725] = "CURRENT_PROGRAM";
|
|
229
|
-
GLEnum2[GLEnum2["NEVER"] = 512] = "NEVER";
|
|
230
|
-
GLEnum2[GLEnum2["LESS"] = 513] = "LESS";
|
|
231
|
-
GLEnum2[GLEnum2["EQUAL"] = 514] = "EQUAL";
|
|
232
|
-
GLEnum2[GLEnum2["LEQUAL"] = 515] = "LEQUAL";
|
|
233
|
-
GLEnum2[GLEnum2["GREATER"] = 516] = "GREATER";
|
|
234
|
-
GLEnum2[GLEnum2["NOTEQUAL"] = 517] = "NOTEQUAL";
|
|
235
|
-
GLEnum2[GLEnum2["GEQUAL"] = 518] = "GEQUAL";
|
|
236
|
-
GLEnum2[GLEnum2["ALWAYS"] = 519] = "ALWAYS";
|
|
237
|
-
GLEnum2[GLEnum2["KEEP"] = 7680] = "KEEP";
|
|
238
|
-
GLEnum2[GLEnum2["REPLACE"] = 7681] = "REPLACE";
|
|
239
|
-
GLEnum2[GLEnum2["INCR"] = 7682] = "INCR";
|
|
240
|
-
GLEnum2[GLEnum2["DECR"] = 7683] = "DECR";
|
|
241
|
-
GLEnum2[GLEnum2["INVERT"] = 5386] = "INVERT";
|
|
242
|
-
GLEnum2[GLEnum2["INCR_WRAP"] = 34055] = "INCR_WRAP";
|
|
243
|
-
GLEnum2[GLEnum2["DECR_WRAP"] = 34056] = "DECR_WRAP";
|
|
244
|
-
GLEnum2[GLEnum2["NEAREST"] = 9728] = "NEAREST";
|
|
245
|
-
GLEnum2[GLEnum2["LINEAR"] = 9729] = "LINEAR";
|
|
246
|
-
GLEnum2[GLEnum2["NEAREST_MIPMAP_NEAREST"] = 9984] = "NEAREST_MIPMAP_NEAREST";
|
|
247
|
-
GLEnum2[GLEnum2["LINEAR_MIPMAP_NEAREST"] = 9985] = "LINEAR_MIPMAP_NEAREST";
|
|
248
|
-
GLEnum2[GLEnum2["NEAREST_MIPMAP_LINEAR"] = 9986] = "NEAREST_MIPMAP_LINEAR";
|
|
249
|
-
GLEnum2[GLEnum2["LINEAR_MIPMAP_LINEAR"] = 9987] = "LINEAR_MIPMAP_LINEAR";
|
|
250
|
-
GLEnum2[GLEnum2["TEXTURE_MAG_FILTER"] = 10240] = "TEXTURE_MAG_FILTER";
|
|
251
|
-
GLEnum2[GLEnum2["TEXTURE_MIN_FILTER"] = 10241] = "TEXTURE_MIN_FILTER";
|
|
252
|
-
GLEnum2[GLEnum2["TEXTURE_WRAP_S"] = 10242] = "TEXTURE_WRAP_S";
|
|
253
|
-
GLEnum2[GLEnum2["TEXTURE_WRAP_T"] = 10243] = "TEXTURE_WRAP_T";
|
|
254
|
-
GLEnum2[GLEnum2["TEXTURE_2D"] = 3553] = "TEXTURE_2D";
|
|
255
|
-
GLEnum2[GLEnum2["TEXTURE"] = 5890] = "TEXTURE";
|
|
256
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP"] = 34067] = "TEXTURE_CUBE_MAP";
|
|
257
|
-
GLEnum2[GLEnum2["TEXTURE_BINDING_CUBE_MAP"] = 34068] = "TEXTURE_BINDING_CUBE_MAP";
|
|
258
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_POSITIVE_X"] = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X";
|
|
259
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_NEGATIVE_X"] = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X";
|
|
260
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_POSITIVE_Y"] = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y";
|
|
261
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_NEGATIVE_Y"] = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y";
|
|
262
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_POSITIVE_Z"] = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z";
|
|
263
|
-
GLEnum2[GLEnum2["TEXTURE_CUBE_MAP_NEGATIVE_Z"] = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z";
|
|
264
|
-
GLEnum2[GLEnum2["MAX_CUBE_MAP_TEXTURE_SIZE"] = 34076] = "MAX_CUBE_MAP_TEXTURE_SIZE";
|
|
265
|
-
GLEnum2[GLEnum2["TEXTURE0"] = 33984] = "TEXTURE0";
|
|
266
|
-
GLEnum2[GLEnum2["ACTIVE_TEXTURE"] = 34016] = "ACTIVE_TEXTURE";
|
|
267
|
-
GLEnum2[GLEnum2["REPEAT"] = 10497] = "REPEAT";
|
|
268
|
-
GLEnum2[GLEnum2["CLAMP_TO_EDGE"] = 33071] = "CLAMP_TO_EDGE";
|
|
269
|
-
GLEnum2[GLEnum2["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
|
|
270
|
-
GLEnum2[GLEnum2["TEXTURE_WIDTH"] = 4096] = "TEXTURE_WIDTH";
|
|
271
|
-
GLEnum2[GLEnum2["TEXTURE_HEIGHT"] = 4097] = "TEXTURE_HEIGHT";
|
|
272
|
-
GLEnum2[GLEnum2["FLOAT_VEC2"] = 35664] = "FLOAT_VEC2";
|
|
273
|
-
GLEnum2[GLEnum2["FLOAT_VEC3"] = 35665] = "FLOAT_VEC3";
|
|
274
|
-
GLEnum2[GLEnum2["FLOAT_VEC4"] = 35666] = "FLOAT_VEC4";
|
|
275
|
-
GLEnum2[GLEnum2["INT_VEC2"] = 35667] = "INT_VEC2";
|
|
276
|
-
GLEnum2[GLEnum2["INT_VEC3"] = 35668] = "INT_VEC3";
|
|
277
|
-
GLEnum2[GLEnum2["INT_VEC4"] = 35669] = "INT_VEC4";
|
|
278
|
-
GLEnum2[GLEnum2["BOOL"] = 35670] = "BOOL";
|
|
279
|
-
GLEnum2[GLEnum2["BOOL_VEC2"] = 35671] = "BOOL_VEC2";
|
|
280
|
-
GLEnum2[GLEnum2["BOOL_VEC3"] = 35672] = "BOOL_VEC3";
|
|
281
|
-
GLEnum2[GLEnum2["BOOL_VEC4"] = 35673] = "BOOL_VEC4";
|
|
282
|
-
GLEnum2[GLEnum2["FLOAT_MAT2"] = 35674] = "FLOAT_MAT2";
|
|
283
|
-
GLEnum2[GLEnum2["FLOAT_MAT3"] = 35675] = "FLOAT_MAT3";
|
|
284
|
-
GLEnum2[GLEnum2["FLOAT_MAT4"] = 35676] = "FLOAT_MAT4";
|
|
285
|
-
GLEnum2[GLEnum2["SAMPLER_2D"] = 35678] = "SAMPLER_2D";
|
|
286
|
-
GLEnum2[GLEnum2["SAMPLER_CUBE"] = 35680] = "SAMPLER_CUBE";
|
|
287
|
-
GLEnum2[GLEnum2["LOW_FLOAT"] = 36336] = "LOW_FLOAT";
|
|
288
|
-
GLEnum2[GLEnum2["MEDIUM_FLOAT"] = 36337] = "MEDIUM_FLOAT";
|
|
289
|
-
GLEnum2[GLEnum2["HIGH_FLOAT"] = 36338] = "HIGH_FLOAT";
|
|
290
|
-
GLEnum2[GLEnum2["LOW_INT"] = 36339] = "LOW_INT";
|
|
291
|
-
GLEnum2[GLEnum2["MEDIUM_INT"] = 36340] = "MEDIUM_INT";
|
|
292
|
-
GLEnum2[GLEnum2["HIGH_INT"] = 36341] = "HIGH_INT";
|
|
293
|
-
GLEnum2[GLEnum2["FRAMEBUFFER"] = 36160] = "FRAMEBUFFER";
|
|
294
|
-
GLEnum2[GLEnum2["RENDERBUFFER"] = 36161] = "RENDERBUFFER";
|
|
295
|
-
GLEnum2[GLEnum2["RGBA4"] = 32854] = "RGBA4";
|
|
296
|
-
GLEnum2[GLEnum2["RGB5_A1"] = 32855] = "RGB5_A1";
|
|
297
|
-
GLEnum2[GLEnum2["RGB565"] = 36194] = "RGB565";
|
|
298
|
-
GLEnum2[GLEnum2["DEPTH_COMPONENT16"] = 33189] = "DEPTH_COMPONENT16";
|
|
299
|
-
GLEnum2[GLEnum2["STENCIL_INDEX"] = 6401] = "STENCIL_INDEX";
|
|
300
|
-
GLEnum2[GLEnum2["STENCIL_INDEX8"] = 36168] = "STENCIL_INDEX8";
|
|
301
|
-
GLEnum2[GLEnum2["DEPTH_STENCIL"] = 34041] = "DEPTH_STENCIL";
|
|
302
|
-
GLEnum2[GLEnum2["RENDERBUFFER_WIDTH"] = 36162] = "RENDERBUFFER_WIDTH";
|
|
303
|
-
GLEnum2[GLEnum2["RENDERBUFFER_HEIGHT"] = 36163] = "RENDERBUFFER_HEIGHT";
|
|
304
|
-
GLEnum2[GLEnum2["RENDERBUFFER_INTERNAL_FORMAT"] = 36164] = "RENDERBUFFER_INTERNAL_FORMAT";
|
|
305
|
-
GLEnum2[GLEnum2["RENDERBUFFER_RED_SIZE"] = 36176] = "RENDERBUFFER_RED_SIZE";
|
|
306
|
-
GLEnum2[GLEnum2["RENDERBUFFER_GREEN_SIZE"] = 36177] = "RENDERBUFFER_GREEN_SIZE";
|
|
307
|
-
GLEnum2[GLEnum2["RENDERBUFFER_BLUE_SIZE"] = 36178] = "RENDERBUFFER_BLUE_SIZE";
|
|
308
|
-
GLEnum2[GLEnum2["RENDERBUFFER_ALPHA_SIZE"] = 36179] = "RENDERBUFFER_ALPHA_SIZE";
|
|
309
|
-
GLEnum2[GLEnum2["RENDERBUFFER_DEPTH_SIZE"] = 36180] = "RENDERBUFFER_DEPTH_SIZE";
|
|
310
|
-
GLEnum2[GLEnum2["RENDERBUFFER_STENCIL_SIZE"] = 36181] = "RENDERBUFFER_STENCIL_SIZE";
|
|
311
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"] = 36048] = "FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE";
|
|
312
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"] = 36049] = "FRAMEBUFFER_ATTACHMENT_OBJECT_NAME";
|
|
313
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"] = 36050] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL";
|
|
314
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"] = 36051] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE";
|
|
315
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT0"] = 36064] = "COLOR_ATTACHMENT0";
|
|
316
|
-
GLEnum2[GLEnum2["DEPTH_ATTACHMENT"] = 36096] = "DEPTH_ATTACHMENT";
|
|
317
|
-
GLEnum2[GLEnum2["STENCIL_ATTACHMENT"] = 36128] = "STENCIL_ATTACHMENT";
|
|
318
|
-
GLEnum2[GLEnum2["DEPTH_STENCIL_ATTACHMENT"] = 33306] = "DEPTH_STENCIL_ATTACHMENT";
|
|
319
|
-
GLEnum2[GLEnum2["NONE"] = 0] = "NONE";
|
|
320
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_COMPLETE"] = 36053] = "FRAMEBUFFER_COMPLETE";
|
|
321
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_INCOMPLETE_ATTACHMENT"] = 36054] = "FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
|
|
322
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"] = 36055] = "FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";
|
|
323
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_INCOMPLETE_DIMENSIONS"] = 36057] = "FRAMEBUFFER_INCOMPLETE_DIMENSIONS";
|
|
324
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_UNSUPPORTED"] = 36061] = "FRAMEBUFFER_UNSUPPORTED";
|
|
325
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_BINDING"] = 36006] = "FRAMEBUFFER_BINDING";
|
|
326
|
-
GLEnum2[GLEnum2["RENDERBUFFER_BINDING"] = 36007] = "RENDERBUFFER_BINDING";
|
|
327
|
-
GLEnum2[GLEnum2["READ_FRAMEBUFFER"] = 36008] = "READ_FRAMEBUFFER";
|
|
328
|
-
GLEnum2[GLEnum2["DRAW_FRAMEBUFFER"] = 36009] = "DRAW_FRAMEBUFFER";
|
|
329
|
-
GLEnum2[GLEnum2["MAX_RENDERBUFFER_SIZE"] = 34024] = "MAX_RENDERBUFFER_SIZE";
|
|
330
|
-
GLEnum2[GLEnum2["INVALID_FRAMEBUFFER_OPERATION"] = 1286] = "INVALID_FRAMEBUFFER_OPERATION";
|
|
331
|
-
GLEnum2[GLEnum2["UNPACK_FLIP_Y_WEBGL"] = 37440] = "UNPACK_FLIP_Y_WEBGL";
|
|
332
|
-
GLEnum2[GLEnum2["UNPACK_PREMULTIPLY_ALPHA_WEBGL"] = 37441] = "UNPACK_PREMULTIPLY_ALPHA_WEBGL";
|
|
333
|
-
GLEnum2[GLEnum2["UNPACK_COLORSPACE_CONVERSION_WEBGL"] = 37443] = "UNPACK_COLORSPACE_CONVERSION_WEBGL";
|
|
334
|
-
GLEnum2[GLEnum2["READ_BUFFER"] = 3074] = "READ_BUFFER";
|
|
335
|
-
GLEnum2[GLEnum2["UNPACK_ROW_LENGTH"] = 3314] = "UNPACK_ROW_LENGTH";
|
|
336
|
-
GLEnum2[GLEnum2["UNPACK_SKIP_ROWS"] = 3315] = "UNPACK_SKIP_ROWS";
|
|
337
|
-
GLEnum2[GLEnum2["UNPACK_SKIP_PIXELS"] = 3316] = "UNPACK_SKIP_PIXELS";
|
|
338
|
-
GLEnum2[GLEnum2["PACK_ROW_LENGTH"] = 3330] = "PACK_ROW_LENGTH";
|
|
339
|
-
GLEnum2[GLEnum2["PACK_SKIP_ROWS"] = 3331] = "PACK_SKIP_ROWS";
|
|
340
|
-
GLEnum2[GLEnum2["PACK_SKIP_PIXELS"] = 3332] = "PACK_SKIP_PIXELS";
|
|
341
|
-
GLEnum2[GLEnum2["TEXTURE_BINDING_3D"] = 32874] = "TEXTURE_BINDING_3D";
|
|
342
|
-
GLEnum2[GLEnum2["UNPACK_SKIP_IMAGES"] = 32877] = "UNPACK_SKIP_IMAGES";
|
|
343
|
-
GLEnum2[GLEnum2["UNPACK_IMAGE_HEIGHT"] = 32878] = "UNPACK_IMAGE_HEIGHT";
|
|
344
|
-
GLEnum2[GLEnum2["MAX_3D_TEXTURE_SIZE"] = 32883] = "MAX_3D_TEXTURE_SIZE";
|
|
345
|
-
GLEnum2[GLEnum2["MAX_ELEMENTS_VERTICES"] = 33e3] = "MAX_ELEMENTS_VERTICES";
|
|
346
|
-
GLEnum2[GLEnum2["MAX_ELEMENTS_INDICES"] = 33001] = "MAX_ELEMENTS_INDICES";
|
|
347
|
-
GLEnum2[GLEnum2["MAX_TEXTURE_LOD_BIAS"] = 34045] = "MAX_TEXTURE_LOD_BIAS";
|
|
348
|
-
GLEnum2[GLEnum2["MAX_FRAGMENT_UNIFORM_COMPONENTS"] = 35657] = "MAX_FRAGMENT_UNIFORM_COMPONENTS";
|
|
349
|
-
GLEnum2[GLEnum2["MAX_VERTEX_UNIFORM_COMPONENTS"] = 35658] = "MAX_VERTEX_UNIFORM_COMPONENTS";
|
|
350
|
-
GLEnum2[GLEnum2["MAX_ARRAY_TEXTURE_LAYERS"] = 35071] = "MAX_ARRAY_TEXTURE_LAYERS";
|
|
351
|
-
GLEnum2[GLEnum2["MIN_PROGRAM_TEXEL_OFFSET"] = 35076] = "MIN_PROGRAM_TEXEL_OFFSET";
|
|
352
|
-
GLEnum2[GLEnum2["MAX_PROGRAM_TEXEL_OFFSET"] = 35077] = "MAX_PROGRAM_TEXEL_OFFSET";
|
|
353
|
-
GLEnum2[GLEnum2["MAX_VARYING_COMPONENTS"] = 35659] = "MAX_VARYING_COMPONENTS";
|
|
354
|
-
GLEnum2[GLEnum2["FRAGMENT_SHADER_DERIVATIVE_HINT"] = 35723] = "FRAGMENT_SHADER_DERIVATIVE_HINT";
|
|
355
|
-
GLEnum2[GLEnum2["RASTERIZER_DISCARD"] = 35977] = "RASTERIZER_DISCARD";
|
|
356
|
-
GLEnum2[GLEnum2["VERTEX_ARRAY_BINDING"] = 34229] = "VERTEX_ARRAY_BINDING";
|
|
357
|
-
GLEnum2[GLEnum2["MAX_VERTEX_OUTPUT_COMPONENTS"] = 37154] = "MAX_VERTEX_OUTPUT_COMPONENTS";
|
|
358
|
-
GLEnum2[GLEnum2["MAX_FRAGMENT_INPUT_COMPONENTS"] = 37157] = "MAX_FRAGMENT_INPUT_COMPONENTS";
|
|
359
|
-
GLEnum2[GLEnum2["MAX_SERVER_WAIT_TIMEOUT"] = 37137] = "MAX_SERVER_WAIT_TIMEOUT";
|
|
360
|
-
GLEnum2[GLEnum2["MAX_ELEMENT_INDEX"] = 36203] = "MAX_ELEMENT_INDEX";
|
|
361
|
-
GLEnum2[GLEnum2["RED"] = 6403] = "RED";
|
|
362
|
-
GLEnum2[GLEnum2["RGB8"] = 32849] = "RGB8";
|
|
363
|
-
GLEnum2[GLEnum2["RGBA8"] = 32856] = "RGBA8";
|
|
364
|
-
GLEnum2[GLEnum2["RGB10_A2"] = 32857] = "RGB10_A2";
|
|
365
|
-
GLEnum2[GLEnum2["TEXTURE_3D"] = 32879] = "TEXTURE_3D";
|
|
366
|
-
GLEnum2[GLEnum2["TEXTURE_WRAP_R"] = 32882] = "TEXTURE_WRAP_R";
|
|
367
|
-
GLEnum2[GLEnum2["TEXTURE_MIN_LOD"] = 33082] = "TEXTURE_MIN_LOD";
|
|
368
|
-
GLEnum2[GLEnum2["TEXTURE_MAX_LOD"] = 33083] = "TEXTURE_MAX_LOD";
|
|
369
|
-
GLEnum2[GLEnum2["TEXTURE_BASE_LEVEL"] = 33084] = "TEXTURE_BASE_LEVEL";
|
|
370
|
-
GLEnum2[GLEnum2["TEXTURE_MAX_LEVEL"] = 33085] = "TEXTURE_MAX_LEVEL";
|
|
371
|
-
GLEnum2[GLEnum2["TEXTURE_COMPARE_MODE"] = 34892] = "TEXTURE_COMPARE_MODE";
|
|
372
|
-
GLEnum2[GLEnum2["TEXTURE_COMPARE_FUNC"] = 34893] = "TEXTURE_COMPARE_FUNC";
|
|
373
|
-
GLEnum2[GLEnum2["SRGB"] = 35904] = "SRGB";
|
|
374
|
-
GLEnum2[GLEnum2["SRGB8"] = 35905] = "SRGB8";
|
|
375
|
-
GLEnum2[GLEnum2["SRGB8_ALPHA8"] = 35907] = "SRGB8_ALPHA8";
|
|
376
|
-
GLEnum2[GLEnum2["COMPARE_REF_TO_TEXTURE"] = 34894] = "COMPARE_REF_TO_TEXTURE";
|
|
377
|
-
GLEnum2[GLEnum2["RGBA32F"] = 34836] = "RGBA32F";
|
|
378
|
-
GLEnum2[GLEnum2["RGB32F"] = 34837] = "RGB32F";
|
|
379
|
-
GLEnum2[GLEnum2["RGBA16F"] = 34842] = "RGBA16F";
|
|
380
|
-
GLEnum2[GLEnum2["RGB16F"] = 34843] = "RGB16F";
|
|
381
|
-
GLEnum2[GLEnum2["TEXTURE_2D_ARRAY"] = 35866] = "TEXTURE_2D_ARRAY";
|
|
382
|
-
GLEnum2[GLEnum2["TEXTURE_BINDING_2D_ARRAY"] = 35869] = "TEXTURE_BINDING_2D_ARRAY";
|
|
383
|
-
GLEnum2[GLEnum2["R11F_G11F_B10F"] = 35898] = "R11F_G11F_B10F";
|
|
384
|
-
GLEnum2[GLEnum2["RGB9_E5"] = 35901] = "RGB9_E5";
|
|
385
|
-
GLEnum2[GLEnum2["RGBA32UI"] = 36208] = "RGBA32UI";
|
|
386
|
-
GLEnum2[GLEnum2["RGB32UI"] = 36209] = "RGB32UI";
|
|
387
|
-
GLEnum2[GLEnum2["RGBA16UI"] = 36214] = "RGBA16UI";
|
|
388
|
-
GLEnum2[GLEnum2["RGB16UI"] = 36215] = "RGB16UI";
|
|
389
|
-
GLEnum2[GLEnum2["RGBA8UI"] = 36220] = "RGBA8UI";
|
|
390
|
-
GLEnum2[GLEnum2["RGB8UI"] = 36221] = "RGB8UI";
|
|
391
|
-
GLEnum2[GLEnum2["RGBA32I"] = 36226] = "RGBA32I";
|
|
392
|
-
GLEnum2[GLEnum2["RGB32I"] = 36227] = "RGB32I";
|
|
393
|
-
GLEnum2[GLEnum2["RGBA16I"] = 36232] = "RGBA16I";
|
|
394
|
-
GLEnum2[GLEnum2["RGB16I"] = 36233] = "RGB16I";
|
|
395
|
-
GLEnum2[GLEnum2["RGBA8I"] = 36238] = "RGBA8I";
|
|
396
|
-
GLEnum2[GLEnum2["RGB8I"] = 36239] = "RGB8I";
|
|
397
|
-
GLEnum2[GLEnum2["RED_INTEGER"] = 36244] = "RED_INTEGER";
|
|
398
|
-
GLEnum2[GLEnum2["RGB_INTEGER"] = 36248] = "RGB_INTEGER";
|
|
399
|
-
GLEnum2[GLEnum2["RGBA_INTEGER"] = 36249] = "RGBA_INTEGER";
|
|
400
|
-
GLEnum2[GLEnum2["R8"] = 33321] = "R8";
|
|
401
|
-
GLEnum2[GLEnum2["RG8"] = 33323] = "RG8";
|
|
402
|
-
GLEnum2[GLEnum2["R16F"] = 33325] = "R16F";
|
|
403
|
-
GLEnum2[GLEnum2["R32F"] = 33326] = "R32F";
|
|
404
|
-
GLEnum2[GLEnum2["RG16F"] = 33327] = "RG16F";
|
|
405
|
-
GLEnum2[GLEnum2["RG32F"] = 33328] = "RG32F";
|
|
406
|
-
GLEnum2[GLEnum2["R8I"] = 33329] = "R8I";
|
|
407
|
-
GLEnum2[GLEnum2["R8UI"] = 33330] = "R8UI";
|
|
408
|
-
GLEnum2[GLEnum2["R16I"] = 33331] = "R16I";
|
|
409
|
-
GLEnum2[GLEnum2["R16UI"] = 33332] = "R16UI";
|
|
410
|
-
GLEnum2[GLEnum2["R32I"] = 33333] = "R32I";
|
|
411
|
-
GLEnum2[GLEnum2["R32UI"] = 33334] = "R32UI";
|
|
412
|
-
GLEnum2[GLEnum2["RG8I"] = 33335] = "RG8I";
|
|
413
|
-
GLEnum2[GLEnum2["RG8UI"] = 33336] = "RG8UI";
|
|
414
|
-
GLEnum2[GLEnum2["RG16I"] = 33337] = "RG16I";
|
|
415
|
-
GLEnum2[GLEnum2["RG16UI"] = 33338] = "RG16UI";
|
|
416
|
-
GLEnum2[GLEnum2["RG32I"] = 33339] = "RG32I";
|
|
417
|
-
GLEnum2[GLEnum2["RG32UI"] = 33340] = "RG32UI";
|
|
418
|
-
GLEnum2[GLEnum2["R8_SNORM"] = 36756] = "R8_SNORM";
|
|
419
|
-
GLEnum2[GLEnum2["RG8_SNORM"] = 36757] = "RG8_SNORM";
|
|
420
|
-
GLEnum2[GLEnum2["RGB8_SNORM"] = 36758] = "RGB8_SNORM";
|
|
421
|
-
GLEnum2[GLEnum2["RGBA8_SNORM"] = 36759] = "RGBA8_SNORM";
|
|
422
|
-
GLEnum2[GLEnum2["RGB10_A2UI"] = 36975] = "RGB10_A2UI";
|
|
423
|
-
GLEnum2[GLEnum2["TEXTURE_IMMUTABLE_FORMAT"] = 37167] = "TEXTURE_IMMUTABLE_FORMAT";
|
|
424
|
-
GLEnum2[GLEnum2["TEXTURE_IMMUTABLE_LEVELS"] = 33503] = "TEXTURE_IMMUTABLE_LEVELS";
|
|
425
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_2_10_10_10_REV"] = 33640] = "UNSIGNED_INT_2_10_10_10_REV";
|
|
426
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_10F_11F_11F_REV"] = 35899] = "UNSIGNED_INT_10F_11F_11F_REV";
|
|
427
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_5_9_9_9_REV"] = 35902] = "UNSIGNED_INT_5_9_9_9_REV";
|
|
428
|
-
GLEnum2[GLEnum2["FLOAT_32_UNSIGNED_INT_24_8_REV"] = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV";
|
|
429
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_24_8"] = 34042] = "UNSIGNED_INT_24_8";
|
|
430
|
-
GLEnum2[GLEnum2["HALF_FLOAT"] = 5131] = "HALF_FLOAT";
|
|
431
|
-
GLEnum2[GLEnum2["RG"] = 33319] = "RG";
|
|
432
|
-
GLEnum2[GLEnum2["RG_INTEGER"] = 33320] = "RG_INTEGER";
|
|
433
|
-
GLEnum2[GLEnum2["INT_2_10_10_10_REV"] = 36255] = "INT_2_10_10_10_REV";
|
|
434
|
-
GLEnum2[GLEnum2["CURRENT_QUERY"] = 34917] = "CURRENT_QUERY";
|
|
435
|
-
GLEnum2[GLEnum2["QUERY_RESULT"] = 34918] = "QUERY_RESULT";
|
|
436
|
-
GLEnum2[GLEnum2["QUERY_RESULT_AVAILABLE"] = 34919] = "QUERY_RESULT_AVAILABLE";
|
|
437
|
-
GLEnum2[GLEnum2["ANY_SAMPLES_PASSED"] = 35887] = "ANY_SAMPLES_PASSED";
|
|
438
|
-
GLEnum2[GLEnum2["ANY_SAMPLES_PASSED_CONSERVATIVE"] = 36202] = "ANY_SAMPLES_PASSED_CONSERVATIVE";
|
|
439
|
-
GLEnum2[GLEnum2["MAX_DRAW_BUFFERS"] = 34852] = "MAX_DRAW_BUFFERS";
|
|
440
|
-
GLEnum2[GLEnum2["DRAW_BUFFER0"] = 34853] = "DRAW_BUFFER0";
|
|
441
|
-
GLEnum2[GLEnum2["DRAW_BUFFER1"] = 34854] = "DRAW_BUFFER1";
|
|
442
|
-
GLEnum2[GLEnum2["DRAW_BUFFER2"] = 34855] = "DRAW_BUFFER2";
|
|
443
|
-
GLEnum2[GLEnum2["DRAW_BUFFER3"] = 34856] = "DRAW_BUFFER3";
|
|
444
|
-
GLEnum2[GLEnum2["DRAW_BUFFER4"] = 34857] = "DRAW_BUFFER4";
|
|
445
|
-
GLEnum2[GLEnum2["DRAW_BUFFER5"] = 34858] = "DRAW_BUFFER5";
|
|
446
|
-
GLEnum2[GLEnum2["DRAW_BUFFER6"] = 34859] = "DRAW_BUFFER6";
|
|
447
|
-
GLEnum2[GLEnum2["DRAW_BUFFER7"] = 34860] = "DRAW_BUFFER7";
|
|
448
|
-
GLEnum2[GLEnum2["DRAW_BUFFER8"] = 34861] = "DRAW_BUFFER8";
|
|
449
|
-
GLEnum2[GLEnum2["DRAW_BUFFER9"] = 34862] = "DRAW_BUFFER9";
|
|
450
|
-
GLEnum2[GLEnum2["DRAW_BUFFER10"] = 34863] = "DRAW_BUFFER10";
|
|
451
|
-
GLEnum2[GLEnum2["DRAW_BUFFER11"] = 34864] = "DRAW_BUFFER11";
|
|
452
|
-
GLEnum2[GLEnum2["DRAW_BUFFER12"] = 34865] = "DRAW_BUFFER12";
|
|
453
|
-
GLEnum2[GLEnum2["DRAW_BUFFER13"] = 34866] = "DRAW_BUFFER13";
|
|
454
|
-
GLEnum2[GLEnum2["DRAW_BUFFER14"] = 34867] = "DRAW_BUFFER14";
|
|
455
|
-
GLEnum2[GLEnum2["DRAW_BUFFER15"] = 34868] = "DRAW_BUFFER15";
|
|
456
|
-
GLEnum2[GLEnum2["MAX_COLOR_ATTACHMENTS"] = 36063] = "MAX_COLOR_ATTACHMENTS";
|
|
457
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT1"] = 36065] = "COLOR_ATTACHMENT1";
|
|
458
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT2"] = 36066] = "COLOR_ATTACHMENT2";
|
|
459
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT3"] = 36067] = "COLOR_ATTACHMENT3";
|
|
460
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT4"] = 36068] = "COLOR_ATTACHMENT4";
|
|
461
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT5"] = 36069] = "COLOR_ATTACHMENT5";
|
|
462
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT6"] = 36070] = "COLOR_ATTACHMENT6";
|
|
463
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT7"] = 36071] = "COLOR_ATTACHMENT7";
|
|
464
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT8"] = 36072] = "COLOR_ATTACHMENT8";
|
|
465
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT9"] = 36073] = "COLOR_ATTACHMENT9";
|
|
466
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT10"] = 36074] = "COLOR_ATTACHMENT10";
|
|
467
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT11"] = 36075] = "COLOR_ATTACHMENT11";
|
|
468
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT12"] = 36076] = "COLOR_ATTACHMENT12";
|
|
469
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT13"] = 36077] = "COLOR_ATTACHMENT13";
|
|
470
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT14"] = 36078] = "COLOR_ATTACHMENT14";
|
|
471
|
-
GLEnum2[GLEnum2["COLOR_ATTACHMENT15"] = 36079] = "COLOR_ATTACHMENT15";
|
|
472
|
-
GLEnum2[GLEnum2["SAMPLER_3D"] = 35679] = "SAMPLER_3D";
|
|
473
|
-
GLEnum2[GLEnum2["SAMPLER_2D_SHADOW"] = 35682] = "SAMPLER_2D_SHADOW";
|
|
474
|
-
GLEnum2[GLEnum2["SAMPLER_2D_ARRAY"] = 36289] = "SAMPLER_2D_ARRAY";
|
|
475
|
-
GLEnum2[GLEnum2["SAMPLER_2D_ARRAY_SHADOW"] = 36292] = "SAMPLER_2D_ARRAY_SHADOW";
|
|
476
|
-
GLEnum2[GLEnum2["SAMPLER_CUBE_SHADOW"] = 36293] = "SAMPLER_CUBE_SHADOW";
|
|
477
|
-
GLEnum2[GLEnum2["INT_SAMPLER_2D"] = 36298] = "INT_SAMPLER_2D";
|
|
478
|
-
GLEnum2[GLEnum2["INT_SAMPLER_3D"] = 36299] = "INT_SAMPLER_3D";
|
|
479
|
-
GLEnum2[GLEnum2["INT_SAMPLER_CUBE"] = 36300] = "INT_SAMPLER_CUBE";
|
|
480
|
-
GLEnum2[GLEnum2["INT_SAMPLER_2D_ARRAY"] = 36303] = "INT_SAMPLER_2D_ARRAY";
|
|
481
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_SAMPLER_2D"] = 36306] = "UNSIGNED_INT_SAMPLER_2D";
|
|
482
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_SAMPLER_3D"] = 36307] = "UNSIGNED_INT_SAMPLER_3D";
|
|
483
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_SAMPLER_CUBE"] = 36308] = "UNSIGNED_INT_SAMPLER_CUBE";
|
|
484
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_SAMPLER_2D_ARRAY"] = 36311] = "UNSIGNED_INT_SAMPLER_2D_ARRAY";
|
|
485
|
-
GLEnum2[GLEnum2["MAX_SAMPLES"] = 36183] = "MAX_SAMPLES";
|
|
486
|
-
GLEnum2[GLEnum2["SAMPLER_BINDING"] = 35097] = "SAMPLER_BINDING";
|
|
487
|
-
GLEnum2[GLEnum2["PIXEL_PACK_BUFFER"] = 35051] = "PIXEL_PACK_BUFFER";
|
|
488
|
-
GLEnum2[GLEnum2["PIXEL_UNPACK_BUFFER"] = 35052] = "PIXEL_UNPACK_BUFFER";
|
|
489
|
-
GLEnum2[GLEnum2["PIXEL_PACK_BUFFER_BINDING"] = 35053] = "PIXEL_PACK_BUFFER_BINDING";
|
|
490
|
-
GLEnum2[GLEnum2["PIXEL_UNPACK_BUFFER_BINDING"] = 35055] = "PIXEL_UNPACK_BUFFER_BINDING";
|
|
491
|
-
GLEnum2[GLEnum2["COPY_READ_BUFFER"] = 36662] = "COPY_READ_BUFFER";
|
|
492
|
-
GLEnum2[GLEnum2["COPY_WRITE_BUFFER"] = 36663] = "COPY_WRITE_BUFFER";
|
|
493
|
-
GLEnum2[GLEnum2["COPY_READ_BUFFER_BINDING"] = 36662] = "COPY_READ_BUFFER_BINDING";
|
|
494
|
-
GLEnum2[GLEnum2["COPY_WRITE_BUFFER_BINDING"] = 36663] = "COPY_WRITE_BUFFER_BINDING";
|
|
495
|
-
GLEnum2[GLEnum2["FLOAT_MAT2x3"] = 35685] = "FLOAT_MAT2x3";
|
|
496
|
-
GLEnum2[GLEnum2["FLOAT_MAT2x4"] = 35686] = "FLOAT_MAT2x4";
|
|
497
|
-
GLEnum2[GLEnum2["FLOAT_MAT3x2"] = 35687] = "FLOAT_MAT3x2";
|
|
498
|
-
GLEnum2[GLEnum2["FLOAT_MAT3x4"] = 35688] = "FLOAT_MAT3x4";
|
|
499
|
-
GLEnum2[GLEnum2["FLOAT_MAT4x2"] = 35689] = "FLOAT_MAT4x2";
|
|
500
|
-
GLEnum2[GLEnum2["FLOAT_MAT4x3"] = 35690] = "FLOAT_MAT4x3";
|
|
501
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_VEC2"] = 36294] = "UNSIGNED_INT_VEC2";
|
|
502
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_VEC3"] = 36295] = "UNSIGNED_INT_VEC3";
|
|
503
|
-
GLEnum2[GLEnum2["UNSIGNED_INT_VEC4"] = 36296] = "UNSIGNED_INT_VEC4";
|
|
504
|
-
GLEnum2[GLEnum2["UNSIGNED_NORMALIZED"] = 35863] = "UNSIGNED_NORMALIZED";
|
|
505
|
-
GLEnum2[GLEnum2["SIGNED_NORMALIZED"] = 36764] = "SIGNED_NORMALIZED";
|
|
506
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_INTEGER"] = 35069] = "VERTEX_ATTRIB_ARRAY_INTEGER";
|
|
507
|
-
GLEnum2[GLEnum2["VERTEX_ATTRIB_ARRAY_DIVISOR"] = 35070] = "VERTEX_ATTRIB_ARRAY_DIVISOR";
|
|
508
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BUFFER_MODE"] = 35967] = "TRANSFORM_FEEDBACK_BUFFER_MODE";
|
|
509
|
-
GLEnum2[GLEnum2["MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS"] = 35968] = "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS";
|
|
510
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_VARYINGS"] = 35971] = "TRANSFORM_FEEDBACK_VARYINGS";
|
|
511
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BUFFER_START"] = 35972] = "TRANSFORM_FEEDBACK_BUFFER_START";
|
|
512
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BUFFER_SIZE"] = 35973] = "TRANSFORM_FEEDBACK_BUFFER_SIZE";
|
|
513
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN"] = 35976] = "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN";
|
|
514
|
-
GLEnum2[GLEnum2["MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS"] = 35978] = "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS";
|
|
515
|
-
GLEnum2[GLEnum2["MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS"] = 35979] = "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS";
|
|
516
|
-
GLEnum2[GLEnum2["INTERLEAVED_ATTRIBS"] = 35980] = "INTERLEAVED_ATTRIBS";
|
|
517
|
-
GLEnum2[GLEnum2["SEPARATE_ATTRIBS"] = 35981] = "SEPARATE_ATTRIBS";
|
|
518
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BUFFER"] = 35982] = "TRANSFORM_FEEDBACK_BUFFER";
|
|
519
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BUFFER_BINDING"] = 35983] = "TRANSFORM_FEEDBACK_BUFFER_BINDING";
|
|
520
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK"] = 36386] = "TRANSFORM_FEEDBACK";
|
|
521
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_PAUSED"] = 36387] = "TRANSFORM_FEEDBACK_PAUSED";
|
|
522
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_ACTIVE"] = 36388] = "TRANSFORM_FEEDBACK_ACTIVE";
|
|
523
|
-
GLEnum2[GLEnum2["TRANSFORM_FEEDBACK_BINDING"] = 36389] = "TRANSFORM_FEEDBACK_BINDING";
|
|
524
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING"] = 33296] = "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING";
|
|
525
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE"] = 33297] = "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE";
|
|
526
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_RED_SIZE"] = 33298] = "FRAMEBUFFER_ATTACHMENT_RED_SIZE";
|
|
527
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_GREEN_SIZE"] = 33299] = "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE";
|
|
528
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_BLUE_SIZE"] = 33300] = "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE";
|
|
529
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE"] = 33301] = "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE";
|
|
530
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE"] = 33302] = "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE";
|
|
531
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE"] = 33303] = "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE";
|
|
532
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_DEFAULT"] = 33304] = "FRAMEBUFFER_DEFAULT";
|
|
533
|
-
GLEnum2[GLEnum2["DEPTH24_STENCIL8"] = 35056] = "DEPTH24_STENCIL8";
|
|
534
|
-
GLEnum2[GLEnum2["DRAW_FRAMEBUFFER_BINDING"] = 36006] = "DRAW_FRAMEBUFFER_BINDING";
|
|
535
|
-
GLEnum2[GLEnum2["READ_FRAMEBUFFER_BINDING"] = 36010] = "READ_FRAMEBUFFER_BINDING";
|
|
536
|
-
GLEnum2[GLEnum2["RENDERBUFFER_SAMPLES"] = 36011] = "RENDERBUFFER_SAMPLES";
|
|
537
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"] = 36052] = "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER";
|
|
538
|
-
GLEnum2[GLEnum2["FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"] = 36182] = "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE";
|
|
539
|
-
GLEnum2[GLEnum2["UNIFORM_BUFFER"] = 35345] = "UNIFORM_BUFFER";
|
|
540
|
-
GLEnum2[GLEnum2["UNIFORM_BUFFER_BINDING"] = 35368] = "UNIFORM_BUFFER_BINDING";
|
|
541
|
-
GLEnum2[GLEnum2["UNIFORM_BUFFER_START"] = 35369] = "UNIFORM_BUFFER_START";
|
|
542
|
-
GLEnum2[GLEnum2["UNIFORM_BUFFER_SIZE"] = 35370] = "UNIFORM_BUFFER_SIZE";
|
|
543
|
-
GLEnum2[GLEnum2["MAX_VERTEX_UNIFORM_BLOCKS"] = 35371] = "MAX_VERTEX_UNIFORM_BLOCKS";
|
|
544
|
-
GLEnum2[GLEnum2["MAX_FRAGMENT_UNIFORM_BLOCKS"] = 35373] = "MAX_FRAGMENT_UNIFORM_BLOCKS";
|
|
545
|
-
GLEnum2[GLEnum2["MAX_COMBINED_UNIFORM_BLOCKS"] = 35374] = "MAX_COMBINED_UNIFORM_BLOCKS";
|
|
546
|
-
GLEnum2[GLEnum2["MAX_UNIFORM_BUFFER_BINDINGS"] = 35375] = "MAX_UNIFORM_BUFFER_BINDINGS";
|
|
547
|
-
GLEnum2[GLEnum2["MAX_UNIFORM_BLOCK_SIZE"] = 35376] = "MAX_UNIFORM_BLOCK_SIZE";
|
|
548
|
-
GLEnum2[GLEnum2["MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS"] = 35377] = "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS";
|
|
549
|
-
GLEnum2[GLEnum2["MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS"] = 35379] = "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS";
|
|
550
|
-
GLEnum2[GLEnum2["UNIFORM_BUFFER_OFFSET_ALIGNMENT"] = 35380] = "UNIFORM_BUFFER_OFFSET_ALIGNMENT";
|
|
551
|
-
GLEnum2[GLEnum2["ACTIVE_UNIFORM_BLOCKS"] = 35382] = "ACTIVE_UNIFORM_BLOCKS";
|
|
552
|
-
GLEnum2[GLEnum2["UNIFORM_TYPE"] = 35383] = "UNIFORM_TYPE";
|
|
553
|
-
GLEnum2[GLEnum2["UNIFORM_SIZE"] = 35384] = "UNIFORM_SIZE";
|
|
554
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_INDEX"] = 35386] = "UNIFORM_BLOCK_INDEX";
|
|
555
|
-
GLEnum2[GLEnum2["UNIFORM_OFFSET"] = 35387] = "UNIFORM_OFFSET";
|
|
556
|
-
GLEnum2[GLEnum2["UNIFORM_ARRAY_STRIDE"] = 35388] = "UNIFORM_ARRAY_STRIDE";
|
|
557
|
-
GLEnum2[GLEnum2["UNIFORM_MATRIX_STRIDE"] = 35389] = "UNIFORM_MATRIX_STRIDE";
|
|
558
|
-
GLEnum2[GLEnum2["UNIFORM_IS_ROW_MAJOR"] = 35390] = "UNIFORM_IS_ROW_MAJOR";
|
|
559
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_BINDING"] = 35391] = "UNIFORM_BLOCK_BINDING";
|
|
560
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_DATA_SIZE"] = 35392] = "UNIFORM_BLOCK_DATA_SIZE";
|
|
561
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_ACTIVE_UNIFORMS"] = 35394] = "UNIFORM_BLOCK_ACTIVE_UNIFORMS";
|
|
562
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES"] = 35395] = "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES";
|
|
563
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER"] = 35396] = "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER";
|
|
564
|
-
GLEnum2[GLEnum2["UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"] = 35398] = "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER";
|
|
565
|
-
GLEnum2[GLEnum2["OBJECT_TYPE"] = 37138] = "OBJECT_TYPE";
|
|
566
|
-
GLEnum2[GLEnum2["SYNC_CONDITION"] = 37139] = "SYNC_CONDITION";
|
|
567
|
-
GLEnum2[GLEnum2["SYNC_STATUS"] = 37140] = "SYNC_STATUS";
|
|
568
|
-
GLEnum2[GLEnum2["SYNC_FLAGS"] = 37141] = "SYNC_FLAGS";
|
|
569
|
-
GLEnum2[GLEnum2["SYNC_FENCE"] = 37142] = "SYNC_FENCE";
|
|
570
|
-
GLEnum2[GLEnum2["SYNC_GPU_COMMANDS_COMPLETE"] = 37143] = "SYNC_GPU_COMMANDS_COMPLETE";
|
|
571
|
-
GLEnum2[GLEnum2["UNSIGNALED"] = 37144] = "UNSIGNALED";
|
|
572
|
-
GLEnum2[GLEnum2["SIGNALED"] = 37145] = "SIGNALED";
|
|
573
|
-
GLEnum2[GLEnum2["ALREADY_SIGNALED"] = 37146] = "ALREADY_SIGNALED";
|
|
574
|
-
GLEnum2[GLEnum2["TIMEOUT_EXPIRED"] = 37147] = "TIMEOUT_EXPIRED";
|
|
575
|
-
GLEnum2[GLEnum2["CONDITION_SATISFIED"] = 37148] = "CONDITION_SATISFIED";
|
|
576
|
-
GLEnum2[GLEnum2["WAIT_FAILED"] = 37149] = "WAIT_FAILED";
|
|
577
|
-
GLEnum2[GLEnum2["SYNC_FLUSH_COMMANDS_BIT"] = 1] = "SYNC_FLUSH_COMMANDS_BIT";
|
|
578
|
-
GLEnum2[GLEnum2["COLOR"] = 6144] = "COLOR";
|
|
579
|
-
GLEnum2[GLEnum2["DEPTH"] = 6145] = "DEPTH";
|
|
580
|
-
GLEnum2[GLEnum2["STENCIL"] = 6146] = "STENCIL";
|
|
581
|
-
GLEnum2[GLEnum2["MIN"] = 32775] = "MIN";
|
|
582
|
-
GLEnum2[GLEnum2["MAX"] = 32776] = "MAX";
|
|
583
|
-
GLEnum2[GLEnum2["DEPTH_COMPONENT24"] = 33190] = "DEPTH_COMPONENT24";
|
|
584
|
-
GLEnum2[GLEnum2["STREAM_READ"] = 35041] = "STREAM_READ";
|
|
585
|
-
GLEnum2[GLEnum2["STREAM_COPY"] = 35042] = "STREAM_COPY";
|
|
586
|
-
GLEnum2[GLEnum2["STATIC_READ"] = 35045] = "STATIC_READ";
|
|
587
|
-
GLEnum2[GLEnum2["STATIC_COPY"] = 35046] = "STATIC_COPY";
|
|
588
|
-
GLEnum2[GLEnum2["DYNAMIC_READ"] = 35049] = "DYNAMIC_READ";
|
|
589
|
-
GLEnum2[GLEnum2["DYNAMIC_COPY"] = 35050] = "DYNAMIC_COPY";
|
|
590
|
-
GLEnum2[GLEnum2["DEPTH_COMPONENT32F"] = 36012] = "DEPTH_COMPONENT32F";
|
|
591
|
-
GLEnum2[GLEnum2["DEPTH32F_STENCIL8"] = 36013] = "DEPTH32F_STENCIL8";
|
|
592
|
-
GLEnum2[GLEnum2["INVALID_INDEX"] = 4294967295] = "INVALID_INDEX";
|
|
593
|
-
GLEnum2[GLEnum2["TIMEOUT_IGNORED"] = -1] = "TIMEOUT_IGNORED";
|
|
594
|
-
GLEnum2[GLEnum2["MAX_CLIENT_WAIT_TIMEOUT_WEBGL"] = 37447] = "MAX_CLIENT_WAIT_TIMEOUT_WEBGL";
|
|
595
|
-
GLEnum2[GLEnum2["UNMASKED_VENDOR_WEBGL"] = 37445] = "UNMASKED_VENDOR_WEBGL";
|
|
596
|
-
GLEnum2[GLEnum2["UNMASKED_RENDERER_WEBGL"] = 37446] = "UNMASKED_RENDERER_WEBGL";
|
|
597
|
-
GLEnum2[GLEnum2["MAX_TEXTURE_MAX_ANISOTROPY_EXT"] = 34047] = "MAX_TEXTURE_MAX_ANISOTROPY_EXT";
|
|
598
|
-
GLEnum2[GLEnum2["TEXTURE_MAX_ANISOTROPY_EXT"] = 34046] = "TEXTURE_MAX_ANISOTROPY_EXT";
|
|
599
|
-
GLEnum2[GLEnum2["R16_EXT"] = 33322] = "R16_EXT";
|
|
600
|
-
GLEnum2[GLEnum2["RG16_EXT"] = 33324] = "RG16_EXT";
|
|
601
|
-
GLEnum2[GLEnum2["RGB16_EXT"] = 32852] = "RGB16_EXT";
|
|
602
|
-
GLEnum2[GLEnum2["RGBA16_EXT"] = 32859] = "RGBA16_EXT";
|
|
603
|
-
GLEnum2[GLEnum2["R16_SNORM_EXT"] = 36760] = "R16_SNORM_EXT";
|
|
604
|
-
GLEnum2[GLEnum2["RG16_SNORM_EXT"] = 36761] = "RG16_SNORM_EXT";
|
|
605
|
-
GLEnum2[GLEnum2["RGB16_SNORM_EXT"] = 36762] = "RGB16_SNORM_EXT";
|
|
606
|
-
GLEnum2[GLEnum2["RGBA16_SNORM_EXT"] = 36763] = "RGBA16_SNORM_EXT";
|
|
607
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_S3TC_DXT1_EXT"] = 33776] = "COMPRESSED_RGB_S3TC_DXT1_EXT";
|
|
608
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_S3TC_DXT1_EXT"] = 33777] = "COMPRESSED_RGBA_S3TC_DXT1_EXT";
|
|
609
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_S3TC_DXT3_EXT"] = 33778] = "COMPRESSED_RGBA_S3TC_DXT3_EXT";
|
|
610
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_S3TC_DXT5_EXT"] = 33779] = "COMPRESSED_RGBA_S3TC_DXT5_EXT";
|
|
611
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB_S3TC_DXT1_EXT"] = 35916] = "COMPRESSED_SRGB_S3TC_DXT1_EXT";
|
|
612
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT"] = 35917] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT";
|
|
613
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT"] = 35918] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT";
|
|
614
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT"] = 35919] = "COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT";
|
|
615
|
-
GLEnum2[GLEnum2["COMPRESSED_RED_RGTC1_EXT"] = 36283] = "COMPRESSED_RED_RGTC1_EXT";
|
|
616
|
-
GLEnum2[GLEnum2["COMPRESSED_SIGNED_RED_RGTC1_EXT"] = 36284] = "COMPRESSED_SIGNED_RED_RGTC1_EXT";
|
|
617
|
-
GLEnum2[GLEnum2["COMPRESSED_RED_GREEN_RGTC2_EXT"] = 36285] = "COMPRESSED_RED_GREEN_RGTC2_EXT";
|
|
618
|
-
GLEnum2[GLEnum2["COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT"] = 36286] = "COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT";
|
|
619
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_BPTC_UNORM_EXT"] = 36492] = "COMPRESSED_RGBA_BPTC_UNORM_EXT";
|
|
620
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT"] = 36493] = "COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT";
|
|
621
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT"] = 36494] = "COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT";
|
|
622
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT"] = 36495] = "COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT";
|
|
623
|
-
GLEnum2[GLEnum2["COMPRESSED_R11_EAC"] = 37488] = "COMPRESSED_R11_EAC";
|
|
624
|
-
GLEnum2[GLEnum2["COMPRESSED_SIGNED_R11_EAC"] = 37489] = "COMPRESSED_SIGNED_R11_EAC";
|
|
625
|
-
GLEnum2[GLEnum2["COMPRESSED_RG11_EAC"] = 37490] = "COMPRESSED_RG11_EAC";
|
|
626
|
-
GLEnum2[GLEnum2["COMPRESSED_SIGNED_RG11_EAC"] = 37491] = "COMPRESSED_SIGNED_RG11_EAC";
|
|
627
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB8_ETC2"] = 37492] = "COMPRESSED_RGB8_ETC2";
|
|
628
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA8_ETC2_EAC"] = 37493] = "COMPRESSED_RGBA8_ETC2_EAC";
|
|
629
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ETC2"] = 37494] = "COMPRESSED_SRGB8_ETC2";
|
|
630
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"] = 37495] = "COMPRESSED_SRGB8_ALPHA8_ETC2_EAC";
|
|
631
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2"] = 37496] = "COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2";
|
|
632
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2"] = 37497] = "COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2";
|
|
633
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_PVRTC_4BPPV1_IMG"] = 35840] = "COMPRESSED_RGB_PVRTC_4BPPV1_IMG";
|
|
634
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_PVRTC_4BPPV1_IMG"] = 35842] = "COMPRESSED_RGBA_PVRTC_4BPPV1_IMG";
|
|
635
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_PVRTC_2BPPV1_IMG"] = 35841] = "COMPRESSED_RGB_PVRTC_2BPPV1_IMG";
|
|
636
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_PVRTC_2BPPV1_IMG"] = 35843] = "COMPRESSED_RGBA_PVRTC_2BPPV1_IMG";
|
|
637
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_ETC1_WEBGL"] = 36196] = "COMPRESSED_RGB_ETC1_WEBGL";
|
|
638
|
-
GLEnum2[GLEnum2["COMPRESSED_RGB_ATC_WEBGL"] = 35986] = "COMPRESSED_RGB_ATC_WEBGL";
|
|
639
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL"] = 35986] = "COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL";
|
|
640
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"] = 34798] = "COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL";
|
|
641
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_4x4_KHR"] = 37808] = "COMPRESSED_RGBA_ASTC_4x4_KHR";
|
|
642
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_5x4_KHR"] = 37809] = "COMPRESSED_RGBA_ASTC_5x4_KHR";
|
|
643
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_5x5_KHR"] = 37810] = "COMPRESSED_RGBA_ASTC_5x5_KHR";
|
|
644
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_6x5_KHR"] = 37811] = "COMPRESSED_RGBA_ASTC_6x5_KHR";
|
|
645
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_6x6_KHR"] = 37812] = "COMPRESSED_RGBA_ASTC_6x6_KHR";
|
|
646
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_8x5_KHR"] = 37813] = "COMPRESSED_RGBA_ASTC_8x5_KHR";
|
|
647
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_8x6_KHR"] = 37814] = "COMPRESSED_RGBA_ASTC_8x6_KHR";
|
|
648
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_8x8_KHR"] = 37815] = "COMPRESSED_RGBA_ASTC_8x8_KHR";
|
|
649
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_10x5_KHR"] = 37816] = "COMPRESSED_RGBA_ASTC_10x5_KHR";
|
|
650
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_10x6_KHR"] = 37817] = "COMPRESSED_RGBA_ASTC_10x6_KHR";
|
|
651
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_10x8_KHR"] = 37818] = "COMPRESSED_RGBA_ASTC_10x8_KHR";
|
|
652
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_10x10_KHR"] = 37819] = "COMPRESSED_RGBA_ASTC_10x10_KHR";
|
|
653
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_12x10_KHR"] = 37820] = "COMPRESSED_RGBA_ASTC_12x10_KHR";
|
|
654
|
-
GLEnum2[GLEnum2["COMPRESSED_RGBA_ASTC_12x12_KHR"] = 37821] = "COMPRESSED_RGBA_ASTC_12x12_KHR";
|
|
655
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR"] = 37840] = "COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR";
|
|
656
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR"] = 37841] = "COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR";
|
|
657
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR"] = 37842] = "COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR";
|
|
658
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR"] = 37843] = "COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR";
|
|
659
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR"] = 37844] = "COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR";
|
|
660
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR"] = 37845] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR";
|
|
661
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR"] = 37846] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR";
|
|
662
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR"] = 37847] = "COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR";
|
|
663
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR"] = 37848] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR";
|
|
664
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR"] = 37849] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR";
|
|
665
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR"] = 37850] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR";
|
|
666
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR"] = 37851] = "COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR";
|
|
667
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR"] = 37852] = "COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR";
|
|
668
|
-
GLEnum2[GLEnum2["COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR"] = 37853] = "COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR";
|
|
669
|
-
GLEnum2[GLEnum2["QUERY_COUNTER_BITS_EXT"] = 34916] = "QUERY_COUNTER_BITS_EXT";
|
|
670
|
-
GLEnum2[GLEnum2["CURRENT_QUERY_EXT"] = 34917] = "CURRENT_QUERY_EXT";
|
|
671
|
-
GLEnum2[GLEnum2["QUERY_RESULT_EXT"] = 34918] = "QUERY_RESULT_EXT";
|
|
672
|
-
GLEnum2[GLEnum2["QUERY_RESULT_AVAILABLE_EXT"] = 34919] = "QUERY_RESULT_AVAILABLE_EXT";
|
|
673
|
-
GLEnum2[GLEnum2["TIME_ELAPSED_EXT"] = 35007] = "TIME_ELAPSED_EXT";
|
|
674
|
-
GLEnum2[GLEnum2["TIMESTAMP_EXT"] = 36392] = "TIMESTAMP_EXT";
|
|
675
|
-
GLEnum2[GLEnum2["GPU_DISJOINT_EXT"] = 36795] = "GPU_DISJOINT_EXT";
|
|
676
|
-
GLEnum2[GLEnum2["COMPLETION_STATUS_KHR"] = 37297] = "COMPLETION_STATUS_KHR";
|
|
677
|
-
GLEnum2[GLEnum2["DEPTH_CLAMP_EXT"] = 34383] = "DEPTH_CLAMP_EXT";
|
|
678
|
-
GLEnum2[GLEnum2["FIRST_VERTEX_CONVENTION_WEBGL"] = 36429] = "FIRST_VERTEX_CONVENTION_WEBGL";
|
|
679
|
-
GLEnum2[GLEnum2["LAST_VERTEX_CONVENTION_WEBGL"] = 36430] = "LAST_VERTEX_CONVENTION_WEBGL";
|
|
680
|
-
GLEnum2[GLEnum2["PROVOKING_VERTEX_WEBL"] = 36431] = "PROVOKING_VERTEX_WEBL";
|
|
681
|
-
GLEnum2[GLEnum2["POLYGON_MODE_WEBGL"] = 2880] = "POLYGON_MODE_WEBGL";
|
|
682
|
-
GLEnum2[GLEnum2["POLYGON_OFFSET_LINE_WEBGL"] = 10754] = "POLYGON_OFFSET_LINE_WEBGL";
|
|
683
|
-
GLEnum2[GLEnum2["LINE_WEBGL"] = 6913] = "LINE_WEBGL";
|
|
684
|
-
GLEnum2[GLEnum2["FILL_WEBGL"] = 6914] = "FILL_WEBGL";
|
|
685
|
-
GLEnum2[GLEnum2["MAX_CLIP_DISTANCES_WEBGL"] = 3378] = "MAX_CLIP_DISTANCES_WEBGL";
|
|
686
|
-
GLEnum2[GLEnum2["MAX_CULL_DISTANCES_WEBGL"] = 33529] = "MAX_CULL_DISTANCES_WEBGL";
|
|
687
|
-
GLEnum2[GLEnum2["MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL"] = 33530] = "MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL";
|
|
688
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE0_WEBGL"] = 12288] = "CLIP_DISTANCE0_WEBGL";
|
|
689
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE1_WEBGL"] = 12289] = "CLIP_DISTANCE1_WEBGL";
|
|
690
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE2_WEBGL"] = 12290] = "CLIP_DISTANCE2_WEBGL";
|
|
691
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE3_WEBGL"] = 12291] = "CLIP_DISTANCE3_WEBGL";
|
|
692
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE4_WEBGL"] = 12292] = "CLIP_DISTANCE4_WEBGL";
|
|
693
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE5_WEBGL"] = 12293] = "CLIP_DISTANCE5_WEBGL";
|
|
694
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE6_WEBGL"] = 12294] = "CLIP_DISTANCE6_WEBGL";
|
|
695
|
-
GLEnum2[GLEnum2["CLIP_DISTANCE7_WEBGL"] = 12295] = "CLIP_DISTANCE7_WEBGL";
|
|
696
|
-
GLEnum2[GLEnum2["POLYGON_OFFSET_CLAMP_EXT"] = 36379] = "POLYGON_OFFSET_CLAMP_EXT";
|
|
697
|
-
GLEnum2[GLEnum2["LOWER_LEFT_EXT"] = 36001] = "LOWER_LEFT_EXT";
|
|
698
|
-
GLEnum2[GLEnum2["UPPER_LEFT_EXT"] = 36002] = "UPPER_LEFT_EXT";
|
|
699
|
-
GLEnum2[GLEnum2["NEGATIVE_ONE_TO_ONE_EXT"] = 37726] = "NEGATIVE_ONE_TO_ONE_EXT";
|
|
700
|
-
GLEnum2[GLEnum2["ZERO_TO_ONE_EXT"] = 37727] = "ZERO_TO_ONE_EXT";
|
|
701
|
-
GLEnum2[GLEnum2["CLIP_ORIGIN_EXT"] = 37724] = "CLIP_ORIGIN_EXT";
|
|
702
|
-
GLEnum2[GLEnum2["CLIP_DEPTH_MODE_EXT"] = 37725] = "CLIP_DEPTH_MODE_EXT";
|
|
703
|
-
GLEnum2[GLEnum2["SRC1_COLOR_WEBGL"] = 35065] = "SRC1_COLOR_WEBGL";
|
|
704
|
-
GLEnum2[GLEnum2["SRC1_ALPHA_WEBGL"] = 34185] = "SRC1_ALPHA_WEBGL";
|
|
705
|
-
GLEnum2[GLEnum2["ONE_MINUS_SRC1_COLOR_WEBGL"] = 35066] = "ONE_MINUS_SRC1_COLOR_WEBGL";
|
|
706
|
-
GLEnum2[GLEnum2["ONE_MINUS_SRC1_ALPHA_WEBGL"] = 35067] = "ONE_MINUS_SRC1_ALPHA_WEBGL";
|
|
707
|
-
GLEnum2[GLEnum2["MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL"] = 35068] = "MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL";
|
|
708
|
-
GLEnum2[GLEnum2["MIRROR_CLAMP_TO_EDGE_EXT"] = 34627] = "MIRROR_CLAMP_TO_EDGE_EXT";
|
|
709
|
-
})(GLEnum || (GLEnum = {}));
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
|
|
713
|
-
// ../../node_modules/@luma.gl/webgl/dist/constants/index.js
|
|
714
|
-
var init_constants = __esm({
|
|
715
|
-
"../../node_modules/@luma.gl/webgl/dist/constants/index.js"() {
|
|
716
|
-
init_webgl_constants();
|
|
717
|
-
}
|
|
718
|
-
});
|
|
719
|
-
|
|
720
67
|
// external-global-plugin:@luma.gl/core
|
|
721
68
|
var require_core2 = __commonJS({
|
|
722
69
|
"external-global-plugin:@luma.gl/core"(exports, module) {
|
|
@@ -724,240 +71,30 @@ var __exports__ = (() => {
|
|
|
724
71
|
}
|
|
725
72
|
});
|
|
726
73
|
|
|
727
|
-
// ../../node_modules/@luma.gl/webgl/dist/context/
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
softwareRenderer: false
|
|
733
|
-
};
|
|
734
|
-
contextData._polyfilled ??= false;
|
|
735
|
-
contextData.extensions ||= {};
|
|
736
|
-
gl.luma = contextData;
|
|
737
|
-
return contextData;
|
|
738
|
-
}
|
|
739
|
-
var init_webgl_context_data = __esm({
|
|
740
|
-
"../../node_modules/@luma.gl/webgl/dist/context/helpers/webgl-context-data.js"() {
|
|
741
|
-
}
|
|
742
|
-
});
|
|
743
|
-
|
|
744
|
-
// ../../node_modules/@luma.gl/webgl/dist/context/debug/spector.js
|
|
745
|
-
function initializeSpectorJS(props) {
|
|
746
|
-
props = { ...DEFAULT_SPECTOR_PROPS, ...props };
|
|
747
|
-
if (!props.debugSpectorJS) {
|
|
748
|
-
return null;
|
|
749
|
-
}
|
|
750
|
-
if (!spector && globalThis.SPECTOR && !globalThis.luma?.spector) {
|
|
751
|
-
import_core2.log.probe(LOG_LEVEL, "SPECTOR found and initialized. Start with `luma.spector.displayUI()`")();
|
|
752
|
-
const { Spector: SpectorJS } = globalThis.SPECTOR;
|
|
753
|
-
spector = new SpectorJS();
|
|
754
|
-
if (globalThis.luma) {
|
|
755
|
-
globalThis.luma.spector = spector;
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
if (!spector) {
|
|
759
|
-
return null;
|
|
760
|
-
}
|
|
761
|
-
if (!initialized) {
|
|
762
|
-
initialized = true;
|
|
763
|
-
spector.spyCanvases();
|
|
764
|
-
spector?.onCaptureStarted.add((capture) => import_core2.log.info("Spector capture started:", capture)());
|
|
765
|
-
spector?.onCapture.add((capture) => {
|
|
766
|
-
import_core2.log.info("Spector capture complete:", capture)();
|
|
767
|
-
spector?.getResultUI();
|
|
768
|
-
spector?.resultView.display();
|
|
769
|
-
spector?.resultView.addCapture(capture);
|
|
770
|
-
});
|
|
771
|
-
}
|
|
772
|
-
if (props.gl) {
|
|
773
|
-
const gl = props.gl;
|
|
774
|
-
const contextData = getWebGLContextData(gl);
|
|
775
|
-
const device = contextData.device;
|
|
776
|
-
spector?.startCapture(props.gl, 500);
|
|
777
|
-
contextData.device = device;
|
|
778
|
-
new Promise((resolve) => setTimeout(resolve, 2e3)).then((_) => {
|
|
779
|
-
import_core2.log.info("Spector capture stopped after 2 seconds")();
|
|
780
|
-
spector?.stopCapture();
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
return spector;
|
|
784
|
-
}
|
|
785
|
-
var import_core2, LOG_LEVEL, spector, initialized, DEFAULT_SPECTOR_PROPS;
|
|
786
|
-
var init_spector = __esm({
|
|
787
|
-
"../../node_modules/@luma.gl/webgl/dist/context/debug/spector.js"() {
|
|
788
|
-
import_core2 = __toESM(require_core2(), 1);
|
|
789
|
-
init_webgl_context_data();
|
|
790
|
-
LOG_LEVEL = 1;
|
|
791
|
-
spector = null;
|
|
792
|
-
initialized = false;
|
|
793
|
-
DEFAULT_SPECTOR_PROPS = {
|
|
794
|
-
debugSpectorJS: import_core2.log.get("debug-spectorjs"),
|
|
795
|
-
// https://github.com/BabylonJS/Spector.js#basic-usage
|
|
796
|
-
// https://forum.babylonjs.com/t/spectorcdn-is-temporarily-off/48241
|
|
797
|
-
// spectorUrl: 'https://spectorcdn.babylonjs.com/spector.bundle.js';
|
|
798
|
-
debugSpectorJSUrl: "https://cdn.jsdelivr.net/npm/spectorjs@0.9.30/dist/spector.bundle.js",
|
|
799
|
-
gl: void 0
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
});
|
|
803
|
-
|
|
804
|
-
// ../../node_modules/@probe.gl/env/dist/lib/globals.js
|
|
805
|
-
var window_, document_, process_, console_, navigator_;
|
|
806
|
-
var init_globals = __esm({
|
|
807
|
-
"../../node_modules/@probe.gl/env/dist/lib/globals.js"() {
|
|
808
|
-
window_ = globalThis;
|
|
809
|
-
document_ = globalThis.document || {};
|
|
810
|
-
process_ = globalThis.process || {};
|
|
811
|
-
console_ = globalThis.console;
|
|
812
|
-
navigator_ = globalThis.navigator || {};
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
|
-
|
|
816
|
-
// ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
|
|
817
|
-
function isElectron(mockUserAgent) {
|
|
818
|
-
if (typeof window !== "undefined" && window.process?.type === "renderer") {
|
|
819
|
-
return true;
|
|
820
|
-
}
|
|
821
|
-
if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
|
|
822
|
-
return true;
|
|
823
|
-
}
|
|
824
|
-
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
825
|
-
const userAgent2 = mockUserAgent || realUserAgent;
|
|
826
|
-
return Boolean(userAgent2 && userAgent2.indexOf("Electron") >= 0);
|
|
827
|
-
}
|
|
828
|
-
var init_is_electron = __esm({
|
|
829
|
-
"../../node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
|
|
74
|
+
// ../../node_modules/@luma.gl/webgl/dist/context/debug/debug-hooks.js
|
|
75
|
+
function makeRegisteredDebugContext(gl, props) {
|
|
76
|
+
if (!webglDeveloperToolsHooks) {
|
|
77
|
+
warnDebugImportRequired();
|
|
78
|
+
return gl;
|
|
830
79
|
}
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
// ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
|
|
834
|
-
function isBrowser() {
|
|
835
|
-
const isNode = (
|
|
836
|
-
// @ts-expect-error
|
|
837
|
-
typeof process === "object" && String(process) === "[object process]" && !process?.browser
|
|
838
|
-
);
|
|
839
|
-
return !isNode || isElectron();
|
|
80
|
+
return webglDeveloperToolsHooks.makeDebugContext(gl, props);
|
|
840
81
|
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
init_is_electron();
|
|
844
|
-
}
|
|
845
|
-
});
|
|
846
|
-
|
|
847
|
-
// ../../node_modules/@probe.gl/env/dist/lib/get-browser.js
|
|
848
|
-
function getBrowser(mockUserAgent) {
|
|
849
|
-
if (!mockUserAgent && !isBrowser()) {
|
|
850
|
-
return "Node";
|
|
851
|
-
}
|
|
852
|
-
if (isElectron(mockUserAgent)) {
|
|
853
|
-
return "Electron";
|
|
854
|
-
}
|
|
855
|
-
const userAgent2 = mockUserAgent || navigator_.userAgent || "";
|
|
856
|
-
if (userAgent2.indexOf("Edge") > -1) {
|
|
857
|
-
return "Edge";
|
|
858
|
-
}
|
|
859
|
-
if (globalThis.chrome) {
|
|
860
|
-
return "Chrome";
|
|
861
|
-
}
|
|
862
|
-
if (globalThis.safari) {
|
|
863
|
-
return "Safari";
|
|
864
|
-
}
|
|
865
|
-
if (globalThis.mozInnerScreenX) {
|
|
866
|
-
return "Firefox";
|
|
867
|
-
}
|
|
868
|
-
return "Unknown";
|
|
82
|
+
function initializeRegisteredSpectorJS(props) {
|
|
83
|
+
return spectorHooks?.initialize(props) || null;
|
|
869
84
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
init_globals();
|
|
875
|
-
}
|
|
876
|
-
});
|
|
877
|
-
|
|
878
|
-
// ../../node_modules/@probe.gl/env/dist/index.js
|
|
879
|
-
var VERSION;
|
|
880
|
-
var init_dist = __esm({
|
|
881
|
-
"../../node_modules/@probe.gl/env/dist/index.js"() {
|
|
882
|
-
init_globals();
|
|
883
|
-
init_is_browser();
|
|
884
|
-
init_get_browser();
|
|
885
|
-
VERSION = true ? "4.1.1" : "untranspiled source";
|
|
85
|
+
function warnDebugImportRequired() {
|
|
86
|
+
if (!debugImportWarningShown) {
|
|
87
|
+
debugImportWarningShown = true;
|
|
88
|
+
import_core2.log.warn("Import @luma.gl/webgl/debug before enabling WebGL debugging.")();
|
|
886
89
|
}
|
|
887
|
-
});
|
|
888
|
-
|
|
889
|
-
// ../../node_modules/@luma.gl/webgl/dist/context/debug/webgl-developer-tools.js
|
|
890
|
-
function getWebGLContextData2(gl) {
|
|
891
|
-
gl.luma = gl.luma || {};
|
|
892
|
-
return gl.luma;
|
|
893
90
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
function getDebugContext(gl, props) {
|
|
902
|
-
if (!globalThis.WebGLDebugUtils) {
|
|
903
|
-
import_core3.log.warn("webgl-debug not loaded")();
|
|
904
|
-
return gl;
|
|
905
|
-
}
|
|
906
|
-
const data = getWebGLContextData2(gl);
|
|
907
|
-
if (data.debugContext) {
|
|
908
|
-
return data.debugContext;
|
|
909
|
-
}
|
|
910
|
-
globalThis.WebGLDebugUtils.init({ ...GLEnum, ...gl });
|
|
911
|
-
const glDebug = globalThis.WebGLDebugUtils.makeDebugContext(gl, onGLError.bind(null, props), onValidateGLFunc.bind(null, props));
|
|
912
|
-
for (const key in GLEnum) {
|
|
913
|
-
if (!(key in glDebug) && typeof GLEnum[key] === "number") {
|
|
914
|
-
glDebug[key] = GLEnum[key];
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
class WebGLDebugContext {
|
|
918
|
-
}
|
|
919
|
-
Object.setPrototypeOf(glDebug, Object.getPrototypeOf(gl));
|
|
920
|
-
Object.setPrototypeOf(WebGLDebugContext, glDebug);
|
|
921
|
-
const debugContext = Object.create(WebGLDebugContext);
|
|
922
|
-
data.realContext = gl;
|
|
923
|
-
data.debugContext = debugContext;
|
|
924
|
-
debugContext.luma = data;
|
|
925
|
-
debugContext.debug = true;
|
|
926
|
-
return debugContext;
|
|
927
|
-
}
|
|
928
|
-
function getFunctionString(functionName, functionArgs) {
|
|
929
|
-
functionArgs = Array.from(functionArgs).map((arg) => arg === void 0 ? "undefined" : arg);
|
|
930
|
-
let args = globalThis.WebGLDebugUtils.glFunctionArgsToString(functionName, functionArgs);
|
|
931
|
-
args = `${args.slice(0, 100)}${args.length > 100 ? "..." : ""}`;
|
|
932
|
-
return `gl.${functionName}(${args})`;
|
|
933
|
-
}
|
|
934
|
-
function onGLError(props, err, functionName, args) {
|
|
935
|
-
args = Array.from(args).map((arg) => arg === void 0 ? "undefined" : arg);
|
|
936
|
-
const errorMessage = globalThis.WebGLDebugUtils.glEnumToString(err);
|
|
937
|
-
const functionArgs = globalThis.WebGLDebugUtils.glFunctionArgsToString(functionName, args);
|
|
938
|
-
const message2 = `${errorMessage} in gl.${functionName}(${functionArgs})`;
|
|
939
|
-
import_core3.log.error("%cWebGL", "color: white; background: red; padding: 2px 6px; border-radius: 3px;", message2)();
|
|
940
|
-
debugger;
|
|
941
|
-
throw new Error(message2);
|
|
942
|
-
}
|
|
943
|
-
function onValidateGLFunc(props, functionName, functionArgs) {
|
|
944
|
-
let functionString = "";
|
|
945
|
-
if (props.traceWebGL && import_core3.log.level >= 1) {
|
|
946
|
-
functionString = getFunctionString(functionName, functionArgs);
|
|
947
|
-
import_core3.log.info(1, "%cWebGL", "color: white; background: blue; padding: 2px 6px; border-radius: 3px;", functionString)();
|
|
948
|
-
}
|
|
949
|
-
for (const arg of functionArgs) {
|
|
950
|
-
if (arg === void 0) {
|
|
951
|
-
functionString = functionString || getFunctionString(functionName, functionArgs);
|
|
952
|
-
debugger;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
var import_core3;
|
|
957
|
-
var init_webgl_developer_tools = __esm({
|
|
958
|
-
"../../node_modules/@luma.gl/webgl/dist/context/debug/webgl-developer-tools.js"() {
|
|
959
|
-
import_core3 = __toESM(require_core2(), 1);
|
|
960
|
-
init_constants();
|
|
91
|
+
var import_core2, webglDeveloperToolsHooks, spectorHooks, debugImportWarningShown;
|
|
92
|
+
var init_debug_hooks = __esm({
|
|
93
|
+
"../../node_modules/@luma.gl/webgl/dist/context/debug/debug-hooks.js"() {
|
|
94
|
+
import_core2 = __toESM(require_core2(), 1);
|
|
95
|
+
webglDeveloperToolsHooks = null;
|
|
96
|
+
spectorHooks = null;
|
|
97
|
+
debugImportWarningShown = false;
|
|
961
98
|
}
|
|
962
99
|
});
|
|
963
100
|
|
|
@@ -1478,7 +615,7 @@ var __exports__ = (() => {
|
|
|
1478
615
|
setGLParameters(gl, GL_PARAMETER_DEFAULTS);
|
|
1479
616
|
}
|
|
1480
617
|
function isObjectEmpty(object) {
|
|
1481
|
-
for (const
|
|
618
|
+
for (const _key in object) {
|
|
1482
619
|
return false;
|
|
1483
620
|
}
|
|
1484
621
|
return true;
|
|
@@ -1647,6 +784,23 @@ var __exports__ = (() => {
|
|
|
1647
784
|
}
|
|
1648
785
|
});
|
|
1649
786
|
|
|
787
|
+
// ../../node_modules/@luma.gl/webgl/dist/context/helpers/webgl-context-data.js
|
|
788
|
+
function getWebGLContextData(gl) {
|
|
789
|
+
const contextData = gl.luma || {
|
|
790
|
+
_polyfilled: false,
|
|
791
|
+
extensions: {},
|
|
792
|
+
softwareRenderer: false
|
|
793
|
+
};
|
|
794
|
+
contextData._polyfilled ??= false;
|
|
795
|
+
contextData.extensions ||= {};
|
|
796
|
+
gl.luma = contextData;
|
|
797
|
+
return contextData;
|
|
798
|
+
}
|
|
799
|
+
var init_webgl_context_data = __esm({
|
|
800
|
+
"../../node_modules/@luma.gl/webgl/dist/context/helpers/webgl-context-data.js"() {
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
|
|
1650
804
|
// ../../node_modules/@luma.gl/webgl/dist/context/helpers/create-browser-context.js
|
|
1651
805
|
function createBrowserContext(canvas, props, webglContextAttributes) {
|
|
1652
806
|
let errorMessage = "";
|
|
@@ -1820,6 +974,9 @@ var __exports__ = (() => {
|
|
|
1820
974
|
return 5125;
|
|
1821
975
|
case "sint32":
|
|
1822
976
|
return 5124;
|
|
977
|
+
// WebGPU does not support normalized 32 bit integer attributes
|
|
978
|
+
// case 'unorm32': return GL.UNSIGNED_INT;
|
|
979
|
+
// case 'snorm32': return GL.INT;
|
|
1823
980
|
case "float16":
|
|
1824
981
|
return 5131;
|
|
1825
982
|
case "float32":
|
|
@@ -1925,7 +1082,7 @@ var __exports__ = (() => {
|
|
|
1925
1082
|
function getTextureFormatWebGL(format) {
|
|
1926
1083
|
const formatData = WEBGL_TEXTURE_FORMATS[format];
|
|
1927
1084
|
const webglFormat = convertTextureFormatToGL(format);
|
|
1928
|
-
const decoded =
|
|
1085
|
+
const decoded = import_core3.textureFormatDecoder.getInfo(format);
|
|
1929
1086
|
if (decoded.compressed) {
|
|
1930
1087
|
formatData.dataFormat = webglFormat;
|
|
1931
1088
|
}
|
|
@@ -1938,7 +1095,7 @@ var __exports__ = (() => {
|
|
|
1938
1095
|
};
|
|
1939
1096
|
}
|
|
1940
1097
|
function getDepthStencilAttachmentWebGL(format) {
|
|
1941
|
-
const formatInfo =
|
|
1098
|
+
const formatInfo = import_core3.textureFormatDecoder.getInfo(format);
|
|
1942
1099
|
switch (formatInfo.attachment) {
|
|
1943
1100
|
case "depth":
|
|
1944
1101
|
return 36096;
|
|
@@ -1977,10 +1134,10 @@ var __exports__ = (() => {
|
|
|
1977
1134
|
}
|
|
1978
1135
|
return webglFormat;
|
|
1979
1136
|
}
|
|
1980
|
-
var
|
|
1137
|
+
var import_core3, X_S3TC, X_S3TC_SRGB, X_RGTC, X_BPTC, X_ETC2, X_ASTC, X_ETC1, X_PVRTC, X_ATC, EXT_texture_norm16, EXT_render_snorm, EXT_color_buffer_float, SNORM8_COLOR_RENDERABLE, NORM16_COLOR_RENDERABLE, SNORM16_COLOR_RENDERABLE, FLOAT16_COLOR_RENDERABLE, FLOAT32_COLOR_RENDERABLE, RGB9E5UFLOAT_COLOR_RENDERABLE, TEXTURE_FEATURES, WEBGL_TEXTURE_FORMATS;
|
|
1981
1138
|
var init_webgl_texture_table = __esm({
|
|
1982
1139
|
"../../node_modules/@luma.gl/webgl/dist/adapter/converters/webgl-texture-table.js"() {
|
|
1983
|
-
|
|
1140
|
+
import_core3 = __toESM(require_core2(), 1);
|
|
1984
1141
|
init_webgl_extensions();
|
|
1985
1142
|
init_webgl_vertex_formats();
|
|
1986
1143
|
X_S3TC = "WEBGL_compressed_texture_s3tc";
|
|
@@ -2175,10 +1332,10 @@ var __exports__ = (() => {
|
|
|
2175
1332
|
});
|
|
2176
1333
|
|
|
2177
1334
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-features.js
|
|
2178
|
-
var
|
|
1335
|
+
var import_core4, WEBGL_FEATURES, WebGLDeviceFeatures;
|
|
2179
1336
|
var init_webgl_device_features = __esm({
|
|
2180
1337
|
"../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-features.js"() {
|
|
2181
|
-
|
|
1338
|
+
import_core4 = __toESM(require_core2(), 1);
|
|
2182
1339
|
init_webgl_extensions();
|
|
2183
1340
|
init_webgl_texture_table();
|
|
2184
1341
|
WEBGL_FEATURES = {
|
|
@@ -2191,6 +1348,7 @@ var __exports__ = (() => {
|
|
|
2191
1348
|
// 'depth32float-stencil8' // GPUTextureFormat 'depth32float-stencil8'
|
|
2192
1349
|
// optional WebGL features
|
|
2193
1350
|
"compilation-status-async-webgl": "KHR_parallel_shader_compile",
|
|
1351
|
+
"html-in-canvas": (gl) => (0, import_core4.isHTMLInCanvasSupported)() && typeof gl.texElementImage2D === "function",
|
|
2194
1352
|
"polygon-mode-webgl": "WEBGL_polygon_mode",
|
|
2195
1353
|
"provoking-vertex-webgl": "WEBGL_provoking_vertex",
|
|
2196
1354
|
"shader-clip-cull-distance-webgl": "WEBGL_clip_cull_distance",
|
|
@@ -2198,7 +1356,7 @@ var __exports__ = (() => {
|
|
|
2198
1356
|
"shader-conservative-depth-webgl": "EXT_conservative_depth"
|
|
2199
1357
|
// Textures are handled by getTextureFeatures()
|
|
2200
1358
|
};
|
|
2201
|
-
WebGLDeviceFeatures = class extends
|
|
1359
|
+
WebGLDeviceFeatures = class extends import_core4.DeviceFeatures {
|
|
2202
1360
|
gl;
|
|
2203
1361
|
extensions;
|
|
2204
1362
|
testedFeatures = /* @__PURE__ */ new Set();
|
|
@@ -2246,7 +1404,7 @@ var __exports__ = (() => {
|
|
|
2246
1404
|
/** Extract all WebGL features */
|
|
2247
1405
|
getWebGLFeature(feature) {
|
|
2248
1406
|
const featureInfo = WEBGL_FEATURES[feature];
|
|
2249
|
-
const isSupported = typeof featureInfo === "string" ? Boolean(getWebGLExtension(this.gl, featureInfo, this.extensions)) : Boolean(featureInfo);
|
|
1407
|
+
const isSupported = typeof featureInfo === "string" ? Boolean(getWebGLExtension(this.gl, featureInfo, this.extensions)) : typeof featureInfo === "function" ? featureInfo(this.gl) : Boolean(featureInfo);
|
|
2250
1408
|
return isSupported;
|
|
2251
1409
|
}
|
|
2252
1410
|
};
|
|
@@ -2254,11 +1412,11 @@ var __exports__ = (() => {
|
|
|
2254
1412
|
});
|
|
2255
1413
|
|
|
2256
1414
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-limits.js
|
|
2257
|
-
var
|
|
1415
|
+
var import_core5, WebGLDeviceLimits;
|
|
2258
1416
|
var init_webgl_device_limits = __esm({
|
|
2259
1417
|
"../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-limits.js"() {
|
|
2260
|
-
|
|
2261
|
-
WebGLDeviceLimits = class extends
|
|
1418
|
+
import_core5 = __toESM(require_core2(), 1);
|
|
1419
|
+
WebGLDeviceLimits = class extends import_core5.DeviceLimits {
|
|
2262
1420
|
get maxTextureDimension1D() {
|
|
2263
1421
|
return 0;
|
|
2264
1422
|
}
|
|
@@ -2275,6 +1433,12 @@ var __exports__ = (() => {
|
|
|
2275
1433
|
get maxBindGroups() {
|
|
2276
1434
|
return 0;
|
|
2277
1435
|
}
|
|
1436
|
+
get maxBindGroupsPlusVertexBuffers() {
|
|
1437
|
+
return 0;
|
|
1438
|
+
}
|
|
1439
|
+
get maxBindingsPerBindGroup() {
|
|
1440
|
+
return 0;
|
|
1441
|
+
}
|
|
2278
1442
|
get maxDynamicUniformBuffersPerPipelineLayout() {
|
|
2279
1443
|
return 0;
|
|
2280
1444
|
}
|
|
@@ -2294,10 +1458,22 @@ var __exports__ = (() => {
|
|
|
2294
1458
|
return 0;
|
|
2295
1459
|
}
|
|
2296
1460
|
// TBD
|
|
1461
|
+
get maxStorageBuffersInVertexStage() {
|
|
1462
|
+
return 0;
|
|
1463
|
+
}
|
|
1464
|
+
get maxStorageBuffersInFragmentStage() {
|
|
1465
|
+
return 0;
|
|
1466
|
+
}
|
|
2297
1467
|
get maxStorageTexturesPerShaderStage() {
|
|
2298
1468
|
return 0;
|
|
2299
1469
|
}
|
|
2300
1470
|
// TBD
|
|
1471
|
+
get maxStorageTexturesInVertexStage() {
|
|
1472
|
+
return 0;
|
|
1473
|
+
}
|
|
1474
|
+
get maxStorageTexturesInFragmentStage() {
|
|
1475
|
+
return 0;
|
|
1476
|
+
}
|
|
2301
1477
|
get maxUniformBuffersPerShaderStage() {
|
|
2302
1478
|
return this.getParameter(35375);
|
|
2303
1479
|
}
|
|
@@ -2307,6 +1483,9 @@ var __exports__ = (() => {
|
|
|
2307
1483
|
get maxStorageBufferBindingSize() {
|
|
2308
1484
|
return 0;
|
|
2309
1485
|
}
|
|
1486
|
+
get maxBufferSize() {
|
|
1487
|
+
return Number.MAX_SAFE_INTEGER;
|
|
1488
|
+
}
|
|
2310
1489
|
get minUniformBufferOffsetAlignment() {
|
|
2311
1490
|
return this.getParameter(35380);
|
|
2312
1491
|
}
|
|
@@ -2327,6 +1506,12 @@ var __exports__ = (() => {
|
|
|
2327
1506
|
get maxInterStageShaderVariables() {
|
|
2328
1507
|
return this.getParameter(35659);
|
|
2329
1508
|
}
|
|
1509
|
+
get maxColorAttachments() {
|
|
1510
|
+
return this.getParameter(36063);
|
|
1511
|
+
}
|
|
1512
|
+
get maxColorAttachmentBytesPerSample() {
|
|
1513
|
+
return 0;
|
|
1514
|
+
}
|
|
2330
1515
|
get maxComputeWorkgroupStorageSize() {
|
|
2331
1516
|
return 0;
|
|
2332
1517
|
}
|
|
@@ -2384,18 +1569,21 @@ var __exports__ = (() => {
|
|
|
2384
1569
|
return "Height/width mismatch";
|
|
2385
1570
|
case 36061:
|
|
2386
1571
|
return "Unsupported or split attachments";
|
|
1572
|
+
// WebGL2
|
|
2387
1573
|
case 36182:
|
|
2388
1574
|
return "Samples mismatch";
|
|
1575
|
+
// OVR_multiview2 extension
|
|
1576
|
+
// case GL.FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: return 'baseViewIndex mismatch';
|
|
2389
1577
|
default:
|
|
2390
1578
|
return `${status}`;
|
|
2391
1579
|
}
|
|
2392
1580
|
}
|
|
2393
|
-
var
|
|
1581
|
+
var import_core6, WEBGLFramebuffer;
|
|
2394
1582
|
var init_webgl_framebuffer = __esm({
|
|
2395
1583
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-framebuffer.js"() {
|
|
2396
|
-
|
|
1584
|
+
import_core6 = __toESM(require_core2(), 1);
|
|
2397
1585
|
init_webgl_texture_table();
|
|
2398
|
-
WEBGLFramebuffer = class extends
|
|
1586
|
+
WEBGLFramebuffer = class extends import_core6.Framebuffer {
|
|
2399
1587
|
device;
|
|
2400
1588
|
gl;
|
|
2401
1589
|
handle;
|
|
@@ -2403,10 +1591,11 @@ var __exports__ = (() => {
|
|
|
2403
1591
|
depthStencilAttachment = null;
|
|
2404
1592
|
constructor(device, props) {
|
|
2405
1593
|
super(device, props);
|
|
2406
|
-
const
|
|
1594
|
+
const suppliedHandle = props.handle;
|
|
1595
|
+
const isDefaultFramebuffer = suppliedHandle === null;
|
|
2407
1596
|
this.device = device;
|
|
2408
1597
|
this.gl = device.gl;
|
|
2409
|
-
this.handle =
|
|
1598
|
+
this.handle = suppliedHandle || isDefaultFramebuffer ? suppliedHandle : this.gl.createFramebuffer();
|
|
2410
1599
|
if (!isDefaultFramebuffer) {
|
|
2411
1600
|
device._setWebGLDebugMetadata(this.handle, this, { spector: this.props });
|
|
2412
1601
|
if (!props.handle) {
|
|
@@ -2498,12 +1687,12 @@ var __exports__ = (() => {
|
|
|
2498
1687
|
});
|
|
2499
1688
|
|
|
2500
1689
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/webgl-canvas-context.js
|
|
2501
|
-
var
|
|
1690
|
+
var import_core7, WebGLCanvasContext;
|
|
2502
1691
|
var init_webgl_canvas_context = __esm({
|
|
2503
1692
|
"../../node_modules/@luma.gl/webgl/dist/adapter/webgl-canvas-context.js"() {
|
|
2504
|
-
|
|
1693
|
+
import_core7 = __toESM(require_core2(), 1);
|
|
2505
1694
|
init_webgl_framebuffer();
|
|
2506
|
-
WebGLCanvasContext = class extends
|
|
1695
|
+
WebGLCanvasContext = class extends import_core7.CanvasContext {
|
|
2507
1696
|
device;
|
|
2508
1697
|
handle = null;
|
|
2509
1698
|
_framebuffer = null;
|
|
@@ -2538,11 +1727,11 @@ var __exports__ = (() => {
|
|
|
2538
1727
|
});
|
|
2539
1728
|
|
|
2540
1729
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/webgl-presentation-context.js
|
|
2541
|
-
var
|
|
1730
|
+
var import_core8, WebGLPresentationContext;
|
|
2542
1731
|
var init_webgl_presentation_context = __esm({
|
|
2543
1732
|
"../../node_modules/@luma.gl/webgl/dist/adapter/webgl-presentation-context.js"() {
|
|
2544
|
-
|
|
2545
|
-
WebGLPresentationContext = class extends
|
|
1733
|
+
import_core8 = __toESM(require_core2(), 1);
|
|
1734
|
+
WebGLPresentationContext = class extends import_core8.PresentationContext {
|
|
2546
1735
|
device;
|
|
2547
1736
|
handle = null;
|
|
2548
1737
|
context2d;
|
|
@@ -2606,34 +1795,34 @@ var __exports__ = (() => {
|
|
|
2606
1795
|
|
|
2607
1796
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-buffer.js
|
|
2608
1797
|
function getWebGLTarget(usage) {
|
|
2609
|
-
if (usage &
|
|
1798
|
+
if (usage & import_core9.Buffer.INDEX) {
|
|
2610
1799
|
return 34963;
|
|
2611
1800
|
}
|
|
2612
|
-
if (usage &
|
|
1801
|
+
if (usage & import_core9.Buffer.VERTEX) {
|
|
2613
1802
|
return 34962;
|
|
2614
1803
|
}
|
|
2615
|
-
if (usage &
|
|
1804
|
+
if (usage & import_core9.Buffer.UNIFORM) {
|
|
2616
1805
|
return 35345;
|
|
2617
1806
|
}
|
|
2618
1807
|
return 34962;
|
|
2619
1808
|
}
|
|
2620
1809
|
function getWebGLUsage(usage) {
|
|
2621
|
-
if (usage &
|
|
1810
|
+
if (usage & import_core9.Buffer.INDEX) {
|
|
2622
1811
|
return 35044;
|
|
2623
1812
|
}
|
|
2624
|
-
if (usage &
|
|
1813
|
+
if (usage & import_core9.Buffer.VERTEX) {
|
|
2625
1814
|
return 35044;
|
|
2626
1815
|
}
|
|
2627
|
-
if (usage &
|
|
1816
|
+
if (usage & import_core9.Buffer.UNIFORM) {
|
|
2628
1817
|
return 35048;
|
|
2629
1818
|
}
|
|
2630
1819
|
return 35044;
|
|
2631
1820
|
}
|
|
2632
|
-
var
|
|
1821
|
+
var import_core9, WEBGLBuffer;
|
|
2633
1822
|
var init_webgl_buffer = __esm({
|
|
2634
1823
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-buffer.js"() {
|
|
2635
|
-
|
|
2636
|
-
WEBGLBuffer = class extends
|
|
1824
|
+
import_core9 = __toESM(require_core2(), 1);
|
|
1825
|
+
WEBGLBuffer = class extends import_core9.Buffer {
|
|
2637
1826
|
device;
|
|
2638
1827
|
gl;
|
|
2639
1828
|
handle;
|
|
@@ -2823,23 +2012,28 @@ var __exports__ = (() => {
|
|
|
2823
2012
|
});
|
|
2824
2013
|
|
|
2825
2014
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shader.js
|
|
2826
|
-
|
|
2015
|
+
function getFirstCompilerLogLine(shaderLog) {
|
|
2016
|
+
return shaderLog.split(/\r?\n/).find((line) => line.trim())?.trim();
|
|
2017
|
+
}
|
|
2018
|
+
var import_core10, WEBGLShader;
|
|
2827
2019
|
var init_webgl_shader = __esm({
|
|
2828
2020
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shader.js"() {
|
|
2829
|
-
|
|
2021
|
+
import_core10 = __toESM(require_core2(), 1);
|
|
2830
2022
|
init_parse_shader_compiler_log();
|
|
2831
|
-
WEBGLShader = class extends
|
|
2023
|
+
WEBGLShader = class extends import_core10.Shader {
|
|
2832
2024
|
device;
|
|
2833
2025
|
handle;
|
|
2026
|
+
_compilationInfoLog = "";
|
|
2834
2027
|
constructor(device, props) {
|
|
2835
2028
|
super(device, props);
|
|
2836
2029
|
this.device = device;
|
|
2030
|
+
const suppliedHandle = this.props.handle;
|
|
2837
2031
|
switch (this.props.stage) {
|
|
2838
2032
|
case "vertex":
|
|
2839
|
-
this.handle =
|
|
2033
|
+
this.handle = suppliedHandle || this.device.gl.createShader(35633);
|
|
2840
2034
|
break;
|
|
2841
2035
|
case "fragment":
|
|
2842
|
-
this.handle =
|
|
2036
|
+
this.handle = suppliedHandle || this.device.gl.createShader(35632);
|
|
2843
2037
|
break;
|
|
2844
2038
|
default:
|
|
2845
2039
|
throw new Error(this.props.stage);
|
|
@@ -2871,7 +2065,7 @@ var __exports__ = (() => {
|
|
|
2871
2065
|
return this.getCompilationInfoSync();
|
|
2872
2066
|
}
|
|
2873
2067
|
getCompilationInfoSync() {
|
|
2874
|
-
const shaderLog = this.
|
|
2068
|
+
const shaderLog = this._getCompilationInfoLog();
|
|
2875
2069
|
return shaderLog ? parseShaderCompilerLog(shaderLog) : [];
|
|
2876
2070
|
}
|
|
2877
2071
|
getTranslatedSource() {
|
|
@@ -2895,13 +2089,13 @@ ${source}`;
|
|
|
2895
2089
|
this._getCompilationStatus();
|
|
2896
2090
|
this.debugShader();
|
|
2897
2091
|
if (this.compilationStatus === "error") {
|
|
2898
|
-
throw new Error(
|
|
2092
|
+
throw new Error(this._getCompilationErrorMessage(source));
|
|
2899
2093
|
}
|
|
2900
2094
|
return;
|
|
2901
2095
|
}
|
|
2902
|
-
|
|
2096
|
+
import_core10.log.once(1, "Shader compilation is asynchronous")();
|
|
2903
2097
|
return this._waitForCompilationComplete().then(() => {
|
|
2904
|
-
|
|
2098
|
+
import_core10.log.info(2, `Shader ${this.id} - async compilation complete: ${this.compilationStatus}`)();
|
|
2905
2099
|
this._getCompilationStatus();
|
|
2906
2100
|
this.debugShader();
|
|
2907
2101
|
});
|
|
@@ -2930,6 +2124,31 @@ ${source}`;
|
|
|
2930
2124
|
*/
|
|
2931
2125
|
_getCompilationStatus() {
|
|
2932
2126
|
this.compilationStatus = this.device.gl.getShaderParameter(this.handle, 35713) ? "success" : "error";
|
|
2127
|
+
if (this.compilationStatus === "error") {
|
|
2128
|
+
this._getCompilationInfoLog();
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
_getCompilationErrorMessage(source) {
|
|
2132
|
+
const shaderDescription = `${this.props.stage} shader ${this.props.id}`;
|
|
2133
|
+
const firstShaderLogLine = getFirstCompilerLogLine(this._getCompilationInfoLog());
|
|
2134
|
+
const compilerMessages = this.getCompilationInfoSync();
|
|
2135
|
+
const firstMessage = compilerMessages.find((message3) => message3.type === "error" && message3.message.trim()) || compilerMessages.find((message3) => message3.message.trim()) || compilerMessages.find((message3) => message3.type === "error") || compilerMessages[0];
|
|
2136
|
+
if (!firstMessage) {
|
|
2137
|
+
return firstShaderLogLine ? `GLSL compilation errors in ${shaderDescription}: ${firstShaderLogLine}` : `GLSL compilation errors in ${shaderDescription}: WebGL did not provide a shader compiler log`;
|
|
2138
|
+
}
|
|
2139
|
+
const sourceLine = firstMessage.lineNum ? source.split(/\r?\n/)[firstMessage.lineNum - 1]?.trim() : void 0;
|
|
2140
|
+
const location = firstMessage.lineNum ? ` line ${firstMessage.lineNum}` : "";
|
|
2141
|
+
const sourceSnippet = sourceLine ? `
|
|
2142
|
+
Source: ${sourceLine}` : "";
|
|
2143
|
+
const message2 = firstMessage.message.trim() || firstShaderLogLine || "WebGL did not provide a shader compiler log";
|
|
2144
|
+
return `GLSL compilation errors in ${shaderDescription}:${location}: ${message2}${sourceSnippet}`;
|
|
2145
|
+
}
|
|
2146
|
+
_getCompilationInfoLog() {
|
|
2147
|
+
const shaderLog = this.device.gl.getShaderInfoLog(this.handle)?.trim();
|
|
2148
|
+
if (shaderLog) {
|
|
2149
|
+
this._compilationInfoLog = shaderLog;
|
|
2150
|
+
}
|
|
2151
|
+
return this._compilationInfoLog;
|
|
2933
2152
|
}
|
|
2934
2153
|
};
|
|
2935
2154
|
}
|
|
@@ -3053,7 +2272,7 @@ ${source}`;
|
|
|
3053
2272
|
gl.stencilMaskSeparate(1029, mask);
|
|
3054
2273
|
}
|
|
3055
2274
|
if (parameters.stencilReadMask) {
|
|
3056
|
-
|
|
2275
|
+
import_core11.log.warn("stencilReadMask not supported under WebGL");
|
|
3057
2276
|
}
|
|
3058
2277
|
if (parameters.stencilCompare) {
|
|
3059
2278
|
const mask = parameters.stencilReadMask || 4294967295;
|
|
@@ -3160,16 +2379,16 @@ ${source}`;
|
|
|
3160
2379
|
}
|
|
3161
2380
|
function isObjectEmpty2(obj) {
|
|
3162
2381
|
let isEmpty = true;
|
|
3163
|
-
for (const
|
|
2382
|
+
for (const _key in obj) {
|
|
3164
2383
|
isEmpty = false;
|
|
3165
2384
|
break;
|
|
3166
2385
|
}
|
|
3167
2386
|
return isEmpty;
|
|
3168
2387
|
}
|
|
3169
|
-
var
|
|
2388
|
+
var import_core11;
|
|
3170
2389
|
var init_device_parameters = __esm({
|
|
3171
2390
|
"../../node_modules/@luma.gl/webgl/dist/adapter/converters/device-parameters.js"() {
|
|
3172
|
-
|
|
2391
|
+
import_core11 = __toESM(require_core2(), 1);
|
|
3173
2392
|
init_unified_parameter_api();
|
|
3174
2393
|
}
|
|
3175
2394
|
});
|
|
@@ -3258,12 +2477,12 @@ ${source}`;
|
|
|
3258
2477
|
});
|
|
3259
2478
|
|
|
3260
2479
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-sampler.js
|
|
3261
|
-
var
|
|
2480
|
+
var import_core12, WEBGLSampler;
|
|
3262
2481
|
var init_webgl_sampler = __esm({
|
|
3263
2482
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-sampler.js"() {
|
|
3264
|
-
|
|
2483
|
+
import_core12 = __toESM(require_core2(), 1);
|
|
3265
2484
|
init_sampler_parameters();
|
|
3266
|
-
WEBGLSampler = class extends
|
|
2485
|
+
WEBGLSampler = class extends import_core12.Sampler {
|
|
3267
2486
|
device;
|
|
3268
2487
|
handle;
|
|
3269
2488
|
parameters;
|
|
@@ -3325,7 +2544,7 @@ ${source}`;
|
|
|
3325
2544
|
return value;
|
|
3326
2545
|
}
|
|
3327
2546
|
function isObjectEmpty3(object) {
|
|
3328
|
-
for (const
|
|
2547
|
+
for (const _key in object) {
|
|
3329
2548
|
return false;
|
|
3330
2549
|
}
|
|
3331
2550
|
return true;
|
|
@@ -3338,18 +2557,18 @@ ${source}`;
|
|
|
3338
2557
|
});
|
|
3339
2558
|
|
|
3340
2559
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture-view.js
|
|
3341
|
-
var
|
|
2560
|
+
var import_core13, WEBGLTextureView;
|
|
3342
2561
|
var init_webgl_texture_view = __esm({
|
|
3343
2562
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture-view.js"() {
|
|
3344
|
-
|
|
3345
|
-
WEBGLTextureView = class extends
|
|
2563
|
+
import_core13 = __toESM(require_core2(), 1);
|
|
2564
|
+
WEBGLTextureView = class extends import_core13.TextureView {
|
|
3346
2565
|
device;
|
|
3347
2566
|
gl;
|
|
3348
2567
|
handle;
|
|
3349
2568
|
// Does not have a WebGL representation
|
|
3350
2569
|
texture;
|
|
3351
2570
|
constructor(device, props) {
|
|
3352
|
-
super(device, { ...
|
|
2571
|
+
super(device, { ...import_core13.Texture.defaultProps, ...props });
|
|
3353
2572
|
this.device = device;
|
|
3354
2573
|
this.gl = this.device.gl;
|
|
3355
2574
|
this.handle = null;
|
|
@@ -3404,14 +2623,19 @@ ${source}`;
|
|
|
3404
2623
|
switch (dimension) {
|
|
3405
2624
|
case "1d":
|
|
3406
2625
|
break;
|
|
2626
|
+
// not supported in any WebGL version
|
|
3407
2627
|
case "2d":
|
|
3408
2628
|
return 3553;
|
|
2629
|
+
// supported in WebGL1
|
|
3409
2630
|
case "3d":
|
|
3410
2631
|
return 32879;
|
|
2632
|
+
// supported in WebGL2
|
|
3411
2633
|
case "cube":
|
|
3412
2634
|
return 34067;
|
|
2635
|
+
// supported in WebGL1
|
|
3413
2636
|
case "2d-array":
|
|
3414
2637
|
return 35866;
|
|
2638
|
+
// supported in WebGL2
|
|
3415
2639
|
case "cube-array":
|
|
3416
2640
|
break;
|
|
3417
2641
|
}
|
|
@@ -3420,16 +2644,16 @@ ${source}`;
|
|
|
3420
2644
|
function getWebGLCubeFaceTarget(glTarget, dimension, level) {
|
|
3421
2645
|
return dimension === "cube" ? 34069 + level : glTarget;
|
|
3422
2646
|
}
|
|
3423
|
-
var
|
|
2647
|
+
var import_core14, WEBGLTexture;
|
|
3424
2648
|
var init_webgl_texture = __esm({
|
|
3425
2649
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture.js"() {
|
|
3426
|
-
|
|
2650
|
+
import_core14 = __toESM(require_core2(), 1);
|
|
3427
2651
|
init_webgl_texture_table();
|
|
3428
2652
|
init_sampler_parameters();
|
|
3429
2653
|
init_with_parameters();
|
|
3430
2654
|
init_webgl_texture_view();
|
|
3431
2655
|
init_shader_formats();
|
|
3432
|
-
WEBGLTexture = class extends
|
|
2656
|
+
WEBGLTexture = class extends import_core14.Texture {
|
|
3433
2657
|
// readonly MAX_ATTRIBUTES: number;
|
|
3434
2658
|
device;
|
|
3435
2659
|
gl;
|
|
@@ -3472,32 +2696,39 @@ ${source}`;
|
|
|
3472
2696
|
this.glFormat = formatInfo.format;
|
|
3473
2697
|
this.glType = formatInfo.type;
|
|
3474
2698
|
this.compressed = formatInfo.compressed;
|
|
2699
|
+
if (this.isHandleBorrowed && this.props.handle === void 0) {
|
|
2700
|
+
throw new Error("Borrowed WebGL textures require a texture handle");
|
|
2701
|
+
}
|
|
3475
2702
|
this.handle = this.props.handle || this.gl.createTexture();
|
|
3476
2703
|
this.device._setWebGLDebugMetadata(this.handle, this, { spector: this.props });
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
2704
|
+
if (!this.isHandleBorrowed) {
|
|
2705
|
+
this.gl.bindTexture(this.glTarget, this.handle);
|
|
2706
|
+
const { dimension, width, height, depth, mipLevels, glTarget, glInternalFormat } = this;
|
|
2707
|
+
if (!this.compressed) {
|
|
2708
|
+
switch (dimension) {
|
|
2709
|
+
case "2d":
|
|
2710
|
+
case "cube":
|
|
2711
|
+
this.gl.texStorage2D(glTarget, mipLevels, glInternalFormat, width, height);
|
|
2712
|
+
break;
|
|
2713
|
+
case "2d-array":
|
|
2714
|
+
case "3d":
|
|
2715
|
+
this.gl.texStorage3D(glTarget, mipLevels, glInternalFormat, width, height, depth);
|
|
2716
|
+
break;
|
|
2717
|
+
default:
|
|
2718
|
+
throw new Error(dimension);
|
|
2719
|
+
}
|
|
3491
2720
|
}
|
|
2721
|
+
this.gl.bindTexture(this.glTarget, null);
|
|
2722
|
+
this._initializeData(props.data);
|
|
3492
2723
|
}
|
|
3493
|
-
|
|
3494
|
-
this._initializeData(props.data);
|
|
3495
|
-
if (!this.props.handle) {
|
|
2724
|
+
if (this.ownsHandle) {
|
|
3496
2725
|
this.trackAllocatedMemory(this.getAllocatedByteLength(), "Texture");
|
|
3497
2726
|
} else {
|
|
3498
2727
|
this.trackReferencedMemory(this.getAllocatedByteLength(), "Texture");
|
|
3499
2728
|
}
|
|
3500
|
-
|
|
2729
|
+
if (!this.isHandleBorrowed) {
|
|
2730
|
+
this.setSampler(this.props.sampler);
|
|
2731
|
+
}
|
|
3501
2732
|
this.view = new WEBGLTextureView(this.device, { ...this.props, texture: this });
|
|
3502
2733
|
Object.seal(this);
|
|
3503
2734
|
}
|
|
@@ -3507,7 +2738,7 @@ ${source}`;
|
|
|
3507
2738
|
this._framebuffer = null;
|
|
3508
2739
|
this._framebufferAttachmentKey = null;
|
|
3509
2740
|
this.removeStats();
|
|
3510
|
-
if (
|
|
2741
|
+
if (this.ownsHandle) {
|
|
3511
2742
|
this.gl.deleteTexture(this.handle);
|
|
3512
2743
|
this.trackDeallocatedMemory("Texture");
|
|
3513
2744
|
} else {
|
|
@@ -3519,12 +2750,20 @@ ${source}`;
|
|
|
3519
2750
|
createView(props) {
|
|
3520
2751
|
return new WEBGLTextureView(this.device, { ...props, texture: this });
|
|
3521
2752
|
}
|
|
2753
|
+
clone(size) {
|
|
2754
|
+
if (this.isHandleBorrowed && size && (size.width !== this.width || size.height !== this.height)) {
|
|
2755
|
+
throw new Error(`Cannot resize borrowed read-only ${this}`);
|
|
2756
|
+
}
|
|
2757
|
+
return super.clone(size);
|
|
2758
|
+
}
|
|
3522
2759
|
setSampler(sampler = {}) {
|
|
2760
|
+
this._assertWritable("set sampler parameters on");
|
|
3523
2761
|
super.setSampler(sampler);
|
|
3524
2762
|
const parameters = convertSamplerParametersToWebGL(this.sampler.props);
|
|
3525
2763
|
this._setSamplerParameters(parameters);
|
|
3526
2764
|
}
|
|
3527
2765
|
copyExternalImage(options_) {
|
|
2766
|
+
this._assertWritable("copy external image data into");
|
|
3528
2767
|
const options = this._normalizeCopyExternalImageOptions(options_);
|
|
3529
2768
|
if (options.sourceX || options.sourceY) {
|
|
3530
2769
|
throw new Error("WebGL does not support sourceX/sourceY)");
|
|
@@ -3550,6 +2789,37 @@ ${source}`;
|
|
|
3550
2789
|
this.gl.bindTexture(this.glTarget, null);
|
|
3551
2790
|
return { width: options.width, height: options.height };
|
|
3552
2791
|
}
|
|
2792
|
+
copyElementImage(options_) {
|
|
2793
|
+
this._assertWritable("copy element image data into");
|
|
2794
|
+
const options = this._normalizeCopyElementImageOptions(options_);
|
|
2795
|
+
const { glFormat } = this;
|
|
2796
|
+
const { element, depth, mipLevel, sourceX, sourceY, sourceWidth, sourceHeight, x, y, z, width, height } = options;
|
|
2797
|
+
const glTarget = getWebGLCubeFaceTarget(this.glTarget, this.dimension, z);
|
|
2798
|
+
const glParameters = options.flipY ? { [37440]: true } : {};
|
|
2799
|
+
const gl = this.gl;
|
|
2800
|
+
if (depth !== 1 || this.dimension !== "2d" && this.dimension !== "cube") {
|
|
2801
|
+
throw new Error(`${this} copyElementImage only supports 2d and cube textures on WebGL`);
|
|
2802
|
+
}
|
|
2803
|
+
if (mipLevel !== 0 || x !== 0 || y !== 0) {
|
|
2804
|
+
throw new Error(`${this} copyElementImage only supports full base-level uploads on WebGL`);
|
|
2805
|
+
}
|
|
2806
|
+
if (typeof gl.texElementImage2D !== "function") {
|
|
2807
|
+
throw new Error(`${this} copyElementImage is not supported by this WebGL implementation`);
|
|
2808
|
+
}
|
|
2809
|
+
this.gl.bindTexture(this.glTarget, this.handle);
|
|
2810
|
+
withGLParameters(this.gl, glParameters, () => {
|
|
2811
|
+
gl.texElementImage2D?.(glTarget, glFormat, element, {
|
|
2812
|
+
sx: sourceX,
|
|
2813
|
+
sy: sourceY,
|
|
2814
|
+
swidth: sourceWidth ?? width,
|
|
2815
|
+
sheight: sourceHeight ?? height,
|
|
2816
|
+
width,
|
|
2817
|
+
height
|
|
2818
|
+
});
|
|
2819
|
+
});
|
|
2820
|
+
this.gl.bindTexture(this.glTarget, null);
|
|
2821
|
+
return { width: options.width, height: options.height };
|
|
2822
|
+
}
|
|
3553
2823
|
copyImageData(options_) {
|
|
3554
2824
|
super.copyImageData(options_);
|
|
3555
2825
|
}
|
|
@@ -3584,6 +2854,7 @@ ${source}`;
|
|
|
3584
2854
|
throw new Error(`${this} readDataAsync is deprecated; use readBuffer() with an explicit destination buffer or DynamicTexture.readAsync()`);
|
|
3585
2855
|
}
|
|
3586
2856
|
writeBuffer(buffer, options_ = {}) {
|
|
2857
|
+
this._assertWritable("write buffer data into");
|
|
3587
2858
|
const options = this._normalizeTextureWriteOptions(options_);
|
|
3588
2859
|
const { width, height, depthOrArrayLayers, mipLevel, byteOffset, x, y, z } = options;
|
|
3589
2860
|
const { glFormat, glType, compressed } = this;
|
|
@@ -3617,6 +2888,7 @@ ${source}`;
|
|
|
3617
2888
|
this.gl.bindTexture(this.glTarget, null);
|
|
3618
2889
|
}
|
|
3619
2890
|
writeData(data, options_ = {}) {
|
|
2891
|
+
this._assertWritable("write data into");
|
|
3620
2892
|
const options = this._normalizeTextureWriteOptions(options_);
|
|
3621
2893
|
const typedArray = ArrayBuffer.isView(data) ? data : new Uint8Array(data);
|
|
3622
2894
|
const { width, height, depthOrArrayLayers, mipLevel, x, y, z, byteOffset } = options;
|
|
@@ -3694,7 +2966,7 @@ ${source}`;
|
|
|
3694
2966
|
const options = this._getSupportedColorReadOptions(options_);
|
|
3695
2967
|
const memoryLayout = this.computeMemoryLayout(options);
|
|
3696
2968
|
const shaderType = convertGLDataTypeToDataType(this.glType);
|
|
3697
|
-
const ArrayType = (0,
|
|
2969
|
+
const ArrayType = (0, import_core14.getTypedArrayConstructor)(shaderType);
|
|
3698
2970
|
const targetArray = new ArrayType(memoryLayout.byteLength / ArrayType.BYTES_PER_ELEMENT);
|
|
3699
2971
|
this._readColorTextureLayers(options, memoryLayout, (destinationByteOffset) => {
|
|
3700
2972
|
const layerView = new ArrayType(targetArray.buffer, targetArray.byteOffset + destinationByteOffset, memoryLayout.bytesPerImage / ArrayType.BYTES_PER_ELEMENT);
|
|
@@ -3764,9 +3036,10 @@ ${source}`;
|
|
|
3764
3036
|
* @note - this is used by the DynamicTexture class to generate mipmaps on WebGL
|
|
3765
3037
|
*/
|
|
3766
3038
|
generateMipmapsWebGL(options) {
|
|
3039
|
+
this._assertWritable("generate mipmaps for");
|
|
3767
3040
|
const isFilterableAndRenderable = this.device.isTextureFormatRenderable(this.props.format) && this.device.isTextureFormatFilterable(this.props.format);
|
|
3768
3041
|
if (!isFilterableAndRenderable) {
|
|
3769
|
-
|
|
3042
|
+
import_core14.log.warn(`${this} is not renderable or filterable, may not be able to generate mipmaps`)();
|
|
3770
3043
|
if (!options?.force) {
|
|
3771
3044
|
return;
|
|
3772
3045
|
}
|
|
@@ -3775,7 +3048,7 @@ ${source}`;
|
|
|
3775
3048
|
this.gl.bindTexture(this.glTarget, this.handle);
|
|
3776
3049
|
this.gl.generateMipmap(this.glTarget);
|
|
3777
3050
|
} catch (error) {
|
|
3778
|
-
|
|
3051
|
+
import_core14.log.warn(`Error generating mipmap for ${this}: ${error.message}`)();
|
|
3779
3052
|
} finally {
|
|
3780
3053
|
this.gl.bindTexture(this.glTarget, null);
|
|
3781
3054
|
}
|
|
@@ -3785,7 +3058,7 @@ ${source}`;
|
|
|
3785
3058
|
* Sets sampler parameters on texture
|
|
3786
3059
|
*/
|
|
3787
3060
|
_setSamplerParameters(parameters) {
|
|
3788
|
-
|
|
3061
|
+
import_core14.log.log(2, `${this.id} sampler parameters`, this.device.getGLKeys(parameters))();
|
|
3789
3062
|
this.gl.bindTexture(this.glTarget, this.handle);
|
|
3790
3063
|
for (const [pname, pvalue] of Object.entries(parameters)) {
|
|
3791
3064
|
const param = Number(pname);
|
|
@@ -3838,6 +3111,11 @@ ${source}`;
|
|
|
3838
3111
|
gl.bindTexture(this.glTarget, null);
|
|
3839
3112
|
return _textureUnit;
|
|
3840
3113
|
}
|
|
3114
|
+
_assertWritable(operation) {
|
|
3115
|
+
if (this.isHandleBorrowed) {
|
|
3116
|
+
throw new Error(`Cannot ${operation} borrowed read-only ${this}`);
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3841
3119
|
};
|
|
3842
3120
|
}
|
|
3843
3121
|
});
|
|
@@ -3897,6 +3175,7 @@ ${source}`;
|
|
|
3897
3175
|
return gl.uniform3iv(location, arrayValue);
|
|
3898
3176
|
case 35673:
|
|
3899
3177
|
return gl.uniform4iv(location, arrayValue);
|
|
3178
|
+
// WEBGL2 - unsigned integers
|
|
3900
3179
|
case 5125:
|
|
3901
3180
|
return gl2.uniform1uiv(location, arrayValue, 1);
|
|
3902
3181
|
case 36294:
|
|
@@ -3905,12 +3184,15 @@ ${source}`;
|
|
|
3905
3184
|
return gl2.uniform3uiv(location, arrayValue, 3);
|
|
3906
3185
|
case 36296:
|
|
3907
3186
|
return gl2.uniform4uiv(location, arrayValue, 4);
|
|
3187
|
+
// WebGL2 - quadratic matrices
|
|
3188
|
+
// false: don't transpose the matrix
|
|
3908
3189
|
case 35674:
|
|
3909
3190
|
return gl.uniformMatrix2fv(location, false, arrayValue);
|
|
3910
3191
|
case 35675:
|
|
3911
3192
|
return gl.uniformMatrix3fv(location, false, arrayValue);
|
|
3912
3193
|
case 35676:
|
|
3913
3194
|
return gl.uniformMatrix4fv(location, false, arrayValue);
|
|
3195
|
+
// WebGL2 - rectangular matrices
|
|
3914
3196
|
case 35685:
|
|
3915
3197
|
return gl2.uniformMatrix2x3fv(location, false, arrayValue);
|
|
3916
3198
|
case 35686:
|
|
@@ -3931,44 +3213,6 @@ ${source}`;
|
|
|
3931
3213
|
}
|
|
3932
3214
|
});
|
|
3933
3215
|
|
|
3934
|
-
// ../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-topology-utils.js
|
|
3935
|
-
function getGLDrawMode(topology) {
|
|
3936
|
-
switch (topology) {
|
|
3937
|
-
case "point-list":
|
|
3938
|
-
return 0;
|
|
3939
|
-
case "line-list":
|
|
3940
|
-
return 1;
|
|
3941
|
-
case "line-strip":
|
|
3942
|
-
return 3;
|
|
3943
|
-
case "triangle-list":
|
|
3944
|
-
return 4;
|
|
3945
|
-
case "triangle-strip":
|
|
3946
|
-
return 5;
|
|
3947
|
-
default:
|
|
3948
|
-
throw new Error(topology);
|
|
3949
|
-
}
|
|
3950
|
-
}
|
|
3951
|
-
function getGLPrimitive(topology) {
|
|
3952
|
-
switch (topology) {
|
|
3953
|
-
case "point-list":
|
|
3954
|
-
return 0;
|
|
3955
|
-
case "line-list":
|
|
3956
|
-
return 1;
|
|
3957
|
-
case "line-strip":
|
|
3958
|
-
return 1;
|
|
3959
|
-
case "triangle-list":
|
|
3960
|
-
return 4;
|
|
3961
|
-
case "triangle-strip":
|
|
3962
|
-
return 4;
|
|
3963
|
-
default:
|
|
3964
|
-
throw new Error(topology);
|
|
3965
|
-
}
|
|
3966
|
-
}
|
|
3967
|
-
var init_webgl_topology_utils = __esm({
|
|
3968
|
-
"../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-topology-utils.js"() {
|
|
3969
|
-
}
|
|
3970
|
-
});
|
|
3971
|
-
|
|
3972
3216
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pipeline.js
|
|
3973
3217
|
function mergeShaderLayout(baseLayout, overrideLayout) {
|
|
3974
3218
|
const mergedLayout = {
|
|
@@ -3979,7 +3223,7 @@ ${source}`;
|
|
|
3979
3223
|
for (const attribute of overrideLayout?.attributes || []) {
|
|
3980
3224
|
const baseAttribute = mergedLayout.attributes.find((attr) => attr.name === attribute.name);
|
|
3981
3225
|
if (!baseAttribute) {
|
|
3982
|
-
|
|
3226
|
+
import_core15.log.warn(`shader layout attribute ${attribute.name} not present in shader`);
|
|
3983
3227
|
} else {
|
|
3984
3228
|
baseAttribute.type = attribute.type || baseAttribute.type;
|
|
3985
3229
|
baseAttribute.stepMode = attribute.stepMode || baseAttribute.stepMode;
|
|
@@ -3988,7 +3232,7 @@ ${source}`;
|
|
|
3988
3232
|
for (const binding of overrideLayout?.bindings || []) {
|
|
3989
3233
|
const baseBinding = getShaderLayoutBindingByName(mergedLayout, binding.name);
|
|
3990
3234
|
if (!baseBinding) {
|
|
3991
|
-
|
|
3235
|
+
import_core15.log.warn(`shader layout binding ${binding.name} not present in shader`);
|
|
3992
3236
|
continue;
|
|
3993
3237
|
}
|
|
3994
3238
|
Object.assign(baseBinding, binding);
|
|
@@ -4001,18 +3245,16 @@ ${source}`;
|
|
|
4001
3245
|
function getBindingValueForLayoutBinding(bindings, bindingName) {
|
|
4002
3246
|
return bindings[bindingName] || bindings[`${bindingName}Uniforms`] || bindings[bindingName.replace(/Uniforms$/, "")];
|
|
4003
3247
|
}
|
|
4004
|
-
var
|
|
3248
|
+
var import_core15, WEBGLRenderPipeline;
|
|
4005
3249
|
var init_webgl_render_pipeline = __esm({
|
|
4006
3250
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pipeline.js"() {
|
|
4007
|
-
|
|
4008
|
-
init_device_parameters();
|
|
3251
|
+
import_core15 = __toESM(require_core2(), 1);
|
|
4009
3252
|
init_set_uniform();
|
|
4010
3253
|
init_webgl_buffer();
|
|
4011
3254
|
init_webgl_framebuffer();
|
|
4012
3255
|
init_webgl_texture();
|
|
4013
3256
|
init_webgl_texture_view();
|
|
4014
|
-
|
|
4015
|
-
WEBGLRenderPipeline = class extends import_core16.RenderPipeline {
|
|
3257
|
+
WEBGLRenderPipeline = class extends import_core15.RenderPipeline {
|
|
4016
3258
|
/** The WebGL device that created this render pipeline */
|
|
4017
3259
|
device;
|
|
4018
3260
|
/** Handle to underlying WebGL program */
|
|
@@ -4057,22 +3299,19 @@ ${source}`;
|
|
|
4057
3299
|
}
|
|
4058
3300
|
this.destroyResource();
|
|
4059
3301
|
}
|
|
4060
|
-
/**
|
|
4061
|
-
* Compatibility shim for code paths that still set bindings on the pipeline.
|
|
4062
|
-
* Shared-model draws pass bindings per draw and do not rely on this state.
|
|
4063
|
-
*/
|
|
3302
|
+
/** @deprecated Set bindings on RenderPass instead. Will be removed in the next major release. */
|
|
4064
3303
|
setBindings(bindings, options) {
|
|
4065
|
-
const flatBindings = (0,
|
|
3304
|
+
const flatBindings = (0, import_core15.flattenBindingsByGroup)((0, import_core15.normalizeBindingsByGroup)(this.shaderLayout, bindings));
|
|
4066
3305
|
for (const [name, value] of Object.entries(flatBindings)) {
|
|
4067
3306
|
const binding = getShaderLayoutBindingByName(this.shaderLayout, name);
|
|
4068
3307
|
if (!binding) {
|
|
4069
3308
|
const validBindings = this.shaderLayout.bindings.map((binding_) => `"${binding_.name}"`).join(", ");
|
|
4070
3309
|
if (!options?.disableWarnings) {
|
|
4071
|
-
|
|
3310
|
+
import_core15.log.warn(`No binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`, value)();
|
|
4072
3311
|
}
|
|
4073
3312
|
} else {
|
|
4074
3313
|
if (!value) {
|
|
4075
|
-
|
|
3314
|
+
import_core15.log.warn(`Unsetting binding "${name}" in render pipeline "${this.id}"`)();
|
|
4076
3315
|
}
|
|
4077
3316
|
switch (binding.type) {
|
|
4078
3317
|
case "uniform":
|
|
@@ -4086,7 +3325,7 @@ ${source}`;
|
|
|
4086
3325
|
}
|
|
4087
3326
|
break;
|
|
4088
3327
|
case "sampler":
|
|
4089
|
-
|
|
3328
|
+
import_core15.log.warn(`Ignoring sampler ${name}`)();
|
|
4090
3329
|
break;
|
|
4091
3330
|
default:
|
|
4092
3331
|
throw new Error(binding.type);
|
|
@@ -4100,66 +3339,25 @@ ${source}`;
|
|
|
4100
3339
|
* This function unifies those ways into a single call using common parameters with sane defaults
|
|
4101
3340
|
*/
|
|
4102
3341
|
draw(options) {
|
|
4103
|
-
|
|
4104
|
-
const drawBindings = options.bindGroups ? (0,
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
const glDrawMode = getGLDrawMode(topology);
|
|
4122
|
-
const isIndexed = Boolean(vertexArray.indexBuffer);
|
|
4123
|
-
const glIndexType = vertexArray.indexBuffer?.glIndexType;
|
|
4124
|
-
if (this.linkStatus !== "success") {
|
|
4125
|
-
import_core16.log.info(2, `RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)();
|
|
4126
|
-
return false;
|
|
4127
|
-
}
|
|
4128
|
-
if (!this._areTexturesRenderable(drawBindings)) {
|
|
4129
|
-
import_core16.log.info(2, `RenderPipeline:${this.id}.draw() aborted - textures not yet loaded`)();
|
|
4130
|
-
return false;
|
|
4131
|
-
}
|
|
4132
|
-
this.device.gl.useProgram(this.handle);
|
|
4133
|
-
vertexArray.bindBeforeRender(renderPass);
|
|
4134
|
-
if (transformFeedback) {
|
|
4135
|
-
transformFeedback.begin(this.props.topology);
|
|
4136
|
-
}
|
|
4137
|
-
this._applyBindings(drawBindings, { disableWarnings: this.props.disableWarnings });
|
|
4138
|
-
this._applyUniforms(uniforms);
|
|
4139
|
-
const webglRenderPass = renderPass;
|
|
4140
|
-
withDeviceAndGLParameters(this.device, parameters, webglRenderPass.glParameters, () => {
|
|
4141
|
-
if (isIndexed && isInstanced) {
|
|
4142
|
-
this.device.gl.drawElementsInstanced(
|
|
4143
|
-
glDrawMode,
|
|
4144
|
-
vertexCount || 0,
|
|
4145
|
-
// indexCount?
|
|
4146
|
-
glIndexType,
|
|
4147
|
-
firstVertex,
|
|
4148
|
-
instanceCount || 0
|
|
4149
|
-
);
|
|
4150
|
-
} else if (isIndexed) {
|
|
4151
|
-
this.device.gl.drawElements(glDrawMode, vertexCount || 0, glIndexType, firstVertex);
|
|
4152
|
-
} else if (isInstanced) {
|
|
4153
|
-
this.device.gl.drawArraysInstanced(glDrawMode, firstVertex, vertexCount || 0, instanceCount || 0);
|
|
4154
|
-
} else {
|
|
4155
|
-
this.device.gl.drawArrays(glDrawMode, firstVertex, vertexCount || 0);
|
|
4156
|
-
}
|
|
4157
|
-
if (transformFeedback) {
|
|
4158
|
-
transformFeedback.end();
|
|
4159
|
-
}
|
|
3342
|
+
const webglRenderPass = options.renderPass;
|
|
3343
|
+
const drawBindings = options.bindGroups ? (0, import_core15.flattenBindingsByGroup)(options.bindGroups) : options.bindings || this.bindings;
|
|
3344
|
+
webglRenderPass.setPipeline(this);
|
|
3345
|
+
webglRenderPass.setBindings(drawBindings);
|
|
3346
|
+
webglRenderPass.setVertexArray(options.vertexArray);
|
|
3347
|
+
return webglRenderPass.draw({
|
|
3348
|
+
parameters: options.parameters,
|
|
3349
|
+
topology: options.topology,
|
|
3350
|
+
isInstanced: options.isInstanced,
|
|
3351
|
+
vertexCount: options.vertexCount,
|
|
3352
|
+
indexCount: options.indexCount,
|
|
3353
|
+
instanceCount: options.instanceCount,
|
|
3354
|
+
firstVertex: options.firstVertex,
|
|
3355
|
+
firstIndex: options.firstIndex,
|
|
3356
|
+
firstInstance: options.firstInstance,
|
|
3357
|
+
baseVertex: options.baseVertex,
|
|
3358
|
+
transformFeedback: options.transformFeedback,
|
|
3359
|
+
uniforms: options.uniforms
|
|
4160
3360
|
});
|
|
4161
|
-
vertexArray.unbindAfterRender(renderPass);
|
|
4162
|
-
return true;
|
|
4163
3361
|
}
|
|
4164
3362
|
/**
|
|
4165
3363
|
* Checks if all texture-values uniforms are renderable (i.e. loaded)
|
|
@@ -4170,7 +3368,7 @@ ${source}`;
|
|
|
4170
3368
|
let texturesRenderable = true;
|
|
4171
3369
|
for (const bindingInfo of this.shaderLayout.bindings) {
|
|
4172
3370
|
if (!getBindingValueForLayoutBinding(bindings, bindingInfo.name)) {
|
|
4173
|
-
|
|
3371
|
+
import_core15.log.warn(`Binding ${bindingInfo.name} not found in ${this.id}`)();
|
|
4174
3372
|
texturesRenderable = false;
|
|
4175
3373
|
}
|
|
4176
3374
|
}
|
|
@@ -4217,7 +3415,7 @@ ${source}`;
|
|
|
4217
3415
|
} else if (value instanceof WEBGLTexture) {
|
|
4218
3416
|
texture = value;
|
|
4219
3417
|
} else if (value instanceof WEBGLFramebuffer && value.colorAttachments[0] instanceof WEBGLTextureView) {
|
|
4220
|
-
|
|
3418
|
+
import_core15.log.warn("Passing framebuffer in texture binding may be deprecated. Use fbo.colorAttachments[0] instead")();
|
|
4221
3419
|
texture = value.colorAttachments[0].texture;
|
|
4222
3420
|
} else {
|
|
4223
3421
|
throw new Error("No texture");
|
|
@@ -4426,7 +3624,7 @@ ${source}`;
|
|
|
4426
3624
|
}
|
|
4427
3625
|
const { name, type: glUniformType, size } = activeInfo;
|
|
4428
3626
|
const uniformType = convertGLUniformTypeToShaderVariableType(glUniformType);
|
|
4429
|
-
const { type, components } = (0,
|
|
3627
|
+
const { type, components } = (0, import_core16.getVariableShaderTypeInfo)(uniformType);
|
|
4430
3628
|
varyings.push({ location, name, type, size: size * components });
|
|
4431
3629
|
}
|
|
4432
3630
|
varyings.sort((a, b) => a.location - b.location);
|
|
@@ -4510,7 +3708,7 @@ ${source}`;
|
|
|
4510
3708
|
const blockAlias = blockInfo.name.replace(/Uniforms$/, "");
|
|
4511
3709
|
if (uniformInstancePrefixes.size === 1 && !uniformInstancePrefixes.has(blockInfo.name) && !uniformInstancePrefixes.has(blockAlias)) {
|
|
4512
3710
|
const [instanceName] = uniformInstancePrefixes;
|
|
4513
|
-
|
|
3711
|
+
import_core16.log.warn(`Uniform block "${blockInfo.name}" uses GLSL instance "${instanceName}". luma.gl binds uniform buffers by block name ("${blockInfo.name}") and alias ("${blockAlias}"). Prefer matching the instance name to one of those to avoid confusing silent mismatches.`)();
|
|
4514
3712
|
}
|
|
4515
3713
|
uniformBlocks.push(blockInfo);
|
|
4516
3714
|
}
|
|
@@ -4527,7 +3725,7 @@ ${source}`;
|
|
|
4527
3725
|
}
|
|
4528
3726
|
const UNIFORM_NAME_REGEXP = /([^[]*)(\[[0-9]+\])?/;
|
|
4529
3727
|
const matches = UNIFORM_NAME_REGEXP.exec(name);
|
|
4530
|
-
const uniformName = (0,
|
|
3728
|
+
const uniformName = (0, import_core16.assertDefined)(matches?.[1], `Failed to parse GLSL uniform name ${name}`);
|
|
4531
3729
|
return {
|
|
4532
3730
|
name: uniformName,
|
|
4533
3731
|
// TODO - is this a bug, shouldn't we return the value?
|
|
@@ -4535,23 +3733,23 @@ ${source}`;
|
|
|
4535
3733
|
isArray: Boolean(matches?.[2])
|
|
4536
3734
|
};
|
|
4537
3735
|
}
|
|
4538
|
-
var
|
|
3736
|
+
var import_core16;
|
|
4539
3737
|
var init_get_shader_layout_from_glsl = __esm({
|
|
4540
3738
|
"../../node_modules/@luma.gl/webgl/dist/adapter/helpers/get-shader-layout-from-glsl.js"() {
|
|
4541
|
-
|
|
3739
|
+
import_core16 = __toESM(require_core2(), 1);
|
|
4542
3740
|
init_webgl_shadertypes();
|
|
4543
3741
|
}
|
|
4544
3742
|
});
|
|
4545
3743
|
|
|
4546
3744
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shared-render-pipeline.js
|
|
4547
|
-
var
|
|
3745
|
+
var import_core17, LOG_PROGRAM_PERF_PRIORITY, WEBGLSharedRenderPipeline;
|
|
4548
3746
|
var init_webgl_shared_render_pipeline = __esm({
|
|
4549
3747
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shared-render-pipeline.js"() {
|
|
4550
|
-
|
|
3748
|
+
import_core17 = __toESM(require_core2(), 1);
|
|
4551
3749
|
init_get_shader_layout_from_glsl();
|
|
4552
3750
|
init_webgl_shadertypes();
|
|
4553
3751
|
LOG_PROGRAM_PERF_PRIORITY = 4;
|
|
4554
|
-
WEBGLSharedRenderPipeline = class extends
|
|
3752
|
+
WEBGLSharedRenderPipeline = class extends import_core17.SharedRenderPipeline {
|
|
4555
3753
|
device;
|
|
4556
3754
|
handle;
|
|
4557
3755
|
vs;
|
|
@@ -4568,9 +3766,9 @@ ${source}`;
|
|
|
4568
3766
|
this.device.gl.transformFeedbackVaryings(this.handle, props.varyings, props.bufferMode || 35981);
|
|
4569
3767
|
}
|
|
4570
3768
|
this._linkShaders();
|
|
4571
|
-
|
|
3769
|
+
import_core17.log.time(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
|
|
4572
3770
|
this.introspectedLayout = getShaderLayoutFromGLSL(this.device.gl, this.handle);
|
|
4573
|
-
|
|
3771
|
+
import_core17.log.timeEnd(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
|
|
4574
3772
|
}
|
|
4575
3773
|
destroy() {
|
|
4576
3774
|
if (this.destroyed) {
|
|
@@ -4585,17 +3783,17 @@ ${source}`;
|
|
|
4585
3783
|
const { gl } = this.device;
|
|
4586
3784
|
gl.attachShader(this.handle, this.vs.handle);
|
|
4587
3785
|
gl.attachShader(this.handle, this.fs.handle);
|
|
4588
|
-
|
|
3786
|
+
import_core17.log.time(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
|
|
4589
3787
|
gl.linkProgram(this.handle);
|
|
4590
|
-
|
|
3788
|
+
import_core17.log.timeEnd(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
|
|
4591
3789
|
if (!this.device.features.has("compilation-status-async-webgl")) {
|
|
4592
3790
|
const status2 = this._getLinkStatus();
|
|
4593
3791
|
this._reportLinkStatus(status2);
|
|
4594
3792
|
return;
|
|
4595
3793
|
}
|
|
4596
|
-
|
|
3794
|
+
import_core17.log.once(1, "RenderPipeline linking is asynchronous")();
|
|
4597
3795
|
await this._waitForLinkComplete();
|
|
4598
|
-
|
|
3796
|
+
import_core17.log.info(2, `RenderPipeline ${this.id} - async linking complete: ${this.linkStatus}`)();
|
|
4599
3797
|
const status = this._getLinkStatus();
|
|
4600
3798
|
this._reportLinkStatus(status);
|
|
4601
3799
|
}
|
|
@@ -4707,11 +3905,26 @@ ${source}`;
|
|
|
4707
3905
|
device.gl.bindBuffer(36663, null);
|
|
4708
3906
|
}
|
|
4709
3907
|
function _copyBufferToTexture(_device, _options) {
|
|
4710
|
-
|
|
3908
|
+
const { sourceBuffer, byteOffset = 0, destinationTexture, mipLevel = 0, origin = [0, 0, 0], aspect = "all", bytesPerRow, rowsPerImage, size } = _options;
|
|
3909
|
+
if (aspect !== "all") {
|
|
3910
|
+
throw new Error("copyBufferToTexture aspect is not supported in WebGL");
|
|
3911
|
+
}
|
|
3912
|
+
destinationTexture.writeBuffer(sourceBuffer, {
|
|
3913
|
+
byteOffset,
|
|
3914
|
+
bytesPerRow,
|
|
3915
|
+
rowsPerImage,
|
|
3916
|
+
mipLevel,
|
|
3917
|
+
x: origin[0] ?? 0,
|
|
3918
|
+
y: origin[1] ?? 0,
|
|
3919
|
+
z: origin[2] ?? 0,
|
|
3920
|
+
width: size[0],
|
|
3921
|
+
height: size[1],
|
|
3922
|
+
depthOrArrayLayers: size[2]
|
|
3923
|
+
});
|
|
4711
3924
|
}
|
|
4712
3925
|
function _copyTextureToBuffer(device, options) {
|
|
4713
3926
|
const { sourceTexture, mipLevel = 0, aspect = "all", width = options.sourceTexture.width, height = options.sourceTexture.height, depthOrArrayLayers, origin = [0, 0, 0], destinationBuffer, byteOffset = 0, bytesPerRow, rowsPerImage } = options;
|
|
4714
|
-
if (sourceTexture instanceof
|
|
3927
|
+
if (sourceTexture instanceof import_core18.Texture) {
|
|
4715
3928
|
sourceTexture.readBuffer({
|
|
4716
3929
|
x: origin[0] ?? 0,
|
|
4717
3930
|
y: origin[1] ?? 0,
|
|
@@ -4737,7 +3950,7 @@ ${source}`;
|
|
|
4737
3950
|
const webglBuffer = destinationBuffer;
|
|
4738
3951
|
const sourceWidth = width || framebuffer.width;
|
|
4739
3952
|
const sourceHeight = height || framebuffer.height;
|
|
4740
|
-
const colorAttachment0 = (0,
|
|
3953
|
+
const colorAttachment0 = (0, import_core18.assertDefined)(framebuffer.colorAttachments[0]);
|
|
4741
3954
|
const sourceParams = getTextureFormatWebGL(colorAttachment0.texture.props.format);
|
|
4742
3955
|
const sourceFormat = sourceParams.format;
|
|
4743
3956
|
const sourceType = sourceParams.type;
|
|
@@ -4815,7 +4028,7 @@ ${source}`;
|
|
|
4815
4028
|
}
|
|
4816
4029
|
}
|
|
4817
4030
|
function getFramebuffer(source) {
|
|
4818
|
-
if (source instanceof
|
|
4031
|
+
if (source instanceof import_core18.Texture) {
|
|
4819
4032
|
const { width, height, id } = source;
|
|
4820
4033
|
const framebuffer = source.device.createFramebuffer({
|
|
4821
4034
|
id: `framebuffer-for-${id}`,
|
|
@@ -4827,13 +4040,13 @@ ${source}`;
|
|
|
4827
4040
|
}
|
|
4828
4041
|
return { framebuffer: source, destroyFramebuffer: false };
|
|
4829
4042
|
}
|
|
4830
|
-
var
|
|
4043
|
+
var import_core18, WEBGLCommandBuffer;
|
|
4831
4044
|
var init_webgl_command_buffer = __esm({
|
|
4832
4045
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-buffer.js"() {
|
|
4833
|
-
|
|
4046
|
+
import_core18 = __toESM(require_core2(), 1);
|
|
4834
4047
|
init_webgl_texture_table();
|
|
4835
4048
|
init_webgl_texture();
|
|
4836
|
-
WEBGLCommandBuffer = class extends
|
|
4049
|
+
WEBGLCommandBuffer = class extends import_core18.CommandBuffer {
|
|
4837
4050
|
device;
|
|
4838
4051
|
handle = null;
|
|
4839
4052
|
commands = [];
|
|
@@ -4856,6 +4069,9 @@ ${source}`;
|
|
|
4856
4069
|
case "copy-texture-to-texture":
|
|
4857
4070
|
_copyTextureToTexture(this.device, command.options);
|
|
4858
4071
|
break;
|
|
4072
|
+
// case 'clear-texture':
|
|
4073
|
+
// _clearTexture(this.device, command.options);
|
|
4074
|
+
// break;
|
|
4859
4075
|
default:
|
|
4860
4076
|
throw new Error(command.name);
|
|
4861
4077
|
}
|
|
@@ -4865,19 +4081,66 @@ ${source}`;
|
|
|
4865
4081
|
}
|
|
4866
4082
|
});
|
|
4867
4083
|
|
|
4084
|
+
// ../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-topology-utils.js
|
|
4085
|
+
function getGLDrawMode(topology) {
|
|
4086
|
+
switch (topology) {
|
|
4087
|
+
case "point-list":
|
|
4088
|
+
return 0;
|
|
4089
|
+
case "line-list":
|
|
4090
|
+
return 1;
|
|
4091
|
+
case "line-strip":
|
|
4092
|
+
return 3;
|
|
4093
|
+
case "triangle-list":
|
|
4094
|
+
return 4;
|
|
4095
|
+
case "triangle-strip":
|
|
4096
|
+
return 5;
|
|
4097
|
+
default:
|
|
4098
|
+
throw new Error(topology);
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
function getGLPrimitive(topology) {
|
|
4102
|
+
switch (topology) {
|
|
4103
|
+
case "point-list":
|
|
4104
|
+
return 0;
|
|
4105
|
+
case "line-list":
|
|
4106
|
+
return 1;
|
|
4107
|
+
case "line-strip":
|
|
4108
|
+
return 1;
|
|
4109
|
+
case "triangle-list":
|
|
4110
|
+
return 4;
|
|
4111
|
+
case "triangle-strip":
|
|
4112
|
+
return 4;
|
|
4113
|
+
default:
|
|
4114
|
+
throw new Error(topology);
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4117
|
+
var init_webgl_topology_utils = __esm({
|
|
4118
|
+
"../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-topology-utils.js"() {
|
|
4119
|
+
}
|
|
4120
|
+
});
|
|
4121
|
+
|
|
4868
4122
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pass.js
|
|
4869
|
-
var
|
|
4123
|
+
var import_core19, COLOR_CHANNELS, WEBGLRenderPass;
|
|
4870
4124
|
var init_webgl_render_pass = __esm({
|
|
4871
4125
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pass.js"() {
|
|
4872
|
-
|
|
4126
|
+
import_core19 = __toESM(require_core2(), 1);
|
|
4873
4127
|
init_with_parameters();
|
|
4874
4128
|
init_unified_parameter_api();
|
|
4129
|
+
init_webgl_topology_utils();
|
|
4130
|
+
init_device_parameters();
|
|
4875
4131
|
COLOR_CHANNELS = [1, 2, 4, 8];
|
|
4876
|
-
WEBGLRenderPass = class extends
|
|
4132
|
+
WEBGLRenderPass = class extends import_core19.RenderPass {
|
|
4877
4133
|
device;
|
|
4878
4134
|
handle = null;
|
|
4879
4135
|
/** Parameters that should be applied before each draw call */
|
|
4880
4136
|
glParameters = {};
|
|
4137
|
+
/** Pipeline used by subsequent draw commands. */
|
|
4138
|
+
pipeline = null;
|
|
4139
|
+
/** Complete binding set used by subsequent draw commands. */
|
|
4140
|
+
bindings = {};
|
|
4141
|
+
bindingsPipeline = null;
|
|
4142
|
+
/** Vertex array used by subsequent draw commands. */
|
|
4143
|
+
vertexArray = null;
|
|
4881
4144
|
constructor(device, props) {
|
|
4882
4145
|
super(device, props);
|
|
4883
4146
|
this.device = device;
|
|
@@ -4929,7 +4192,10 @@ ${source}`;
|
|
|
4929
4192
|
}
|
|
4930
4193
|
// beginOcclusionQuery(queryIndex: number): void;
|
|
4931
4194
|
// endOcclusionQuery(): void;
|
|
4932
|
-
|
|
4195
|
+
/** @throws Always throws because WebGL does not support render bundles. */
|
|
4196
|
+
executeBundles(_bundles) {
|
|
4197
|
+
throw new Error("Render bundles are only supported in WebGPU");
|
|
4198
|
+
}
|
|
4933
4199
|
/**
|
|
4934
4200
|
* Maps RenderPass parameters to GL parameters
|
|
4935
4201
|
*/
|
|
@@ -4969,6 +4235,78 @@ ${source}`;
|
|
|
4969
4235
|
this.glParameters = glParameters;
|
|
4970
4236
|
setGLParameters(this.device.gl, glParameters);
|
|
4971
4237
|
}
|
|
4238
|
+
setPipeline(pipeline) {
|
|
4239
|
+
this.pipeline = pipeline;
|
|
4240
|
+
}
|
|
4241
|
+
setBindings(bindings, _options) {
|
|
4242
|
+
if (!this.pipeline) {
|
|
4243
|
+
throw new Error("RenderPass.setPipeline() must be called before setBindings()");
|
|
4244
|
+
}
|
|
4245
|
+
this.bindings = (0, import_core19.flattenBindingsByGroup)((0, import_core19.normalizeBindingsByGroup)(this.pipeline.shaderLayout, bindings));
|
|
4246
|
+
this.bindingsPipeline = this.pipeline;
|
|
4247
|
+
}
|
|
4248
|
+
setVertexArray(vertexArray) {
|
|
4249
|
+
this.vertexArray = vertexArray;
|
|
4250
|
+
}
|
|
4251
|
+
draw(options) {
|
|
4252
|
+
const pipeline = this.pipeline;
|
|
4253
|
+
const vertexArray = this.vertexArray;
|
|
4254
|
+
if (!pipeline) {
|
|
4255
|
+
throw new Error("RenderPass.setPipeline() must be called before draw()");
|
|
4256
|
+
}
|
|
4257
|
+
if (!vertexArray) {
|
|
4258
|
+
throw new Error("RenderPass.setVertexArray() must be called before draw()");
|
|
4259
|
+
}
|
|
4260
|
+
if (pipeline.shaderLayout.bindings.length > 0 && this.bindingsPipeline !== pipeline) {
|
|
4261
|
+
throw new Error("RenderPass.setBindings() must be called after setPipeline() before draw()");
|
|
4262
|
+
}
|
|
4263
|
+
pipeline._syncLinkStatus();
|
|
4264
|
+
const { parameters = pipeline.props.parameters, topology = pipeline.props.topology, vertexCount, indexCount, instanceCount, isInstanced = false, firstVertex = 0, transformFeedback, uniforms = pipeline.uniforms } = options;
|
|
4265
|
+
const glDrawMode = getGLDrawMode(topology);
|
|
4266
|
+
const isIndexed = Boolean(vertexArray.indexBuffer);
|
|
4267
|
+
const glIndexType = vertexArray.indexBuffer?.glIndexType;
|
|
4268
|
+
const indexedDrawCount = indexCount ?? vertexCount ?? 0;
|
|
4269
|
+
if (pipeline.linkStatus !== "success") {
|
|
4270
|
+
import_core19.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - waiting for shader linking`)();
|
|
4271
|
+
return false;
|
|
4272
|
+
}
|
|
4273
|
+
if (!pipeline._areTexturesRenderable(this.bindings)) {
|
|
4274
|
+
import_core19.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - textures not yet loaded`)();
|
|
4275
|
+
return false;
|
|
4276
|
+
}
|
|
4277
|
+
this.device.gl.useProgram(pipeline.handle);
|
|
4278
|
+
vertexArray.bindBeforeRender(this);
|
|
4279
|
+
const webglTransformFeedback = transformFeedback;
|
|
4280
|
+
if (webglTransformFeedback) {
|
|
4281
|
+
webglTransformFeedback.begin(pipeline.props.topology);
|
|
4282
|
+
}
|
|
4283
|
+
pipeline._applyBindings(this.bindings, { disableWarnings: pipeline.props.disableWarnings });
|
|
4284
|
+
pipeline._applyUniforms(uniforms);
|
|
4285
|
+
withDeviceAndGLParameters(this.device, parameters, this.glParameters, () => {
|
|
4286
|
+
if (isIndexed && isInstanced) {
|
|
4287
|
+
this.device.gl.drawElementsInstanced(glDrawMode, indexedDrawCount, glIndexType, firstVertex, instanceCount || 0);
|
|
4288
|
+
} else if (isIndexed) {
|
|
4289
|
+
this.device.gl.drawElements(glDrawMode, indexedDrawCount, glIndexType, firstVertex);
|
|
4290
|
+
} else if (isInstanced) {
|
|
4291
|
+
this.device.gl.drawArraysInstanced(glDrawMode, firstVertex, vertexCount || 0, instanceCount || 0);
|
|
4292
|
+
} else {
|
|
4293
|
+
this.device.gl.drawArrays(glDrawMode, firstVertex, vertexCount || 0);
|
|
4294
|
+
}
|
|
4295
|
+
if (webglTransformFeedback) {
|
|
4296
|
+
webglTransformFeedback.end();
|
|
4297
|
+
}
|
|
4298
|
+
});
|
|
4299
|
+
vertexArray.unbindAfterRender(this);
|
|
4300
|
+
return true;
|
|
4301
|
+
}
|
|
4302
|
+
/** @throws Always throws because WebGL does not expose indirect drawing. */
|
|
4303
|
+
drawIndirect(_indirectBuffer, _indirectByteOffset = 0) {
|
|
4304
|
+
throw new Error("Indirect drawing is only supported in WebGPU");
|
|
4305
|
+
}
|
|
4306
|
+
/** @throws Always throws because WebGL does not expose indirect drawing. */
|
|
4307
|
+
drawIndexedIndirect(_indirectBuffer, _indirectByteOffset = 0) {
|
|
4308
|
+
throw new Error("Indirect drawing is only supported in WebGPU");
|
|
4309
|
+
}
|
|
4972
4310
|
beginOcclusionQuery(queryIndex) {
|
|
4973
4311
|
const webglQuerySet = this.props.occlusionQuerySet;
|
|
4974
4312
|
webglQuerySet?.beginOcclusionQuery();
|
|
@@ -5039,13 +4377,13 @@ ${source}`;
|
|
|
5039
4377
|
});
|
|
5040
4378
|
|
|
5041
4379
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-encoder.js
|
|
5042
|
-
var
|
|
4380
|
+
var import_core20, WEBGLCommandEncoder;
|
|
5043
4381
|
var init_webgl_command_encoder = __esm({
|
|
5044
4382
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-encoder.js"() {
|
|
5045
|
-
|
|
4383
|
+
import_core20 = __toESM(require_core2(), 1);
|
|
5046
4384
|
init_webgl_command_buffer();
|
|
5047
4385
|
init_webgl_render_pass();
|
|
5048
|
-
WEBGLCommandEncoder = class extends
|
|
4386
|
+
WEBGLCommandEncoder = class extends import_core20.CommandEncoder {
|
|
5049
4387
|
device;
|
|
5050
4388
|
handle = null;
|
|
5051
4389
|
commandBuffer;
|
|
@@ -5053,17 +4391,14 @@ ${source}`;
|
|
|
5053
4391
|
super(device, props);
|
|
5054
4392
|
this.device = device;
|
|
5055
4393
|
this.commandBuffer = new WEBGLCommandBuffer(device, {
|
|
5056
|
-
id:
|
|
4394
|
+
id: this.id,
|
|
4395
|
+
userData: this.userData
|
|
5057
4396
|
});
|
|
5058
4397
|
}
|
|
5059
4398
|
destroy() {
|
|
5060
4399
|
this.destroyResource();
|
|
5061
4400
|
}
|
|
5062
|
-
finish(
|
|
5063
|
-
if (props?.id && this.commandBuffer.id !== props.id) {
|
|
5064
|
-
this.commandBuffer.id = props.id;
|
|
5065
|
-
this.commandBuffer.props.id = props.id;
|
|
5066
|
-
}
|
|
4401
|
+
finish() {
|
|
5067
4402
|
this.destroy();
|
|
5068
4403
|
return this.commandBuffer;
|
|
5069
4404
|
}
|
|
@@ -5105,6 +4440,91 @@ ${source}`;
|
|
|
5105
4440
|
}
|
|
5106
4441
|
});
|
|
5107
4442
|
|
|
4443
|
+
// ../../node_modules/@probe.gl/env/dist/lib/globals.js
|
|
4444
|
+
var window_, document_, process_, console_, navigator_;
|
|
4445
|
+
var init_globals = __esm({
|
|
4446
|
+
"../../node_modules/@probe.gl/env/dist/lib/globals.js"() {
|
|
4447
|
+
window_ = globalThis;
|
|
4448
|
+
document_ = globalThis.document || {};
|
|
4449
|
+
process_ = globalThis.process || {};
|
|
4450
|
+
console_ = globalThis.console;
|
|
4451
|
+
navigator_ = globalThis.navigator || {};
|
|
4452
|
+
}
|
|
4453
|
+
});
|
|
4454
|
+
|
|
4455
|
+
// ../../node_modules/@probe.gl/env/dist/lib/is-electron.js
|
|
4456
|
+
function isElectron(mockUserAgent) {
|
|
4457
|
+
if (typeof window !== "undefined" && window.process?.type === "renderer") {
|
|
4458
|
+
return true;
|
|
4459
|
+
}
|
|
4460
|
+
if (typeof process !== "undefined" && Boolean(process.versions?.["electron"])) {
|
|
4461
|
+
return true;
|
|
4462
|
+
}
|
|
4463
|
+
const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
|
|
4464
|
+
const userAgent2 = mockUserAgent || realUserAgent;
|
|
4465
|
+
return Boolean(userAgent2 && userAgent2.indexOf("Electron") >= 0);
|
|
4466
|
+
}
|
|
4467
|
+
var init_is_electron = __esm({
|
|
4468
|
+
"../../node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
|
|
4469
|
+
}
|
|
4470
|
+
});
|
|
4471
|
+
|
|
4472
|
+
// ../../node_modules/@probe.gl/env/dist/lib/is-browser.js
|
|
4473
|
+
function isBrowser() {
|
|
4474
|
+
const isNode = (
|
|
4475
|
+
// @ts-expect-error
|
|
4476
|
+
typeof process === "object" && String(process) === "[object process]" && !process?.browser
|
|
4477
|
+
);
|
|
4478
|
+
return !isNode || isElectron();
|
|
4479
|
+
}
|
|
4480
|
+
var init_is_browser = __esm({
|
|
4481
|
+
"../../node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
|
|
4482
|
+
init_is_electron();
|
|
4483
|
+
}
|
|
4484
|
+
});
|
|
4485
|
+
|
|
4486
|
+
// ../../node_modules/@probe.gl/env/dist/lib/get-browser.js
|
|
4487
|
+
function getBrowser(mockUserAgent) {
|
|
4488
|
+
if (!mockUserAgent && !isBrowser()) {
|
|
4489
|
+
return "Node";
|
|
4490
|
+
}
|
|
4491
|
+
if (isElectron(mockUserAgent)) {
|
|
4492
|
+
return "Electron";
|
|
4493
|
+
}
|
|
4494
|
+
const userAgent2 = mockUserAgent || navigator_.userAgent || "";
|
|
4495
|
+
if (userAgent2.indexOf("Edge") > -1) {
|
|
4496
|
+
return "Edge";
|
|
4497
|
+
}
|
|
4498
|
+
if (globalThis.chrome) {
|
|
4499
|
+
return "Chrome";
|
|
4500
|
+
}
|
|
4501
|
+
if (globalThis.safari) {
|
|
4502
|
+
return "Safari";
|
|
4503
|
+
}
|
|
4504
|
+
if (globalThis.mozInnerScreenX) {
|
|
4505
|
+
return "Firefox";
|
|
4506
|
+
}
|
|
4507
|
+
return "Unknown";
|
|
4508
|
+
}
|
|
4509
|
+
var init_get_browser = __esm({
|
|
4510
|
+
"../../node_modules/@probe.gl/env/dist/lib/get-browser.js"() {
|
|
4511
|
+
init_is_browser();
|
|
4512
|
+
init_is_electron();
|
|
4513
|
+
init_globals();
|
|
4514
|
+
}
|
|
4515
|
+
});
|
|
4516
|
+
|
|
4517
|
+
// ../../node_modules/@probe.gl/env/dist/index.js
|
|
4518
|
+
var VERSION;
|
|
4519
|
+
var init_dist = __esm({
|
|
4520
|
+
"../../node_modules/@probe.gl/env/dist/index.js"() {
|
|
4521
|
+
init_globals();
|
|
4522
|
+
init_is_browser();
|
|
4523
|
+
init_get_browser();
|
|
4524
|
+
VERSION = true ? "4.1.1" : "untranspiled source";
|
|
4525
|
+
}
|
|
4526
|
+
});
|
|
4527
|
+
|
|
5108
4528
|
// ../../node_modules/@luma.gl/webgl/dist/utils/fill-array.js
|
|
5109
4529
|
function fillArray(options) {
|
|
5110
4530
|
const { target: target2, source, start = 0, count = 1 } = options;
|
|
@@ -5148,31 +4568,45 @@ ${source}`;
|
|
|
5148
4568
|
}
|
|
5149
4569
|
return true;
|
|
5150
4570
|
}
|
|
5151
|
-
var
|
|
4571
|
+
var import_core21, WEBGLVertexArray;
|
|
5152
4572
|
var init_webgl_vertex_array = __esm({
|
|
5153
4573
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-vertex-array.js"() {
|
|
5154
|
-
|
|
4574
|
+
import_core21 = __toESM(require_core2(), 1);
|
|
5155
4575
|
init_dist();
|
|
5156
4576
|
init_webgl_vertex_formats();
|
|
5157
4577
|
init_fill_array();
|
|
5158
|
-
WEBGLVertexArray = class extends
|
|
4578
|
+
WEBGLVertexArray = class _WEBGLVertexArray extends import_core21.VertexArray {
|
|
5159
4579
|
get [Symbol.toStringTag]() {
|
|
5160
4580
|
return "VertexArray";
|
|
5161
4581
|
}
|
|
5162
4582
|
device;
|
|
5163
4583
|
handle;
|
|
4584
|
+
/** Attribute accessors indexed by shader location for WebGL pointer setup. */
|
|
4585
|
+
attributeInfosByLocation;
|
|
5164
4586
|
/** Attribute 0 buffer constant */
|
|
5165
4587
|
buffer = null;
|
|
5166
4588
|
bufferValue = null;
|
|
5167
|
-
/**
|
|
4589
|
+
/**
|
|
4590
|
+
* Reports whether attribute location 0 may be disabled without fallback handling.
|
|
4591
|
+
* @param device The device that owns the vertex array.
|
|
4592
|
+
* @returns `true` when constant attribute 0 is supported on the current browser.
|
|
4593
|
+
*/
|
|
5168
4594
|
static isConstantAttributeZeroSupported(device) {
|
|
5169
4595
|
return getBrowser() === "Chrome";
|
|
5170
4596
|
}
|
|
5171
|
-
|
|
4597
|
+
/**
|
|
4598
|
+
* Creates a WebGL vertex array and caches per-location accessor metadata.
|
|
4599
|
+
* @param device The device that owns the vertex array.
|
|
4600
|
+
* @param props Vertex-array initialization properties.
|
|
4601
|
+
*/
|
|
5172
4602
|
constructor(device, props) {
|
|
5173
4603
|
super(device, props);
|
|
5174
4604
|
this.device = device;
|
|
5175
4605
|
this.handle = this.device.gl.createVertexArray();
|
|
4606
|
+
this.attributeInfosByLocation = new Array(this.maxVertexAttributes).fill(null);
|
|
4607
|
+
for (const attributeInfo of Object.values((0, import_core21.getAttributeInfosFromLayouts)(props.shaderLayout, props.bufferLayout))) {
|
|
4608
|
+
this.attributeInfosByLocation[attributeInfo.location] = attributeInfo;
|
|
4609
|
+
}
|
|
5176
4610
|
}
|
|
5177
4611
|
destroy() {
|
|
5178
4612
|
super.destroy();
|
|
@@ -5200,7 +4634,11 @@ ${source}`;
|
|
|
5200
4634
|
this.indexBuffer = buffer;
|
|
5201
4635
|
this.device.gl.bindVertexArray(null);
|
|
5202
4636
|
}
|
|
5203
|
-
/**
|
|
4637
|
+
/**
|
|
4638
|
+
* Binds a buffer to one shader attribute location and configures the WebGL pointer state.
|
|
4639
|
+
* @param location Shader attribute location.
|
|
4640
|
+
* @param attributeBuffer Buffer supplying the attribute data.
|
|
4641
|
+
*/
|
|
5204
4642
|
setBuffer(location, attributeBuffer) {
|
|
5205
4643
|
const buffer = attributeBuffer;
|
|
5206
4644
|
if (buffer.glTarget === 34963) {
|
|
@@ -5220,7 +4658,11 @@ ${source}`;
|
|
|
5220
4658
|
this.attributes[location] = buffer;
|
|
5221
4659
|
this.device.gl.bindVertexArray(null);
|
|
5222
4660
|
}
|
|
5223
|
-
/**
|
|
4661
|
+
/**
|
|
4662
|
+
* Stores a constant value for one shader attribute location.
|
|
4663
|
+
* @param location Shader attribute location.
|
|
4664
|
+
* @param value Constant attribute value.
|
|
4665
|
+
*/
|
|
5224
4666
|
setConstantWebGL(location, value) {
|
|
5225
4667
|
this._enable(location, false);
|
|
5226
4668
|
this.attributes[location] = value;
|
|
@@ -5262,9 +4704,13 @@ ${source}`;
|
|
|
5262
4704
|
// }
|
|
5263
4705
|
// this.device.gl.vertexAttribDivisor(location, divisor || 0);
|
|
5264
4706
|
// }
|
|
5265
|
-
/**
|
|
4707
|
+
/**
|
|
4708
|
+
* Returns the cached accessor description for one shader attribute location.
|
|
4709
|
+
* @param location Shader attribute location.
|
|
4710
|
+
* @returns WebGL pointer state derived from the shared attribute metadata.
|
|
4711
|
+
*/
|
|
5266
4712
|
_getAccessor(location) {
|
|
5267
|
-
const attributeInfo = this.
|
|
4713
|
+
const attributeInfo = this.attributeInfosByLocation[location];
|
|
5268
4714
|
if (!attributeInfo) {
|
|
5269
4715
|
throw new Error(`Unknown attribute location ${location}`);
|
|
5270
4716
|
}
|
|
@@ -5291,7 +4737,7 @@ ${source}`;
|
|
|
5291
4737
|
* TODO - convert classic arrays based on known type?
|
|
5292
4738
|
*/
|
|
5293
4739
|
_enable(location, enable2 = true) {
|
|
5294
|
-
const canDisableAttributeZero =
|
|
4740
|
+
const canDisableAttributeZero = _WEBGLVertexArray.isConstantAttributeZeroSupported(this.device);
|
|
5295
4741
|
const canDisableAttribute = canDisableAttributeZero || location !== 0;
|
|
5296
4742
|
if (enable2 || canDisableAttribute) {
|
|
5297
4743
|
location = Number(location);
|
|
@@ -5321,7 +4767,7 @@ ${source}`;
|
|
|
5321
4767
|
this.buffer = this.buffer || this.device.createBuffer({ byteLength });
|
|
5322
4768
|
updateNeeded ||= !compareConstantArrayValues(constantValue, this.bufferValue);
|
|
5323
4769
|
if (updateNeeded) {
|
|
5324
|
-
const typedArray = (0,
|
|
4770
|
+
const typedArray = (0, import_core21.getScratchArray)(value.constructor, length4);
|
|
5325
4771
|
fillArray({ target: typedArray, source: constantValue, start: 0, count: length4 });
|
|
5326
4772
|
this.buffer.write(typedArray);
|
|
5327
4773
|
this.bufferValue = value;
|
|
@@ -5339,13 +4785,13 @@ ${source}`;
|
|
|
5339
4785
|
}
|
|
5340
4786
|
return /^\d+$/.test(value);
|
|
5341
4787
|
}
|
|
5342
|
-
var
|
|
4788
|
+
var import_core22, WEBGLTransformFeedback;
|
|
5343
4789
|
var init_webgl_transform_feedback = __esm({
|
|
5344
4790
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-transform-feedback.js"() {
|
|
5345
|
-
|
|
4791
|
+
import_core22 = __toESM(require_core2(), 1);
|
|
5346
4792
|
init_dist2();
|
|
5347
4793
|
init_webgl_topology_utils();
|
|
5348
|
-
WEBGLTransformFeedback = class extends
|
|
4794
|
+
WEBGLTransformFeedback = class extends import_core22.TransformFeedback {
|
|
5349
4795
|
device;
|
|
5350
4796
|
gl;
|
|
5351
4797
|
handle;
|
|
@@ -5408,7 +4854,7 @@ ${source}`;
|
|
|
5408
4854
|
const { buffer, byteLength, byteOffset } = this._getBufferRange(bufferOrRange);
|
|
5409
4855
|
if (location < 0) {
|
|
5410
4856
|
this.unusedBuffers[locationOrName] = buffer;
|
|
5411
|
-
|
|
4857
|
+
import_core22.log.warn(`${this.id} unusedBuffers varying buffer ${locationOrName}`)();
|
|
5412
4858
|
return;
|
|
5413
4859
|
}
|
|
5414
4860
|
this.buffers[location] = { buffer, byteLength, byteOffset };
|
|
@@ -5491,11 +4937,11 @@ ${source}`;
|
|
|
5491
4937
|
});
|
|
5492
4938
|
|
|
5493
4939
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-query-set.js
|
|
5494
|
-
var
|
|
4940
|
+
var import_core23, WEBGLQuerySet;
|
|
5495
4941
|
var init_webgl_query_set = __esm({
|
|
5496
4942
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-query-set.js"() {
|
|
5497
|
-
|
|
5498
|
-
WEBGLQuerySet = class extends
|
|
4943
|
+
import_core23 = __toESM(require_core2(), 1);
|
|
4944
|
+
WEBGLQuerySet = class extends import_core23.QuerySet {
|
|
5499
4945
|
device;
|
|
5500
4946
|
handle;
|
|
5501
4947
|
_timestampPairs = [];
|
|
@@ -5777,11 +5223,11 @@ ${source}`;
|
|
|
5777
5223
|
});
|
|
5778
5224
|
|
|
5779
5225
|
// ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-fence.js
|
|
5780
|
-
var
|
|
5226
|
+
var import_core24, WEBGLFence;
|
|
5781
5227
|
var init_webgl_fence = __esm({
|
|
5782
5228
|
"../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-fence.js"() {
|
|
5783
|
-
|
|
5784
|
-
WEBGLFence = class extends
|
|
5229
|
+
import_core24 = __toESM(require_core2(), 1);
|
|
5230
|
+
WEBGLFence = class extends import_core24.Fence {
|
|
5785
5231
|
device;
|
|
5786
5232
|
gl;
|
|
5787
5233
|
handle;
|
|
@@ -5848,6 +5294,7 @@ ${source}`;
|
|
|
5848
5294
|
case 36249:
|
|
5849
5295
|
case 34836:
|
|
5850
5296
|
return 4;
|
|
5297
|
+
// TODO: Add support for additional WebGL2 formats
|
|
5851
5298
|
default:
|
|
5852
5299
|
return 0;
|
|
5853
5300
|
}
|
|
@@ -5862,6 +5309,7 @@ ${source}`;
|
|
|
5862
5309
|
return 2;
|
|
5863
5310
|
case 5126:
|
|
5864
5311
|
return 4;
|
|
5312
|
+
// TODO: Add support for additional WebGL2 types
|
|
5865
5313
|
default:
|
|
5866
5314
|
return 0;
|
|
5867
5315
|
}
|
|
@@ -5900,7 +5348,7 @@ ${source}`;
|
|
|
5900
5348
|
sourceFormat ||= texture?.glFormat || 6408;
|
|
5901
5349
|
sourceType ||= texture?.glType || 5121;
|
|
5902
5350
|
target2 = getPixelArray(target2, sourceType, sourceFormat, sourceWidth, sourceHeight, sourceDepth);
|
|
5903
|
-
const signedType =
|
|
5351
|
+
const signedType = import_core25.dataTypeDecoder.getDataType(target2);
|
|
5904
5352
|
sourceType = sourceType || convertDataTypeToGLDataType(signedType);
|
|
5905
5353
|
const prevHandle = gl.bindFramebuffer(36160, handle);
|
|
5906
5354
|
gl.readBuffer(36064 + sourceAttachment);
|
|
@@ -5943,7 +5391,7 @@ ${source}`;
|
|
|
5943
5391
|
return webglBufferTarget;
|
|
5944
5392
|
}
|
|
5945
5393
|
function getFramebuffer2(source) {
|
|
5946
|
-
if (!(source instanceof
|
|
5394
|
+
if (!(source instanceof import_core25.Framebuffer)) {
|
|
5947
5395
|
return { framebuffer: toFramebuffer(source), deleteFramebuffer: true };
|
|
5948
5396
|
}
|
|
5949
5397
|
return { framebuffer: source, deleteFramebuffer: false };
|
|
@@ -5965,14 +5413,14 @@ ${source}`;
|
|
|
5965
5413
|
}
|
|
5966
5414
|
glType ||= 5121;
|
|
5967
5415
|
const shaderType = convertGLDataTypeToDataType(glType);
|
|
5968
|
-
const ArrayType =
|
|
5416
|
+
const ArrayType = import_core25.dataTypeDecoder.getTypedArrayConstructor(shaderType);
|
|
5969
5417
|
const components = glFormatToComponents(glFormat);
|
|
5970
5418
|
return new ArrayType(width * height * components);
|
|
5971
5419
|
}
|
|
5972
|
-
var
|
|
5420
|
+
var import_core25;
|
|
5973
5421
|
var init_webgl_texture_utils = __esm({
|
|
5974
5422
|
"../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-texture-utils.js"() {
|
|
5975
|
-
|
|
5423
|
+
import_core25 = __toESM(require_core2(), 1);
|
|
5976
5424
|
init_webgl_shadertypes();
|
|
5977
5425
|
init_format_utils();
|
|
5978
5426
|
init_shader_formats();
|
|
@@ -6014,10 +5462,10 @@ ${source}`;
|
|
|
6014
5462
|
}
|
|
6015
5463
|
return true;
|
|
6016
5464
|
}
|
|
6017
|
-
var
|
|
5465
|
+
var import_core26, WebGLDevice;
|
|
6018
5466
|
var init_webgl_device = __esm({
|
|
6019
5467
|
"../../node_modules/@luma.gl/webgl/dist/adapter/webgl-device.js"() {
|
|
6020
|
-
|
|
5468
|
+
import_core26 = __toESM(require_core2(), 1);
|
|
6021
5469
|
init_webgl_state_tracker();
|
|
6022
5470
|
init_create_browser_context();
|
|
6023
5471
|
init_webgl_context_data();
|
|
@@ -6026,8 +5474,7 @@ ${source}`;
|
|
|
6026
5474
|
init_webgl_device_limits();
|
|
6027
5475
|
init_webgl_canvas_context();
|
|
6028
5476
|
init_webgl_presentation_context();
|
|
6029
|
-
|
|
6030
|
-
init_webgl_developer_tools();
|
|
5477
|
+
init_debug_hooks();
|
|
6031
5478
|
init_webgl_texture_table();
|
|
6032
5479
|
init_uid();
|
|
6033
5480
|
init_webgl_buffer();
|
|
@@ -6046,7 +5493,7 @@ ${source}`;
|
|
|
6046
5493
|
init_unified_parameter_api();
|
|
6047
5494
|
init_with_parameters();
|
|
6048
5495
|
init_webgl_extensions();
|
|
6049
|
-
WebGLDevice = class extends
|
|
5496
|
+
WebGLDevice = class _WebGLDevice extends import_core26.Device {
|
|
6050
5497
|
static getDeviceFromContext(gl) {
|
|
6051
5498
|
if (!gl) {
|
|
6052
5499
|
return null;
|
|
@@ -6068,6 +5515,7 @@ ${source}`;
|
|
|
6068
5515
|
commandEncoder;
|
|
6069
5516
|
lost;
|
|
6070
5517
|
_resolveContextLost;
|
|
5518
|
+
_isLost = false;
|
|
6071
5519
|
/** WebGL2 context. */
|
|
6072
5520
|
gl;
|
|
6073
5521
|
/** Store constants */
|
|
@@ -6097,12 +5545,12 @@ ${source}`;
|
|
|
6097
5545
|
}
|
|
6098
5546
|
constructor(props) {
|
|
6099
5547
|
super({ ...props, id: props.id || uid("webgl-device") });
|
|
6100
|
-
const canvasContextProps =
|
|
5548
|
+
const canvasContextProps = import_core26.Device._getCanvasContextProps(props);
|
|
6101
5549
|
if (!canvasContextProps) {
|
|
6102
5550
|
throw new Error("WebGLDevice requires props.createCanvasContext to be set");
|
|
6103
5551
|
}
|
|
6104
5552
|
const existingContext = canvasContextProps.canvas?.gl ?? null;
|
|
6105
|
-
let device =
|
|
5553
|
+
let device = _WebGLDevice.getDeviceFromContext(existingContext);
|
|
6106
5554
|
if (device) {
|
|
6107
5555
|
throw new Error(`WebGL context already attached to device ${device.id}`);
|
|
6108
5556
|
}
|
|
@@ -6126,16 +5574,17 @@ ${source}`;
|
|
|
6126
5574
|
reason: "destroyed",
|
|
6127
5575
|
message: "Entered sleep mode, or too many apps or browser tabs are using the GPU."
|
|
6128
5576
|
}),
|
|
6129
|
-
|
|
6130
|
-
|
|
5577
|
+
onContextRestored: (_event) => {
|
|
5578
|
+
console.log("WebGL context restored");
|
|
5579
|
+
}
|
|
6131
5580
|
}, webglContextAttributes);
|
|
6132
5581
|
if (!gl) {
|
|
6133
5582
|
throw new Error("WebGL context creation failed");
|
|
6134
5583
|
}
|
|
6135
|
-
device =
|
|
5584
|
+
device = _WebGLDevice.getDeviceFromContext(gl);
|
|
6136
5585
|
if (device) {
|
|
6137
5586
|
if (props._reuseDevices) {
|
|
6138
|
-
|
|
5587
|
+
import_core26.log.log(1, `Not creating a new Device, instead returning a reference to Device ${device.id} already attached to WebGL context`, device)();
|
|
6139
5588
|
this.canvasContext.destroy();
|
|
6140
5589
|
device._reused = true;
|
|
6141
5590
|
return device;
|
|
@@ -6144,7 +5593,7 @@ ${source}`;
|
|
|
6144
5593
|
}
|
|
6145
5594
|
this.handle = gl;
|
|
6146
5595
|
this.gl = gl;
|
|
6147
|
-
this.spectorJS =
|
|
5596
|
+
this.spectorJS = initializeRegisteredSpectorJS({ ...this.props, gl: this.handle });
|
|
6148
5597
|
const contextData = getWebGLContextData(this.handle);
|
|
6149
5598
|
contextData.device = this;
|
|
6150
5599
|
if (!contextData.extensions) {
|
|
@@ -6158,15 +5607,18 @@ ${source}`;
|
|
|
6158
5607
|
this.features.initializeFeatures();
|
|
6159
5608
|
}
|
|
6160
5609
|
const glState = new WebGLStateTracker(this.gl, {
|
|
6161
|
-
log: (...args) =>
|
|
5610
|
+
log: (...args) => import_core26.log.log(1, ...args)()
|
|
6162
5611
|
});
|
|
6163
5612
|
glState.trackState(this.gl, { copyState: false });
|
|
6164
5613
|
if (props.debug || props.debugWebGL) {
|
|
6165
|
-
this.gl =
|
|
6166
|
-
|
|
5614
|
+
this.gl = makeRegisteredDebugContext(this.gl, {
|
|
5615
|
+
debugWebGL: true,
|
|
5616
|
+
traceWebGL: props.debugWebGL
|
|
5617
|
+
});
|
|
5618
|
+
import_core26.log.warn("WebGL debug mode activated. Performance reduced.")();
|
|
6167
5619
|
}
|
|
6168
5620
|
if (props.debugWebGL) {
|
|
6169
|
-
|
|
5621
|
+
import_core26.log.level = Math.max(import_core26.log.level, 1);
|
|
6170
5622
|
}
|
|
6171
5623
|
this.commandEncoder = new WEBGLCommandEncoder(this, { id: `${this}-command-encoder` });
|
|
6172
5624
|
this.canvasContext._startObservers();
|
|
@@ -6182,14 +5634,15 @@ ${source}`;
|
|
|
6182
5634
|
* browser API for destroying WebGL contexts.
|
|
6183
5635
|
*/
|
|
6184
5636
|
destroy() {
|
|
6185
|
-
this.commandEncoder?.destroy();
|
|
6186
5637
|
if (!this.props._reuseDevices && !this._reused) {
|
|
5638
|
+
this._isLost = true;
|
|
5639
|
+
this.commandEncoder?.destroy();
|
|
6187
5640
|
const contextData = getWebGLContextData(this.handle);
|
|
6188
5641
|
contextData.device = null;
|
|
6189
5642
|
}
|
|
6190
5643
|
}
|
|
6191
5644
|
get isLost() {
|
|
6192
|
-
return this.gl.isContextLost();
|
|
5645
|
+
return this._isLost || this.gl.isContextLost();
|
|
6193
5646
|
}
|
|
6194
5647
|
// IMPLEMENTATION OF ABSTRACT DEVICE
|
|
6195
5648
|
createCanvasContext(props) {
|
|
@@ -6205,8 +5658,8 @@ ${source}`;
|
|
|
6205
5658
|
createTexture(props) {
|
|
6206
5659
|
return new WEBGLTexture(this, props);
|
|
6207
5660
|
}
|
|
6208
|
-
createExternalTexture(
|
|
6209
|
-
throw new Error("
|
|
5661
|
+
createExternalTexture(_props) {
|
|
5662
|
+
throw new Error("ExternalTexture is not available on WebGL");
|
|
6210
5663
|
}
|
|
6211
5664
|
createSampler(props) {
|
|
6212
5665
|
return new WEBGLSampler(this, props);
|
|
@@ -6238,6 +5691,10 @@ ${source}`;
|
|
|
6238
5691
|
createComputePipeline(props) {
|
|
6239
5692
|
throw new Error("ComputePipeline not supported in WebGL");
|
|
6240
5693
|
}
|
|
5694
|
+
/** @throws Always throws because WebGL does not support render bundles. */
|
|
5695
|
+
createRenderBundleEncoder(_props) {
|
|
5696
|
+
throw new Error("Render bundles are only supported in WebGPU");
|
|
5697
|
+
}
|
|
6241
5698
|
createCommandEncoder(props = {}) {
|
|
6242
5699
|
return new WEBGLCommandEncoder(this, props);
|
|
6243
5700
|
}
|
|
@@ -6263,6 +5720,9 @@ ${source}`;
|
|
|
6263
5720
|
commandBuffer.destroy();
|
|
6264
5721
|
}
|
|
6265
5722
|
}
|
|
5723
|
+
writeBufferViaCommandEncoder(_commandEncoder, destinationBuffer, data, byteOffset = 0) {
|
|
5724
|
+
destinationBuffer.write(data, byteOffset);
|
|
5725
|
+
}
|
|
6266
5726
|
_finalizeDefaultCommandEncoderForSubmit() {
|
|
6267
5727
|
const submittedCommandEncoder = this.commandEncoder;
|
|
6268
5728
|
const commandBuffer = submittedCommandEncoder.finish();
|
|
@@ -6294,7 +5754,7 @@ ${source}`;
|
|
|
6294
5754
|
return withGLParameters(this.gl, parameters, func);
|
|
6295
5755
|
}
|
|
6296
5756
|
resetWebGL() {
|
|
6297
|
-
|
|
5757
|
+
import_core26.log.warn("WebGLDevice.resetWebGL is deprecated, use only for debugging")();
|
|
6298
5758
|
resetGLParameters(this.gl);
|
|
6299
5759
|
}
|
|
6300
5760
|
_getDeviceSpecificTextureFormatCapabilities(capabilities) {
|
|
@@ -6366,7 +5826,7 @@ ${source}`;
|
|
|
6366
5826
|
this._constants = this._constants || new Array(maxVertexAttributes).fill(null);
|
|
6367
5827
|
const currentConstant = this._constants[location];
|
|
6368
5828
|
if (currentConstant && compareConstantArrayValues2(currentConstant, constant)) {
|
|
6369
|
-
|
|
5829
|
+
import_core26.log.info(1, `setConstantAttributeWebGL(${location}) could have been skipped, value unchanged`)();
|
|
6370
5830
|
}
|
|
6371
5831
|
this._constants[location] = constant;
|
|
6372
5832
|
switch (constant.constructor) {
|
|
@@ -6413,9 +5873,9 @@ ${source}`;
|
|
|
6413
5873
|
// ../../node_modules/esri-loader/dist/umd/esri-loader.js
|
|
6414
5874
|
var require_esri_loader = __commonJS({
|
|
6415
5875
|
"../../node_modules/esri-loader/dist/umd/esri-loader.js"(exports, module) {
|
|
6416
|
-
(function(
|
|
6417
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(
|
|
6418
|
-
})(exports, function(exports2) {
|
|
5876
|
+
(function(global, factory) {
|
|
5877
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.esriLoader = global.esriLoader || {});
|
|
5878
|
+
})(exports, (function(exports2) {
|
|
6419
5879
|
"use strict";
|
|
6420
5880
|
var isBrowser2 = typeof window !== "undefined";
|
|
6421
5881
|
var utils = {
|
|
@@ -6608,7 +6068,7 @@ ${source}`;
|
|
|
6608
6068
|
exports2.setDefaultOptions = setDefaultOptions;
|
|
6609
6069
|
exports2.loadCss = loadCss;
|
|
6610
6070
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6611
|
-
});
|
|
6071
|
+
}));
|
|
6612
6072
|
}
|
|
6613
6073
|
});
|
|
6614
6074
|
|
|
@@ -6710,12 +6170,12 @@ ${source}`;
|
|
|
6710
6170
|
}
|
|
6711
6171
|
|
|
6712
6172
|
// dist/commons.js
|
|
6713
|
-
var
|
|
6173
|
+
var import_core27 = __toESM(require_core(), 1);
|
|
6714
6174
|
var import_engine = __toESM(require_engine(), 1);
|
|
6715
6175
|
init_dist2();
|
|
6716
6176
|
async function createDeckInstance(gl) {
|
|
6717
6177
|
return new Promise((resolve) => {
|
|
6718
|
-
const deckInstance = new
|
|
6178
|
+
const deckInstance = new import_core27.Deck({
|
|
6719
6179
|
// Input is handled by the ArcGIS API for JavaScript.
|
|
6720
6180
|
controller: false,
|
|
6721
6181
|
// We use the same WebGL context as the ArcGIS API for JavaScript.
|
|
@@ -7155,8 +6615,7 @@ void main(void) {
|
|
|
7155
6615
|
function deepMergeViewState(a, b) {
|
|
7156
6616
|
const result = { ...a };
|
|
7157
6617
|
for (const key in b) {
|
|
7158
|
-
if (key === "id")
|
|
7159
|
-
continue;
|
|
6618
|
+
if (key === "id") continue;
|
|
7160
6619
|
if (Array.isArray(result[key]) && Array.isArray(b[key])) {
|
|
7161
6620
|
result[key] = mergeNumericArray(result[key], b[key]);
|
|
7162
6621
|
} else {
|
|
@@ -8502,7 +7961,7 @@ void main(void) {
|
|
|
8502
7961
|
var dist = distance;
|
|
8503
7962
|
var sqrDist = squaredDistance;
|
|
8504
7963
|
var sqrLen = squaredLength;
|
|
8505
|
-
var forEach = function() {
|
|
7964
|
+
var forEach = (function() {
|
|
8506
7965
|
const vec = create();
|
|
8507
7966
|
return function(a, stride, offset, count, fn, arg) {
|
|
8508
7967
|
let i;
|
|
@@ -8527,7 +7986,7 @@ void main(void) {
|
|
|
8527
7986
|
}
|
|
8528
7987
|
return a;
|
|
8529
7988
|
};
|
|
8530
|
-
}();
|
|
7989
|
+
})();
|
|
8531
7990
|
|
|
8532
7991
|
// ../../node_modules/@math.gl/core/dist/lib/gl-matrix-extras.js
|
|
8533
7992
|
function vec2_transformMat4AsVector(out, a, m) {
|
|
@@ -8955,7 +8414,7 @@ void main(void) {
|
|
|
8955
8414
|
var sqrDist2 = squaredDistance2;
|
|
8956
8415
|
var len2 = length2;
|
|
8957
8416
|
var sqrLen2 = squaredLength2;
|
|
8958
|
-
var forEach2 = function() {
|
|
8417
|
+
var forEach2 = (function() {
|
|
8959
8418
|
const vec = create2();
|
|
8960
8419
|
return function(a, stride, offset, count, fn, arg) {
|
|
8961
8420
|
let i;
|
|
@@ -8982,15 +8441,15 @@ void main(void) {
|
|
|
8982
8441
|
}
|
|
8983
8442
|
return a;
|
|
8984
8443
|
};
|
|
8985
|
-
}();
|
|
8444
|
+
})();
|
|
8986
8445
|
|
|
8987
8446
|
// ../../node_modules/@math.gl/core/dist/classes/vector3.js
|
|
8988
8447
|
var ORIGIN = [0, 0, 0];
|
|
8989
8448
|
var ZERO;
|
|
8990
|
-
var Vector3 = class extends Vector {
|
|
8449
|
+
var Vector3 = class _Vector3 extends Vector {
|
|
8991
8450
|
static get ZERO() {
|
|
8992
8451
|
if (!ZERO) {
|
|
8993
|
-
ZERO = new
|
|
8452
|
+
ZERO = new _Vector3(0, 0, 0);
|
|
8994
8453
|
Object.freeze(ZERO);
|
|
8995
8454
|
}
|
|
8996
8455
|
return ZERO;
|
|
@@ -10969,7 +10428,7 @@ void main(void) {
|
|
|
10969
10428
|
var sqrDist3 = squaredDistance3;
|
|
10970
10429
|
var len3 = length3;
|
|
10971
10430
|
var sqrLen3 = squaredLength3;
|
|
10972
|
-
var forEach3 = function() {
|
|
10431
|
+
var forEach3 = (function() {
|
|
10973
10432
|
const vec = create4();
|
|
10974
10433
|
return function(a, stride, offset, count, fn, arg) {
|
|
10975
10434
|
let i;
|
|
@@ -10998,7 +10457,7 @@ void main(void) {
|
|
|
10998
10457
|
}
|
|
10999
10458
|
return a;
|
|
11000
10459
|
};
|
|
11001
|
-
}();
|
|
10460
|
+
})();
|
|
11002
10461
|
|
|
11003
10462
|
// ../../node_modules/@math.gl/core/dist/classes/matrix4.js
|
|
11004
10463
|
var INDICES;
|
|
@@ -11868,19 +11327,6 @@ void main(void) {
|
|
|
11868
11327
|
RecognizerState2[RecognizerState2["Failed"] = 32] = "Failed";
|
|
11869
11328
|
})(RecognizerState || (RecognizerState = {}));
|
|
11870
11329
|
|
|
11871
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/touchaction/touchaction-Consts.js
|
|
11872
|
-
var TOUCH_ACTION_MANIPULATION = "manipulation";
|
|
11873
|
-
var TOUCH_ACTION_NONE = "none";
|
|
11874
|
-
var TOUCH_ACTION_PAN_X = "pan-x";
|
|
11875
|
-
var TOUCH_ACTION_PAN_Y = "pan-y";
|
|
11876
|
-
|
|
11877
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/input/get-distance.js
|
|
11878
|
-
function getPointDistance(p1, p2) {
|
|
11879
|
-
const x = p2.x - p1.x;
|
|
11880
|
-
const y = p2.y - p1.y;
|
|
11881
|
-
return Math.sqrt(x * x + y * y);
|
|
11882
|
-
}
|
|
11883
|
-
|
|
11884
11330
|
// ../../node_modules/mjolnir.js/dist/hammerjs/inputs/pointerevent.js
|
|
11885
11331
|
var POINTER_INPUT_MAP = {
|
|
11886
11332
|
pointerdown: InputEvent.Start,
|
|
@@ -11890,616 +11336,18 @@ void main(void) {
|
|
|
11890
11336
|
pointerout: InputEvent.Cancel
|
|
11891
11337
|
};
|
|
11892
11338
|
|
|
11893
|
-
// ../../node_modules/mjolnir.js/dist/
|
|
11894
|
-
var
|
|
11895
|
-
function uniqueId() {
|
|
11896
|
-
return _uniqueId++;
|
|
11897
|
-
}
|
|
11339
|
+
// ../../node_modules/mjolnir.js/dist/utils/globals.js
|
|
11340
|
+
var userAgent = typeof navigator !== "undefined" && navigator.userAgent ? navigator.userAgent.toLowerCase() : "";
|
|
11898
11341
|
|
|
11899
|
-
// ../../node_modules/mjolnir.js/dist/
|
|
11900
|
-
|
|
11901
|
-
if (state & RecognizerState.Cancelled) {
|
|
11902
|
-
return "cancel";
|
|
11903
|
-
} else if (state & RecognizerState.Ended) {
|
|
11904
|
-
return "end";
|
|
11905
|
-
} else if (state & RecognizerState.Changed) {
|
|
11906
|
-
return "move";
|
|
11907
|
-
} else if (state & RecognizerState.Began) {
|
|
11908
|
-
return "start";
|
|
11909
|
-
}
|
|
11910
|
-
return "";
|
|
11911
|
-
}
|
|
11342
|
+
// ../../node_modules/mjolnir.js/dist/inputs/wheel-input.js
|
|
11343
|
+
var firefox = userAgent.indexOf("firefox") !== -1;
|
|
11912
11344
|
|
|
11913
|
-
//
|
|
11914
|
-
var
|
|
11915
|
-
constructor(options) {
|
|
11916
|
-
this.options = options;
|
|
11917
|
-
this.id = uniqueId();
|
|
11918
|
-
this.state = RecognizerState.Possible;
|
|
11919
|
-
this.simultaneous = {};
|
|
11920
|
-
this.requireFail = [];
|
|
11921
|
-
}
|
|
11345
|
+
// ../core/src/lib/constants.ts
|
|
11346
|
+
var COORDINATE_SYSTEM = {
|
|
11922
11347
|
/**
|
|
11923
|
-
*
|
|
11348
|
+
* `LNGLAT` if rendering into a geospatial viewport, `CARTESIAN` otherwise
|
|
11924
11349
|
*/
|
|
11925
|
-
|
|
11926
|
-
Object.assign(this.options, options);
|
|
11927
|
-
this.manager.touchAction.update();
|
|
11928
|
-
return this;
|
|
11929
|
-
}
|
|
11930
|
-
/**
|
|
11931
|
-
* recognize simultaneous with an other recognizer.
|
|
11932
|
-
*/
|
|
11933
|
-
recognizeWith(recognizerOrName) {
|
|
11934
|
-
if (Array.isArray(recognizerOrName)) {
|
|
11935
|
-
for (const item of recognizerOrName) {
|
|
11936
|
-
this.recognizeWith(item);
|
|
11937
|
-
}
|
|
11938
|
-
return this;
|
|
11939
|
-
}
|
|
11940
|
-
let otherRecognizer;
|
|
11941
|
-
if (typeof recognizerOrName === "string") {
|
|
11942
|
-
otherRecognizer = this.manager.get(recognizerOrName);
|
|
11943
|
-
if (!otherRecognizer) {
|
|
11944
|
-
throw new Error(`Cannot find recognizer ${recognizerOrName}`);
|
|
11945
|
-
}
|
|
11946
|
-
} else {
|
|
11947
|
-
otherRecognizer = recognizerOrName;
|
|
11948
|
-
}
|
|
11949
|
-
const { simultaneous } = this;
|
|
11950
|
-
if (!simultaneous[otherRecognizer.id]) {
|
|
11951
|
-
simultaneous[otherRecognizer.id] = otherRecognizer;
|
|
11952
|
-
otherRecognizer.recognizeWith(this);
|
|
11953
|
-
}
|
|
11954
|
-
return this;
|
|
11955
|
-
}
|
|
11956
|
-
/**
|
|
11957
|
-
* drop the simultaneous link. it doesnt remove the link on the other recognizer.
|
|
11958
|
-
*/
|
|
11959
|
-
dropRecognizeWith(recognizerOrName) {
|
|
11960
|
-
if (Array.isArray(recognizerOrName)) {
|
|
11961
|
-
for (const item of recognizerOrName) {
|
|
11962
|
-
this.dropRecognizeWith(item);
|
|
11963
|
-
}
|
|
11964
|
-
return this;
|
|
11965
|
-
}
|
|
11966
|
-
let otherRecognizer;
|
|
11967
|
-
if (typeof recognizerOrName === "string") {
|
|
11968
|
-
otherRecognizer = this.manager.get(recognizerOrName);
|
|
11969
|
-
} else {
|
|
11970
|
-
otherRecognizer = recognizerOrName;
|
|
11971
|
-
}
|
|
11972
|
-
if (otherRecognizer) {
|
|
11973
|
-
delete this.simultaneous[otherRecognizer.id];
|
|
11974
|
-
}
|
|
11975
|
-
return this;
|
|
11976
|
-
}
|
|
11977
|
-
/**
|
|
11978
|
-
* recognizer can only run when an other is failing
|
|
11979
|
-
*/
|
|
11980
|
-
requireFailure(recognizerOrName) {
|
|
11981
|
-
if (Array.isArray(recognizerOrName)) {
|
|
11982
|
-
for (const item of recognizerOrName) {
|
|
11983
|
-
this.requireFailure(item);
|
|
11984
|
-
}
|
|
11985
|
-
return this;
|
|
11986
|
-
}
|
|
11987
|
-
let otherRecognizer;
|
|
11988
|
-
if (typeof recognizerOrName === "string") {
|
|
11989
|
-
otherRecognizer = this.manager.get(recognizerOrName);
|
|
11990
|
-
if (!otherRecognizer) {
|
|
11991
|
-
throw new Error(`Cannot find recognizer ${recognizerOrName}`);
|
|
11992
|
-
}
|
|
11993
|
-
} else {
|
|
11994
|
-
otherRecognizer = recognizerOrName;
|
|
11995
|
-
}
|
|
11996
|
-
const { requireFail } = this;
|
|
11997
|
-
if (requireFail.indexOf(otherRecognizer) === -1) {
|
|
11998
|
-
requireFail.push(otherRecognizer);
|
|
11999
|
-
otherRecognizer.requireFailure(this);
|
|
12000
|
-
}
|
|
12001
|
-
return this;
|
|
12002
|
-
}
|
|
12003
|
-
/**
|
|
12004
|
-
* drop the requireFailure link. it does not remove the link on the other recognizer.
|
|
12005
|
-
*/
|
|
12006
|
-
dropRequireFailure(recognizerOrName) {
|
|
12007
|
-
if (Array.isArray(recognizerOrName)) {
|
|
12008
|
-
for (const item of recognizerOrName) {
|
|
12009
|
-
this.dropRequireFailure(item);
|
|
12010
|
-
}
|
|
12011
|
-
return this;
|
|
12012
|
-
}
|
|
12013
|
-
let otherRecognizer;
|
|
12014
|
-
if (typeof recognizerOrName === "string") {
|
|
12015
|
-
otherRecognizer = this.manager.get(recognizerOrName);
|
|
12016
|
-
} else {
|
|
12017
|
-
otherRecognizer = recognizerOrName;
|
|
12018
|
-
}
|
|
12019
|
-
if (otherRecognizer) {
|
|
12020
|
-
const index = this.requireFail.indexOf(otherRecognizer);
|
|
12021
|
-
if (index > -1) {
|
|
12022
|
-
this.requireFail.splice(index, 1);
|
|
12023
|
-
}
|
|
12024
|
-
}
|
|
12025
|
-
return this;
|
|
12026
|
-
}
|
|
12027
|
-
/**
|
|
12028
|
-
* has require failures boolean
|
|
12029
|
-
*/
|
|
12030
|
-
hasRequireFailures() {
|
|
12031
|
-
return Boolean(this.requireFail.find((recognier) => recognier.options.enable));
|
|
12032
|
-
}
|
|
12033
|
-
/**
|
|
12034
|
-
* if the recognizer can recognize simultaneous with an other recognizer
|
|
12035
|
-
*/
|
|
12036
|
-
canRecognizeWith(otherRecognizer) {
|
|
12037
|
-
return Boolean(this.simultaneous[otherRecognizer.id]);
|
|
12038
|
-
}
|
|
12039
|
-
/**
|
|
12040
|
-
* You should use `tryEmit` instead of `emit` directly to check
|
|
12041
|
-
* that all the needed recognizers has failed before emitting.
|
|
12042
|
-
*/
|
|
12043
|
-
emit(input) {
|
|
12044
|
-
if (!input)
|
|
12045
|
-
return;
|
|
12046
|
-
const { state } = this;
|
|
12047
|
-
if (state < RecognizerState.Ended) {
|
|
12048
|
-
this.manager.emit(this.options.event + stateStr(state), input);
|
|
12049
|
-
}
|
|
12050
|
-
this.manager.emit(this.options.event, input);
|
|
12051
|
-
if (input.additionalEvent) {
|
|
12052
|
-
this.manager.emit(input.additionalEvent, input);
|
|
12053
|
-
}
|
|
12054
|
-
if (state >= RecognizerState.Ended) {
|
|
12055
|
-
this.manager.emit(this.options.event + stateStr(state), input);
|
|
12056
|
-
}
|
|
12057
|
-
}
|
|
12058
|
-
/**
|
|
12059
|
-
* Check that all the require failure recognizers has failed,
|
|
12060
|
-
* if true, it emits a gesture event,
|
|
12061
|
-
* otherwise, setup the state to FAILED.
|
|
12062
|
-
*/
|
|
12063
|
-
tryEmit(input) {
|
|
12064
|
-
if (this.canEmit()) {
|
|
12065
|
-
this.emit(input);
|
|
12066
|
-
} else {
|
|
12067
|
-
this.state = RecognizerState.Failed;
|
|
12068
|
-
}
|
|
12069
|
-
}
|
|
12070
|
-
/**
|
|
12071
|
-
* can we emit?
|
|
12072
|
-
*/
|
|
12073
|
-
canEmit() {
|
|
12074
|
-
let i = 0;
|
|
12075
|
-
while (i < this.requireFail.length) {
|
|
12076
|
-
if (!(this.requireFail[i].state & (RecognizerState.Failed | RecognizerState.Possible))) {
|
|
12077
|
-
return false;
|
|
12078
|
-
}
|
|
12079
|
-
i++;
|
|
12080
|
-
}
|
|
12081
|
-
return true;
|
|
12082
|
-
}
|
|
12083
|
-
/**
|
|
12084
|
-
* update the recognizer
|
|
12085
|
-
*/
|
|
12086
|
-
recognize(inputData) {
|
|
12087
|
-
const inputDataClone = { ...inputData };
|
|
12088
|
-
if (!this.options.enable) {
|
|
12089
|
-
this.reset();
|
|
12090
|
-
this.state = RecognizerState.Failed;
|
|
12091
|
-
return;
|
|
12092
|
-
}
|
|
12093
|
-
if (this.state & (RecognizerState.Recognized | RecognizerState.Cancelled | RecognizerState.Failed)) {
|
|
12094
|
-
this.state = RecognizerState.Possible;
|
|
12095
|
-
}
|
|
12096
|
-
this.state = this.process(inputDataClone);
|
|
12097
|
-
if (this.state & (RecognizerState.Began | RecognizerState.Changed | RecognizerState.Ended | RecognizerState.Cancelled)) {
|
|
12098
|
-
this.tryEmit(inputDataClone);
|
|
12099
|
-
}
|
|
12100
|
-
}
|
|
12101
|
-
/**
|
|
12102
|
-
* return the event names that are emitted by this recognizer
|
|
12103
|
-
*/
|
|
12104
|
-
getEventNames() {
|
|
12105
|
-
return [this.options.event];
|
|
12106
|
-
}
|
|
12107
|
-
/**
|
|
12108
|
-
* called when the gesture isn't allowed to recognize
|
|
12109
|
-
* like when another is being recognized or it is disabled
|
|
12110
|
-
*/
|
|
12111
|
-
reset() {
|
|
12112
|
-
}
|
|
12113
|
-
};
|
|
12114
|
-
|
|
12115
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/recognizers/attribute.js
|
|
12116
|
-
var AttrRecognizer = class extends Recognizer {
|
|
12117
|
-
/**
|
|
12118
|
-
* Used to check if it the recognizer receives valid input, like input.distance > 10.
|
|
12119
|
-
*/
|
|
12120
|
-
attrTest(input) {
|
|
12121
|
-
const optionPointers = this.options.pointers;
|
|
12122
|
-
return optionPointers === 0 || input.pointers.length === optionPointers;
|
|
12123
|
-
}
|
|
12124
|
-
/**
|
|
12125
|
-
* Process the input and return the state for the recognizer
|
|
12126
|
-
*/
|
|
12127
|
-
process(input) {
|
|
12128
|
-
const { state } = this;
|
|
12129
|
-
const { eventType } = input;
|
|
12130
|
-
const isRecognized = state & (RecognizerState.Began | RecognizerState.Changed);
|
|
12131
|
-
const isValid = this.attrTest(input);
|
|
12132
|
-
if (isRecognized && (eventType & InputEvent.Cancel || !isValid)) {
|
|
12133
|
-
return state | RecognizerState.Cancelled;
|
|
12134
|
-
} else if (isRecognized || isValid) {
|
|
12135
|
-
if (eventType & InputEvent.End) {
|
|
12136
|
-
return state | RecognizerState.Ended;
|
|
12137
|
-
} else if (!(state & RecognizerState.Began)) {
|
|
12138
|
-
return RecognizerState.Began;
|
|
12139
|
-
}
|
|
12140
|
-
return state | RecognizerState.Changed;
|
|
12141
|
-
}
|
|
12142
|
-
return RecognizerState.Failed;
|
|
12143
|
-
}
|
|
12144
|
-
};
|
|
12145
|
-
|
|
12146
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/recognizers/double-click-drag.js
|
|
12147
|
-
var EVENT_NAMES = ["", "start", "move", "end", "cancel"];
|
|
12148
|
-
var DoubleClickDragRecognizer = class extends Recognizer {
|
|
12149
|
-
constructor(options = {}) {
|
|
12150
|
-
super({
|
|
12151
|
-
enable: true,
|
|
12152
|
-
event: "doubleclickdrag",
|
|
12153
|
-
pointers: 1,
|
|
12154
|
-
interval: 500,
|
|
12155
|
-
time: 350,
|
|
12156
|
-
threshold: 28,
|
|
12157
|
-
dragThreshold: 1,
|
|
12158
|
-
pixelsPerScale: 120,
|
|
12159
|
-
...options
|
|
12160
|
-
});
|
|
12161
|
-
this._tapStart = null;
|
|
12162
|
-
this._lastTap = null;
|
|
12163
|
-
this._drag = null;
|
|
12164
|
-
this._emittedStart = false;
|
|
12165
|
-
}
|
|
12166
|
-
getTouchAction() {
|
|
12167
|
-
return [TOUCH_ACTION_MANIPULATION];
|
|
12168
|
-
}
|
|
12169
|
-
getEventNames() {
|
|
12170
|
-
return EVENT_NAMES.map((suffix) => this.options.event + suffix);
|
|
12171
|
-
}
|
|
12172
|
-
process(input) {
|
|
12173
|
-
const { options } = this;
|
|
12174
|
-
const validPointers = input.pointers.length === options.pointers;
|
|
12175
|
-
if (!validPointers) {
|
|
12176
|
-
this.reset();
|
|
12177
|
-
return RecognizerState.Failed;
|
|
12178
|
-
}
|
|
12179
|
-
if (input.eventType & InputEvent.Start) {
|
|
12180
|
-
return this._handleStart(input);
|
|
12181
|
-
}
|
|
12182
|
-
if (input.eventType & InputEvent.Move) {
|
|
12183
|
-
return this._handleMove(input);
|
|
12184
|
-
}
|
|
12185
|
-
if (input.eventType & InputEvent.Cancel) {
|
|
12186
|
-
return this._handleEnd(input, true);
|
|
12187
|
-
}
|
|
12188
|
-
if (input.eventType & InputEvent.End) {
|
|
12189
|
-
return this._handleEnd(input, false);
|
|
12190
|
-
}
|
|
12191
|
-
return RecognizerState.Failed;
|
|
12192
|
-
}
|
|
12193
|
-
reset() {
|
|
12194
|
-
this._tapStart = null;
|
|
12195
|
-
this._lastTap = null;
|
|
12196
|
-
this._drag = null;
|
|
12197
|
-
this._emittedStart = false;
|
|
12198
|
-
}
|
|
12199
|
-
emit(input) {
|
|
12200
|
-
if (!input) {
|
|
12201
|
-
return;
|
|
12202
|
-
}
|
|
12203
|
-
if (this.state === RecognizerState.Began) {
|
|
12204
|
-
if (!this._drag?.active || this._emittedStart) {
|
|
12205
|
-
return;
|
|
12206
|
-
}
|
|
12207
|
-
this._emittedStart = true;
|
|
12208
|
-
this.manager.emit(`${this.options.event}start`, input);
|
|
12209
|
-
this.manager.emit(this.options.event, input);
|
|
12210
|
-
return;
|
|
12211
|
-
}
|
|
12212
|
-
if (this.state === RecognizerState.Changed) {
|
|
12213
|
-
if (!this._emittedStart) {
|
|
12214
|
-
return;
|
|
12215
|
-
}
|
|
12216
|
-
this.manager.emit(`${this.options.event}move`, input);
|
|
12217
|
-
this.manager.emit(this.options.event, input);
|
|
12218
|
-
return;
|
|
12219
|
-
}
|
|
12220
|
-
if (this.state === RecognizerState.Ended) {
|
|
12221
|
-
if (!this._emittedStart) {
|
|
12222
|
-
return;
|
|
12223
|
-
}
|
|
12224
|
-
this.manager.emit(this.options.event, input);
|
|
12225
|
-
this.manager.emit(`${this.options.event}end`, input);
|
|
12226
|
-
this._emittedStart = false;
|
|
12227
|
-
return;
|
|
12228
|
-
}
|
|
12229
|
-
if (this.state === RecognizerState.Cancelled) {
|
|
12230
|
-
if (!this._emittedStart) {
|
|
12231
|
-
return;
|
|
12232
|
-
}
|
|
12233
|
-
this.manager.emit(this.options.event, input);
|
|
12234
|
-
this.manager.emit(`${this.options.event}cancel`, input);
|
|
12235
|
-
this._emittedStart = false;
|
|
12236
|
-
}
|
|
12237
|
-
}
|
|
12238
|
-
_handleStart(input) {
|
|
12239
|
-
const pointerId = this._getPointerId(input);
|
|
12240
|
-
if (this._lastTap && this._isTapMatch(input, this._lastTap)) {
|
|
12241
|
-
this._tapStart = null;
|
|
12242
|
-
this._lastTap = null;
|
|
12243
|
-
this._drag = {
|
|
12244
|
-
startCenter: input.center,
|
|
12245
|
-
pointerId,
|
|
12246
|
-
active: false
|
|
12247
|
-
};
|
|
12248
|
-
this._emittedStart = false;
|
|
12249
|
-
return RecognizerState.Began;
|
|
12250
|
-
}
|
|
12251
|
-
this._tapStart = {
|
|
12252
|
-
center: input.center,
|
|
12253
|
-
timeStamp: input.timeStamp,
|
|
12254
|
-
pointerId
|
|
12255
|
-
};
|
|
12256
|
-
this._lastTap = null;
|
|
12257
|
-
this._drag = null;
|
|
12258
|
-
this._emittedStart = false;
|
|
12259
|
-
return RecognizerState.Failed;
|
|
12260
|
-
}
|
|
12261
|
-
_handleMove(input) {
|
|
12262
|
-
if (!this._drag || !this._isSamePointer(input, this._drag.pointerId)) {
|
|
12263
|
-
return RecognizerState.Failed;
|
|
12264
|
-
}
|
|
12265
|
-
const dy = this._drag.startCenter.y - input.center.y;
|
|
12266
|
-
if (!this._drag.active && Math.abs(dy) < this.options.dragThreshold) {
|
|
12267
|
-
return RecognizerState.Began;
|
|
12268
|
-
}
|
|
12269
|
-
this._drag.active = true;
|
|
12270
|
-
input.scale = Math.pow(2, dy / this.options.pixelsPerScale);
|
|
12271
|
-
return this._emittedStart ? RecognizerState.Changed : RecognizerState.Began;
|
|
12272
|
-
}
|
|
12273
|
-
_handleEnd(input, cancelled) {
|
|
12274
|
-
if (this._drag && this._isSamePointer(input, this._drag.pointerId)) {
|
|
12275
|
-
const { active, startCenter } = this._drag;
|
|
12276
|
-
this._drag = null;
|
|
12277
|
-
this._tapStart = null;
|
|
12278
|
-
this._lastTap = null;
|
|
12279
|
-
if (!active) {
|
|
12280
|
-
this._emittedStart = false;
|
|
12281
|
-
return RecognizerState.Failed;
|
|
12282
|
-
}
|
|
12283
|
-
const dy = startCenter.y - input.center.y;
|
|
12284
|
-
input.scale = Math.pow(2, dy / this.options.pixelsPerScale);
|
|
12285
|
-
return cancelled ? RecognizerState.Cancelled : RecognizerState.Ended;
|
|
12286
|
-
}
|
|
12287
|
-
if (!this._tapStart || !this._isSamePointer(input, this._tapStart.pointerId)) {
|
|
12288
|
-
if (cancelled) {
|
|
12289
|
-
this.reset();
|
|
12290
|
-
}
|
|
12291
|
-
return RecognizerState.Failed;
|
|
12292
|
-
}
|
|
12293
|
-
if (this._isValidTap(input)) {
|
|
12294
|
-
this._lastTap = {
|
|
12295
|
-
center: input.center,
|
|
12296
|
-
timeStamp: input.timeStamp,
|
|
12297
|
-
pointerId: this._tapStart.pointerId
|
|
12298
|
-
};
|
|
12299
|
-
} else {
|
|
12300
|
-
this._lastTap = null;
|
|
12301
|
-
}
|
|
12302
|
-
this._tapStart = null;
|
|
12303
|
-
return RecognizerState.Failed;
|
|
12304
|
-
}
|
|
12305
|
-
_isTapMatch(input, tap) {
|
|
12306
|
-
return input.timeStamp - tap.timeStamp <= this.options.interval && getPointDistance(input.center, tap.center) <= this.options.threshold;
|
|
12307
|
-
}
|
|
12308
|
-
_isValidTap(input) {
|
|
12309
|
-
return input.deltaTime <= this.options.time && input.distance <= this.options.threshold;
|
|
12310
|
-
}
|
|
12311
|
-
_getPointerId(input) {
|
|
12312
|
-
return "pointerId" in input.srcEvent ? input.srcEvent.pointerId : null;
|
|
12313
|
-
}
|
|
12314
|
-
_isSamePointer(input, pointerId) {
|
|
12315
|
-
return pointerId === null || this._getPointerId(input) === pointerId;
|
|
12316
|
-
}
|
|
12317
|
-
};
|
|
12318
|
-
|
|
12319
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/recognizers/tap.js
|
|
12320
|
-
var TapRecognizer = class extends Recognizer {
|
|
12321
|
-
constructor(options = {}) {
|
|
12322
|
-
super({
|
|
12323
|
-
enable: true,
|
|
12324
|
-
event: "tap",
|
|
12325
|
-
pointers: 1,
|
|
12326
|
-
taps: 1,
|
|
12327
|
-
interval: 300,
|
|
12328
|
-
time: 250,
|
|
12329
|
-
threshold: 9,
|
|
12330
|
-
posThreshold: 10,
|
|
12331
|
-
...options
|
|
12332
|
-
});
|
|
12333
|
-
this.pTime = null;
|
|
12334
|
-
this.pCenter = null;
|
|
12335
|
-
this._timer = null;
|
|
12336
|
-
this._input = null;
|
|
12337
|
-
this.count = 0;
|
|
12338
|
-
}
|
|
12339
|
-
getTouchAction() {
|
|
12340
|
-
return [TOUCH_ACTION_MANIPULATION];
|
|
12341
|
-
}
|
|
12342
|
-
process(input) {
|
|
12343
|
-
const { options } = this;
|
|
12344
|
-
const validPointers = input.pointers.length === options.pointers;
|
|
12345
|
-
const validMovement = input.distance < options.threshold;
|
|
12346
|
-
const validTouchTime = input.deltaTime < options.time;
|
|
12347
|
-
this.reset();
|
|
12348
|
-
if (input.eventType & InputEvent.Start && this.count === 0) {
|
|
12349
|
-
return this.failTimeout();
|
|
12350
|
-
}
|
|
12351
|
-
if (validMovement && validTouchTime && validPointers) {
|
|
12352
|
-
if (input.eventType !== InputEvent.End) {
|
|
12353
|
-
return this.failTimeout();
|
|
12354
|
-
}
|
|
12355
|
-
const validInterval = this.pTime ? input.timeStamp - this.pTime < options.interval : true;
|
|
12356
|
-
const validMultiTap = !this.pCenter || getPointDistance(this.pCenter, input.center) < options.posThreshold;
|
|
12357
|
-
this.pTime = input.timeStamp;
|
|
12358
|
-
this.pCenter = input.center;
|
|
12359
|
-
if (!validMultiTap || !validInterval) {
|
|
12360
|
-
this.count = 1;
|
|
12361
|
-
} else {
|
|
12362
|
-
this.count += 1;
|
|
12363
|
-
}
|
|
12364
|
-
this._input = input;
|
|
12365
|
-
const tapCount = this.count % options.taps;
|
|
12366
|
-
if (tapCount === 0) {
|
|
12367
|
-
if (!this.hasRequireFailures()) {
|
|
12368
|
-
return RecognizerState.Recognized;
|
|
12369
|
-
}
|
|
12370
|
-
this._timer = setTimeout(() => {
|
|
12371
|
-
this.state = RecognizerState.Recognized;
|
|
12372
|
-
this.tryEmit(this._input);
|
|
12373
|
-
}, options.interval);
|
|
12374
|
-
return RecognizerState.Began;
|
|
12375
|
-
}
|
|
12376
|
-
}
|
|
12377
|
-
return RecognizerState.Failed;
|
|
12378
|
-
}
|
|
12379
|
-
failTimeout() {
|
|
12380
|
-
this._timer = setTimeout(() => {
|
|
12381
|
-
this.state = RecognizerState.Failed;
|
|
12382
|
-
}, this.options.interval);
|
|
12383
|
-
return RecognizerState.Failed;
|
|
12384
|
-
}
|
|
12385
|
-
reset() {
|
|
12386
|
-
clearTimeout(this._timer);
|
|
12387
|
-
}
|
|
12388
|
-
emit(input) {
|
|
12389
|
-
if (this.state === RecognizerState.Recognized) {
|
|
12390
|
-
input.tapCount = this.count;
|
|
12391
|
-
this.manager.emit(this.options.event, input);
|
|
12392
|
-
}
|
|
12393
|
-
}
|
|
12394
|
-
};
|
|
12395
|
-
|
|
12396
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/recognizers/pan.js
|
|
12397
|
-
var EVENT_NAMES2 = ["", "start", "move", "end", "cancel", "up", "down", "left", "right"];
|
|
12398
|
-
var PanRecognizer = class extends AttrRecognizer {
|
|
12399
|
-
constructor(options = {}) {
|
|
12400
|
-
super({
|
|
12401
|
-
enable: true,
|
|
12402
|
-
pointers: 1,
|
|
12403
|
-
event: "pan",
|
|
12404
|
-
threshold: 10,
|
|
12405
|
-
direction: InputDirection.All,
|
|
12406
|
-
...options
|
|
12407
|
-
});
|
|
12408
|
-
this.pX = null;
|
|
12409
|
-
this.pY = null;
|
|
12410
|
-
}
|
|
12411
|
-
getTouchAction() {
|
|
12412
|
-
const { options: { direction } } = this;
|
|
12413
|
-
const actions = [];
|
|
12414
|
-
if (direction & InputDirection.Horizontal) {
|
|
12415
|
-
actions.push(TOUCH_ACTION_PAN_Y);
|
|
12416
|
-
}
|
|
12417
|
-
if (direction & InputDirection.Vertical) {
|
|
12418
|
-
actions.push(TOUCH_ACTION_PAN_X);
|
|
12419
|
-
}
|
|
12420
|
-
return actions;
|
|
12421
|
-
}
|
|
12422
|
-
getEventNames() {
|
|
12423
|
-
return EVENT_NAMES2.map((suffix) => this.options.event + suffix);
|
|
12424
|
-
}
|
|
12425
|
-
directionTest(input) {
|
|
12426
|
-
const { options } = this;
|
|
12427
|
-
let hasMoved = true;
|
|
12428
|
-
let { distance: distance4 } = input;
|
|
12429
|
-
let { direction } = input;
|
|
12430
|
-
const x = input.deltaX;
|
|
12431
|
-
const y = input.deltaY;
|
|
12432
|
-
if (!(direction & options.direction)) {
|
|
12433
|
-
if (options.direction & InputDirection.Horizontal) {
|
|
12434
|
-
direction = x === 0 ? InputDirection.None : x < 0 ? InputDirection.Left : InputDirection.Right;
|
|
12435
|
-
hasMoved = x !== this.pX;
|
|
12436
|
-
distance4 = Math.abs(input.deltaX);
|
|
12437
|
-
} else {
|
|
12438
|
-
direction = y === 0 ? InputDirection.None : y < 0 ? InputDirection.Up : InputDirection.Down;
|
|
12439
|
-
hasMoved = y !== this.pY;
|
|
12440
|
-
distance4 = Math.abs(input.deltaY);
|
|
12441
|
-
}
|
|
12442
|
-
}
|
|
12443
|
-
input.direction = direction;
|
|
12444
|
-
return hasMoved && distance4 > options.threshold && Boolean(direction & options.direction);
|
|
12445
|
-
}
|
|
12446
|
-
attrTest(input) {
|
|
12447
|
-
return super.attrTest(input) && (Boolean(this.state & RecognizerState.Began) || !(this.state & RecognizerState.Began) && this.directionTest(input));
|
|
12448
|
-
}
|
|
12449
|
-
emit(input) {
|
|
12450
|
-
this.pX = input.deltaX;
|
|
12451
|
-
this.pY = input.deltaY;
|
|
12452
|
-
const direction = InputDirection[input.direction].toLowerCase();
|
|
12453
|
-
if (direction) {
|
|
12454
|
-
input.additionalEvent = this.options.event + direction;
|
|
12455
|
-
}
|
|
12456
|
-
super.emit(input);
|
|
12457
|
-
}
|
|
12458
|
-
};
|
|
12459
|
-
|
|
12460
|
-
// ../../node_modules/mjolnir.js/dist/hammerjs/recognizers/pinch.js
|
|
12461
|
-
var EVENT_NAMES3 = ["", "start", "move", "end", "cancel", "in", "out"];
|
|
12462
|
-
var PinchRecognizer = class extends AttrRecognizer {
|
|
12463
|
-
constructor(options = {}) {
|
|
12464
|
-
super({
|
|
12465
|
-
enable: true,
|
|
12466
|
-
event: "pinch",
|
|
12467
|
-
threshold: 0,
|
|
12468
|
-
pointers: 2,
|
|
12469
|
-
...options
|
|
12470
|
-
});
|
|
12471
|
-
}
|
|
12472
|
-
getTouchAction() {
|
|
12473
|
-
return [TOUCH_ACTION_NONE];
|
|
12474
|
-
}
|
|
12475
|
-
getEventNames() {
|
|
12476
|
-
return EVENT_NAMES3.map((suffix) => this.options.event + suffix);
|
|
12477
|
-
}
|
|
12478
|
-
attrTest(input) {
|
|
12479
|
-
return super.attrTest(input) && (Math.abs(input.scale - 1) > this.options.threshold || Boolean(this.state & RecognizerState.Began));
|
|
12480
|
-
}
|
|
12481
|
-
emit(input) {
|
|
12482
|
-
if (input.scale !== 1) {
|
|
12483
|
-
const inOut = input.scale < 1 ? "in" : "out";
|
|
12484
|
-
input.additionalEvent = this.options.event + inOut;
|
|
12485
|
-
}
|
|
12486
|
-
super.emit(input);
|
|
12487
|
-
}
|
|
12488
|
-
};
|
|
12489
|
-
|
|
12490
|
-
// ../../node_modules/mjolnir.js/dist/utils/globals.js
|
|
12491
|
-
var userAgent = typeof navigator !== "undefined" && navigator.userAgent ? navigator.userAgent.toLowerCase() : "";
|
|
12492
|
-
var window_2 = typeof window !== "undefined" ? window : global;
|
|
12493
|
-
|
|
12494
|
-
// ../../node_modules/mjolnir.js/dist/inputs/wheel-input.js
|
|
12495
|
-
var firefox = userAgent.indexOf("firefox") !== -1;
|
|
12496
|
-
|
|
12497
|
-
// ../core/src/lib/constants.ts
|
|
12498
|
-
var COORDINATE_SYSTEM = {
|
|
12499
|
-
/**
|
|
12500
|
-
* `LNGLAT` if rendering into a geospatial viewport, `CARTESIAN` otherwise
|
|
12501
|
-
*/
|
|
12502
|
-
DEFAULT: "default",
|
|
11350
|
+
DEFAULT: "default",
|
|
12503
11351
|
/**
|
|
12504
11352
|
* Positions are interpreted as [longitude, latitude, elevation]
|
|
12505
11353
|
* longitude/latitude are in degrees, elevation is in meters.
|
|
@@ -12546,14 +11394,6 @@ void main(void) {
|
|
|
12546
11394
|
*/
|
|
12547
11395
|
IDENTITY: 0
|
|
12548
11396
|
};
|
|
12549
|
-
var RECOGNIZERS = {
|
|
12550
|
-
multipan: [PanRecognizer, { threshold: 10, direction: InputDirection.Vertical, pointers: 2 }],
|
|
12551
|
-
pinch: [PinchRecognizer, {}, null, ["multipan"]],
|
|
12552
|
-
pan: [PanRecognizer, { threshold: 1 }, ["pinch"], ["multipan"]],
|
|
12553
|
-
dblclick: [TapRecognizer, { event: "dblclick", taps: 2, enable: false }],
|
|
12554
|
-
dblclickdrag: [DoubleClickDragRecognizer, { event: "dblclickdrag", enable: false }, ["dblclick"], null],
|
|
12555
|
-
click: [TapRecognizer, { event: "click" }, ["dblclickdrag"], ["dblclick", "dblclickdrag"]]
|
|
12556
|
-
};
|
|
12557
11397
|
|
|
12558
11398
|
// ../core/src/viewports/viewport.ts
|
|
12559
11399
|
var DEGREES_TO_RADIANS4 = Math.PI / 180;
|
|
@@ -12584,7 +11424,7 @@ void main(void) {
|
|
|
12584
11424
|
}
|
|
12585
11425
|
return matrix;
|
|
12586
11426
|
}
|
|
12587
|
-
var _Viewport = class {
|
|
11427
|
+
var _Viewport = class _Viewport {
|
|
12588
11428
|
// eslint-disable-next-line complexity
|
|
12589
11429
|
constructor(opts = {}) {
|
|
12590
11430
|
this._frustumPlanes = {};
|
|
@@ -12847,11 +11687,11 @@ void main(void) {
|
|
|
12847
11687
|
}
|
|
12848
11688
|
}
|
|
12849
11689
|
};
|
|
11690
|
+
_Viewport.displayName = "Viewport";
|
|
12850
11691
|
var Viewport = _Viewport;
|
|
12851
|
-
Viewport.displayName = "Viewport";
|
|
12852
11692
|
|
|
12853
11693
|
// ../core/src/viewports/web-mercator-viewport.ts
|
|
12854
|
-
var _WebMercatorViewport = class extends Viewport {
|
|
11694
|
+
var _WebMercatorViewport = class _WebMercatorViewport extends Viewport {
|
|
12855
11695
|
/* eslint-disable complexity, max-statements */
|
|
12856
11696
|
constructor(opts = {}) {
|
|
12857
11697
|
const {
|
|
@@ -13032,8 +11872,8 @@ void main(void) {
|
|
|
13032
11872
|
return new _WebMercatorViewport({ width, height, longitude, latitude, zoom });
|
|
13033
11873
|
}
|
|
13034
11874
|
};
|
|
11875
|
+
_WebMercatorViewport.displayName = "WebMercatorViewport";
|
|
13035
11876
|
var WebMercatorViewport2 = _WebMercatorViewport;
|
|
13036
|
-
WebMercatorViewport2.displayName = "WebMercatorViewport";
|
|
13037
11877
|
|
|
13038
11878
|
// ../core/src/transitions/transition.ts
|
|
13039
11879
|
var Transition = class {
|
|
@@ -13116,6 +11956,8 @@ void main(void) {
|
|
|
13116
11956
|
// ../core/src/controllers/transition-manager.ts
|
|
13117
11957
|
var noop2 = () => {
|
|
13118
11958
|
};
|
|
11959
|
+
var PRESERVE_CONSTRAINT_CONTEXT = { mode: "preserve" };
|
|
11960
|
+
var HARD_CONSTRAINT_CONTEXT = { mode: "hard" };
|
|
13119
11961
|
var TRANSITION_EVENTS = {
|
|
13120
11962
|
BREAK: 1,
|
|
13121
11963
|
SNAP_TO_END: 2,
|
|
@@ -13132,10 +11974,13 @@ void main(void) {
|
|
|
13132
11974
|
} = transition;
|
|
13133
11975
|
const t = easing(time / duration);
|
|
13134
11976
|
const viewport = interpolator.interpolateProps(startProps, endProps, t);
|
|
13135
|
-
this.propsInTransition = this.getControllerState(
|
|
13136
|
-
|
|
13137
|
-
|
|
13138
|
-
|
|
11977
|
+
this.propsInTransition = this.getControllerState(
|
|
11978
|
+
{
|
|
11979
|
+
...this.props,
|
|
11980
|
+
...viewport
|
|
11981
|
+
},
|
|
11982
|
+
PRESERVE_CONSTRAINT_CONTEXT
|
|
11983
|
+
).getViewportProps();
|
|
13139
11984
|
this.onViewStateChange({
|
|
13140
11985
|
viewState: this.propsInTransition,
|
|
13141
11986
|
oldViewState: this.props
|
|
@@ -13211,8 +12056,11 @@ void main(void) {
|
|
|
13211
12056
|
return true;
|
|
13212
12057
|
}
|
|
13213
12058
|
_triggerTransition(startProps, endProps) {
|
|
13214
|
-
const startViewstate = this.getControllerState(startProps);
|
|
13215
|
-
const endViewStateProps = this.getControllerState(
|
|
12059
|
+
const startViewstate = this.getControllerState(startProps, PRESERVE_CONSTRAINT_CONTEXT);
|
|
12060
|
+
const endViewStateProps = this.getControllerState(
|
|
12061
|
+
endProps,
|
|
12062
|
+
HARD_CONSTRAINT_CONTEXT
|
|
12063
|
+
).shortestPathFrom(startViewstate);
|
|
13216
12064
|
const transitionInterpolator = endProps.transitionInterpolator;
|
|
13217
12065
|
const duration = transitionInterpolator.getDuration ? transitionInterpolator.getDuration(startProps, endProps) : endProps.transitionDuration;
|
|
13218
12066
|
if (duration === 0) {
|
|
@@ -13409,10 +12257,8 @@ void main(void) {
|
|
|
13409
12257
|
const top = this.unproject([this.width / 2, 0], unprojectOption);
|
|
13410
12258
|
const right = this.unproject([this.width, this.height / 2], unprojectOption);
|
|
13411
12259
|
const bottom = this.unproject([this.width / 2, this.height], unprojectOption);
|
|
13412
|
-
if (right[0] < this.longitude)
|
|
13413
|
-
|
|
13414
|
-
if (left[0] > this.longitude)
|
|
13415
|
-
left[0] -= 360;
|
|
12260
|
+
if (right[0] < this.longitude) right[0] += 360;
|
|
12261
|
+
if (left[0] > this.longitude) left[0] -= 360;
|
|
13416
12262
|
return [
|
|
13417
12263
|
Math.min(left[0], right[0], top[0], bottom[0]),
|
|
13418
12264
|
Math.min(left[1], right[1], top[1], bottom[1]),
|
|
@@ -13573,14 +12419,21 @@ void main(void) {
|
|
|
13573
12419
|
transitionDuration: 0
|
|
13574
12420
|
};
|
|
13575
12421
|
var DEFAULT_INERTIA = 300;
|
|
12422
|
+
var REBOUND_DURATION = 300;
|
|
13576
12423
|
var INERTIA_EASING = (t) => 1 - (1 - t) * (1 - t);
|
|
12424
|
+
var EASE_OUT_EXPONENTIAL = (t) => t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
|
|
13577
12425
|
var EVENT_TYPES = {
|
|
13578
12426
|
WHEEL: ["wheel"],
|
|
13579
12427
|
PAN: ["panstart", "panmove", "panend"],
|
|
13580
12428
|
PINCH: ["pinchstart", "pinchmove", "pinchend"],
|
|
13581
12429
|
MULTI_PAN: ["multipanstart", "multipanmove", "multipanend"],
|
|
13582
12430
|
DOUBLE_CLICK: ["dblclick"],
|
|
13583
|
-
DOUBLE_CLICK_DRAG: [
|
|
12431
|
+
DOUBLE_CLICK_DRAG: [
|
|
12432
|
+
"dblclickdragstart",
|
|
12433
|
+
"dblclickdragmove",
|
|
12434
|
+
"dblclickdragend",
|
|
12435
|
+
"dblclickdragcancel"
|
|
12436
|
+
],
|
|
13584
12437
|
KEYBOARD: ["keydown"]
|
|
13585
12438
|
};
|
|
13586
12439
|
var pinchEventWorkaround = {};
|
|
@@ -13594,6 +12447,8 @@ void main(void) {
|
|
|
13594
12447
|
this._customEvents = [];
|
|
13595
12448
|
this._eventStartBlocked = null;
|
|
13596
12449
|
this._panMove = false;
|
|
12450
|
+
this._multiPanMode = null;
|
|
12451
|
+
this._multiPanStartCenter = null;
|
|
13597
12452
|
this._doubleClickDragAnchor = null;
|
|
13598
12453
|
this._suppressDoubleClickUntil = 0;
|
|
13599
12454
|
this.invertPan = false;
|
|
@@ -13606,10 +12461,16 @@ void main(void) {
|
|
|
13606
12461
|
this.doubleClickDragZoom = true;
|
|
13607
12462
|
this.touchZoom = true;
|
|
13608
12463
|
this.touchRotate = false;
|
|
12464
|
+
this.multiTouchDrag = null;
|
|
12465
|
+
this.trackpadGesture = false;
|
|
13609
12466
|
this.keyboard = true;
|
|
13610
12467
|
this.transitionManager = new TransitionManager({
|
|
13611
12468
|
...opts,
|
|
13612
|
-
getControllerState: (props) => new this.ControllerState(
|
|
12469
|
+
getControllerState: (props, constraintContext) => new this.ControllerState({
|
|
12470
|
+
...props,
|
|
12471
|
+
constraintContext,
|
|
12472
|
+
makeViewport: opts.makeViewport
|
|
12473
|
+
}),
|
|
13613
12474
|
onViewStateChange: this._onTransition.bind(this),
|
|
13614
12475
|
onStateChange: this._setInteractionState.bind(this)
|
|
13615
12476
|
});
|
|
@@ -13652,11 +12513,11 @@ void main(void) {
|
|
|
13652
12513
|
case "panend":
|
|
13653
12514
|
return this._onPanEnd(event);
|
|
13654
12515
|
case "pinchstart":
|
|
13655
|
-
return eventStartBlocked ? false : this._onPinchStart(event);
|
|
12516
|
+
return eventStartBlocked || !this._isTrackpadGestureAllowed(event) ? false : this._onPinchStart(event);
|
|
13656
12517
|
case "pinchmove":
|
|
13657
|
-
return this._onPinch(event);
|
|
12518
|
+
return this._isTrackpadGestureAllowed(event) ? this._onPinch(event) : false;
|
|
13658
12519
|
case "pinchend":
|
|
13659
|
-
return this._onPinchEnd(event);
|
|
12520
|
+
return this._isTrackpadGestureAllowed(event) ? this._onPinchEnd(event) : false;
|
|
13660
12521
|
case "multipanstart":
|
|
13661
12522
|
return eventStartBlocked ? false : this._onMultiPanStart(event);
|
|
13662
12523
|
case "multipanmove":
|
|
@@ -13728,6 +12589,9 @@ void main(void) {
|
|
|
13728
12589
|
* Extract interactivity options
|
|
13729
12590
|
*/
|
|
13730
12591
|
setProps(props) {
|
|
12592
|
+
if (props.maxBoundsPadding === void 0) {
|
|
12593
|
+
props.maxBoundsPadding = null;
|
|
12594
|
+
}
|
|
13731
12595
|
if (props.dragMode) {
|
|
13732
12596
|
this.dragMode = props.dragMode;
|
|
13733
12597
|
}
|
|
@@ -13747,13 +12611,18 @@ void main(void) {
|
|
|
13747
12611
|
doubleClickDragZoom = false,
|
|
13748
12612
|
touchZoom = true,
|
|
13749
12613
|
touchRotate = false,
|
|
12614
|
+
multiTouchDrag = touchRotate ? "rotate" : null,
|
|
12615
|
+
trackpadGesture = false,
|
|
13750
12616
|
keyboard = true
|
|
13751
12617
|
} = props;
|
|
13752
12618
|
const isInteractive = Boolean(this.onViewStateChange);
|
|
13753
12619
|
this.toggleEvents(EVENT_TYPES.WHEEL, isInteractive && scrollZoom);
|
|
13754
12620
|
this.toggleEvents(EVENT_TYPES.PAN, isInteractive);
|
|
13755
|
-
this.toggleEvents(
|
|
13756
|
-
|
|
12621
|
+
this.toggleEvents(
|
|
12622
|
+
EVENT_TYPES.PINCH,
|
|
12623
|
+
isInteractive && (touchZoom || multiTouchDrag === "rotate")
|
|
12624
|
+
);
|
|
12625
|
+
this.toggleEvents(EVENT_TYPES.MULTI_PAN, isInteractive && Boolean(multiTouchDrag));
|
|
13757
12626
|
this.toggleEvents(EVENT_TYPES.DOUBLE_CLICK, isInteractive && doubleClickZoom);
|
|
13758
12627
|
this.toggleEvents(EVENT_TYPES.DOUBLE_CLICK_DRAG, isInteractive && doubleClickDragZoom);
|
|
13759
12628
|
this.toggleEvents(EVENT_TYPES.KEYBOARD, isInteractive && keyboard);
|
|
@@ -13763,13 +12632,17 @@ void main(void) {
|
|
|
13763
12632
|
this.doubleClickZoom = doubleClickZoom;
|
|
13764
12633
|
this.doubleClickDragZoom = doubleClickDragZoom;
|
|
13765
12634
|
this.touchZoom = touchZoom;
|
|
13766
|
-
this.touchRotate =
|
|
12635
|
+
this.touchRotate = multiTouchDrag === "rotate";
|
|
12636
|
+
this.multiTouchDrag = multiTouchDrag;
|
|
12637
|
+
this.trackpadGesture = trackpadGesture;
|
|
13767
12638
|
this.keyboard = keyboard;
|
|
13768
|
-
const
|
|
13769
|
-
if (
|
|
12639
|
+
const constraintChanged = !oldProps || oldProps.height !== props.height || oldProps.width !== props.width || oldProps.maxBounds !== props.maxBounds || oldProps.maxBoundsPadding !== props.maxBoundsPadding;
|
|
12640
|
+
if (constraintChanged && props.maxBounds) {
|
|
13770
12641
|
const controllerState = new this.ControllerState({ ...props, makeViewport: this.makeViewport });
|
|
13771
12642
|
const normalizedProps = controllerState.getViewportProps();
|
|
13772
|
-
const changed = Object.keys(normalizedProps).some(
|
|
12643
|
+
const changed = Object.keys(normalizedProps).some(
|
|
12644
|
+
(key) => !deepEqual(normalizedProps[key], props[key], 1)
|
|
12645
|
+
);
|
|
13773
12646
|
if (changed) {
|
|
13774
12647
|
this.updateViewport(controllerState);
|
|
13775
12648
|
}
|
|
@@ -13803,17 +12676,48 @@ void main(void) {
|
|
|
13803
12676
|
if (changed) {
|
|
13804
12677
|
const oldViewState = this.controllerState && this.controllerState.getViewportProps();
|
|
13805
12678
|
if (this.onViewStateChange) {
|
|
13806
|
-
this.onViewStateChange({
|
|
12679
|
+
this.onViewStateChange({
|
|
12680
|
+
viewState,
|
|
12681
|
+
interactionState: this._interactionState,
|
|
12682
|
+
oldViewState,
|
|
12683
|
+
viewId: this.props.id
|
|
12684
|
+
});
|
|
13807
12685
|
}
|
|
13808
12686
|
}
|
|
13809
12687
|
}
|
|
13810
12688
|
_onTransition(params) {
|
|
13811
|
-
this.onViewStateChange({
|
|
12689
|
+
this.onViewStateChange({
|
|
12690
|
+
...params,
|
|
12691
|
+
interactionState: this._interactionState,
|
|
12692
|
+
viewId: this.props.id
|
|
12693
|
+
});
|
|
13812
12694
|
}
|
|
13813
12695
|
_setInteractionState(newStates) {
|
|
13814
12696
|
Object.assign(this._interactionState, newStates);
|
|
13815
12697
|
this.onStateChange(this._interactionState);
|
|
13816
12698
|
}
|
|
12699
|
+
/** Maps a semantic input lifecycle to the constraint policy seen by controller state. */
|
|
12700
|
+
_getConstraintContext(_action, phase) {
|
|
12701
|
+
if (!this.props.rubberBand) {
|
|
12702
|
+
return { mode: "hard" };
|
|
12703
|
+
}
|
|
12704
|
+
return { mode: phase === "update" ? "elastic" : phase === "end" ? "rebound" : "hard" };
|
|
12705
|
+
}
|
|
12706
|
+
/** Returns a rebound transition when hard resolution changed the displayed viewport props. */
|
|
12707
|
+
_getReboundTransition(constraintContext, nextControllerState) {
|
|
12708
|
+
if (constraintContext.mode !== "rebound") {
|
|
12709
|
+
return null;
|
|
12710
|
+
}
|
|
12711
|
+
const nextViewportProps = nextControllerState.getViewportProps();
|
|
12712
|
+
const shouldRebound = Object.keys(nextViewportProps).some(
|
|
12713
|
+
(key) => !deepEqual(this.props[key], nextViewportProps[key], 1)
|
|
12714
|
+
);
|
|
12715
|
+
return shouldRebound ? {
|
|
12716
|
+
...this._getTransitionProps(),
|
|
12717
|
+
transitionDuration: REBOUND_DURATION,
|
|
12718
|
+
transitionEasing: EASE_OUT_EXPONENTIAL
|
|
12719
|
+
} : null;
|
|
12720
|
+
}
|
|
13817
12721
|
/* Event handlers */
|
|
13818
12722
|
// Default handler for the `panstart` event.
|
|
13819
12723
|
_onPanStart(event) {
|
|
@@ -13825,9 +12729,9 @@ void main(void) {
|
|
|
13825
12729
|
if (this.invertPan || this.dragMode === "pan") {
|
|
13826
12730
|
alternateMode = !alternateMode;
|
|
13827
12731
|
}
|
|
13828
|
-
const
|
|
13829
|
-
|
|
13830
|
-
});
|
|
12732
|
+
const action = alternateMode ? "pan" : "rotate";
|
|
12733
|
+
const constraintContext = this._getConstraintContext(action, "start");
|
|
12734
|
+
const newControllerState = alternateMode ? this.controllerState.panStart({ pos }, constraintContext) : this.controllerState.rotateStart({ pos }, constraintContext);
|
|
13831
12735
|
this._panMove = alternateMode;
|
|
13832
12736
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
|
|
13833
12737
|
return true;
|
|
@@ -13852,7 +12756,10 @@ void main(void) {
|
|
|
13852
12756
|
return false;
|
|
13853
12757
|
}
|
|
13854
12758
|
const pos = this.getCenter(event);
|
|
13855
|
-
const newControllerState = this.controllerState.pan(
|
|
12759
|
+
const newControllerState = this.controllerState.pan(
|
|
12760
|
+
{ pos },
|
|
12761
|
+
this._getConstraintContext("pan", "update")
|
|
12762
|
+
);
|
|
13856
12763
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
13857
12764
|
isDragging: true,
|
|
13858
12765
|
isPanning: true
|
|
@@ -13881,10 +12788,13 @@ void main(void) {
|
|
|
13881
12788
|
}
|
|
13882
12789
|
);
|
|
13883
12790
|
} else {
|
|
13884
|
-
const
|
|
13885
|
-
this.
|
|
12791
|
+
const currentControllerState = this.controllerState;
|
|
12792
|
+
const constraintContext = this._getConstraintContext("pan", "end");
|
|
12793
|
+
const newControllerState = currentControllerState.panEnd(constraintContext);
|
|
12794
|
+
const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
|
|
12795
|
+
this.updateViewport(newControllerState, reboundTransition, {
|
|
13886
12796
|
isDragging: false,
|
|
13887
|
-
isPanning:
|
|
12797
|
+
isPanning: Boolean(reboundTransition)
|
|
13888
12798
|
});
|
|
13889
12799
|
}
|
|
13890
12800
|
return true;
|
|
@@ -13896,7 +12806,10 @@ void main(void) {
|
|
|
13896
12806
|
return false;
|
|
13897
12807
|
}
|
|
13898
12808
|
const pos = this.getCenter(event);
|
|
13899
|
-
const newControllerState = this.controllerState.rotate(
|
|
12809
|
+
const newControllerState = this.controllerState.rotate(
|
|
12810
|
+
{ pos },
|
|
12811
|
+
this._getConstraintContext("rotate", "update")
|
|
12812
|
+
);
|
|
13900
12813
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
13901
12814
|
isDragging: true,
|
|
13902
12815
|
isRotating: true
|
|
@@ -13925,10 +12838,13 @@ void main(void) {
|
|
|
13925
12838
|
}
|
|
13926
12839
|
);
|
|
13927
12840
|
} else {
|
|
13928
|
-
const
|
|
13929
|
-
this.
|
|
12841
|
+
const currentControllerState = this.controllerState;
|
|
12842
|
+
const constraintContext = this._getConstraintContext("rotate", "end");
|
|
12843
|
+
const newControllerState = currentControllerState.rotateEnd(constraintContext);
|
|
12844
|
+
const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
|
|
12845
|
+
this.updateViewport(newControllerState, reboundTransition, {
|
|
13930
12846
|
isDragging: false,
|
|
13931
|
-
isRotating:
|
|
12847
|
+
isRotating: Boolean(reboundTransition)
|
|
13932
12848
|
});
|
|
13933
12849
|
}
|
|
13934
12850
|
return true;
|
|
@@ -13938,6 +12854,9 @@ void main(void) {
|
|
|
13938
12854
|
if (!this.scrollZoom) {
|
|
13939
12855
|
return false;
|
|
13940
12856
|
}
|
|
12857
|
+
if (this.trackpadGesture && event.device !== "mouse") {
|
|
12858
|
+
return false;
|
|
12859
|
+
}
|
|
13941
12860
|
const pos = this.getCenter(event);
|
|
13942
12861
|
if (!this.isPointInBounds(pos, event)) {
|
|
13943
12862
|
return false;
|
|
@@ -13951,74 +12870,83 @@ void main(void) {
|
|
|
13951
12870
|
}
|
|
13952
12871
|
const transitionProps = smooth ? { ...this._getTransitionProps({ around: pos }), transitionDuration: 250 } : NO_TRANSITION_PROPS;
|
|
13953
12872
|
const newControllerState = this.controllerState.zoom({ pos, scale: scale5 });
|
|
13954
|
-
this.updateViewport(
|
|
13955
|
-
|
|
13956
|
-
|
|
13957
|
-
|
|
13958
|
-
isZooming: true,
|
|
13959
|
-
isPanning: true
|
|
13960
|
-
}
|
|
13961
|
-
);
|
|
12873
|
+
this.updateViewport(newControllerState, transitionProps, {
|
|
12874
|
+
isZooming: true,
|
|
12875
|
+
isPanning: true
|
|
12876
|
+
});
|
|
13962
12877
|
if (!smooth) {
|
|
13963
12878
|
this._setInteractionState({ isZooming: false, isPanning: false });
|
|
13964
12879
|
}
|
|
13965
12880
|
return true;
|
|
13966
12881
|
}
|
|
13967
12882
|
_onMultiPanStart(event) {
|
|
13968
|
-
const
|
|
13969
|
-
if (!this.
|
|
12883
|
+
const { multiTouchDrag } = this;
|
|
12884
|
+
if (!multiTouchDrag || !this._isMultiPanEventAllowed(event, multiTouchDrag)) {
|
|
12885
|
+
return false;
|
|
12886
|
+
}
|
|
12887
|
+
const currentCenter = event.offsetCenter;
|
|
12888
|
+
if (!this.isPointInBounds(this.getCenter(event), event)) {
|
|
13970
12889
|
return false;
|
|
13971
12890
|
}
|
|
13972
|
-
const
|
|
12891
|
+
const isTrackpad = event.pointerType === "trackpad";
|
|
12892
|
+
const startCenter = {
|
|
12893
|
+
x: currentCenter.x - (isTrackpad ? 0 : event.deltaX),
|
|
12894
|
+
y: currentCenter.y - (isTrackpad ? 0 : event.deltaY)
|
|
12895
|
+
};
|
|
12896
|
+
const startEvent = { ...event, offsetCenter: startCenter };
|
|
12897
|
+
const pos = this.getCenter(startEvent);
|
|
12898
|
+
const newControllerState = multiTouchDrag === "pan" ? this.controllerState.panStart({ pos }, this._getConstraintContext("pan", "start")) : this.controllerState.rotateStart({ pos }, this._getConstraintContext("rotate", "start"));
|
|
12899
|
+
this._multiPanMode = multiTouchDrag;
|
|
12900
|
+
this._multiPanStartCenter = startCenter;
|
|
13973
12901
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
|
|
13974
12902
|
return true;
|
|
13975
12903
|
}
|
|
13976
12904
|
_onMultiPan(event) {
|
|
13977
|
-
|
|
13978
|
-
|
|
13979
|
-
}
|
|
13980
|
-
if (!this.isDragging()) {
|
|
12905
|
+
const { mode, event: panEvent } = this._getMultiPanEvent(event);
|
|
12906
|
+
if (!mode || !panEvent || !this.isDragging()) {
|
|
13981
12907
|
return false;
|
|
13982
12908
|
}
|
|
13983
|
-
|
|
13984
|
-
pos[0] -= event.deltaX;
|
|
13985
|
-
const newControllerState = this.controllerState.rotate({ pos });
|
|
13986
|
-
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
13987
|
-
isDragging: true,
|
|
13988
|
-
isRotating: true
|
|
13989
|
-
});
|
|
13990
|
-
return true;
|
|
12909
|
+
return mode === "pan" ? this._onPanMove(panEvent) : this._onPanRotate(panEvent);
|
|
13991
12910
|
}
|
|
13992
12911
|
_onMultiPanEnd(event) {
|
|
13993
|
-
|
|
12912
|
+
const { mode, event: panEvent } = this._getMultiPanEvent(event);
|
|
12913
|
+
if (!mode || !panEvent || !this.isDragging()) {
|
|
12914
|
+
this._resetMultiPan();
|
|
13994
12915
|
return false;
|
|
13995
12916
|
}
|
|
13996
|
-
const
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
transitionEasing: INERTIA_EASING
|
|
14007
|
-
},
|
|
14008
|
-
{
|
|
14009
|
-
isDragging: false,
|
|
14010
|
-
isRotating: true
|
|
14011
|
-
}
|
|
14012
|
-
);
|
|
14013
|
-
this.blockEvents(inertia);
|
|
14014
|
-
} else {
|
|
14015
|
-
const newControllerState = this.controllerState.rotateEnd();
|
|
14016
|
-
this.updateViewport(newControllerState, null, {
|
|
14017
|
-
isDragging: false,
|
|
14018
|
-
isRotating: false
|
|
14019
|
-
});
|
|
12917
|
+
const handled = mode === "pan" ? this._onPanMoveEnd(panEvent) : this._onPanRotateEnd(panEvent);
|
|
12918
|
+
this._resetMultiPan();
|
|
12919
|
+
return handled;
|
|
12920
|
+
}
|
|
12921
|
+
_isTrackpadGestureAllowed(event) {
|
|
12922
|
+
return event.pointerType !== "trackpad" || this.trackpadGesture;
|
|
12923
|
+
}
|
|
12924
|
+
_isMultiPanEventAllowed(event, mode) {
|
|
12925
|
+
if (event.pointerType === "trackpad") {
|
|
12926
|
+
return this.trackpadGesture && (mode === "pan" ? this.dragPan : this.dragRotate);
|
|
14020
12927
|
}
|
|
14021
|
-
return
|
|
12928
|
+
return event.pointerType === "touch" && (mode === "pan" ? this.dragPan : this.dragRotate);
|
|
12929
|
+
}
|
|
12930
|
+
_getMultiPanEvent(event) {
|
|
12931
|
+
const mode = this._multiPanMode;
|
|
12932
|
+
const startCenter = this._multiPanStartCenter;
|
|
12933
|
+
if (!mode || !startCenter) {
|
|
12934
|
+
return { mode: null, event: null };
|
|
12935
|
+
}
|
|
12936
|
+
return {
|
|
12937
|
+
mode,
|
|
12938
|
+
event: {
|
|
12939
|
+
...event,
|
|
12940
|
+
offsetCenter: {
|
|
12941
|
+
x: startCenter.x + event.deltaX,
|
|
12942
|
+
y: startCenter.y + event.deltaY
|
|
12943
|
+
}
|
|
12944
|
+
}
|
|
12945
|
+
};
|
|
12946
|
+
}
|
|
12947
|
+
_resetMultiPan() {
|
|
12948
|
+
this._multiPanMode = null;
|
|
12949
|
+
this._multiPanStartCenter = null;
|
|
14022
12950
|
}
|
|
14023
12951
|
// Default handler for the `pinchstart` event.
|
|
14024
12952
|
_onPinchStart(event) {
|
|
@@ -14027,7 +12955,7 @@ void main(void) {
|
|
|
14027
12955
|
if (!this.isPointInBounds(pos, event)) {
|
|
14028
12956
|
return false;
|
|
14029
12957
|
}
|
|
14030
|
-
const newControllerState = this.controllerState.zoomStart({ pos }).rotateStart({ pos });
|
|
12958
|
+
const newControllerState = this.controllerState.zoomStart({ pos }, this._getConstraintContext("zoom", "start")).rotateStart({ pos }, this._getConstraintContext("rotate", "start"));
|
|
14031
12959
|
pinchEventWorkaround._startPinchRotation = event.rotation;
|
|
14032
12960
|
pinchEventWorkaround._lastPinchEvent = event;
|
|
14033
12961
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
|
|
@@ -14045,13 +12973,17 @@ void main(void) {
|
|
|
14045
12973
|
if (this.touchZoom) {
|
|
14046
12974
|
const { scale: scale5 } = event;
|
|
14047
12975
|
const pos = this.getCenter(event);
|
|
14048
|
-
newControllerState = newControllerState.zoom(
|
|
12976
|
+
newControllerState = newControllerState.zoom(
|
|
12977
|
+
{ pos, scale: scale5 },
|
|
12978
|
+
this._getConstraintContext("zoom", "update")
|
|
12979
|
+
);
|
|
14049
12980
|
}
|
|
14050
12981
|
if (this.touchRotate) {
|
|
14051
12982
|
const { rotation } = event;
|
|
14052
|
-
newControllerState = newControllerState.rotate(
|
|
14053
|
-
deltaAngleX: pinchEventWorkaround._startPinchRotation - rotation
|
|
14054
|
-
|
|
12983
|
+
newControllerState = newControllerState.rotate(
|
|
12984
|
+
{ deltaAngleX: pinchEventWorkaround._startPinchRotation - rotation },
|
|
12985
|
+
this._getConstraintContext("rotate", "update")
|
|
12986
|
+
);
|
|
14055
12987
|
}
|
|
14056
12988
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
14057
12989
|
isDragging: true,
|
|
@@ -14091,12 +13023,19 @@ void main(void) {
|
|
|
14091
13023
|
);
|
|
14092
13024
|
this.blockEvents(inertia);
|
|
14093
13025
|
} else {
|
|
14094
|
-
const
|
|
14095
|
-
this.
|
|
13026
|
+
const currentControllerState = this.controllerState;
|
|
13027
|
+
const zoomConstraintContext = this._getConstraintContext("zoom", "end");
|
|
13028
|
+
const rotateConstraintContext = this._getConstraintContext("rotate", "end");
|
|
13029
|
+
const newControllerState = currentControllerState.zoomEnd(zoomConstraintContext).rotateEnd(rotateConstraintContext);
|
|
13030
|
+
const reboundTransition = this._getReboundTransition(
|
|
13031
|
+
this.touchZoom ? zoomConstraintContext : rotateConstraintContext,
|
|
13032
|
+
newControllerState
|
|
13033
|
+
);
|
|
13034
|
+
this.updateViewport(newControllerState, reboundTransition, {
|
|
14096
13035
|
isDragging: false,
|
|
14097
|
-
isPanning:
|
|
14098
|
-
isZooming:
|
|
14099
|
-
isRotating:
|
|
13036
|
+
isPanning: Boolean(reboundTransition) && this.touchZoom,
|
|
13037
|
+
isZooming: Boolean(reboundTransition) && this.touchZoom,
|
|
13038
|
+
isRotating: Boolean(reboundTransition) && this.touchRotate
|
|
14100
13039
|
});
|
|
14101
13040
|
}
|
|
14102
13041
|
pinchEventWorkaround._startPinchRotation = null;
|
|
@@ -14135,9 +13074,15 @@ void main(void) {
|
|
|
14135
13074
|
return false;
|
|
14136
13075
|
}
|
|
14137
13076
|
this._doubleClickDragAnchor = pos;
|
|
14138
|
-
let newControllerState = this.controllerState.zoomStart(
|
|
13077
|
+
let newControllerState = this.controllerState.zoomStart(
|
|
13078
|
+
{ pos },
|
|
13079
|
+
this._getConstraintContext("zoom", "start")
|
|
13080
|
+
);
|
|
14139
13081
|
if (event.scale !== 1) {
|
|
14140
|
-
newControllerState = newControllerState.zoom(
|
|
13082
|
+
newControllerState = newControllerState.zoom(
|
|
13083
|
+
{ pos, scale: event.scale },
|
|
13084
|
+
this._getConstraintContext("zoom", "update")
|
|
13085
|
+
);
|
|
14141
13086
|
}
|
|
14142
13087
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
14143
13088
|
isDragging: true,
|
|
@@ -14151,7 +13096,10 @@ void main(void) {
|
|
|
14151
13096
|
if (!pos) {
|
|
14152
13097
|
return false;
|
|
14153
13098
|
}
|
|
14154
|
-
const newControllerState = this.controllerState.zoom(
|
|
13099
|
+
const newControllerState = this.controllerState.zoom(
|
|
13100
|
+
{ pos, scale: event.scale },
|
|
13101
|
+
this._getConstraintContext("zoom", "update")
|
|
13102
|
+
);
|
|
14155
13103
|
this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
|
|
14156
13104
|
isDragging: true,
|
|
14157
13105
|
isPanning: true,
|
|
@@ -14160,15 +13108,19 @@ void main(void) {
|
|
|
14160
13108
|
return true;
|
|
14161
13109
|
}
|
|
14162
13110
|
_onDoubleClickDragEnd(_event) {
|
|
14163
|
-
|
|
13111
|
+
const pos = this._doubleClickDragAnchor;
|
|
13112
|
+
if (!pos) {
|
|
14164
13113
|
return false;
|
|
14165
13114
|
}
|
|
14166
13115
|
this._doubleClickDragAnchor = null;
|
|
14167
|
-
const
|
|
14168
|
-
this.
|
|
13116
|
+
const currentControllerState = this.controllerState;
|
|
13117
|
+
const constraintContext = this._getConstraintContext("zoom", "end");
|
|
13118
|
+
const newControllerState = currentControllerState.zoomEnd(constraintContext);
|
|
13119
|
+
const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
|
|
13120
|
+
this.updateViewport(newControllerState, reboundTransition, {
|
|
14169
13121
|
isDragging: false,
|
|
14170
|
-
isPanning:
|
|
14171
|
-
isZooming:
|
|
13122
|
+
isPanning: Boolean(reboundTransition),
|
|
13123
|
+
isZooming: Boolean(reboundTransition)
|
|
14172
13124
|
});
|
|
14173
13125
|
this._suppressDoubleClickUntil = Date.now() + 100;
|
|
14174
13126
|
this.blockEvents(100);
|
|
@@ -14252,10 +13204,11 @@ void main(void) {
|
|
|
14252
13204
|
};
|
|
14253
13205
|
|
|
14254
13206
|
// ../core/src/controllers/view-state.ts
|
|
13207
|
+
var CONSTRAINT_AROUND = /* @__PURE__ */ Symbol("constraintAround");
|
|
14255
13208
|
var ViewState = class {
|
|
14256
|
-
constructor(props, state, makeViewport) {
|
|
13209
|
+
constructor(props, state, makeViewport, constraintContext) {
|
|
14257
13210
|
this.makeViewport = makeViewport;
|
|
14258
|
-
this._viewportProps = this.applyConstraints(props);
|
|
13211
|
+
this._viewportProps = this.applyConstraints(props, constraintContext);
|
|
14259
13212
|
this._state = state;
|
|
14260
13213
|
}
|
|
14261
13214
|
getViewportProps() {
|
|
@@ -14266,6 +13219,35 @@ void main(void) {
|
|
|
14266
13219
|
}
|
|
14267
13220
|
};
|
|
14268
13221
|
|
|
13222
|
+
// ../core/src/controllers/utils.ts
|
|
13223
|
+
function applyRubberBand(value, constrainedValue, range) {
|
|
13224
|
+
const overshoot = value - constrainedValue;
|
|
13225
|
+
return overshoot && Number.isFinite(overshoot) ? constrainedValue + overshoot * range / (range + Math.abs(overshoot)) : constrainedValue;
|
|
13226
|
+
}
|
|
13227
|
+
function getMaxBoundsRect(width, height, padding) {
|
|
13228
|
+
const left = getPosition(parsePosition(padding?.left ?? 0), width);
|
|
13229
|
+
const right = getPosition(parsePosition(padding?.right ?? 0), width);
|
|
13230
|
+
const top = getPosition(parsePosition(padding?.top ?? 0), height);
|
|
13231
|
+
const bottom = getPosition(parsePosition(padding?.bottom ?? 0), height);
|
|
13232
|
+
return {
|
|
13233
|
+
x: left,
|
|
13234
|
+
y: top,
|
|
13235
|
+
width: width - left - right,
|
|
13236
|
+
height: height - top - bottom
|
|
13237
|
+
};
|
|
13238
|
+
}
|
|
13239
|
+
function getMaxBoundsExtents(viewport, target2, rect) {
|
|
13240
|
+
let [x, y] = viewport.project(target2);
|
|
13241
|
+
x = Number.isFinite(x) ? x : viewport.width / 2;
|
|
13242
|
+
y = Number.isFinite(y) ? y : viewport.height / 2;
|
|
13243
|
+
return {
|
|
13244
|
+
left: x - rect.x,
|
|
13245
|
+
right: rect.x + rect.width - x,
|
|
13246
|
+
top: y - rect.y,
|
|
13247
|
+
bottom: rect.y + rect.height - y
|
|
13248
|
+
};
|
|
13249
|
+
}
|
|
13250
|
+
|
|
14269
13251
|
// ../core/src/controllers/map-controller.ts
|
|
14270
13252
|
var PITCH_MOUSE_THRESHOLD = 5;
|
|
14271
13253
|
var PITCH_ACCEL = 1.2;
|
|
@@ -14274,6 +13256,7 @@ void main(void) {
|
|
|
14274
13256
|
[-Infinity, -90],
|
|
14275
13257
|
[Infinity, 90]
|
|
14276
13258
|
];
|
|
13259
|
+
var ZOOM_RUBBER_BAND_RANGE = 1;
|
|
14277
13260
|
function lngLatToWorld2([lng, lat]) {
|
|
14278
13261
|
if (Math.abs(lat) > 90) {
|
|
14279
13262
|
lat = Math.sign(lat) * 90;
|
|
@@ -14332,12 +13315,15 @@ void main(void) {
|
|
|
14332
13315
|
/** Zoom when current zoom operation started */
|
|
14333
13316
|
startZoom,
|
|
14334
13317
|
/** Normalize viewport props to fit map height into viewport */
|
|
14335
|
-
normalize: normalize4 = true
|
|
13318
|
+
normalize: normalize4 = true,
|
|
13319
|
+
rubberBand = false
|
|
14336
13320
|
} = options;
|
|
13321
|
+
const { [CONSTRAINT_AROUND]: constraintAround } = options;
|
|
14337
13322
|
assert4(Number.isFinite(longitude));
|
|
14338
13323
|
assert4(Number.isFinite(latitude));
|
|
14339
13324
|
assert4(Number.isFinite(zoom));
|
|
14340
13325
|
const maxBounds = options.maxBounds || (normalize4 ? WEB_MERCATOR_MAX_BOUNDS : null);
|
|
13326
|
+
const maxBoundsPadding = options.maxBoundsPadding || null;
|
|
14341
13327
|
super(
|
|
14342
13328
|
{
|
|
14343
13329
|
width,
|
|
@@ -14354,7 +13340,10 @@ void main(void) {
|
|
|
14354
13340
|
minPitch,
|
|
14355
13341
|
normalize: normalize4,
|
|
14356
13342
|
position,
|
|
14357
|
-
maxBounds
|
|
13343
|
+
maxBounds,
|
|
13344
|
+
maxBoundsPadding,
|
|
13345
|
+
rubberBand,
|
|
13346
|
+
...{ [CONSTRAINT_AROUND]: constraintAround }
|
|
14358
13347
|
},
|
|
14359
13348
|
{
|
|
14360
13349
|
startPanLngLat,
|
|
@@ -14365,7 +13354,8 @@ void main(void) {
|
|
|
14365
13354
|
startPitch,
|
|
14366
13355
|
startZoom
|
|
14367
13356
|
},
|
|
14368
|
-
options.makeViewport
|
|
13357
|
+
options.makeViewport,
|
|
13358
|
+
options.constraintContext
|
|
14369
13359
|
);
|
|
14370
13360
|
this.getAltitude = options.getAltitude;
|
|
14371
13361
|
}
|
|
@@ -14373,10 +13363,13 @@ void main(void) {
|
|
|
14373
13363
|
* Start panning
|
|
14374
13364
|
* @param {[Number, Number]} pos - position on screen where the pointer grabs
|
|
14375
13365
|
*/
|
|
14376
|
-
panStart({ pos }) {
|
|
14377
|
-
return this._getUpdatedState(
|
|
14378
|
-
|
|
14379
|
-
|
|
13366
|
+
panStart({ pos }, constraintContext) {
|
|
13367
|
+
return this._getUpdatedState(
|
|
13368
|
+
{
|
|
13369
|
+
startPanLngLat: this._unproject(pos)
|
|
13370
|
+
},
|
|
13371
|
+
constraintContext
|
|
13372
|
+
);
|
|
14380
13373
|
}
|
|
14381
13374
|
/**
|
|
14382
13375
|
* Pan
|
|
@@ -14384,23 +13377,26 @@ void main(void) {
|
|
|
14384
13377
|
* @param {[Number, Number], optional} startPos - where the pointer grabbed at
|
|
14385
13378
|
* the start of the operation. Must be supplied of `panStart()` was not called
|
|
14386
13379
|
*/
|
|
14387
|
-
pan({ pos, startPos }) {
|
|
13380
|
+
pan({ pos, startPos }, constraintContext) {
|
|
14388
13381
|
const startPanLngLat = this.getState().startPanLngLat || this._unproject(startPos);
|
|
14389
13382
|
if (!startPanLngLat) {
|
|
14390
13383
|
return this;
|
|
14391
13384
|
}
|
|
14392
13385
|
const viewport = this.makeViewport(this.getViewportProps());
|
|
14393
13386
|
const newProps = viewport.panByPosition(startPanLngLat, pos);
|
|
14394
|
-
return this._getUpdatedState(newProps);
|
|
13387
|
+
return this._getUpdatedState(newProps, constraintContext);
|
|
14395
13388
|
}
|
|
14396
13389
|
/**
|
|
14397
13390
|
* End panning
|
|
14398
13391
|
* Must call if `panStart()` was called
|
|
14399
13392
|
*/
|
|
14400
|
-
panEnd() {
|
|
14401
|
-
return this._getUpdatedState(
|
|
14402
|
-
|
|
14403
|
-
|
|
13393
|
+
panEnd(constraintContext) {
|
|
13394
|
+
return this._getUpdatedState(
|
|
13395
|
+
{
|
|
13396
|
+
startPanLngLat: null
|
|
13397
|
+
},
|
|
13398
|
+
constraintContext
|
|
13399
|
+
);
|
|
14404
13400
|
}
|
|
14405
13401
|
/**
|
|
14406
13402
|
* Start rotating
|
|
@@ -14466,11 +13462,14 @@ void main(void) {
|
|
|
14466
13462
|
* Start zooming
|
|
14467
13463
|
* @param {[Number, Number]} pos - position on screen where the center is
|
|
14468
13464
|
*/
|
|
14469
|
-
zoomStart({ pos }) {
|
|
14470
|
-
return this._getUpdatedState(
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
13465
|
+
zoomStart({ pos }, constraintContext) {
|
|
13466
|
+
return this._getUpdatedState(
|
|
13467
|
+
{
|
|
13468
|
+
startZoomLngLat: this._unproject(pos),
|
|
13469
|
+
startZoom: this.getViewportProps().zoom
|
|
13470
|
+
},
|
|
13471
|
+
constraintContext
|
|
13472
|
+
);
|
|
14474
13473
|
}
|
|
14475
13474
|
/**
|
|
14476
13475
|
* Zoom
|
|
@@ -14484,7 +13483,7 @@ void main(void) {
|
|
|
14484
13483
|
pos,
|
|
14485
13484
|
startPos,
|
|
14486
13485
|
scale: scale5
|
|
14487
|
-
}) {
|
|
13486
|
+
}, constraintContext) {
|
|
14488
13487
|
let { startZoom, startZoomLngLat } = this.getState();
|
|
14489
13488
|
if (!startZoomLngLat) {
|
|
14490
13489
|
startZoom = this.getViewportProps().zoom;
|
|
@@ -14493,40 +13492,44 @@ void main(void) {
|
|
|
14493
13492
|
if (!startZoomLngLat) {
|
|
14494
13493
|
return this;
|
|
14495
13494
|
}
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
13495
|
+
return this._getUpdatedState(
|
|
13496
|
+
{
|
|
13497
|
+
zoom: startZoom + Math.log2(scale5),
|
|
13498
|
+
[CONSTRAINT_AROUND]: { position: startZoomLngLat, screenPosition: pos }
|
|
13499
|
+
},
|
|
13500
|
+
constraintContext
|
|
13501
|
+
);
|
|
14502
13502
|
}
|
|
14503
13503
|
/**
|
|
14504
13504
|
* End zooming
|
|
14505
13505
|
* Must call if `zoomStart()` was called
|
|
14506
13506
|
*/
|
|
14507
|
-
zoomEnd() {
|
|
14508
|
-
return this._getUpdatedState(
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
13507
|
+
zoomEnd(constraintContext) {
|
|
13508
|
+
return this._getUpdatedState(
|
|
13509
|
+
{
|
|
13510
|
+
startZoomLngLat: null,
|
|
13511
|
+
startZoom: null
|
|
13512
|
+
},
|
|
13513
|
+
constraintContext
|
|
13514
|
+
);
|
|
14512
13515
|
}
|
|
14513
|
-
zoomIn(speed = 2) {
|
|
14514
|
-
return this._zoomFromCenter(speed);
|
|
13516
|
+
zoomIn(speed = 2, constraintContext) {
|
|
13517
|
+
return this._zoomFromCenter(speed, constraintContext);
|
|
14515
13518
|
}
|
|
14516
|
-
zoomOut(speed = 2) {
|
|
14517
|
-
return this._zoomFromCenter(1 / speed);
|
|
13519
|
+
zoomOut(speed = 2, constraintContext) {
|
|
13520
|
+
return this._zoomFromCenter(1 / speed, constraintContext);
|
|
14518
13521
|
}
|
|
14519
|
-
moveLeft(speed = 100) {
|
|
14520
|
-
return this._panFromCenter([speed, 0]);
|
|
13522
|
+
moveLeft(speed = 100, constraintContext) {
|
|
13523
|
+
return this._panFromCenter([speed, 0], constraintContext);
|
|
14521
13524
|
}
|
|
14522
|
-
moveRight(speed = 100) {
|
|
14523
|
-
return this._panFromCenter([-speed, 0]);
|
|
13525
|
+
moveRight(speed = 100, constraintContext) {
|
|
13526
|
+
return this._panFromCenter([-speed, 0], constraintContext);
|
|
14524
13527
|
}
|
|
14525
|
-
moveUp(speed = 100) {
|
|
14526
|
-
return this._panFromCenter([0, speed]);
|
|
13528
|
+
moveUp(speed = 100, constraintContext) {
|
|
13529
|
+
return this._panFromCenter([0, speed], constraintContext);
|
|
14527
13530
|
}
|
|
14528
|
-
moveDown(speed = 100) {
|
|
14529
|
-
return this._panFromCenter([0, -speed]);
|
|
13531
|
+
moveDown(speed = 100, constraintContext) {
|
|
13532
|
+
return this._panFromCenter([0, -speed], constraintContext);
|
|
14530
13533
|
}
|
|
14531
13534
|
rotateLeft(speed = 15) {
|
|
14532
13535
|
return this._getUpdatedState({
|
|
@@ -14561,28 +13564,70 @@ void main(void) {
|
|
|
14561
13564
|
return props;
|
|
14562
13565
|
}
|
|
14563
13566
|
// Apply any constraints (mathematical or defined by _viewportProps) to map state
|
|
14564
|
-
applyConstraints(props) {
|
|
14565
|
-
const
|
|
13567
|
+
applyConstraints(props, constraintContext) {
|
|
13568
|
+
const internalProps = props;
|
|
13569
|
+
const constraintAround = internalProps[CONSTRAINT_AROUND];
|
|
13570
|
+
delete internalProps[CONSTRAINT_AROUND];
|
|
13571
|
+
const { maxPitch, minPitch, pitch, bearing, normalize: normalize4, maxBounds, rubberBand } = props;
|
|
14566
13572
|
if (normalize4) {
|
|
14567
|
-
if (longitude < -180 || longitude > 180) {
|
|
14568
|
-
props.longitude = mod(longitude + 180, 360) - 180;
|
|
14569
|
-
}
|
|
14570
13573
|
if (bearing < -180 || bearing > 180) {
|
|
14571
13574
|
props.bearing = mod(bearing + 180, 360) - 180;
|
|
14572
13575
|
}
|
|
14573
13576
|
}
|
|
14574
13577
|
props.pitch = clamp(pitch, minPitch, maxPitch);
|
|
14575
|
-
|
|
13578
|
+
const constrainedZoom = this._constrainZoom(props.zoom, props);
|
|
13579
|
+
const shouldRubberBand = rubberBand && constraintContext?.mode === "elastic";
|
|
13580
|
+
props.zoom = constraintContext?.mode === "preserve" ? props.zoom : shouldRubberBand ? applyRubberBand(props.zoom, constrainedZoom, ZOOM_RUBBER_BAND_RANGE) : constrainedZoom;
|
|
13581
|
+
if (constraintAround) {
|
|
13582
|
+
const viewport = this.makeViewport(props);
|
|
13583
|
+
Object.assign(
|
|
13584
|
+
props,
|
|
13585
|
+
viewport.panByPosition(constraintAround.position, constraintAround.screenPosition)
|
|
13586
|
+
);
|
|
13587
|
+
}
|
|
13588
|
+
if (normalize4 && (props.longitude < -180 || props.longitude > 180)) {
|
|
13589
|
+
props.longitude = mod(props.longitude + 180, 360) - 180;
|
|
13590
|
+
}
|
|
14576
13591
|
if (maxBounds) {
|
|
13592
|
+
const maxBoundsRect = getMaxBoundsRect(props.width, props.height, props.maxBoundsPadding);
|
|
13593
|
+
const viewport = this.makeViewport({ ...props, bearing: 0, pitch: 0 });
|
|
13594
|
+
const screenExtents = getMaxBoundsExtents(
|
|
13595
|
+
viewport,
|
|
13596
|
+
[props.longitude, props.latitude],
|
|
13597
|
+
maxBoundsRect
|
|
13598
|
+
);
|
|
14577
13599
|
const bl = lngLatToWorld2(maxBounds[0]);
|
|
14578
13600
|
const tr = lngLatToWorld2(maxBounds[1]);
|
|
14579
13601
|
const scale5 = 2 ** props.zoom;
|
|
14580
|
-
const
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
13602
|
+
const minimumCenter = [
|
|
13603
|
+
bl[0] + screenExtents.left / scale5,
|
|
13604
|
+
bl[1] + screenExtents.bottom / scale5
|
|
13605
|
+
];
|
|
13606
|
+
const maximumCenter = [
|
|
13607
|
+
tr[0] - screenExtents.right / scale5,
|
|
13608
|
+
tr[1] - screenExtents.top / scale5
|
|
13609
|
+
];
|
|
13610
|
+
const center = lngLatToWorld2([props.longitude, props.latitude]);
|
|
13611
|
+
const constrainedCenter = [
|
|
13612
|
+
clamp(center[0], minimumCenter[0], maximumCenter[0]),
|
|
13613
|
+
clamp(center[1], minimumCenter[1], maximumCenter[1])
|
|
13614
|
+
];
|
|
13615
|
+
const displayedCenter = center.slice();
|
|
13616
|
+
if (maxBoundsRect.width >= 0) {
|
|
13617
|
+
displayedCenter[0] = constraintContext?.mode === "preserve" ? center[0] : shouldRubberBand ? applyRubberBand(center[0], constrainedCenter[0], maxBoundsRect.width / 2 / scale5) : constrainedCenter[0];
|
|
13618
|
+
}
|
|
13619
|
+
if (maxBoundsRect.height >= 0) {
|
|
13620
|
+
displayedCenter[1] = constraintContext?.mode === "preserve" ? center[1] : shouldRubberBand ? applyRubberBand(center[1], constrainedCenter[1], maxBoundsRect.height / 2 / scale5) : constrainedCenter[1];
|
|
13621
|
+
}
|
|
13622
|
+
if (displayedCenter[0] !== center[0] || displayedCenter[1] !== center[1]) {
|
|
13623
|
+
const [displayedLongitude, displayedLatitude] = worldToLngLat(displayedCenter);
|
|
13624
|
+
if (displayedCenter[0] !== center[0]) {
|
|
13625
|
+
props.longitude = displayedLongitude;
|
|
13626
|
+
}
|
|
13627
|
+
if (displayedCenter[1] !== center[1]) {
|
|
13628
|
+
props.latitude = displayedLatitude;
|
|
13629
|
+
}
|
|
13630
|
+
}
|
|
14586
13631
|
}
|
|
14587
13632
|
return props;
|
|
14588
13633
|
}
|
|
@@ -14593,41 +13638,48 @@ void main(void) {
|
|
|
14593
13638
|
const shouldApplyMaxBounds = maxBounds !== null && props.width > 0 && props.height > 0;
|
|
14594
13639
|
let { minZoom } = props;
|
|
14595
13640
|
if (shouldApplyMaxBounds) {
|
|
13641
|
+
const maxBoundsRect = getMaxBoundsRect(props.width, props.height, props.maxBoundsPadding);
|
|
14596
13642
|
const bl = lngLatToWorld2(maxBounds[0]);
|
|
14597
13643
|
const tr = lngLatToWorld2(maxBounds[1]);
|
|
14598
13644
|
const w = tr[0] - bl[0];
|
|
14599
13645
|
const h = tr[1] - bl[1];
|
|
14600
|
-
if (Number.isFinite(w) && w > 0) {
|
|
14601
|
-
minZoom = Math.max(minZoom, Math.log2(
|
|
13646
|
+
if (maxBoundsRect.width > 0 && Number.isFinite(w) && w > 0) {
|
|
13647
|
+
minZoom = Math.max(minZoom, Math.log2(maxBoundsRect.width / w));
|
|
14602
13648
|
}
|
|
14603
|
-
if (Number.isFinite(h) && h > 0) {
|
|
14604
|
-
minZoom = Math.max(minZoom, Math.log2(
|
|
13649
|
+
if (maxBoundsRect.height > 0 && Number.isFinite(h) && h > 0) {
|
|
13650
|
+
minZoom = Math.max(minZoom, Math.log2(maxBoundsRect.height / h));
|
|
14605
13651
|
}
|
|
14606
|
-
if (minZoom > maxZoom)
|
|
14607
|
-
minZoom = maxZoom;
|
|
13652
|
+
if (minZoom > maxZoom) minZoom = maxZoom;
|
|
14608
13653
|
}
|
|
14609
13654
|
return clamp(zoom, minZoom, maxZoom);
|
|
14610
13655
|
}
|
|
14611
|
-
_zoomFromCenter(scale5) {
|
|
13656
|
+
_zoomFromCenter(scale5, constraintContext) {
|
|
14612
13657
|
const { width, height } = this.getViewportProps();
|
|
14613
|
-
return this.zoom(
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
13658
|
+
return this.zoom(
|
|
13659
|
+
{
|
|
13660
|
+
pos: [width / 2, height / 2],
|
|
13661
|
+
scale: scale5
|
|
13662
|
+
},
|
|
13663
|
+
constraintContext
|
|
13664
|
+
);
|
|
14617
13665
|
}
|
|
14618
|
-
_panFromCenter(offset) {
|
|
13666
|
+
_panFromCenter(offset, constraintContext) {
|
|
14619
13667
|
const { width, height } = this.getViewportProps();
|
|
14620
|
-
return this.pan(
|
|
14621
|
-
|
|
14622
|
-
|
|
14623
|
-
|
|
13668
|
+
return this.pan(
|
|
13669
|
+
{
|
|
13670
|
+
startPos: [width / 2, height / 2],
|
|
13671
|
+
pos: [width / 2 + offset[0], height / 2 + offset[1]]
|
|
13672
|
+
},
|
|
13673
|
+
constraintContext
|
|
13674
|
+
);
|
|
14624
13675
|
}
|
|
14625
|
-
_getUpdatedState(newProps) {
|
|
13676
|
+
_getUpdatedState(newProps, constraintContext) {
|
|
14626
13677
|
return new this.constructor({
|
|
14627
13678
|
makeViewport: this.makeViewport,
|
|
14628
13679
|
...this.getViewportProps(),
|
|
14629
13680
|
...this.getState(),
|
|
14630
|
-
...newProps
|
|
13681
|
+
...newProps,
|
|
13682
|
+
constraintContext
|
|
14631
13683
|
});
|
|
14632
13684
|
}
|
|
14633
13685
|
_unproject(pos) {
|