@deck.gl/arcgis 9.4.0-alpha.2 → 9.4.0-beta.3

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 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
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
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
- return mod3 || (0, cb[__getOwnPropNames(cb)[0]])((mod3 = { exports: {} }).exports, mod3), mod3.exports;
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/helpers/webgl-context-data.js
728
- function getWebGLContextData(gl) {
729
- const contextData = gl.luma || {
730
- _polyfilled: false,
731
- extensions: {},
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;
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;
823
79
  }
824
- const realUserAgent = typeof navigator !== "undefined" && navigator.userAgent;
825
- const userAgent2 = mockUserAgent || realUserAgent;
826
- return Boolean(userAgent2 && userAgent2.indexOf("Electron") >= 0);
80
+ return webglDeveloperToolsHooks.makeDebugContext(gl, props);
827
81
  }
828
- var init_is_electron = __esm({
829
- "../../node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
830
- }
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();
840
- }
841
- var init_is_browser = __esm({
842
- "../../node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
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
- var init_get_browser = __esm({
871
- "../../node_modules/@probe.gl/env/dist/lib/get-browser.js"() {
872
- init_is_browser();
873
- init_is_electron();
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
- function makeDebugContext(gl, props = {}) {
895
- return props.debugWebGL || props.traceWebGL ? getDebugContext(gl, props) : getRealContext(gl);
896
- }
897
- function getRealContext(gl) {
898
- const data = getWebGLContextData2(gl);
899
- return data.realContext ? data.realContext : gl;
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
 
@@ -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 = import_core4.textureFormatDecoder.getInfo(format);
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 = import_core4.textureFormatDecoder.getInfo(format);
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 import_core4, 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;
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
- import_core4 = __toESM(require_core2(), 1);
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 import_core5, WEBGL_FEATURES, WebGLDeviceFeatures;
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
- import_core5 = __toESM(require_core2(), 1);
1338
+ import_core4 = __toESM(require_core2(), 1);
2182
1339
  init_webgl_extensions();
2183
1340
  init_webgl_texture_table();
2184
1341
  WEBGL_FEATURES = {
@@ -2191,7 +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",
2194
- "html-in-canvas": (gl) => (0, import_core5.isHTMLInCanvasSupported)() && typeof gl.texElementImage2D === "function",
1351
+ "html-in-canvas": (gl) => (0, import_core4.isHTMLInCanvasSupported)() && typeof gl.texElementImage2D === "function",
2195
1352
  "polygon-mode-webgl": "WEBGL_polygon_mode",
2196
1353
  "provoking-vertex-webgl": "WEBGL_provoking_vertex",
2197
1354
  "shader-clip-cull-distance-webgl": "WEBGL_clip_cull_distance",
@@ -2199,7 +1356,7 @@ var __exports__ = (() => {
2199
1356
  "shader-conservative-depth-webgl": "EXT_conservative_depth"
2200
1357
  // Textures are handled by getTextureFeatures()
2201
1358
  };
2202
- WebGLDeviceFeatures = class extends import_core5.DeviceFeatures {
1359
+ WebGLDeviceFeatures = class extends import_core4.DeviceFeatures {
2203
1360
  gl;
2204
1361
  extensions;
2205
1362
  testedFeatures = /* @__PURE__ */ new Set();
@@ -2255,11 +1412,11 @@ var __exports__ = (() => {
2255
1412
  });
2256
1413
 
2257
1414
  // ../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-limits.js
2258
- var import_core6, WebGLDeviceLimits;
1415
+ var import_core5, WebGLDeviceLimits;
2259
1416
  var init_webgl_device_limits = __esm({
2260
1417
  "../../node_modules/@luma.gl/webgl/dist/adapter/device-helpers/webgl-device-limits.js"() {
2261
- import_core6 = __toESM(require_core2(), 1);
2262
- WebGLDeviceLimits = class extends import_core6.DeviceLimits {
1418
+ import_core5 = __toESM(require_core2(), 1);
1419
+ WebGLDeviceLimits = class extends import_core5.DeviceLimits {
2263
1420
  get maxTextureDimension1D() {
2264
1421
  return 0;
2265
1422
  }
@@ -2412,18 +1569,21 @@ var __exports__ = (() => {
2412
1569
  return "Height/width mismatch";
2413
1570
  case 36061:
2414
1571
  return "Unsupported or split attachments";
1572
+ // WebGL2
2415
1573
  case 36182:
2416
1574
  return "Samples mismatch";
1575
+ // OVR_multiview2 extension
1576
+ // case GL.FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: return 'baseViewIndex mismatch';
2417
1577
  default:
2418
1578
  return `${status}`;
2419
1579
  }
2420
1580
  }
2421
- var import_core7, WEBGLFramebuffer;
1581
+ var import_core6, WEBGLFramebuffer;
2422
1582
  var init_webgl_framebuffer = __esm({
2423
1583
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-framebuffer.js"() {
2424
- import_core7 = __toESM(require_core2(), 1);
1584
+ import_core6 = __toESM(require_core2(), 1);
2425
1585
  init_webgl_texture_table();
2426
- WEBGLFramebuffer = class extends import_core7.Framebuffer {
1586
+ WEBGLFramebuffer = class extends import_core6.Framebuffer {
2427
1587
  device;
2428
1588
  gl;
2429
1589
  handle;
@@ -2527,12 +1687,12 @@ var __exports__ = (() => {
2527
1687
  });
2528
1688
 
2529
1689
  // ../../node_modules/@luma.gl/webgl/dist/adapter/webgl-canvas-context.js
2530
- var import_core8, WebGLCanvasContext;
1690
+ var import_core7, WebGLCanvasContext;
2531
1691
  var init_webgl_canvas_context = __esm({
2532
1692
  "../../node_modules/@luma.gl/webgl/dist/adapter/webgl-canvas-context.js"() {
2533
- import_core8 = __toESM(require_core2(), 1);
1693
+ import_core7 = __toESM(require_core2(), 1);
2534
1694
  init_webgl_framebuffer();
2535
- WebGLCanvasContext = class extends import_core8.CanvasContext {
1695
+ WebGLCanvasContext = class extends import_core7.CanvasContext {
2536
1696
  device;
2537
1697
  handle = null;
2538
1698
  _framebuffer = null;
@@ -2567,11 +1727,11 @@ var __exports__ = (() => {
2567
1727
  });
2568
1728
 
2569
1729
  // ../../node_modules/@luma.gl/webgl/dist/adapter/webgl-presentation-context.js
2570
- var import_core9, WebGLPresentationContext;
1730
+ var import_core8, WebGLPresentationContext;
2571
1731
  var init_webgl_presentation_context = __esm({
2572
1732
  "../../node_modules/@luma.gl/webgl/dist/adapter/webgl-presentation-context.js"() {
2573
- import_core9 = __toESM(require_core2(), 1);
2574
- WebGLPresentationContext = class extends import_core9.PresentationContext {
1733
+ import_core8 = __toESM(require_core2(), 1);
1734
+ WebGLPresentationContext = class extends import_core8.PresentationContext {
2575
1735
  device;
2576
1736
  handle = null;
2577
1737
  context2d;
@@ -2635,34 +1795,34 @@ var __exports__ = (() => {
2635
1795
 
2636
1796
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-buffer.js
2637
1797
  function getWebGLTarget(usage) {
2638
- if (usage & import_core10.Buffer.INDEX) {
1798
+ if (usage & import_core9.Buffer.INDEX) {
2639
1799
  return 34963;
2640
1800
  }
2641
- if (usage & import_core10.Buffer.VERTEX) {
1801
+ if (usage & import_core9.Buffer.VERTEX) {
2642
1802
  return 34962;
2643
1803
  }
2644
- if (usage & import_core10.Buffer.UNIFORM) {
1804
+ if (usage & import_core9.Buffer.UNIFORM) {
2645
1805
  return 35345;
2646
1806
  }
2647
1807
  return 34962;
2648
1808
  }
2649
1809
  function getWebGLUsage(usage) {
2650
- if (usage & import_core10.Buffer.INDEX) {
1810
+ if (usage & import_core9.Buffer.INDEX) {
2651
1811
  return 35044;
2652
1812
  }
2653
- if (usage & import_core10.Buffer.VERTEX) {
1813
+ if (usage & import_core9.Buffer.VERTEX) {
2654
1814
  return 35044;
2655
1815
  }
2656
- if (usage & import_core10.Buffer.UNIFORM) {
1816
+ if (usage & import_core9.Buffer.UNIFORM) {
2657
1817
  return 35048;
2658
1818
  }
2659
1819
  return 35044;
2660
1820
  }
2661
- var import_core10, WEBGLBuffer;
1821
+ var import_core9, WEBGLBuffer;
2662
1822
  var init_webgl_buffer = __esm({
2663
1823
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-buffer.js"() {
2664
- import_core10 = __toESM(require_core2(), 1);
2665
- WEBGLBuffer = class extends import_core10.Buffer {
1824
+ import_core9 = __toESM(require_core2(), 1);
1825
+ WEBGLBuffer = class extends import_core9.Buffer {
2666
1826
  device;
2667
1827
  gl;
2668
1828
  handle;
@@ -2855,12 +2015,12 @@ var __exports__ = (() => {
2855
2015
  function getFirstCompilerLogLine(shaderLog) {
2856
2016
  return shaderLog.split(/\r?\n/).find((line) => line.trim())?.trim();
2857
2017
  }
2858
- var import_core11, WEBGLShader;
2018
+ var import_core10, WEBGLShader;
2859
2019
  var init_webgl_shader = __esm({
2860
2020
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shader.js"() {
2861
- import_core11 = __toESM(require_core2(), 1);
2021
+ import_core10 = __toESM(require_core2(), 1);
2862
2022
  init_parse_shader_compiler_log();
2863
- WEBGLShader = class extends import_core11.Shader {
2023
+ WEBGLShader = class extends import_core10.Shader {
2864
2024
  device;
2865
2025
  handle;
2866
2026
  _compilationInfoLog = "";
@@ -2933,9 +2093,9 @@ ${source}`;
2933
2093
  }
2934
2094
  return;
2935
2095
  }
2936
- import_core11.log.once(1, "Shader compilation is asynchronous")();
2096
+ import_core10.log.once(1, "Shader compilation is asynchronous")();
2937
2097
  return this._waitForCompilationComplete().then(() => {
2938
- import_core11.log.info(2, `Shader ${this.id} - async compilation complete: ${this.compilationStatus}`)();
2098
+ import_core10.log.info(2, `Shader ${this.id} - async compilation complete: ${this.compilationStatus}`)();
2939
2099
  this._getCompilationStatus();
2940
2100
  this.debugShader();
2941
2101
  });
@@ -3112,7 +2272,7 @@ Source: ${sourceLine}` : "";
3112
2272
  gl.stencilMaskSeparate(1029, mask);
3113
2273
  }
3114
2274
  if (parameters.stencilReadMask) {
3115
- import_core12.log.warn("stencilReadMask not supported under WebGL");
2275
+ import_core11.log.warn("stencilReadMask not supported under WebGL");
3116
2276
  }
3117
2277
  if (parameters.stencilCompare) {
3118
2278
  const mask = parameters.stencilReadMask || 4294967295;
@@ -3225,10 +2385,10 @@ Source: ${sourceLine}` : "";
3225
2385
  }
3226
2386
  return isEmpty;
3227
2387
  }
3228
- var import_core12;
2388
+ var import_core11;
3229
2389
  var init_device_parameters = __esm({
3230
2390
  "../../node_modules/@luma.gl/webgl/dist/adapter/converters/device-parameters.js"() {
3231
- import_core12 = __toESM(require_core2(), 1);
2391
+ import_core11 = __toESM(require_core2(), 1);
3232
2392
  init_unified_parameter_api();
3233
2393
  }
3234
2394
  });
@@ -3317,12 +2477,12 @@ Source: ${sourceLine}` : "";
3317
2477
  });
3318
2478
 
3319
2479
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-sampler.js
3320
- var import_core13, WEBGLSampler;
2480
+ var import_core12, WEBGLSampler;
3321
2481
  var init_webgl_sampler = __esm({
3322
2482
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-sampler.js"() {
3323
- import_core13 = __toESM(require_core2(), 1);
2483
+ import_core12 = __toESM(require_core2(), 1);
3324
2484
  init_sampler_parameters();
3325
- WEBGLSampler = class extends import_core13.Sampler {
2485
+ WEBGLSampler = class extends import_core12.Sampler {
3326
2486
  device;
3327
2487
  handle;
3328
2488
  parameters;
@@ -3397,18 +2557,18 @@ Source: ${sourceLine}` : "";
3397
2557
  });
3398
2558
 
3399
2559
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture-view.js
3400
- var import_core14, WEBGLTextureView;
2560
+ var import_core13, WEBGLTextureView;
3401
2561
  var init_webgl_texture_view = __esm({
3402
2562
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture-view.js"() {
3403
- import_core14 = __toESM(require_core2(), 1);
3404
- WEBGLTextureView = class extends import_core14.TextureView {
2563
+ import_core13 = __toESM(require_core2(), 1);
2564
+ WEBGLTextureView = class extends import_core13.TextureView {
3405
2565
  device;
3406
2566
  gl;
3407
2567
  handle;
3408
2568
  // Does not have a WebGL representation
3409
2569
  texture;
3410
2570
  constructor(device, props) {
3411
- super(device, { ...import_core14.Texture.defaultProps, ...props });
2571
+ super(device, { ...import_core13.Texture.defaultProps, ...props });
3412
2572
  this.device = device;
3413
2573
  this.gl = this.device.gl;
3414
2574
  this.handle = null;
@@ -3463,14 +2623,19 @@ Source: ${sourceLine}` : "";
3463
2623
  switch (dimension) {
3464
2624
  case "1d":
3465
2625
  break;
2626
+ // not supported in any WebGL version
3466
2627
  case "2d":
3467
2628
  return 3553;
2629
+ // supported in WebGL1
3468
2630
  case "3d":
3469
2631
  return 32879;
2632
+ // supported in WebGL2
3470
2633
  case "cube":
3471
2634
  return 34067;
2635
+ // supported in WebGL1
3472
2636
  case "2d-array":
3473
2637
  return 35866;
2638
+ // supported in WebGL2
3474
2639
  case "cube-array":
3475
2640
  break;
3476
2641
  }
@@ -3479,16 +2644,16 @@ Source: ${sourceLine}` : "";
3479
2644
  function getWebGLCubeFaceTarget(glTarget, dimension, level) {
3480
2645
  return dimension === "cube" ? 34069 + level : glTarget;
3481
2646
  }
3482
- var import_core15, WEBGLTexture;
2647
+ var import_core14, WEBGLTexture;
3483
2648
  var init_webgl_texture = __esm({
3484
2649
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-texture.js"() {
3485
- import_core15 = __toESM(require_core2(), 1);
2650
+ import_core14 = __toESM(require_core2(), 1);
3486
2651
  init_webgl_texture_table();
3487
2652
  init_sampler_parameters();
3488
2653
  init_with_parameters();
3489
2654
  init_webgl_texture_view();
3490
2655
  init_shader_formats();
3491
- WEBGLTexture = class extends import_core15.Texture {
2656
+ WEBGLTexture = class extends import_core14.Texture {
3492
2657
  // readonly MAX_ATTRIBUTES: number;
3493
2658
  device;
3494
2659
  gl;
@@ -3801,7 +2966,7 @@ Source: ${sourceLine}` : "";
3801
2966
  const options = this._getSupportedColorReadOptions(options_);
3802
2967
  const memoryLayout = this.computeMemoryLayout(options);
3803
2968
  const shaderType = convertGLDataTypeToDataType(this.glType);
3804
- const ArrayType = (0, import_core15.getTypedArrayConstructor)(shaderType);
2969
+ const ArrayType = (0, import_core14.getTypedArrayConstructor)(shaderType);
3805
2970
  const targetArray = new ArrayType(memoryLayout.byteLength / ArrayType.BYTES_PER_ELEMENT);
3806
2971
  this._readColorTextureLayers(options, memoryLayout, (destinationByteOffset) => {
3807
2972
  const layerView = new ArrayType(targetArray.buffer, targetArray.byteOffset + destinationByteOffset, memoryLayout.bytesPerImage / ArrayType.BYTES_PER_ELEMENT);
@@ -3874,7 +3039,7 @@ Source: ${sourceLine}` : "";
3874
3039
  this._assertWritable("generate mipmaps for");
3875
3040
  const isFilterableAndRenderable = this.device.isTextureFormatRenderable(this.props.format) && this.device.isTextureFormatFilterable(this.props.format);
3876
3041
  if (!isFilterableAndRenderable) {
3877
- import_core15.log.warn(`${this} is not renderable or filterable, may not be able to generate mipmaps`)();
3042
+ import_core14.log.warn(`${this} is not renderable or filterable, may not be able to generate mipmaps`)();
3878
3043
  if (!options?.force) {
3879
3044
  return;
3880
3045
  }
@@ -3883,7 +3048,7 @@ Source: ${sourceLine}` : "";
3883
3048
  this.gl.bindTexture(this.glTarget, this.handle);
3884
3049
  this.gl.generateMipmap(this.glTarget);
3885
3050
  } catch (error) {
3886
- import_core15.log.warn(`Error generating mipmap for ${this}: ${error.message}`)();
3051
+ import_core14.log.warn(`Error generating mipmap for ${this}: ${error.message}`)();
3887
3052
  } finally {
3888
3053
  this.gl.bindTexture(this.glTarget, null);
3889
3054
  }
@@ -3893,7 +3058,7 @@ Source: ${sourceLine}` : "";
3893
3058
  * Sets sampler parameters on texture
3894
3059
  */
3895
3060
  _setSamplerParameters(parameters) {
3896
- import_core15.log.log(2, `${this.id} sampler parameters`, this.device.getGLKeys(parameters))();
3061
+ import_core14.log.log(2, `${this.id} sampler parameters`, this.device.getGLKeys(parameters))();
3897
3062
  this.gl.bindTexture(this.glTarget, this.handle);
3898
3063
  for (const [pname, pvalue] of Object.entries(parameters)) {
3899
3064
  const param = Number(pname);
@@ -4010,6 +3175,7 @@ Source: ${sourceLine}` : "";
4010
3175
  return gl.uniform3iv(location, arrayValue);
4011
3176
  case 35673:
4012
3177
  return gl.uniform4iv(location, arrayValue);
3178
+ // WEBGL2 - unsigned integers
4013
3179
  case 5125:
4014
3180
  return gl2.uniform1uiv(location, arrayValue, 1);
4015
3181
  case 36294:
@@ -4018,12 +3184,15 @@ Source: ${sourceLine}` : "";
4018
3184
  return gl2.uniform3uiv(location, arrayValue, 3);
4019
3185
  case 36296:
4020
3186
  return gl2.uniform4uiv(location, arrayValue, 4);
3187
+ // WebGL2 - quadratic matrices
3188
+ // false: don't transpose the matrix
4021
3189
  case 35674:
4022
3190
  return gl.uniformMatrix2fv(location, false, arrayValue);
4023
3191
  case 35675:
4024
3192
  return gl.uniformMatrix3fv(location, false, arrayValue);
4025
3193
  case 35676:
4026
3194
  return gl.uniformMatrix4fv(location, false, arrayValue);
3195
+ // WebGL2 - rectangular matrices
4027
3196
  case 35685:
4028
3197
  return gl2.uniformMatrix2x3fv(location, false, arrayValue);
4029
3198
  case 35686:
@@ -4054,7 +3223,7 @@ Source: ${sourceLine}` : "";
4054
3223
  for (const attribute of overrideLayout?.attributes || []) {
4055
3224
  const baseAttribute = mergedLayout.attributes.find((attr) => attr.name === attribute.name);
4056
3225
  if (!baseAttribute) {
4057
- import_core16.log.warn(`shader layout attribute ${attribute.name} not present in shader`);
3226
+ import_core15.log.warn(`shader layout attribute ${attribute.name} not present in shader`);
4058
3227
  } else {
4059
3228
  baseAttribute.type = attribute.type || baseAttribute.type;
4060
3229
  baseAttribute.stepMode = attribute.stepMode || baseAttribute.stepMode;
@@ -4063,7 +3232,7 @@ Source: ${sourceLine}` : "";
4063
3232
  for (const binding of overrideLayout?.bindings || []) {
4064
3233
  const baseBinding = getShaderLayoutBindingByName(mergedLayout, binding.name);
4065
3234
  if (!baseBinding) {
4066
- import_core16.log.warn(`shader layout binding ${binding.name} not present in shader`);
3235
+ import_core15.log.warn(`shader layout binding ${binding.name} not present in shader`);
4067
3236
  continue;
4068
3237
  }
4069
3238
  Object.assign(baseBinding, binding);
@@ -4076,16 +3245,16 @@ Source: ${sourceLine}` : "";
4076
3245
  function getBindingValueForLayoutBinding(bindings, bindingName) {
4077
3246
  return bindings[bindingName] || bindings[`${bindingName}Uniforms`] || bindings[bindingName.replace(/Uniforms$/, "")];
4078
3247
  }
4079
- var import_core16, WEBGLRenderPipeline;
3248
+ var import_core15, WEBGLRenderPipeline;
4080
3249
  var init_webgl_render_pipeline = __esm({
4081
3250
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pipeline.js"() {
4082
- import_core16 = __toESM(require_core2(), 1);
3251
+ import_core15 = __toESM(require_core2(), 1);
4083
3252
  init_set_uniform();
4084
3253
  init_webgl_buffer();
4085
3254
  init_webgl_framebuffer();
4086
3255
  init_webgl_texture();
4087
3256
  init_webgl_texture_view();
4088
- WEBGLRenderPipeline = class extends import_core16.RenderPipeline {
3257
+ WEBGLRenderPipeline = class extends import_core15.RenderPipeline {
4089
3258
  /** The WebGL device that created this render pipeline */
4090
3259
  device;
4091
3260
  /** Handle to underlying WebGL program */
@@ -4132,17 +3301,17 @@ Source: ${sourceLine}` : "";
4132
3301
  }
4133
3302
  /** @deprecated Set bindings on RenderPass instead. Will be removed in the next major release. */
4134
3303
  setBindings(bindings, options) {
4135
- const flatBindings = (0, import_core16.flattenBindingsByGroup)((0, import_core16.normalizeBindingsByGroup)(this.shaderLayout, bindings));
3304
+ const flatBindings = (0, import_core15.flattenBindingsByGroup)((0, import_core15.normalizeBindingsByGroup)(this.shaderLayout, bindings));
4136
3305
  for (const [name, value] of Object.entries(flatBindings)) {
4137
3306
  const binding = getShaderLayoutBindingByName(this.shaderLayout, name);
4138
3307
  if (!binding) {
4139
3308
  const validBindings = this.shaderLayout.bindings.map((binding_) => `"${binding_.name}"`).join(", ");
4140
3309
  if (!options?.disableWarnings) {
4141
- import_core16.log.warn(`No binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`, value)();
3310
+ import_core15.log.warn(`No binding "${name}" in render pipeline "${this.id}", expected one of ${validBindings}`, value)();
4142
3311
  }
4143
3312
  } else {
4144
3313
  if (!value) {
4145
- import_core16.log.warn(`Unsetting binding "${name}" in render pipeline "${this.id}"`)();
3314
+ import_core15.log.warn(`Unsetting binding "${name}" in render pipeline "${this.id}"`)();
4146
3315
  }
4147
3316
  switch (binding.type) {
4148
3317
  case "uniform":
@@ -4156,7 +3325,7 @@ Source: ${sourceLine}` : "";
4156
3325
  }
4157
3326
  break;
4158
3327
  case "sampler":
4159
- import_core16.log.warn(`Ignoring sampler ${name}`)();
3328
+ import_core15.log.warn(`Ignoring sampler ${name}`)();
4160
3329
  break;
4161
3330
  default:
4162
3331
  throw new Error(binding.type);
@@ -4171,7 +3340,7 @@ Source: ${sourceLine}` : "";
4171
3340
  */
4172
3341
  draw(options) {
4173
3342
  const webglRenderPass = options.renderPass;
4174
- const drawBindings = options.bindGroups ? (0, import_core16.flattenBindingsByGroup)(options.bindGroups) : options.bindings || this.bindings;
3343
+ const drawBindings = options.bindGroups ? (0, import_core15.flattenBindingsByGroup)(options.bindGroups) : options.bindings || this.bindings;
4175
3344
  webglRenderPass.setPipeline(this);
4176
3345
  webglRenderPass.setBindings(drawBindings);
4177
3346
  webglRenderPass.setVertexArray(options.vertexArray);
@@ -4199,7 +3368,7 @@ Source: ${sourceLine}` : "";
4199
3368
  let texturesRenderable = true;
4200
3369
  for (const bindingInfo of this.shaderLayout.bindings) {
4201
3370
  if (!getBindingValueForLayoutBinding(bindings, bindingInfo.name)) {
4202
- import_core16.log.warn(`Binding ${bindingInfo.name} not found in ${this.id}`)();
3371
+ import_core15.log.warn(`Binding ${bindingInfo.name} not found in ${this.id}`)();
4203
3372
  texturesRenderable = false;
4204
3373
  }
4205
3374
  }
@@ -4246,7 +3415,7 @@ Source: ${sourceLine}` : "";
4246
3415
  } else if (value instanceof WEBGLTexture) {
4247
3416
  texture = value;
4248
3417
  } else if (value instanceof WEBGLFramebuffer && value.colorAttachments[0] instanceof WEBGLTextureView) {
4249
- import_core16.log.warn("Passing framebuffer in texture binding may be deprecated. Use fbo.colorAttachments[0] instead")();
3418
+ import_core15.log.warn("Passing framebuffer in texture binding may be deprecated. Use fbo.colorAttachments[0] instead")();
4250
3419
  texture = value.colorAttachments[0].texture;
4251
3420
  } else {
4252
3421
  throw new Error("No texture");
@@ -4455,7 +3624,7 @@ Source: ${sourceLine}` : "";
4455
3624
  }
4456
3625
  const { name, type: glUniformType, size } = activeInfo;
4457
3626
  const uniformType = convertGLUniformTypeToShaderVariableType(glUniformType);
4458
- const { type, components } = (0, import_core17.getVariableShaderTypeInfo)(uniformType);
3627
+ const { type, components } = (0, import_core16.getVariableShaderTypeInfo)(uniformType);
4459
3628
  varyings.push({ location, name, type, size: size * components });
4460
3629
  }
4461
3630
  varyings.sort((a, b) => a.location - b.location);
@@ -4539,7 +3708,7 @@ Source: ${sourceLine}` : "";
4539
3708
  const blockAlias = blockInfo.name.replace(/Uniforms$/, "");
4540
3709
  if (uniformInstancePrefixes.size === 1 && !uniformInstancePrefixes.has(blockInfo.name) && !uniformInstancePrefixes.has(blockAlias)) {
4541
3710
  const [instanceName] = uniformInstancePrefixes;
4542
- import_core17.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.`)();
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.`)();
4543
3712
  }
4544
3713
  uniformBlocks.push(blockInfo);
4545
3714
  }
@@ -4556,7 +3725,7 @@ Source: ${sourceLine}` : "";
4556
3725
  }
4557
3726
  const UNIFORM_NAME_REGEXP = /([^[]*)(\[[0-9]+\])?/;
4558
3727
  const matches = UNIFORM_NAME_REGEXP.exec(name);
4559
- const uniformName = (0, import_core17.assertDefined)(matches?.[1], `Failed to parse GLSL uniform name ${name}`);
3728
+ const uniformName = (0, import_core16.assertDefined)(matches?.[1], `Failed to parse GLSL uniform name ${name}`);
4560
3729
  return {
4561
3730
  name: uniformName,
4562
3731
  // TODO - is this a bug, shouldn't we return the value?
@@ -4564,23 +3733,23 @@ Source: ${sourceLine}` : "";
4564
3733
  isArray: Boolean(matches?.[2])
4565
3734
  };
4566
3735
  }
4567
- var import_core17;
3736
+ var import_core16;
4568
3737
  var init_get_shader_layout_from_glsl = __esm({
4569
3738
  "../../node_modules/@luma.gl/webgl/dist/adapter/helpers/get-shader-layout-from-glsl.js"() {
4570
- import_core17 = __toESM(require_core2(), 1);
3739
+ import_core16 = __toESM(require_core2(), 1);
4571
3740
  init_webgl_shadertypes();
4572
3741
  }
4573
3742
  });
4574
3743
 
4575
3744
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shared-render-pipeline.js
4576
- var import_core18, LOG_PROGRAM_PERF_PRIORITY, WEBGLSharedRenderPipeline;
3745
+ var import_core17, LOG_PROGRAM_PERF_PRIORITY, WEBGLSharedRenderPipeline;
4577
3746
  var init_webgl_shared_render_pipeline = __esm({
4578
3747
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-shared-render-pipeline.js"() {
4579
- import_core18 = __toESM(require_core2(), 1);
3748
+ import_core17 = __toESM(require_core2(), 1);
4580
3749
  init_get_shader_layout_from_glsl();
4581
3750
  init_webgl_shadertypes();
4582
3751
  LOG_PROGRAM_PERF_PRIORITY = 4;
4583
- WEBGLSharedRenderPipeline = class extends import_core18.SharedRenderPipeline {
3752
+ WEBGLSharedRenderPipeline = class extends import_core17.SharedRenderPipeline {
4584
3753
  device;
4585
3754
  handle;
4586
3755
  vs;
@@ -4597,9 +3766,9 @@ Source: ${sourceLine}` : "";
4597
3766
  this.device.gl.transformFeedbackVaryings(this.handle, props.varyings, props.bufferMode || 35981);
4598
3767
  }
4599
3768
  this._linkShaders();
4600
- import_core18.log.time(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
3769
+ import_core17.log.time(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
4601
3770
  this.introspectedLayout = getShaderLayoutFromGLSL(this.device.gl, this.handle);
4602
- import_core18.log.timeEnd(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
3771
+ import_core17.log.timeEnd(3, `RenderPipeline ${this.id} - shaderLayout introspection`)();
4603
3772
  }
4604
3773
  destroy() {
4605
3774
  if (this.destroyed) {
@@ -4614,17 +3783,17 @@ Source: ${sourceLine}` : "";
4614
3783
  const { gl } = this.device;
4615
3784
  gl.attachShader(this.handle, this.vs.handle);
4616
3785
  gl.attachShader(this.handle, this.fs.handle);
4617
- import_core18.log.time(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
3786
+ import_core17.log.time(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
4618
3787
  gl.linkProgram(this.handle);
4619
- import_core18.log.timeEnd(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
3788
+ import_core17.log.timeEnd(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this.id}`)();
4620
3789
  if (!this.device.features.has("compilation-status-async-webgl")) {
4621
3790
  const status2 = this._getLinkStatus();
4622
3791
  this._reportLinkStatus(status2);
4623
3792
  return;
4624
3793
  }
4625
- import_core18.log.once(1, "RenderPipeline linking is asynchronous")();
3794
+ import_core17.log.once(1, "RenderPipeline linking is asynchronous")();
4626
3795
  await this._waitForLinkComplete();
4627
- import_core18.log.info(2, `RenderPipeline ${this.id} - async linking complete: ${this.linkStatus}`)();
3796
+ import_core17.log.info(2, `RenderPipeline ${this.id} - async linking complete: ${this.linkStatus}`)();
4628
3797
  const status = this._getLinkStatus();
4629
3798
  this._reportLinkStatus(status);
4630
3799
  }
@@ -4755,7 +3924,7 @@ Source: ${sourceLine}` : "";
4755
3924
  }
4756
3925
  function _copyTextureToBuffer(device, options) {
4757
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;
4758
- if (sourceTexture instanceof import_core19.Texture) {
3927
+ if (sourceTexture instanceof import_core18.Texture) {
4759
3928
  sourceTexture.readBuffer({
4760
3929
  x: origin[0] ?? 0,
4761
3930
  y: origin[1] ?? 0,
@@ -4781,7 +3950,7 @@ Source: ${sourceLine}` : "";
4781
3950
  const webglBuffer = destinationBuffer;
4782
3951
  const sourceWidth = width || framebuffer.width;
4783
3952
  const sourceHeight = height || framebuffer.height;
4784
- const colorAttachment0 = (0, import_core19.assertDefined)(framebuffer.colorAttachments[0]);
3953
+ const colorAttachment0 = (0, import_core18.assertDefined)(framebuffer.colorAttachments[0]);
4785
3954
  const sourceParams = getTextureFormatWebGL(colorAttachment0.texture.props.format);
4786
3955
  const sourceFormat = sourceParams.format;
4787
3956
  const sourceType = sourceParams.type;
@@ -4859,7 +4028,7 @@ Source: ${sourceLine}` : "";
4859
4028
  }
4860
4029
  }
4861
4030
  function getFramebuffer(source) {
4862
- if (source instanceof import_core19.Texture) {
4031
+ if (source instanceof import_core18.Texture) {
4863
4032
  const { width, height, id } = source;
4864
4033
  const framebuffer = source.device.createFramebuffer({
4865
4034
  id: `framebuffer-for-${id}`,
@@ -4871,13 +4040,13 @@ Source: ${sourceLine}` : "";
4871
4040
  }
4872
4041
  return { framebuffer: source, destroyFramebuffer: false };
4873
4042
  }
4874
- var import_core19, WEBGLCommandBuffer;
4043
+ var import_core18, WEBGLCommandBuffer;
4875
4044
  var init_webgl_command_buffer = __esm({
4876
4045
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-buffer.js"() {
4877
- import_core19 = __toESM(require_core2(), 1);
4046
+ import_core18 = __toESM(require_core2(), 1);
4878
4047
  init_webgl_texture_table();
4879
4048
  init_webgl_texture();
4880
- WEBGLCommandBuffer = class extends import_core19.CommandBuffer {
4049
+ WEBGLCommandBuffer = class extends import_core18.CommandBuffer {
4881
4050
  device;
4882
4051
  handle = null;
4883
4052
  commands = [];
@@ -4900,6 +4069,9 @@ Source: ${sourceLine}` : "";
4900
4069
  case "copy-texture-to-texture":
4901
4070
  _copyTextureToTexture(this.device, command.options);
4902
4071
  break;
4072
+ // case 'clear-texture':
4073
+ // _clearTexture(this.device, command.options);
4074
+ // break;
4903
4075
  default:
4904
4076
  throw new Error(command.name);
4905
4077
  }
@@ -4948,16 +4120,16 @@ Source: ${sourceLine}` : "";
4948
4120
  });
4949
4121
 
4950
4122
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pass.js
4951
- var import_core20, COLOR_CHANNELS, WEBGLRenderPass;
4123
+ var import_core19, COLOR_CHANNELS, WEBGLRenderPass;
4952
4124
  var init_webgl_render_pass = __esm({
4953
4125
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-render-pass.js"() {
4954
- import_core20 = __toESM(require_core2(), 1);
4126
+ import_core19 = __toESM(require_core2(), 1);
4955
4127
  init_with_parameters();
4956
4128
  init_unified_parameter_api();
4957
4129
  init_webgl_topology_utils();
4958
4130
  init_device_parameters();
4959
4131
  COLOR_CHANNELS = [1, 2, 4, 8];
4960
- WEBGLRenderPass = class extends import_core20.RenderPass {
4132
+ WEBGLRenderPass = class extends import_core19.RenderPass {
4961
4133
  device;
4962
4134
  handle = null;
4963
4135
  /** Parameters that should be applied before each draw call */
@@ -5070,7 +4242,7 @@ Source: ${sourceLine}` : "";
5070
4242
  if (!this.pipeline) {
5071
4243
  throw new Error("RenderPass.setPipeline() must be called before setBindings()");
5072
4244
  }
5073
- this.bindings = (0, import_core20.flattenBindingsByGroup)((0, import_core20.normalizeBindingsByGroup)(this.pipeline.shaderLayout, bindings));
4245
+ this.bindings = (0, import_core19.flattenBindingsByGroup)((0, import_core19.normalizeBindingsByGroup)(this.pipeline.shaderLayout, bindings));
5074
4246
  this.bindingsPipeline = this.pipeline;
5075
4247
  }
5076
4248
  setVertexArray(vertexArray) {
@@ -5095,11 +4267,11 @@ Source: ${sourceLine}` : "";
5095
4267
  const glIndexType = vertexArray.indexBuffer?.glIndexType;
5096
4268
  const indexedDrawCount = indexCount ?? vertexCount ?? 0;
5097
4269
  if (pipeline.linkStatus !== "success") {
5098
- import_core20.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - waiting for shader linking`)();
4270
+ import_core19.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - waiting for shader linking`)();
5099
4271
  return false;
5100
4272
  }
5101
4273
  if (!pipeline._areTexturesRenderable(this.bindings)) {
5102
- import_core20.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - textures not yet loaded`)();
4274
+ import_core19.log.info(2, `RenderPipeline:${pipeline.id}.draw() aborted - textures not yet loaded`)();
5103
4275
  return false;
5104
4276
  }
5105
4277
  this.device.gl.useProgram(pipeline.handle);
@@ -5205,13 +4377,13 @@ Source: ${sourceLine}` : "";
5205
4377
  });
5206
4378
 
5207
4379
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-encoder.js
5208
- var import_core21, WEBGLCommandEncoder;
4380
+ var import_core20, WEBGLCommandEncoder;
5209
4381
  var init_webgl_command_encoder = __esm({
5210
4382
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-command-encoder.js"() {
5211
- import_core21 = __toESM(require_core2(), 1);
4383
+ import_core20 = __toESM(require_core2(), 1);
5212
4384
  init_webgl_command_buffer();
5213
4385
  init_webgl_render_pass();
5214
- WEBGLCommandEncoder = class extends import_core21.CommandEncoder {
4386
+ WEBGLCommandEncoder = class extends import_core20.CommandEncoder {
5215
4387
  device;
5216
4388
  handle = null;
5217
4389
  commandBuffer;
@@ -5268,6 +4440,91 @@ Source: ${sourceLine}` : "";
5268
4440
  }
5269
4441
  });
5270
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
+
5271
4528
  // ../../node_modules/@luma.gl/webgl/dist/utils/fill-array.js
5272
4529
  function fillArray(options) {
5273
4530
  const { target: target2, source, start = 0, count = 1 } = options;
@@ -5311,14 +4568,14 @@ Source: ${sourceLine}` : "";
5311
4568
  }
5312
4569
  return true;
5313
4570
  }
5314
- var import_core22, WEBGLVertexArray;
4571
+ var import_core21, WEBGLVertexArray;
5315
4572
  var init_webgl_vertex_array = __esm({
5316
4573
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-vertex-array.js"() {
5317
- import_core22 = __toESM(require_core2(), 1);
4574
+ import_core21 = __toESM(require_core2(), 1);
5318
4575
  init_dist();
5319
4576
  init_webgl_vertex_formats();
5320
4577
  init_fill_array();
5321
- WEBGLVertexArray = class extends import_core22.VertexArray {
4578
+ WEBGLVertexArray = class _WEBGLVertexArray extends import_core21.VertexArray {
5322
4579
  get [Symbol.toStringTag]() {
5323
4580
  return "VertexArray";
5324
4581
  }
@@ -5347,7 +4604,7 @@ Source: ${sourceLine}` : "";
5347
4604
  this.device = device;
5348
4605
  this.handle = this.device.gl.createVertexArray();
5349
4606
  this.attributeInfosByLocation = new Array(this.maxVertexAttributes).fill(null);
5350
- for (const attributeInfo of Object.values((0, import_core22.getAttributeInfosFromLayouts)(props.shaderLayout, props.bufferLayout))) {
4607
+ for (const attributeInfo of Object.values((0, import_core21.getAttributeInfosFromLayouts)(props.shaderLayout, props.bufferLayout))) {
5351
4608
  this.attributeInfosByLocation[attributeInfo.location] = attributeInfo;
5352
4609
  }
5353
4610
  }
@@ -5480,7 +4737,7 @@ Source: ${sourceLine}` : "";
5480
4737
  * TODO - convert classic arrays based on known type?
5481
4738
  */
5482
4739
  _enable(location, enable2 = true) {
5483
- const canDisableAttributeZero = WEBGLVertexArray.isConstantAttributeZeroSupported(this.device);
4740
+ const canDisableAttributeZero = _WEBGLVertexArray.isConstantAttributeZeroSupported(this.device);
5484
4741
  const canDisableAttribute = canDisableAttributeZero || location !== 0;
5485
4742
  if (enable2 || canDisableAttribute) {
5486
4743
  location = Number(location);
@@ -5510,7 +4767,7 @@ Source: ${sourceLine}` : "";
5510
4767
  this.buffer = this.buffer || this.device.createBuffer({ byteLength });
5511
4768
  updateNeeded ||= !compareConstantArrayValues(constantValue, this.bufferValue);
5512
4769
  if (updateNeeded) {
5513
- const typedArray = (0, import_core22.getScratchArray)(value.constructor, length4);
4770
+ const typedArray = (0, import_core21.getScratchArray)(value.constructor, length4);
5514
4771
  fillArray({ target: typedArray, source: constantValue, start: 0, count: length4 });
5515
4772
  this.buffer.write(typedArray);
5516
4773
  this.bufferValue = value;
@@ -5528,13 +4785,13 @@ Source: ${sourceLine}` : "";
5528
4785
  }
5529
4786
  return /^\d+$/.test(value);
5530
4787
  }
5531
- var import_core23, WEBGLTransformFeedback;
4788
+ var import_core22, WEBGLTransformFeedback;
5532
4789
  var init_webgl_transform_feedback = __esm({
5533
4790
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-transform-feedback.js"() {
5534
- import_core23 = __toESM(require_core2(), 1);
4791
+ import_core22 = __toESM(require_core2(), 1);
5535
4792
  init_dist2();
5536
4793
  init_webgl_topology_utils();
5537
- WEBGLTransformFeedback = class extends import_core23.TransformFeedback {
4794
+ WEBGLTransformFeedback = class extends import_core22.TransformFeedback {
5538
4795
  device;
5539
4796
  gl;
5540
4797
  handle;
@@ -5597,7 +4854,7 @@ Source: ${sourceLine}` : "";
5597
4854
  const { buffer, byteLength, byteOffset } = this._getBufferRange(bufferOrRange);
5598
4855
  if (location < 0) {
5599
4856
  this.unusedBuffers[locationOrName] = buffer;
5600
- import_core23.log.warn(`${this.id} unusedBuffers varying buffer ${locationOrName}`)();
4857
+ import_core22.log.warn(`${this.id} unusedBuffers varying buffer ${locationOrName}`)();
5601
4858
  return;
5602
4859
  }
5603
4860
  this.buffers[location] = { buffer, byteLength, byteOffset };
@@ -5680,11 +4937,11 @@ Source: ${sourceLine}` : "";
5680
4937
  });
5681
4938
 
5682
4939
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-query-set.js
5683
- var import_core24, WEBGLQuerySet;
4940
+ var import_core23, WEBGLQuerySet;
5684
4941
  var init_webgl_query_set = __esm({
5685
4942
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-query-set.js"() {
5686
- import_core24 = __toESM(require_core2(), 1);
5687
- WEBGLQuerySet = class extends import_core24.QuerySet {
4943
+ import_core23 = __toESM(require_core2(), 1);
4944
+ WEBGLQuerySet = class extends import_core23.QuerySet {
5688
4945
  device;
5689
4946
  handle;
5690
4947
  _timestampPairs = [];
@@ -5966,11 +5223,11 @@ Source: ${sourceLine}` : "";
5966
5223
  });
5967
5224
 
5968
5225
  // ../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-fence.js
5969
- var import_core25, WEBGLFence;
5226
+ var import_core24, WEBGLFence;
5970
5227
  var init_webgl_fence = __esm({
5971
5228
  "../../node_modules/@luma.gl/webgl/dist/adapter/resources/webgl-fence.js"() {
5972
- import_core25 = __toESM(require_core2(), 1);
5973
- WEBGLFence = class extends import_core25.Fence {
5229
+ import_core24 = __toESM(require_core2(), 1);
5230
+ WEBGLFence = class extends import_core24.Fence {
5974
5231
  device;
5975
5232
  gl;
5976
5233
  handle;
@@ -6037,6 +5294,7 @@ Source: ${sourceLine}` : "";
6037
5294
  case 36249:
6038
5295
  case 34836:
6039
5296
  return 4;
5297
+ // TODO: Add support for additional WebGL2 formats
6040
5298
  default:
6041
5299
  return 0;
6042
5300
  }
@@ -6051,6 +5309,7 @@ Source: ${sourceLine}` : "";
6051
5309
  return 2;
6052
5310
  case 5126:
6053
5311
  return 4;
5312
+ // TODO: Add support for additional WebGL2 types
6054
5313
  default:
6055
5314
  return 0;
6056
5315
  }
@@ -6089,7 +5348,7 @@ Source: ${sourceLine}` : "";
6089
5348
  sourceFormat ||= texture?.glFormat || 6408;
6090
5349
  sourceType ||= texture?.glType || 5121;
6091
5350
  target2 = getPixelArray(target2, sourceType, sourceFormat, sourceWidth, sourceHeight, sourceDepth);
6092
- const signedType = import_core26.dataTypeDecoder.getDataType(target2);
5351
+ const signedType = import_core25.dataTypeDecoder.getDataType(target2);
6093
5352
  sourceType = sourceType || convertDataTypeToGLDataType(signedType);
6094
5353
  const prevHandle = gl.bindFramebuffer(36160, handle);
6095
5354
  gl.readBuffer(36064 + sourceAttachment);
@@ -6132,7 +5391,7 @@ Source: ${sourceLine}` : "";
6132
5391
  return webglBufferTarget;
6133
5392
  }
6134
5393
  function getFramebuffer2(source) {
6135
- if (!(source instanceof import_core26.Framebuffer)) {
5394
+ if (!(source instanceof import_core25.Framebuffer)) {
6136
5395
  return { framebuffer: toFramebuffer(source), deleteFramebuffer: true };
6137
5396
  }
6138
5397
  return { framebuffer: source, deleteFramebuffer: false };
@@ -6154,14 +5413,14 @@ Source: ${sourceLine}` : "";
6154
5413
  }
6155
5414
  glType ||= 5121;
6156
5415
  const shaderType = convertGLDataTypeToDataType(glType);
6157
- const ArrayType = import_core26.dataTypeDecoder.getTypedArrayConstructor(shaderType);
5416
+ const ArrayType = import_core25.dataTypeDecoder.getTypedArrayConstructor(shaderType);
6158
5417
  const components = glFormatToComponents(glFormat);
6159
5418
  return new ArrayType(width * height * components);
6160
5419
  }
6161
- var import_core26;
5420
+ var import_core25;
6162
5421
  var init_webgl_texture_utils = __esm({
6163
5422
  "../../node_modules/@luma.gl/webgl/dist/adapter/helpers/webgl-texture-utils.js"() {
6164
- import_core26 = __toESM(require_core2(), 1);
5423
+ import_core25 = __toESM(require_core2(), 1);
6165
5424
  init_webgl_shadertypes();
6166
5425
  init_format_utils();
6167
5426
  init_shader_formats();
@@ -6203,10 +5462,10 @@ Source: ${sourceLine}` : "";
6203
5462
  }
6204
5463
  return true;
6205
5464
  }
6206
- var import_core27, WebGLDevice;
5465
+ var import_core26, WebGLDevice;
6207
5466
  var init_webgl_device = __esm({
6208
5467
  "../../node_modules/@luma.gl/webgl/dist/adapter/webgl-device.js"() {
6209
- import_core27 = __toESM(require_core2(), 1);
5468
+ import_core26 = __toESM(require_core2(), 1);
6210
5469
  init_webgl_state_tracker();
6211
5470
  init_create_browser_context();
6212
5471
  init_webgl_context_data();
@@ -6215,8 +5474,7 @@ Source: ${sourceLine}` : "";
6215
5474
  init_webgl_device_limits();
6216
5475
  init_webgl_canvas_context();
6217
5476
  init_webgl_presentation_context();
6218
- init_spector();
6219
- init_webgl_developer_tools();
5477
+ init_debug_hooks();
6220
5478
  init_webgl_texture_table();
6221
5479
  init_uid();
6222
5480
  init_webgl_buffer();
@@ -6235,7 +5493,7 @@ Source: ${sourceLine}` : "";
6235
5493
  init_unified_parameter_api();
6236
5494
  init_with_parameters();
6237
5495
  init_webgl_extensions();
6238
- WebGLDevice = class extends import_core27.Device {
5496
+ WebGLDevice = class _WebGLDevice extends import_core26.Device {
6239
5497
  static getDeviceFromContext(gl) {
6240
5498
  if (!gl) {
6241
5499
  return null;
@@ -6257,6 +5515,7 @@ Source: ${sourceLine}` : "";
6257
5515
  commandEncoder;
6258
5516
  lost;
6259
5517
  _resolveContextLost;
5518
+ _isLost = false;
6260
5519
  /** WebGL2 context. */
6261
5520
  gl;
6262
5521
  /** Store constants */
@@ -6286,12 +5545,12 @@ Source: ${sourceLine}` : "";
6286
5545
  }
6287
5546
  constructor(props) {
6288
5547
  super({ ...props, id: props.id || uid("webgl-device") });
6289
- const canvasContextProps = import_core27.Device._getCanvasContextProps(props);
5548
+ const canvasContextProps = import_core26.Device._getCanvasContextProps(props);
6290
5549
  if (!canvasContextProps) {
6291
5550
  throw new Error("WebGLDevice requires props.createCanvasContext to be set");
6292
5551
  }
6293
5552
  const existingContext = canvasContextProps.canvas?.gl ?? null;
6294
- let device = WebGLDevice.getDeviceFromContext(existingContext);
5553
+ let device = _WebGLDevice.getDeviceFromContext(existingContext);
6295
5554
  if (device) {
6296
5555
  throw new Error(`WebGL context already attached to device ${device.id}`);
6297
5556
  }
@@ -6322,10 +5581,10 @@ Source: ${sourceLine}` : "";
6322
5581
  if (!gl) {
6323
5582
  throw new Error("WebGL context creation failed");
6324
5583
  }
6325
- device = WebGLDevice.getDeviceFromContext(gl);
5584
+ device = _WebGLDevice.getDeviceFromContext(gl);
6326
5585
  if (device) {
6327
5586
  if (props._reuseDevices) {
6328
- import_core27.log.log(1, `Not creating a new Device, instead returning a reference to Device ${device.id} already attached to WebGL context`, device)();
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)();
6329
5588
  this.canvasContext.destroy();
6330
5589
  device._reused = true;
6331
5590
  return device;
@@ -6334,7 +5593,7 @@ Source: ${sourceLine}` : "";
6334
5593
  }
6335
5594
  this.handle = gl;
6336
5595
  this.gl = gl;
6337
- this.spectorJS = initializeSpectorJS({ ...this.props, gl: this.handle });
5596
+ this.spectorJS = initializeRegisteredSpectorJS({ ...this.props, gl: this.handle });
6338
5597
  const contextData = getWebGLContextData(this.handle);
6339
5598
  contextData.device = this;
6340
5599
  if (!contextData.extensions) {
@@ -6348,15 +5607,18 @@ Source: ${sourceLine}` : "";
6348
5607
  this.features.initializeFeatures();
6349
5608
  }
6350
5609
  const glState = new WebGLStateTracker(this.gl, {
6351
- log: (...args) => import_core27.log.log(1, ...args)()
5610
+ log: (...args) => import_core26.log.log(1, ...args)()
6352
5611
  });
6353
5612
  glState.trackState(this.gl, { copyState: false });
6354
5613
  if (props.debug || props.debugWebGL) {
6355
- this.gl = makeDebugContext(this.gl, { debugWebGL: true, traceWebGL: props.debugWebGL });
6356
- import_core27.log.warn("WebGL debug mode activated. Performance reduced.")();
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.")();
6357
5619
  }
6358
5620
  if (props.debugWebGL) {
6359
- import_core27.log.level = Math.max(import_core27.log.level, 1);
5621
+ import_core26.log.level = Math.max(import_core26.log.level, 1);
6360
5622
  }
6361
5623
  this.commandEncoder = new WEBGLCommandEncoder(this, { id: `${this}-command-encoder` });
6362
5624
  this.canvasContext._startObservers();
@@ -6372,14 +5634,15 @@ Source: ${sourceLine}` : "";
6372
5634
  * browser API for destroying WebGL contexts.
6373
5635
  */
6374
5636
  destroy() {
6375
- this.commandEncoder?.destroy();
6376
5637
  if (!this.props._reuseDevices && !this._reused) {
5638
+ this._isLost = true;
5639
+ this.commandEncoder?.destroy();
6377
5640
  const contextData = getWebGLContextData(this.handle);
6378
5641
  contextData.device = null;
6379
5642
  }
6380
5643
  }
6381
5644
  get isLost() {
6382
- return this.gl.isContextLost();
5645
+ return this._isLost || this.gl.isContextLost();
6383
5646
  }
6384
5647
  // IMPLEMENTATION OF ABSTRACT DEVICE
6385
5648
  createCanvasContext(props) {
@@ -6491,7 +5754,7 @@ Source: ${sourceLine}` : "";
6491
5754
  return withGLParameters(this.gl, parameters, func);
6492
5755
  }
6493
5756
  resetWebGL() {
6494
- import_core27.log.warn("WebGLDevice.resetWebGL is deprecated, use only for debugging")();
5757
+ import_core26.log.warn("WebGLDevice.resetWebGL is deprecated, use only for debugging")();
6495
5758
  resetGLParameters(this.gl);
6496
5759
  }
6497
5760
  _getDeviceSpecificTextureFormatCapabilities(capabilities) {
@@ -6563,7 +5826,7 @@ Source: ${sourceLine}` : "";
6563
5826
  this._constants = this._constants || new Array(maxVertexAttributes).fill(null);
6564
5827
  const currentConstant = this._constants[location];
6565
5828
  if (currentConstant && compareConstantArrayValues2(currentConstant, constant)) {
6566
- import_core27.log.info(1, `setConstantAttributeWebGL(${location}) could have been skipped, value unchanged`)();
5829
+ import_core26.log.info(1, `setConstantAttributeWebGL(${location}) could have been skipped, value unchanged`)();
6567
5830
  }
6568
5831
  this._constants[location] = constant;
6569
5832
  switch (constant.constructor) {
@@ -6610,9 +5873,9 @@ Source: ${sourceLine}` : "";
6610
5873
  // ../../node_modules/esri-loader/dist/umd/esri-loader.js
6611
5874
  var require_esri_loader = __commonJS({
6612
5875
  "../../node_modules/esri-loader/dist/umd/esri-loader.js"(exports, module) {
6613
- (function(global2, factory) {
6614
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.esriLoader = global2.esriLoader || {});
6615
- })(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) {
6616
5879
  "use strict";
6617
5880
  var isBrowser2 = typeof window !== "undefined";
6618
5881
  var utils = {
@@ -6805,7 +6068,7 @@ Source: ${sourceLine}` : "";
6805
6068
  exports2.setDefaultOptions = setDefaultOptions;
6806
6069
  exports2.loadCss = loadCss;
6807
6070
  Object.defineProperty(exports2, "__esModule", { value: true });
6808
- });
6071
+ }));
6809
6072
  }
6810
6073
  });
6811
6074
 
@@ -6907,12 +6170,12 @@ Source: ${sourceLine}` : "";
6907
6170
  }
6908
6171
 
6909
6172
  // dist/commons.js
6910
- var import_core28 = __toESM(require_core(), 1);
6173
+ var import_core27 = __toESM(require_core(), 1);
6911
6174
  var import_engine = __toESM(require_engine(), 1);
6912
6175
  init_dist2();
6913
6176
  async function createDeckInstance(gl) {
6914
6177
  return new Promise((resolve) => {
6915
- const deckInstance = new import_core28.Deck({
6178
+ const deckInstance = new import_core27.Deck({
6916
6179
  // Input is handled by the ArcGIS API for JavaScript.
6917
6180
  controller: false,
6918
6181
  // We use the same WebGL context as the ArcGIS API for JavaScript.
@@ -7352,8 +6615,7 @@ void main(void) {
7352
6615
  function deepMergeViewState(a, b) {
7353
6616
  const result = { ...a };
7354
6617
  for (const key in b) {
7355
- if (key === "id")
7356
- continue;
6618
+ if (key === "id") continue;
7357
6619
  if (Array.isArray(result[key]) && Array.isArray(b[key])) {
7358
6620
  result[key] = mergeNumericArray(result[key], b[key]);
7359
6621
  } else {
@@ -8699,7 +7961,7 @@ void main(void) {
8699
7961
  var dist = distance;
8700
7962
  var sqrDist = squaredDistance;
8701
7963
  var sqrLen = squaredLength;
8702
- var forEach = function() {
7964
+ var forEach = (function() {
8703
7965
  const vec = create();
8704
7966
  return function(a, stride, offset, count, fn, arg) {
8705
7967
  let i;
@@ -8724,7 +7986,7 @@ void main(void) {
8724
7986
  }
8725
7987
  return a;
8726
7988
  };
8727
- }();
7989
+ })();
8728
7990
 
8729
7991
  // ../../node_modules/@math.gl/core/dist/lib/gl-matrix-extras.js
8730
7992
  function vec2_transformMat4AsVector(out, a, m) {
@@ -9152,7 +8414,7 @@ void main(void) {
9152
8414
  var sqrDist2 = squaredDistance2;
9153
8415
  var len2 = length2;
9154
8416
  var sqrLen2 = squaredLength2;
9155
- var forEach2 = function() {
8417
+ var forEach2 = (function() {
9156
8418
  const vec = create2();
9157
8419
  return function(a, stride, offset, count, fn, arg) {
9158
8420
  let i;
@@ -9179,15 +8441,15 @@ void main(void) {
9179
8441
  }
9180
8442
  return a;
9181
8443
  };
9182
- }();
8444
+ })();
9183
8445
 
9184
8446
  // ../../node_modules/@math.gl/core/dist/classes/vector3.js
9185
8447
  var ORIGIN = [0, 0, 0];
9186
8448
  var ZERO;
9187
- var Vector3 = class extends Vector {
8449
+ var Vector3 = class _Vector3 extends Vector {
9188
8450
  static get ZERO() {
9189
8451
  if (!ZERO) {
9190
- ZERO = new Vector3(0, 0, 0);
8452
+ ZERO = new _Vector3(0, 0, 0);
9191
8453
  Object.freeze(ZERO);
9192
8454
  }
9193
8455
  return ZERO;
@@ -11166,7 +10428,7 @@ void main(void) {
11166
10428
  var sqrDist3 = squaredDistance3;
11167
10429
  var len3 = length3;
11168
10430
  var sqrLen3 = squaredLength3;
11169
- var forEach3 = function() {
10431
+ var forEach3 = (function() {
11170
10432
  const vec = create4();
11171
10433
  return function(a, stride, offset, count, fn, arg) {
11172
10434
  let i;
@@ -11195,7 +10457,7 @@ void main(void) {
11195
10457
  }
11196
10458
  return a;
11197
10459
  };
11198
- }();
10460
+ })();
11199
10461
 
11200
10462
  // ../../node_modules/@math.gl/core/dist/classes/matrix4.js
11201
10463
  var INDICES;
@@ -12076,7 +11338,6 @@ void main(void) {
12076
11338
 
12077
11339
  // ../../node_modules/mjolnir.js/dist/utils/globals.js
12078
11340
  var userAgent = typeof navigator !== "undefined" && navigator.userAgent ? navigator.userAgent.toLowerCase() : "";
12079
- var window_2 = typeof window !== "undefined" ? window : global;
12080
11341
 
12081
11342
  // ../../node_modules/mjolnir.js/dist/inputs/wheel-input.js
12082
11343
  var firefox = userAgent.indexOf("firefox") !== -1;
@@ -12163,7 +11424,7 @@ void main(void) {
12163
11424
  }
12164
11425
  return matrix;
12165
11426
  }
12166
- var _Viewport = class {
11427
+ var _Viewport = class _Viewport {
12167
11428
  // eslint-disable-next-line complexity
12168
11429
  constructor(opts = {}) {
12169
11430
  this._frustumPlanes = {};
@@ -12202,8 +11463,8 @@ void main(void) {
12202
11463
  }
12203
11464
  return PROJECTION_MODE.IDENTITY;
12204
11465
  }
12205
- // Two viewports are equal if width and height are identical, and if
12206
- // their view and projection matrices are (approximately) equal.
11466
+ // Two viewports are equal if their dimensions, common-space scale, and
11467
+ // view and projection matrices are (approximately) equal.
12207
11468
  equals(viewport) {
12208
11469
  if (!(viewport instanceof _Viewport)) {
12209
11470
  return false;
@@ -12211,7 +11472,7 @@ void main(void) {
12211
11472
  if (this === viewport) {
12212
11473
  return true;
12213
11474
  }
12214
- return viewport.width === this.width && viewport.height === this.height && viewport.scale === this.scale && equals(viewport.projectionMatrix, this.projectionMatrix) && equals(viewport.viewMatrix, this.viewMatrix);
11475
+ return viewport.width === this.width && viewport.height === this.height && viewport.scale === this.scale && viewport.projectionMode === this.projectionMode && viewport.resolution === this.resolution && equals(viewport.distanceScales.unitsPerMeter, this.distanceScales.unitsPerMeter) && equals(viewport.projectionMatrix, this.projectionMatrix) && equals(viewport.viewMatrix, this.viewMatrix);
12215
11476
  }
12216
11477
  /**
12217
11478
  * Projects xyz (possibly latitude and longitude) to pixel coordinates in window
@@ -12426,11 +11687,11 @@ void main(void) {
12426
11687
  }
12427
11688
  }
12428
11689
  };
11690
+ _Viewport.displayName = "Viewport";
12429
11691
  var Viewport = _Viewport;
12430
- Viewport.displayName = "Viewport";
12431
11692
 
12432
11693
  // ../core/src/viewports/web-mercator-viewport.ts
12433
- var _WebMercatorViewport = class extends Viewport {
11694
+ var _WebMercatorViewport = class _WebMercatorViewport extends Viewport {
12434
11695
  /* eslint-disable complexity, max-statements */
12435
11696
  constructor(opts = {}) {
12436
11697
  const {
@@ -12546,6 +11807,10 @@ void main(void) {
12546
11807
  }
12547
11808
  return this._subViewports;
12548
11809
  }
11810
+ /** Returns whether two Web Mercator viewports use the same projection settings. */
11811
+ equals(viewport) {
11812
+ return viewport instanceof _WebMercatorViewport && viewport._pseudoMeters === this._pseudoMeters && super.equals(viewport);
11813
+ }
12549
11814
  projectPosition(xyz) {
12550
11815
  if (this._pseudoMeters) {
12551
11816
  return super.projectPosition(xyz);
@@ -12611,8 +11876,8 @@ void main(void) {
12611
11876
  return new _WebMercatorViewport({ width, height, longitude, latitude, zoom });
12612
11877
  }
12613
11878
  };
11879
+ _WebMercatorViewport.displayName = "WebMercatorViewport";
12614
11880
  var WebMercatorViewport2 = _WebMercatorViewport;
12615
- WebMercatorViewport2.displayName = "WebMercatorViewport";
12616
11881
 
12617
11882
  // ../core/src/transitions/transition.ts
12618
11883
  var Transition = class {
@@ -12695,6 +11960,8 @@ void main(void) {
12695
11960
  // ../core/src/controllers/transition-manager.ts
12696
11961
  var noop2 = () => {
12697
11962
  };
11963
+ var PRESERVE_CONSTRAINT_CONTEXT = { mode: "preserve" };
11964
+ var HARD_CONSTRAINT_CONTEXT = { mode: "hard" };
12698
11965
  var TRANSITION_EVENTS = {
12699
11966
  BREAK: 1,
12700
11967
  SNAP_TO_END: 2,
@@ -12711,10 +11978,13 @@ void main(void) {
12711
11978
  } = transition;
12712
11979
  const t = easing(time / duration);
12713
11980
  const viewport = interpolator.interpolateProps(startProps, endProps, t);
12714
- this.propsInTransition = this.getControllerState({
12715
- ...this.props,
12716
- ...viewport
12717
- }).getViewportProps();
11981
+ this.propsInTransition = this.getControllerState(
11982
+ {
11983
+ ...this.props,
11984
+ ...viewport
11985
+ },
11986
+ PRESERVE_CONSTRAINT_CONTEXT
11987
+ ).getViewportProps();
12718
11988
  this.onViewStateChange({
12719
11989
  viewState: this.propsInTransition,
12720
11990
  oldViewState: this.props
@@ -12790,8 +12060,11 @@ void main(void) {
12790
12060
  return true;
12791
12061
  }
12792
12062
  _triggerTransition(startProps, endProps) {
12793
- const startViewstate = this.getControllerState(startProps);
12794
- const endViewStateProps = this.getControllerState(endProps).shortestPathFrom(startViewstate);
12063
+ const startViewstate = this.getControllerState(startProps, PRESERVE_CONSTRAINT_CONTEXT);
12064
+ const endViewStateProps = this.getControllerState(
12065
+ endProps,
12066
+ HARD_CONSTRAINT_CONTEXT
12067
+ ).shortestPathFrom(startViewstate);
12795
12068
  const transitionInterpolator = endProps.transitionInterpolator;
12796
12069
  const duration = transitionInterpolator.getDuration ? transitionInterpolator.getDuration(startProps, endProps) : endProps.transitionDuration;
12797
12070
  if (duration === 0) {
@@ -12908,180 +12181,6 @@ void main(void) {
12908
12181
  }
12909
12182
  };
12910
12183
 
12911
- // ../core/src/viewports/globe-viewport.ts
12912
- var DEGREES_TO_RADIANS5 = Math.PI / 180;
12913
- var RADIANS_TO_DEGREES3 = 180 / Math.PI;
12914
- var EARTH_RADIUS = 6370972;
12915
- var GLOBE_RADIUS = 256;
12916
- function getDistanceScales2() {
12917
- const unitsPerMeter2 = GLOBE_RADIUS / EARTH_RADIUS;
12918
- const unitsPerDegree = Math.PI / 180 * GLOBE_RADIUS;
12919
- return {
12920
- unitsPerMeter: [unitsPerMeter2, unitsPerMeter2, unitsPerMeter2],
12921
- unitsPerMeter2: [0, 0, 0],
12922
- metersPerUnit: [1 / unitsPerMeter2, 1 / unitsPerMeter2, 1 / unitsPerMeter2],
12923
- unitsPerDegree: [unitsPerDegree, unitsPerDegree, unitsPerMeter2],
12924
- unitsPerDegree2: [0, 0, 0],
12925
- degreesPerUnit: [1 / unitsPerDegree, 1 / unitsPerDegree, 1 / unitsPerMeter2]
12926
- };
12927
- }
12928
- var GlobeViewport = class extends Viewport {
12929
- constructor(opts = {}) {
12930
- const {
12931
- longitude = 0,
12932
- bearing = 0,
12933
- pitch = 0,
12934
- zoom = 0,
12935
- // Matches Maplibre defaults
12936
- // https://github.com/maplibre/maplibre-gl-js/blob/f8ab4b48d59ab8fe7b068b102538793bbdd4c848/src/geo/projection/globe_transform.ts#L632-L633
12937
- nearZMultiplier = 0.5,
12938
- farZMultiplier = 1,
12939
- resolution = 10
12940
- } = opts;
12941
- let { latitude = 0, height, altitude = 1.5, fovy } = opts;
12942
- latitude = Math.max(Math.min(latitude, 90), -90);
12943
- height = height || 1;
12944
- if (fovy) {
12945
- altitude = fovyToAltitude(fovy);
12946
- } else {
12947
- fovy = altitudeToFovy(altitude);
12948
- }
12949
- const scaleLatitude = Math.max(Math.min(latitude, MAX_LATITUDE), -MAX_LATITUDE);
12950
- const scale5 = Math.pow(2, zoom - zoomAdjust(scaleLatitude));
12951
- const pitchRadians = pitch * DEGREES_TO_RADIANS5;
12952
- const nearZ = opts.nearZ ?? nearZMultiplier;
12953
- const farZ = opts.farZ ?? (altitude + GLOBE_RADIUS * 2 * scale5 / height / Math.max(Math.cos(pitchRadians), 0.1)) * farZMultiplier;
12954
- const viewMatrix = new Matrix4().lookAt({ eye: [0, -altitude, 0], up: [0, 0, 1] }).rotateX(-pitchRadians).rotateY(-bearing * DEGREES_TO_RADIANS5).rotateX(latitude * DEGREES_TO_RADIANS5).rotateZ(-longitude * DEGREES_TO_RADIANS5).scale(scale5 / height);
12955
- super({
12956
- ...opts,
12957
- // x, y, width,
12958
- height,
12959
- // view matrix
12960
- viewMatrix,
12961
- longitude,
12962
- latitude,
12963
- zoom,
12964
- // projection matrix parameters
12965
- distanceScales: getDistanceScales2(),
12966
- fovy,
12967
- focalDistance: altitude,
12968
- near: nearZ,
12969
- far: farZ
12970
- });
12971
- this.scale = scale5;
12972
- this.latitude = latitude;
12973
- this.longitude = longitude;
12974
- this.bearing = bearing;
12975
- this.pitch = pitch;
12976
- this.fovy = fovy;
12977
- this.resolution = resolution;
12978
- }
12979
- get projectionMode() {
12980
- return PROJECTION_MODE.GLOBE;
12981
- }
12982
- getDistanceScales() {
12983
- return this.distanceScales;
12984
- }
12985
- getBounds(options = {}) {
12986
- const unprojectOption = { targetZ: options.z || 0 };
12987
- const left = this.unproject([0, this.height / 2], unprojectOption);
12988
- const top = this.unproject([this.width / 2, 0], unprojectOption);
12989
- const right = this.unproject([this.width, this.height / 2], unprojectOption);
12990
- const bottom = this.unproject([this.width / 2, this.height], unprojectOption);
12991
- if (right[0] < this.longitude)
12992
- right[0] += 360;
12993
- if (left[0] > this.longitude)
12994
- left[0] -= 360;
12995
- return [
12996
- Math.min(left[0], right[0], top[0], bottom[0]),
12997
- Math.min(left[1], right[1], top[1], bottom[1]),
12998
- Math.max(left[0], right[0], top[0], bottom[0]),
12999
- Math.max(left[1], right[1], top[1], bottom[1])
13000
- ];
13001
- }
13002
- unproject(xyz, { topLeft = true, targetZ } = {}) {
13003
- const [x, y, z] = xyz;
13004
- const y2 = topLeft ? y : this.height - y;
13005
- const { pixelUnprojectionMatrix } = this;
13006
- let coord;
13007
- if (Number.isFinite(z)) {
13008
- coord = transformVector2(pixelUnprojectionMatrix, [x, y2, z, 1]);
13009
- } else {
13010
- const coord0 = transformVector2(pixelUnprojectionMatrix, [x, y2, -1, 1]);
13011
- const coord1 = transformVector2(pixelUnprojectionMatrix, [x, y2, 1, 1]);
13012
- const lt = ((targetZ || 0) / EARTH_RADIUS + 1) * GLOBE_RADIUS;
13013
- const lSqr = vec3_exports.sqrLen(vec3_exports.sub([], coord0, coord1));
13014
- const l0Sqr = vec3_exports.sqrLen(coord0);
13015
- const l1Sqr = vec3_exports.sqrLen(coord1);
13016
- const sSqr = (4 * l0Sqr * l1Sqr - (lSqr - l0Sqr - l1Sqr) ** 2) / 16;
13017
- const dSqr = 4 * sSqr / lSqr;
13018
- const r0 = Math.sqrt(l0Sqr - dSqr);
13019
- const dr = Math.sqrt(Math.max(0, lt * lt - dSqr));
13020
- const t = (r0 - dr) / Math.sqrt(lSqr);
13021
- coord = vec3_exports.lerp([], coord0, coord1, t);
13022
- }
13023
- const [X, Y, Z] = this.unprojectPosition(coord);
13024
- if (Number.isFinite(z)) {
13025
- return [X, Y, Z];
13026
- }
13027
- return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];
13028
- }
13029
- projectPosition(xyz) {
13030
- const [lng, lat, Z = 0] = xyz;
13031
- const lambda = lng * DEGREES_TO_RADIANS5;
13032
- const phi = lat * DEGREES_TO_RADIANS5;
13033
- const cosPhi = Math.cos(phi);
13034
- const D = (Z / EARTH_RADIUS + 1) * GLOBE_RADIUS;
13035
- return [Math.sin(lambda) * cosPhi * D, -Math.cos(lambda) * cosPhi * D, Math.sin(phi) * D];
13036
- }
13037
- unprojectPosition(xyz) {
13038
- const [x, y, z] = xyz;
13039
- const D = vec3_exports.len(xyz);
13040
- const phi = Math.asin(z / D);
13041
- const lambda = Math.atan2(x, -y);
13042
- const lng = lambda * RADIANS_TO_DEGREES3;
13043
- const lat = phi * RADIANS_TO_DEGREES3;
13044
- const Z = (D / GLOBE_RADIUS - 1) * EARTH_RADIUS;
13045
- return [lng, lat, Z];
13046
- }
13047
- projectFlat(xyz) {
13048
- return xyz;
13049
- }
13050
- unprojectFlat(xyz) {
13051
- return xyz;
13052
- }
13053
- /**
13054
- * Pan the globe using delta-based movement
13055
- * @param coords - the geographic coordinates where the pan started
13056
- * @param pixel - the current screen position
13057
- * @param startPixel - the screen position where the pan started
13058
- * @returns updated viewport options with new longitude/latitude
13059
- */
13060
- panByPosition([startLng, startLat, startZoom], pixel, startPixel) {
13061
- const scale5 = Math.pow(2, this.zoom - zoomAdjust(this.latitude));
13062
- const rotationSpeed = 0.25 / scale5;
13063
- const longitude = startLng + rotationSpeed * (startPixel[0] - pixel[0]);
13064
- let latitude = startLat - rotationSpeed * (startPixel[1] - pixel[1]);
13065
- latitude = Math.max(Math.min(latitude, 90), -90);
13066
- const out = { longitude, latitude, zoom: startZoom - zoomAdjust(startLat) };
13067
- out.zoom += zoomAdjust(out.latitude);
13068
- return out;
13069
- }
13070
- };
13071
- GlobeViewport.displayName = "GlobeViewport";
13072
- function zoomAdjust(latitude, clampToPoles) {
13073
- if (clampToPoles) {
13074
- latitude = Math.max(Math.min(latitude, MAX_LATITUDE), -MAX_LATITUDE);
13075
- }
13076
- const scaleAdjust = Math.PI * Math.cos(latitude * Math.PI / 180);
13077
- return Math.log2(scaleAdjust);
13078
- }
13079
- function transformVector2(matrix, vector) {
13080
- const result = vec4_exports.transformMat4([], vector, matrix);
13081
- vec4_exports.scale(result, result, 1 / result[3]);
13082
- return result;
13083
- }
13084
-
13085
12184
  // ../core/src/transitions/linear-interpolator.ts
13086
12185
  var DEFAULT_PROPS = ["longitude", "latitude", "zoom", "bearing", "pitch"];
13087
12186
  var DEFAULT_REQUIRED_PROPS = ["longitude", "latitude", "zoom"];
@@ -13109,21 +12208,16 @@ void main(void) {
13109
12208
  const result = super.initializeProps(startProps, endProps);
13110
12209
  const { makeViewport, around } = this.opts;
13111
12210
  if (makeViewport && around) {
13112
- const TestViewport = makeViewport(startProps);
13113
- if (TestViewport instanceof GlobeViewport) {
13114
- log_default.warn("around not supported in GlobeView")();
13115
- } else {
13116
- const startViewport = makeViewport(startProps);
13117
- const endViewport = makeViewport(endProps);
13118
- const aroundPosition = startViewport.unproject(around);
13119
- result.start.around = around;
13120
- Object.assign(result.end, {
13121
- around: endViewport.project(aroundPosition),
13122
- aroundPosition,
13123
- width: endProps.width,
13124
- height: endProps.height
13125
- });
13126
- }
12211
+ const startViewport = makeViewport(startProps);
12212
+ const endViewport = makeViewport(endProps);
12213
+ const aroundPosition = startViewport.unproject(around);
12214
+ result.start.around = around;
12215
+ Object.assign(result.end, {
12216
+ around: endViewport.project(aroundPosition),
12217
+ aroundPosition,
12218
+ width: endProps.width,
12219
+ height: endProps.height
12220
+ });
13127
12221
  }
13128
12222
  return result;
13129
12223
  }
@@ -13152,14 +12246,21 @@ void main(void) {
13152
12246
  transitionDuration: 0
13153
12247
  };
13154
12248
  var DEFAULT_INERTIA = 300;
12249
+ var REBOUND_DURATION = 300;
13155
12250
  var INERTIA_EASING = (t) => 1 - (1 - t) * (1 - t);
12251
+ var EASE_OUT_EXPONENTIAL = (t) => t === 1 ? 1 : 1 - Math.pow(2, -10 * t);
13156
12252
  var EVENT_TYPES = {
13157
12253
  WHEEL: ["wheel"],
13158
12254
  PAN: ["panstart", "panmove", "panend"],
13159
12255
  PINCH: ["pinchstart", "pinchmove", "pinchend"],
13160
12256
  MULTI_PAN: ["multipanstart", "multipanmove", "multipanend"],
13161
12257
  DOUBLE_CLICK: ["dblclick"],
13162
- DOUBLE_CLICK_DRAG: ["dblclickdragstart", "dblclickdragmove", "dblclickdragend", "dblclickdragcancel"],
12258
+ DOUBLE_CLICK_DRAG: [
12259
+ "dblclickdragstart",
12260
+ "dblclickdragmove",
12261
+ "dblclickdragend",
12262
+ "dblclickdragcancel"
12263
+ ],
13163
12264
  KEYBOARD: ["keydown"]
13164
12265
  };
13165
12266
  var pinchEventWorkaround = {};
@@ -13189,10 +12290,15 @@ void main(void) {
13189
12290
  this.touchRotate = false;
13190
12291
  this.multiTouchDrag = null;
13191
12292
  this.trackpadGesture = false;
12293
+ this.zoomAround = "pointer";
13192
12294
  this.keyboard = true;
13193
12295
  this.transitionManager = new TransitionManager({
13194
12296
  ...opts,
13195
- getControllerState: (props) => new this.ControllerState(props),
12297
+ getControllerState: (props, constraintContext) => new this.ControllerState({
12298
+ ...props,
12299
+ constraintContext,
12300
+ makeViewport: opts.makeViewport
12301
+ }),
13196
12302
  onViewStateChange: this._onTransition.bind(this),
13197
12303
  onStateChange: this._setInteractionState.bind(this)
13198
12304
  });
@@ -13278,6 +12384,15 @@ void main(void) {
13278
12384
  const { offsetCenter } = event;
13279
12385
  return [offsetCenter.x - x, offsetCenter.y - y];
13280
12386
  }
12387
+ /** Resolves the zoom anchor for pointer-based controls. */
12388
+ getZoomPosition(position) {
12389
+ if (this.zoomAround === "pointer") {
12390
+ return position;
12391
+ }
12392
+ const viewport = this.makeViewport(this.controllerState.getViewportProps());
12393
+ const [centerX, centerY] = worldToPixels(viewport.center, viewport.pixelProjectionMatrix);
12394
+ return [centerX, centerY];
12395
+ }
13281
12396
  isPointInBounds(pos, event) {
13282
12397
  const { width, height } = this.props;
13283
12398
  if (event && event.handled) {
@@ -13311,6 +12426,9 @@ void main(void) {
13311
12426
  * Extract interactivity options
13312
12427
  */
13313
12428
  setProps(props) {
12429
+ if (props.maxBoundsPadding === void 0) {
12430
+ props.maxBoundsPadding = null;
12431
+ }
13314
12432
  if (props.dragMode) {
13315
12433
  this.dragMode = props.dragMode;
13316
12434
  }
@@ -13332,6 +12450,7 @@ void main(void) {
13332
12450
  touchRotate = false,
13333
12451
  multiTouchDrag = touchRotate ? "rotate" : null,
13334
12452
  trackpadGesture = false,
12453
+ zoomAround = "pointer",
13335
12454
  keyboard = true
13336
12455
  } = props;
13337
12456
  const isInteractive = Boolean(this.onViewStateChange);
@@ -13354,12 +12473,15 @@ void main(void) {
13354
12473
  this.touchRotate = multiTouchDrag === "rotate";
13355
12474
  this.multiTouchDrag = multiTouchDrag;
13356
12475
  this.trackpadGesture = trackpadGesture;
12476
+ this.zoomAround = zoomAround;
13357
12477
  this.keyboard = keyboard;
13358
- const dimensionChanged = !oldProps || oldProps.height !== props.height || oldProps.width !== props.width || oldProps.maxBounds !== props.maxBounds;
13359
- if (dimensionChanged && props.maxBounds) {
12478
+ const constraintChanged = !oldProps || oldProps.height !== props.height || oldProps.width !== props.width || oldProps.maxBounds !== props.maxBounds || oldProps.maxBoundsPadding !== props.maxBoundsPadding;
12479
+ if (constraintChanged && props.maxBounds) {
13360
12480
  const controllerState = new this.ControllerState({ ...props, makeViewport: this.makeViewport });
13361
12481
  const normalizedProps = controllerState.getViewportProps();
13362
- const changed = Object.keys(normalizedProps).some((key) => !deepEqual(normalizedProps[key], props[key], 1));
12482
+ const changed = Object.keys(normalizedProps).some(
12483
+ (key) => !deepEqual(normalizedProps[key], props[key], 1)
12484
+ );
13363
12485
  if (changed) {
13364
12486
  this.updateViewport(controllerState);
13365
12487
  }
@@ -13393,17 +12515,48 @@ void main(void) {
13393
12515
  if (changed) {
13394
12516
  const oldViewState = this.controllerState && this.controllerState.getViewportProps();
13395
12517
  if (this.onViewStateChange) {
13396
- this.onViewStateChange({ viewState, interactionState: this._interactionState, oldViewState, viewId: this.props.id });
12518
+ this.onViewStateChange({
12519
+ viewState,
12520
+ interactionState: this._interactionState,
12521
+ oldViewState,
12522
+ viewId: this.props.id
12523
+ });
13397
12524
  }
13398
12525
  }
13399
12526
  }
13400
12527
  _onTransition(params) {
13401
- this.onViewStateChange({ ...params, interactionState: this._interactionState, viewId: this.props.id });
12528
+ this.onViewStateChange({
12529
+ ...params,
12530
+ interactionState: this._interactionState,
12531
+ viewId: this.props.id
12532
+ });
13402
12533
  }
13403
12534
  _setInteractionState(newStates) {
13404
12535
  Object.assign(this._interactionState, newStates);
13405
12536
  this.onStateChange(this._interactionState);
13406
12537
  }
12538
+ /** Maps a semantic input lifecycle to the constraint policy seen by controller state. */
12539
+ _getConstraintContext(_action, phase) {
12540
+ if (!this.props.rubberBand) {
12541
+ return { mode: "hard" };
12542
+ }
12543
+ return { mode: phase === "update" ? "elastic" : phase === "end" ? "rebound" : "hard" };
12544
+ }
12545
+ /** Returns a rebound transition when hard resolution changed the displayed viewport props. */
12546
+ _getReboundTransition(constraintContext, nextControllerState) {
12547
+ if (constraintContext.mode !== "rebound") {
12548
+ return null;
12549
+ }
12550
+ const nextViewportProps = nextControllerState.getViewportProps();
12551
+ const shouldRebound = Object.keys(nextViewportProps).some(
12552
+ (key) => !deepEqual(this.props[key], nextViewportProps[key], 1)
12553
+ );
12554
+ return shouldRebound ? {
12555
+ ...this._getTransitionProps(),
12556
+ transitionDuration: REBOUND_DURATION,
12557
+ transitionEasing: EASE_OUT_EXPONENTIAL
12558
+ } : null;
12559
+ }
13407
12560
  /* Event handlers */
13408
12561
  // Default handler for the `panstart` event.
13409
12562
  _onPanStart(event) {
@@ -13415,9 +12568,9 @@ void main(void) {
13415
12568
  if (this.invertPan || this.dragMode === "pan") {
13416
12569
  alternateMode = !alternateMode;
13417
12570
  }
13418
- const newControllerState = this.controllerState[alternateMode ? "panStart" : "rotateStart"]({
13419
- pos
13420
- });
12571
+ const action = alternateMode ? "pan" : "rotate";
12572
+ const constraintContext = this._getConstraintContext(action, "start");
12573
+ const newControllerState = alternateMode ? this.controllerState.panStart({ pos }, constraintContext) : this.controllerState.rotateStart({ pos }, constraintContext);
13421
12574
  this._panMove = alternateMode;
13422
12575
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
13423
12576
  return true;
@@ -13442,7 +12595,10 @@ void main(void) {
13442
12595
  return false;
13443
12596
  }
13444
12597
  const pos = this.getCenter(event);
13445
- const newControllerState = this.controllerState.pan({ pos });
12598
+ const newControllerState = this.controllerState.pan(
12599
+ { pos },
12600
+ this._getConstraintContext("pan", "update")
12601
+ );
13446
12602
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
13447
12603
  isDragging: true,
13448
12604
  isPanning: true
@@ -13471,10 +12627,13 @@ void main(void) {
13471
12627
  }
13472
12628
  );
13473
12629
  } else {
13474
- const newControllerState = this.controllerState.panEnd();
13475
- this.updateViewport(newControllerState, null, {
12630
+ const currentControllerState = this.controllerState;
12631
+ const constraintContext = this._getConstraintContext("pan", "end");
12632
+ const newControllerState = currentControllerState.panEnd(constraintContext);
12633
+ const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
12634
+ this.updateViewport(newControllerState, reboundTransition, {
13476
12635
  isDragging: false,
13477
- isPanning: false
12636
+ isPanning: Boolean(reboundTransition)
13478
12637
  });
13479
12638
  }
13480
12639
  return true;
@@ -13486,7 +12645,10 @@ void main(void) {
13486
12645
  return false;
13487
12646
  }
13488
12647
  const pos = this.getCenter(event);
13489
- const newControllerState = this.controllerState.rotate({ pos });
12648
+ const newControllerState = this.controllerState.rotate(
12649
+ { pos },
12650
+ this._getConstraintContext("rotate", "update")
12651
+ );
13490
12652
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
13491
12653
  isDragging: true,
13492
12654
  isRotating: true
@@ -13515,10 +12677,13 @@ void main(void) {
13515
12677
  }
13516
12678
  );
13517
12679
  } else {
13518
- const newControllerState = this.controllerState.rotateEnd();
13519
- this.updateViewport(newControllerState, null, {
12680
+ const currentControllerState = this.controllerState;
12681
+ const constraintContext = this._getConstraintContext("rotate", "end");
12682
+ const newControllerState = currentControllerState.rotateEnd(constraintContext);
12683
+ const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
12684
+ this.updateViewport(newControllerState, reboundTransition, {
13520
12685
  isDragging: false,
13521
- isRotating: false
12686
+ isRotating: Boolean(reboundTransition)
13522
12687
  });
13523
12688
  }
13524
12689
  return true;
@@ -13542,16 +12707,13 @@ void main(void) {
13542
12707
  if (delta < 0 && scale5 !== 0) {
13543
12708
  scale5 = 1 / scale5;
13544
12709
  }
13545
- const transitionProps = smooth ? { ...this._getTransitionProps({ around: pos }), transitionDuration: 250 } : NO_TRANSITION_PROPS;
13546
- const newControllerState = this.controllerState.zoom({ pos, scale: scale5 });
13547
- this.updateViewport(
13548
- newControllerState,
13549
- transitionProps,
13550
- {
13551
- isZooming: true,
13552
- isPanning: true
13553
- }
13554
- );
12710
+ const zoomPosition = this.getZoomPosition(pos);
12711
+ const transitionProps = smooth ? { ...this._getTransitionProps({ around: zoomPosition }), transitionDuration: 250 } : NO_TRANSITION_PROPS;
12712
+ const newControllerState = this.controllerState.zoom({ pos: zoomPosition, scale: scale5 });
12713
+ this.updateViewport(newControllerState, transitionProps, {
12714
+ isZooming: true,
12715
+ isPanning: true
12716
+ });
13555
12717
  if (!smooth) {
13556
12718
  this._setInteractionState({ isZooming: false, isPanning: false });
13557
12719
  }
@@ -13573,7 +12735,7 @@ void main(void) {
13573
12735
  };
13574
12736
  const startEvent = { ...event, offsetCenter: startCenter };
13575
12737
  const pos = this.getCenter(startEvent);
13576
- const newControllerState = multiTouchDrag === "pan" ? this.controllerState.panStart({ pos }) : this.controllerState.rotateStart({ pos });
12738
+ const newControllerState = multiTouchDrag === "pan" ? this.controllerState.panStart({ pos }, this._getConstraintContext("pan", "start")) : this.controllerState.rotateStart({ pos }, this._getConstraintContext("rotate", "start"));
13577
12739
  this._multiPanMode = multiTouchDrag;
13578
12740
  this._multiPanStartCenter = startCenter;
13579
12741
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
@@ -13633,7 +12795,7 @@ void main(void) {
13633
12795
  if (!this.isPointInBounds(pos, event)) {
13634
12796
  return false;
13635
12797
  }
13636
- const newControllerState = this.controllerState.zoomStart({ pos }).rotateStart({ pos });
12798
+ const newControllerState = this.controllerState.zoomStart({ pos: this.getZoomPosition(pos) }, this._getConstraintContext("zoom", "start")).rotateStart({ pos }, this._getConstraintContext("rotate", "start"));
13637
12799
  pinchEventWorkaround._startPinchRotation = event.rotation;
13638
12800
  pinchEventWorkaround._lastPinchEvent = event;
13639
12801
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, { isDragging: true });
@@ -13651,13 +12813,17 @@ void main(void) {
13651
12813
  if (this.touchZoom) {
13652
12814
  const { scale: scale5 } = event;
13653
12815
  const pos = this.getCenter(event);
13654
- newControllerState = newControllerState.zoom({ pos, scale: scale5 });
12816
+ newControllerState = newControllerState.zoom(
12817
+ { pos: this.getZoomPosition(pos), scale: scale5 },
12818
+ this._getConstraintContext("zoom", "update")
12819
+ );
13655
12820
  }
13656
12821
  if (this.touchRotate) {
13657
12822
  const { rotation } = event;
13658
- newControllerState = newControllerState.rotate({
13659
- deltaAngleX: pinchEventWorkaround._startPinchRotation - rotation
13660
- });
12823
+ newControllerState = newControllerState.rotate(
12824
+ { deltaAngleX: pinchEventWorkaround._startPinchRotation - rotation },
12825
+ this._getConstraintContext("rotate", "update")
12826
+ );
13661
12827
  }
13662
12828
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
13663
12829
  isDragging: true,
@@ -13676,15 +12842,16 @@ void main(void) {
13676
12842
  const { _lastPinchEvent } = pinchEventWorkaround;
13677
12843
  if (this.touchZoom && inertia && _lastPinchEvent && event.scale !== _lastPinchEvent.scale) {
13678
12844
  const pos = this.getCenter(event);
12845
+ const zoomPosition = this.getZoomPosition(pos);
13679
12846
  let newControllerState = this.controllerState.rotateEnd();
13680
12847
  const z = Math.log2(event.scale);
13681
12848
  const velocityZ = (z - Math.log2(_lastPinchEvent.scale)) / (event.deltaTime - _lastPinchEvent.deltaTime);
13682
12849
  const endScale = Math.pow(2, z + velocityZ * inertia / 2);
13683
- newControllerState = newControllerState.zoom({ pos, scale: endScale }).zoomEnd();
12850
+ newControllerState = newControllerState.zoom({ pos: zoomPosition, scale: endScale }).zoomEnd();
13684
12851
  this.updateViewport(
13685
12852
  newControllerState,
13686
12853
  {
13687
- ...this._getTransitionProps({ around: pos }),
12854
+ ...this._getTransitionProps({ around: zoomPosition }),
13688
12855
  transitionDuration: inertia,
13689
12856
  transitionEasing: INERTIA_EASING
13690
12857
  },
@@ -13697,12 +12864,19 @@ void main(void) {
13697
12864
  );
13698
12865
  this.blockEvents(inertia);
13699
12866
  } else {
13700
- const newControllerState = this.controllerState.zoomEnd().rotateEnd();
13701
- this.updateViewport(newControllerState, null, {
12867
+ const currentControllerState = this.controllerState;
12868
+ const zoomConstraintContext = this._getConstraintContext("zoom", "end");
12869
+ const rotateConstraintContext = this._getConstraintContext("rotate", "end");
12870
+ const newControllerState = currentControllerState.zoomEnd(zoomConstraintContext).rotateEnd(rotateConstraintContext);
12871
+ const reboundTransition = this._getReboundTransition(
12872
+ this.touchZoom ? zoomConstraintContext : rotateConstraintContext,
12873
+ newControllerState
12874
+ );
12875
+ this.updateViewport(newControllerState, reboundTransition, {
13702
12876
  isDragging: false,
13703
- isPanning: false,
13704
- isZooming: false,
13705
- isRotating: false
12877
+ isPanning: Boolean(reboundTransition) && this.touchZoom,
12878
+ isZooming: Boolean(reboundTransition) && this.touchZoom,
12879
+ isRotating: Boolean(reboundTransition) && this.touchRotate
13706
12880
  });
13707
12881
  }
13708
12882
  pinchEventWorkaround._startPinchRotation = null;
@@ -13722,8 +12896,12 @@ void main(void) {
13722
12896
  return false;
13723
12897
  }
13724
12898
  const isZoomOut = this.isFunctionKeyPressed(event);
13725
- const newControllerState = this.controllerState.zoom({ pos, scale: isZoomOut ? 0.5 : 2 });
13726
- this.updateViewport(newControllerState, this._getTransitionProps({ around: pos }), {
12899
+ const zoomPosition = this.getZoomPosition(pos);
12900
+ const newControllerState = this.controllerState.zoom({
12901
+ pos: zoomPosition,
12902
+ scale: isZoomOut ? 0.5 : 2
12903
+ });
12904
+ this.updateViewport(newControllerState, this._getTransitionProps({ around: zoomPosition }), {
13727
12905
  isZooming: true,
13728
12906
  isPanning: true
13729
12907
  });
@@ -13740,10 +12918,16 @@ void main(void) {
13740
12918
  this._doubleClickDragAnchor = null;
13741
12919
  return false;
13742
12920
  }
13743
- this._doubleClickDragAnchor = pos;
13744
- let newControllerState = this.controllerState.zoomStart({ pos });
12921
+ this._doubleClickDragAnchor = this.getZoomPosition(pos);
12922
+ let newControllerState = this.controllerState.zoomStart(
12923
+ { pos: this._doubleClickDragAnchor },
12924
+ this._getConstraintContext("zoom", "start")
12925
+ );
13745
12926
  if (event.scale !== 1) {
13746
- newControllerState = newControllerState.zoom({ pos, scale: event.scale });
12927
+ newControllerState = newControllerState.zoom(
12928
+ { pos: this._doubleClickDragAnchor, scale: event.scale },
12929
+ this._getConstraintContext("zoom", "update")
12930
+ );
13747
12931
  }
13748
12932
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
13749
12933
  isDragging: true,
@@ -13757,7 +12941,10 @@ void main(void) {
13757
12941
  if (!pos) {
13758
12942
  return false;
13759
12943
  }
13760
- const newControllerState = this.controllerState.zoom({ pos, scale: event.scale });
12944
+ const newControllerState = this.controllerState.zoom(
12945
+ { pos, scale: event.scale },
12946
+ this._getConstraintContext("zoom", "update")
12947
+ );
13761
12948
  this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {
13762
12949
  isDragging: true,
13763
12950
  isPanning: true,
@@ -13766,15 +12953,19 @@ void main(void) {
13766
12953
  return true;
13767
12954
  }
13768
12955
  _onDoubleClickDragEnd(_event) {
13769
- if (!this._doubleClickDragAnchor) {
12956
+ const pos = this._doubleClickDragAnchor;
12957
+ if (!pos) {
13770
12958
  return false;
13771
12959
  }
13772
12960
  this._doubleClickDragAnchor = null;
13773
- const newControllerState = this.controllerState.zoomEnd();
13774
- this.updateViewport(newControllerState, null, {
12961
+ const currentControllerState = this.controllerState;
12962
+ const constraintContext = this._getConstraintContext("zoom", "end");
12963
+ const newControllerState = currentControllerState.zoomEnd(constraintContext);
12964
+ const reboundTransition = this._getReboundTransition(constraintContext, newControllerState);
12965
+ this.updateViewport(newControllerState, reboundTransition, {
13775
12966
  isDragging: false,
13776
- isPanning: false,
13777
- isZooming: false
12967
+ isPanning: Boolean(reboundTransition),
12968
+ isZooming: Boolean(reboundTransition)
13778
12969
  });
13779
12970
  this._suppressDoubleClickUntil = Date.now() + 100;
13780
12971
  this.blockEvents(100);
@@ -13858,10 +13049,11 @@ void main(void) {
13858
13049
  };
13859
13050
 
13860
13051
  // ../core/src/controllers/view-state.ts
13052
+ var CONSTRAINT_AROUND = /* @__PURE__ */ Symbol("constraintAround");
13861
13053
  var ViewState = class {
13862
- constructor(props, state, makeViewport) {
13054
+ constructor(props, state, makeViewport, constraintContext) {
13863
13055
  this.makeViewport = makeViewport;
13864
- this._viewportProps = this.applyConstraints(props);
13056
+ this._viewportProps = this.applyConstraints(props, constraintContext);
13865
13057
  this._state = state;
13866
13058
  }
13867
13059
  getViewportProps() {
@@ -13872,6 +13064,35 @@ void main(void) {
13872
13064
  }
13873
13065
  };
13874
13066
 
13067
+ // ../core/src/controllers/utils.ts
13068
+ function applyRubberBand(value, constrainedValue, range) {
13069
+ const overshoot = value - constrainedValue;
13070
+ return overshoot && Number.isFinite(overshoot) ? constrainedValue + overshoot * range / (range + Math.abs(overshoot)) : constrainedValue;
13071
+ }
13072
+ function getMaxBoundsRect(width, height, padding) {
13073
+ const left = getPosition(parsePosition(padding?.left ?? 0), width);
13074
+ const right = getPosition(parsePosition(padding?.right ?? 0), width);
13075
+ const top = getPosition(parsePosition(padding?.top ?? 0), height);
13076
+ const bottom = getPosition(parsePosition(padding?.bottom ?? 0), height);
13077
+ return {
13078
+ x: left,
13079
+ y: top,
13080
+ width: width - left - right,
13081
+ height: height - top - bottom
13082
+ };
13083
+ }
13084
+ function getMaxBoundsExtents(viewport, target2, rect) {
13085
+ let [x, y] = viewport.project(target2);
13086
+ x = Number.isFinite(x) ? x : viewport.width / 2;
13087
+ y = Number.isFinite(y) ? y : viewport.height / 2;
13088
+ return {
13089
+ left: x - rect.x,
13090
+ right: rect.x + rect.width - x,
13091
+ top: y - rect.y,
13092
+ bottom: rect.y + rect.height - y
13093
+ };
13094
+ }
13095
+
13875
13096
  // ../core/src/controllers/map-controller.ts
13876
13097
  var PITCH_MOUSE_THRESHOLD = 5;
13877
13098
  var PITCH_ACCEL = 1.2;
@@ -13880,6 +13101,7 @@ void main(void) {
13880
13101
  [-Infinity, -90],
13881
13102
  [Infinity, 90]
13882
13103
  ];
13104
+ var ZOOM_RUBBER_BAND_RANGE = 1;
13883
13105
  function lngLatToWorld2([lng, lat]) {
13884
13106
  if (Math.abs(lat) > 90) {
13885
13107
  lat = Math.sign(lat) * 90;
@@ -13938,12 +13160,15 @@ void main(void) {
13938
13160
  /** Zoom when current zoom operation started */
13939
13161
  startZoom,
13940
13162
  /** Normalize viewport props to fit map height into viewport */
13941
- normalize: normalize4 = true
13163
+ normalize: normalize4 = true,
13164
+ rubberBand = false
13942
13165
  } = options;
13166
+ const { [CONSTRAINT_AROUND]: constraintAround } = options;
13943
13167
  assert4(Number.isFinite(longitude));
13944
13168
  assert4(Number.isFinite(latitude));
13945
13169
  assert4(Number.isFinite(zoom));
13946
13170
  const maxBounds = options.maxBounds || (normalize4 ? WEB_MERCATOR_MAX_BOUNDS : null);
13171
+ const maxBoundsPadding = options.maxBoundsPadding || null;
13947
13172
  super(
13948
13173
  {
13949
13174
  width,
@@ -13960,7 +13185,10 @@ void main(void) {
13960
13185
  minPitch,
13961
13186
  normalize: normalize4,
13962
13187
  position,
13963
- maxBounds
13188
+ maxBounds,
13189
+ maxBoundsPadding,
13190
+ rubberBand,
13191
+ ...{ [CONSTRAINT_AROUND]: constraintAround }
13964
13192
  },
13965
13193
  {
13966
13194
  startPanLngLat,
@@ -13971,7 +13199,8 @@ void main(void) {
13971
13199
  startPitch,
13972
13200
  startZoom
13973
13201
  },
13974
- options.makeViewport
13202
+ options.makeViewport,
13203
+ options.constraintContext
13975
13204
  );
13976
13205
  this.getAltitude = options.getAltitude;
13977
13206
  }
@@ -13979,10 +13208,13 @@ void main(void) {
13979
13208
  * Start panning
13980
13209
  * @param {[Number, Number]} pos - position on screen where the pointer grabs
13981
13210
  */
13982
- panStart({ pos }) {
13983
- return this._getUpdatedState({
13984
- startPanLngLat: this._unproject(pos)
13985
- });
13211
+ panStart({ pos }, constraintContext) {
13212
+ return this._getUpdatedState(
13213
+ {
13214
+ startPanLngLat: this._unproject(pos)
13215
+ },
13216
+ constraintContext
13217
+ );
13986
13218
  }
13987
13219
  /**
13988
13220
  * Pan
@@ -13990,23 +13222,26 @@ void main(void) {
13990
13222
  * @param {[Number, Number], optional} startPos - where the pointer grabbed at
13991
13223
  * the start of the operation. Must be supplied of `panStart()` was not called
13992
13224
  */
13993
- pan({ pos, startPos }) {
13225
+ pan({ pos, startPos }, constraintContext) {
13994
13226
  const startPanLngLat = this.getState().startPanLngLat || this._unproject(startPos);
13995
13227
  if (!startPanLngLat) {
13996
13228
  return this;
13997
13229
  }
13998
13230
  const viewport = this.makeViewport(this.getViewportProps());
13999
13231
  const newProps = viewport.panByPosition(startPanLngLat, pos);
14000
- return this._getUpdatedState(newProps);
13232
+ return this._getUpdatedState(newProps, constraintContext);
14001
13233
  }
14002
13234
  /**
14003
13235
  * End panning
14004
13236
  * Must call if `panStart()` was called
14005
13237
  */
14006
- panEnd() {
14007
- return this._getUpdatedState({
14008
- startPanLngLat: null
14009
- });
13238
+ panEnd(constraintContext) {
13239
+ return this._getUpdatedState(
13240
+ {
13241
+ startPanLngLat: null
13242
+ },
13243
+ constraintContext
13244
+ );
14010
13245
  }
14011
13246
  /**
14012
13247
  * Start rotating
@@ -14072,11 +13307,14 @@ void main(void) {
14072
13307
  * Start zooming
14073
13308
  * @param {[Number, Number]} pos - position on screen where the center is
14074
13309
  */
14075
- zoomStart({ pos }) {
14076
- return this._getUpdatedState({
14077
- startZoomLngLat: this._unproject(pos),
14078
- startZoom: this.getViewportProps().zoom
14079
- });
13310
+ zoomStart({ pos }, constraintContext) {
13311
+ return this._getUpdatedState(
13312
+ {
13313
+ startZoomLngLat: this._unproject(pos),
13314
+ startZoom: this.getViewportProps().zoom
13315
+ },
13316
+ constraintContext
13317
+ );
14080
13318
  }
14081
13319
  /**
14082
13320
  * Zoom
@@ -14090,7 +13328,7 @@ void main(void) {
14090
13328
  pos,
14091
13329
  startPos,
14092
13330
  scale: scale5
14093
- }) {
13331
+ }, constraintContext) {
14094
13332
  let { startZoom, startZoomLngLat } = this.getState();
14095
13333
  if (!startZoomLngLat) {
14096
13334
  startZoom = this.getViewportProps().zoom;
@@ -14099,40 +13337,44 @@ void main(void) {
14099
13337
  if (!startZoomLngLat) {
14100
13338
  return this;
14101
13339
  }
14102
- const zoom = this._constrainZoom(startZoom + Math.log2(scale5));
14103
- const zoomedViewport = this.makeViewport({ ...this.getViewportProps(), zoom });
14104
- return this._getUpdatedState({
14105
- zoom,
14106
- ...zoomedViewport.panByPosition(startZoomLngLat, pos)
14107
- });
13340
+ return this._getUpdatedState(
13341
+ {
13342
+ zoom: startZoom + Math.log2(scale5),
13343
+ [CONSTRAINT_AROUND]: { position: startZoomLngLat, screenPosition: pos }
13344
+ },
13345
+ constraintContext
13346
+ );
14108
13347
  }
14109
13348
  /**
14110
13349
  * End zooming
14111
13350
  * Must call if `zoomStart()` was called
14112
13351
  */
14113
- zoomEnd() {
14114
- return this._getUpdatedState({
14115
- startZoomLngLat: null,
14116
- startZoom: null
14117
- });
13352
+ zoomEnd(constraintContext) {
13353
+ return this._getUpdatedState(
13354
+ {
13355
+ startZoomLngLat: null,
13356
+ startZoom: null
13357
+ },
13358
+ constraintContext
13359
+ );
14118
13360
  }
14119
- zoomIn(speed = 2) {
14120
- return this._zoomFromCenter(speed);
13361
+ zoomIn(speed = 2, constraintContext) {
13362
+ return this._zoomFromCenter(speed, constraintContext);
14121
13363
  }
14122
- zoomOut(speed = 2) {
14123
- return this._zoomFromCenter(1 / speed);
13364
+ zoomOut(speed = 2, constraintContext) {
13365
+ return this._zoomFromCenter(1 / speed, constraintContext);
14124
13366
  }
14125
- moveLeft(speed = 100) {
14126
- return this._panFromCenter([speed, 0]);
13367
+ moveLeft(speed = 100, constraintContext) {
13368
+ return this._panFromCenter([speed, 0], constraintContext);
14127
13369
  }
14128
- moveRight(speed = 100) {
14129
- return this._panFromCenter([-speed, 0]);
13370
+ moveRight(speed = 100, constraintContext) {
13371
+ return this._panFromCenter([-speed, 0], constraintContext);
14130
13372
  }
14131
- moveUp(speed = 100) {
14132
- return this._panFromCenter([0, speed]);
13373
+ moveUp(speed = 100, constraintContext) {
13374
+ return this._panFromCenter([0, speed], constraintContext);
14133
13375
  }
14134
- moveDown(speed = 100) {
14135
- return this._panFromCenter([0, -speed]);
13376
+ moveDown(speed = 100, constraintContext) {
13377
+ return this._panFromCenter([0, -speed], constraintContext);
14136
13378
  }
14137
13379
  rotateLeft(speed = 15) {
14138
13380
  return this._getUpdatedState({
@@ -14167,28 +13409,70 @@ void main(void) {
14167
13409
  return props;
14168
13410
  }
14169
13411
  // Apply any constraints (mathematical or defined by _viewportProps) to map state
14170
- applyConstraints(props) {
14171
- const { maxPitch, minPitch, pitch, longitude, bearing, normalize: normalize4, maxBounds } = props;
13412
+ applyConstraints(props, constraintContext) {
13413
+ const internalProps = props;
13414
+ const constraintAround = internalProps[CONSTRAINT_AROUND];
13415
+ delete internalProps[CONSTRAINT_AROUND];
13416
+ const { maxPitch, minPitch, pitch, bearing, normalize: normalize4, maxBounds, rubberBand } = props;
14172
13417
  if (normalize4) {
14173
- if (longitude < -180 || longitude > 180) {
14174
- props.longitude = mod(longitude + 180, 360) - 180;
14175
- }
14176
13418
  if (bearing < -180 || bearing > 180) {
14177
13419
  props.bearing = mod(bearing + 180, 360) - 180;
14178
13420
  }
14179
13421
  }
14180
13422
  props.pitch = clamp(pitch, minPitch, maxPitch);
14181
- props.zoom = this._constrainZoom(props.zoom, props);
13423
+ const constrainedZoom = this._constrainZoom(props.zoom, props);
13424
+ const shouldRubberBand = rubberBand && constraintContext?.mode === "elastic";
13425
+ props.zoom = constraintContext?.mode === "preserve" ? props.zoom : shouldRubberBand ? applyRubberBand(props.zoom, constrainedZoom, ZOOM_RUBBER_BAND_RANGE) : constrainedZoom;
13426
+ if (constraintAround) {
13427
+ const viewport = this.makeViewport(props);
13428
+ Object.assign(
13429
+ props,
13430
+ viewport.panByPosition(constraintAround.position, constraintAround.screenPosition)
13431
+ );
13432
+ }
13433
+ if (normalize4 && (props.longitude < -180 || props.longitude > 180)) {
13434
+ props.longitude = mod(props.longitude + 180, 360) - 180;
13435
+ }
14182
13436
  if (maxBounds) {
13437
+ const maxBoundsRect = getMaxBoundsRect(props.width, props.height, props.maxBoundsPadding);
13438
+ const viewport = this.makeViewport({ ...props, bearing: 0, pitch: 0 });
13439
+ const screenExtents = getMaxBoundsExtents(
13440
+ viewport,
13441
+ [props.longitude, props.latitude],
13442
+ maxBoundsRect
13443
+ );
14183
13444
  const bl = lngLatToWorld2(maxBounds[0]);
14184
13445
  const tr = lngLatToWorld2(maxBounds[1]);
14185
13446
  const scale5 = 2 ** props.zoom;
14186
- const halfWidth = props.width / 2 / scale5;
14187
- const halfHeight = props.height / 2 / scale5;
14188
- const [minLng, minLat] = worldToLngLat([bl[0] + halfWidth, bl[1] + halfHeight]);
14189
- const [maxLng, maxLat] = worldToLngLat([tr[0] - halfWidth, tr[1] - halfHeight]);
14190
- props.longitude = clamp(props.longitude, minLng, maxLng);
14191
- props.latitude = clamp(props.latitude, minLat, maxLat);
13447
+ const minimumCenter = [
13448
+ bl[0] + screenExtents.left / scale5,
13449
+ bl[1] + screenExtents.bottom / scale5
13450
+ ];
13451
+ const maximumCenter = [
13452
+ tr[0] - screenExtents.right / scale5,
13453
+ tr[1] - screenExtents.top / scale5
13454
+ ];
13455
+ const center = lngLatToWorld2([props.longitude, props.latitude]);
13456
+ const constrainedCenter = [
13457
+ clamp(center[0], minimumCenter[0], maximumCenter[0]),
13458
+ clamp(center[1], minimumCenter[1], maximumCenter[1])
13459
+ ];
13460
+ const displayedCenter = center.slice();
13461
+ if (maxBoundsRect.width >= 0) {
13462
+ displayedCenter[0] = constraintContext?.mode === "preserve" ? center[0] : shouldRubberBand ? applyRubberBand(center[0], constrainedCenter[0], maxBoundsRect.width / 2 / scale5) : constrainedCenter[0];
13463
+ }
13464
+ if (maxBoundsRect.height >= 0) {
13465
+ displayedCenter[1] = constraintContext?.mode === "preserve" ? center[1] : shouldRubberBand ? applyRubberBand(center[1], constrainedCenter[1], maxBoundsRect.height / 2 / scale5) : constrainedCenter[1];
13466
+ }
13467
+ if (displayedCenter[0] !== center[0] || displayedCenter[1] !== center[1]) {
13468
+ const [displayedLongitude, displayedLatitude] = worldToLngLat(displayedCenter);
13469
+ if (displayedCenter[0] !== center[0]) {
13470
+ props.longitude = displayedLongitude;
13471
+ }
13472
+ if (displayedCenter[1] !== center[1]) {
13473
+ props.latitude = displayedLatitude;
13474
+ }
13475
+ }
14192
13476
  }
14193
13477
  return props;
14194
13478
  }
@@ -14199,41 +13483,48 @@ void main(void) {
14199
13483
  const shouldApplyMaxBounds = maxBounds !== null && props.width > 0 && props.height > 0;
14200
13484
  let { minZoom } = props;
14201
13485
  if (shouldApplyMaxBounds) {
13486
+ const maxBoundsRect = getMaxBoundsRect(props.width, props.height, props.maxBoundsPadding);
14202
13487
  const bl = lngLatToWorld2(maxBounds[0]);
14203
13488
  const tr = lngLatToWorld2(maxBounds[1]);
14204
13489
  const w = tr[0] - bl[0];
14205
13490
  const h = tr[1] - bl[1];
14206
- if (Number.isFinite(w) && w > 0) {
14207
- minZoom = Math.max(minZoom, Math.log2(props.width / w));
13491
+ if (maxBoundsRect.width > 0 && Number.isFinite(w) && w > 0) {
13492
+ minZoom = Math.max(minZoom, Math.log2(maxBoundsRect.width / w));
14208
13493
  }
14209
- if (Number.isFinite(h) && h > 0) {
14210
- minZoom = Math.max(minZoom, Math.log2(props.height / h));
13494
+ if (maxBoundsRect.height > 0 && Number.isFinite(h) && h > 0) {
13495
+ minZoom = Math.max(minZoom, Math.log2(maxBoundsRect.height / h));
14211
13496
  }
14212
- if (minZoom > maxZoom)
14213
- minZoom = maxZoom;
13497
+ if (minZoom > maxZoom) minZoom = maxZoom;
14214
13498
  }
14215
13499
  return clamp(zoom, minZoom, maxZoom);
14216
13500
  }
14217
- _zoomFromCenter(scale5) {
13501
+ _zoomFromCenter(scale5, constraintContext) {
14218
13502
  const { width, height } = this.getViewportProps();
14219
- return this.zoom({
14220
- pos: [width / 2, height / 2],
14221
- scale: scale5
14222
- });
13503
+ return this.zoom(
13504
+ {
13505
+ pos: [width / 2, height / 2],
13506
+ scale: scale5
13507
+ },
13508
+ constraintContext
13509
+ );
14223
13510
  }
14224
- _panFromCenter(offset) {
13511
+ _panFromCenter(offset, constraintContext) {
14225
13512
  const { width, height } = this.getViewportProps();
14226
- return this.pan({
14227
- startPos: [width / 2, height / 2],
14228
- pos: [width / 2 + offset[0], height / 2 + offset[1]]
14229
- });
13513
+ return this.pan(
13514
+ {
13515
+ startPos: [width / 2, height / 2],
13516
+ pos: [width / 2 + offset[0], height / 2 + offset[1]]
13517
+ },
13518
+ constraintContext
13519
+ );
14230
13520
  }
14231
- _getUpdatedState(newProps) {
13521
+ _getUpdatedState(newProps, constraintContext) {
14232
13522
  return new this.constructor({
14233
13523
  makeViewport: this.makeViewport,
14234
13524
  ...this.getViewportProps(),
14235
13525
  ...this.getState(),
14236
- ...newProps
13526
+ ...newProps,
13527
+ constraintContext
14237
13528
  });
14238
13529
  }
14239
13530
  _unproject(pos) {