@antv/l7-renderer 2.18.0 → 2.18.2

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.
@@ -1,305 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/regl/ReglModel.ts
20
- var ReglModel_exports = {};
21
- __export(ReglModel_exports, {
22
- default: () => ReglModel
23
- });
24
- module.exports = __toCommonJS(ReglModel_exports);
25
- var import_l7_core = require("@antv/l7-core");
26
- var import_l7_utils = require("@antv/l7-utils");
27
- var import_constants = require("./constants");
28
- var { isPlainObject, isTypedArray } = import_l7_utils.lodashUtil;
29
- var ReglModel = class {
30
- constructor(reGl, options) {
31
- this.destroyed = false;
32
- this.uniforms = {};
33
- this.reGl = reGl;
34
- const {
35
- vs,
36
- fs,
37
- attributes,
38
- uniforms,
39
- primitive,
40
- count,
41
- elements,
42
- depth,
43
- cull,
44
- instances
45
- } = options;
46
- const reglUniforms = {};
47
- this.options = options;
48
- if (uniforms) {
49
- this.uniforms = this.extractUniforms(uniforms);
50
- Object.keys(uniforms).forEach((uniformName) => {
51
- reglUniforms[uniformName] = reGl.prop(uniformName);
52
- });
53
- }
54
- const reglAttributes = {};
55
- Object.keys(attributes).forEach((name) => {
56
- reglAttributes[name] = attributes[name].get();
57
- });
58
- const drawParams = {
59
- attributes: reglAttributes,
60
- frag: fs,
61
- uniforms: reglUniforms,
62
- vert: vs,
63
- // @ts-ignore
64
- colorMask: reGl.prop("colorMask"),
65
- lineWidth: 1,
66
- blend: {
67
- // @ts-ignore
68
- enable: reGl.prop("blend.enable"),
69
- // @ts-ignore
70
- func: reGl.prop("blend.func"),
71
- // @ts-ignore
72
- equation: reGl.prop("blend.equation"),
73
- // @ts-ignore
74
- color: reGl.prop("blend.color")
75
- },
76
- stencil: {
77
- // @ts-ignore
78
- enable: reGl.prop("stencil.enable"),
79
- // @ts-ignore
80
- mask: reGl.prop("stencil.mask"),
81
- // @ts-ignore
82
- func: reGl.prop("stencil.func"),
83
- // @ts-ignore
84
- opFront: reGl.prop("stencil.opFront"),
85
- // @ts-ignore
86
- opBack: reGl.prop("stencil.opBack")
87
- },
88
- primitive: import_constants.primitiveMap[primitive === void 0 ? import_l7_core.gl.TRIANGLES : primitive]
89
- };
90
- if (instances) {
91
- drawParams.instances = instances;
92
- }
93
- if (count) {
94
- drawParams.count = count;
95
- } else if (elements) {
96
- drawParams.elements = elements.get();
97
- }
98
- this.initDepthDrawParams({ depth }, drawParams);
99
- this.initCullDrawParams({ cull }, drawParams);
100
- this.drawCommand = reGl(drawParams);
101
- this.drawParams = drawParams;
102
- }
103
- updateAttributesAndElements(attributes, elements) {
104
- const reglAttributes = {};
105
- Object.keys(attributes).forEach((name) => {
106
- reglAttributes[name] = attributes[name].get();
107
- });
108
- this.drawParams.attributes = reglAttributes;
109
- this.drawParams.elements = elements.get();
110
- this.drawCommand = this.reGl(this.drawParams);
111
- }
112
- updateAttributes(attributes) {
113
- const reglAttributes = {};
114
- Object.keys(attributes).forEach((name) => {
115
- reglAttributes[name] = attributes[name].get();
116
- });
117
- this.drawParams.attributes = reglAttributes;
118
- this.drawCommand = this.reGl(this.drawParams);
119
- }
120
- addUniforms(uniforms) {
121
- this.uniforms = {
122
- ...this.uniforms,
123
- ...this.extractUniforms(uniforms)
124
- };
125
- }
126
- draw(options, pick) {
127
- if (this.drawParams.attributes && Object.keys(this.drawParams.attributes).length === 0) {
128
- return;
129
- }
130
- const uniforms = {
131
- ...this.uniforms,
132
- ...this.extractUniforms(options.uniforms || {})
133
- };
134
- const reglDrawProps = {};
135
- Object.keys(uniforms).forEach((uniformName) => {
136
- const type = typeof uniforms[uniformName];
137
- if (type === "boolean" || type === "number" || Array.isArray(uniforms[uniformName]) || // @ts-ignore
138
- uniforms[uniformName].BYTES_PER_ELEMENT) {
139
- reglDrawProps[uniformName] = uniforms[uniformName];
140
- } else {
141
- reglDrawProps[uniformName] = uniforms[uniformName].get();
142
- }
143
- });
144
- reglDrawProps.blend = pick ? this.getBlendDrawParams({
145
- blend: { enable: false }
146
- }) : this.getBlendDrawParams(options);
147
- reglDrawProps.stencil = this.getStencilDrawParams(options);
148
- reglDrawProps.colorMask = this.getColorMaskDrawParams(options, pick);
149
- this.drawCommand(reglDrawProps);
150
- }
151
- destroy() {
152
- var _a, _b;
153
- (_b = (_a = this.drawParams) == null ? void 0 : _a.elements) == null ? void 0 : _b.destroy();
154
- if (this.options.attributes) {
155
- Object.values(this.options.attributes).forEach((attr) => {
156
- attr == null ? void 0 : attr.destroy();
157
- });
158
- }
159
- this.destroyed = true;
160
- }
161
- /**
162
- * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#depth-buffer
163
- */
164
- initDepthDrawParams({ depth }, drawParams) {
165
- if (depth) {
166
- drawParams.depth = {
167
- enable: depth.enable === void 0 ? true : !!depth.enable,
168
- mask: depth.mask === void 0 ? true : !!depth.mask,
169
- func: import_constants.depthFuncMap[depth.func || import_l7_core.gl.LESS],
170
- range: depth.range || [0, 1]
171
- };
172
- }
173
- }
174
- getBlendDrawParams({
175
- blend
176
- }) {
177
- const { enable, func, equation, color = [0, 0, 0, 0] } = blend || {};
178
- return {
179
- enable: !!enable,
180
- func: {
181
- srcRGB: import_constants.blendFuncMap[func && func.srcRGB || import_l7_core.gl.SRC_ALPHA],
182
- srcAlpha: import_constants.blendFuncMap[func && func.srcAlpha || import_l7_core.gl.SRC_ALPHA],
183
- dstRGB: import_constants.blendFuncMap[func && func.dstRGB || import_l7_core.gl.ONE_MINUS_SRC_ALPHA],
184
- dstAlpha: import_constants.blendFuncMap[func && func.dstAlpha || import_l7_core.gl.ONE_MINUS_SRC_ALPHA]
185
- },
186
- equation: {
187
- rgb: import_constants.blendEquationMap[equation && equation.rgb || import_l7_core.gl.FUNC_ADD],
188
- alpha: import_constants.blendEquationMap[equation && equation.alpha || import_l7_core.gl.FUNC_ADD]
189
- },
190
- color
191
- };
192
- }
193
- /**
194
- * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#stencil
195
- */
196
- getStencilDrawParams({
197
- stencil
198
- }) {
199
- const {
200
- enable,
201
- mask = -1,
202
- func = {
203
- cmp: import_l7_core.gl.ALWAYS,
204
- ref: 0,
205
- mask: -1
206
- },
207
- opFront = {
208
- fail: import_l7_core.gl.KEEP,
209
- zfail: import_l7_core.gl.KEEP,
210
- zpass: import_l7_core.gl.KEEP
211
- },
212
- opBack = {
213
- fail: import_l7_core.gl.KEEP,
214
- zfail: import_l7_core.gl.KEEP,
215
- zpass: import_l7_core.gl.KEEP
216
- }
217
- } = stencil || {};
218
- return {
219
- enable: !!enable,
220
- mask,
221
- func: {
222
- ...func,
223
- cmp: import_constants.stencilFuncMap[func.cmp]
224
- },
225
- opFront: {
226
- fail: import_constants.stencilOpMap[opFront.fail],
227
- zfail: import_constants.stencilOpMap[opFront.zfail],
228
- zpass: import_constants.stencilOpMap[opFront.zpass]
229
- },
230
- opBack: {
231
- fail: import_constants.stencilOpMap[opBack.fail],
232
- zfail: import_constants.stencilOpMap[opBack.zfail],
233
- zpass: import_constants.stencilOpMap[opBack.zpass]
234
- }
235
- };
236
- }
237
- getColorMaskDrawParams({ stencil }, pick) {
238
- const colorMask = (stencil == null ? void 0 : stencil.enable) && stencil.opFront && !pick ? [false, false, false, false] : [true, true, true, true];
239
- return colorMask;
240
- }
241
- /**
242
- * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#culling
243
- */
244
- initCullDrawParams({ cull }, drawParams) {
245
- if (cull) {
246
- const { enable, face = import_l7_core.gl.BACK } = cull;
247
- drawParams.cull = {
248
- enable: !!enable,
249
- face: import_constants.cullFaceMap[face]
250
- };
251
- }
252
- }
253
- /**
254
- * 考虑结构体命名, eg:
255
- * a: { b: 1 } -> 'a.b'
256
- * a: [ { b: 1 } ] -> 'a[0].b'
257
- */
258
- extractUniforms(uniforms) {
259
- const extractedUniforms = {};
260
- Object.keys(uniforms).forEach((uniformName) => {
261
- this.extractUniformsRecursively(
262
- uniformName,
263
- uniforms[uniformName],
264
- extractedUniforms,
265
- ""
266
- );
267
- });
268
- return extractedUniforms;
269
- }
270
- extractUniformsRecursively(uniformName, uniformValue, uniforms, prefix) {
271
- if (uniformValue === null || typeof uniformValue === "number" || // u_A: 1
272
- typeof uniformValue === "boolean" || // u_A: false
273
- Array.isArray(uniformValue) && typeof uniformValue[0] === "number" || // u_A: [1, 2, 3]
274
- isTypedArray(uniformValue) || // u_A: Float32Array
275
- // @ts-ignore
276
- uniformValue === "" || "resize" in uniformValue) {
277
- uniforms[`${prefix && prefix + "."}${uniformName}`] = uniformValue;
278
- return;
279
- }
280
- if (isPlainObject(uniformValue)) {
281
- Object.keys(uniformValue).forEach((childName) => {
282
- this.extractUniformsRecursively(
283
- childName,
284
- // @ts-ignore
285
- uniformValue[childName],
286
- uniforms,
287
- `${prefix && prefix + "."}${uniformName}`
288
- );
289
- });
290
- }
291
- if (Array.isArray(uniformValue)) {
292
- uniformValue.forEach((child, idx) => {
293
- Object.keys(child).forEach((childName) => {
294
- this.extractUniformsRecursively(
295
- childName,
296
- // @ts-ignore
297
- child[childName],
298
- uniforms,
299
- `${prefix && prefix + "."}${uniformName}[${idx}]`
300
- );
301
- });
302
- });
303
- }
304
- }
305
- };
@@ -1,44 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/regl/ReglRenderbuffer.ts
20
- var ReglRenderbuffer_exports = {};
21
- __export(ReglRenderbuffer_exports, {
22
- default: () => ReglRenderbuffer
23
- });
24
- module.exports = __toCommonJS(ReglRenderbuffer_exports);
25
- var import_constants = require("./constants");
26
- var ReglRenderbuffer = class {
27
- constructor(reGl, options) {
28
- const { width, height, format } = options;
29
- this.renderbuffer = reGl.renderbuffer({
30
- width,
31
- height,
32
- format: import_constants.formatMap[format]
33
- });
34
- }
35
- get() {
36
- return this.renderbuffer;
37
- }
38
- destroy() {
39
- this.renderbuffer.destroy();
40
- }
41
- resize({ width, height }) {
42
- this.renderbuffer.resize(width, height);
43
- }
44
- };
@@ -1,107 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/regl/ReglTexture2D.ts
20
- var ReglTexture2D_exports = {};
21
- __export(ReglTexture2D_exports, {
22
- default: () => ReglTexture2D
23
- });
24
- module.exports = __toCommonJS(ReglTexture2D_exports);
25
- var import_l7_core = require("@antv/l7-core");
26
- var import_constants = require("./constants");
27
- var ReglTexture2D = class {
28
- constructor(reGl, options) {
29
- this.isDestroy = false;
30
- const {
31
- data,
32
- type = import_l7_core.gl.UNSIGNED_BYTE,
33
- width,
34
- height,
35
- flipY = false,
36
- format = import_l7_core.gl.RGBA,
37
- mipmap = false,
38
- wrapS = import_l7_core.gl.CLAMP_TO_EDGE,
39
- wrapT = import_l7_core.gl.CLAMP_TO_EDGE,
40
- aniso = 0,
41
- alignment = 1,
42
- premultiplyAlpha = false,
43
- mag = import_l7_core.gl.NEAREST,
44
- min = import_l7_core.gl.NEAREST,
45
- colorSpace = import_l7_core.gl.BROWSER_DEFAULT_WEBGL,
46
- x = 0,
47
- y = 0,
48
- copy = false
49
- } = options;
50
- this.width = width;
51
- this.height = height;
52
- const textureOptions = {
53
- width,
54
- height,
55
- // @ts-ignore
56
- type: import_constants.dataTypeMap[type],
57
- format: import_constants.formatMap[format],
58
- wrapS: import_constants.wrapModeMap[wrapS],
59
- wrapT: import_constants.wrapModeMap[wrapT],
60
- // @ts-ignore
61
- mag: import_constants.filterMap[mag],
62
- min: import_constants.filterMap[min],
63
- alignment,
64
- flipY,
65
- colorSpace: import_constants.colorSpaceMap[colorSpace],
66
- premultiplyAlpha,
67
- aniso,
68
- // copy pixels from current bind framebuffer
69
- x,
70
- y,
71
- copy
72
- };
73
- if (data) {
74
- textureOptions.data = data;
75
- }
76
- if (typeof mipmap === "number") {
77
- textureOptions.mipmap = import_constants.mipmapMap[mipmap];
78
- } else if (typeof mipmap === "boolean") {
79
- textureOptions.mipmap = mipmap;
80
- }
81
- this.texture = reGl.texture(textureOptions);
82
- }
83
- get() {
84
- return this.texture;
85
- }
86
- update(props = {}) {
87
- this.texture(props);
88
- }
89
- bind() {
90
- this.texture._texture.bind();
91
- }
92
- resize({ width, height }) {
93
- this.texture.resize(width, height);
94
- this.width = width;
95
- this.height = height;
96
- }
97
- getSize() {
98
- return [this.width, this.height];
99
- }
100
- destroy() {
101
- var _a;
102
- if (!this.isDestroy) {
103
- (_a = this.texture) == null ? void 0 : _a.destroy();
104
- }
105
- this.isDestroy = true;
106
- }
107
- };
@@ -1,170 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/regl/constants.ts
20
- var constants_exports = {};
21
- __export(constants_exports, {
22
- blendEquationMap: () => blendEquationMap,
23
- blendFuncMap: () => blendFuncMap,
24
- colorSpaceMap: () => colorSpaceMap,
25
- cullFaceMap: () => cullFaceMap,
26
- dataTypeMap: () => dataTypeMap,
27
- depthFuncMap: () => depthFuncMap,
28
- filterMap: () => filterMap,
29
- formatMap: () => formatMap,
30
- mipmapMap: () => mipmapMap,
31
- primitiveMap: () => primitiveMap,
32
- stencilFuncMap: () => stencilFuncMap,
33
- stencilOpMap: () => stencilOpMap,
34
- usageMap: () => usageMap,
35
- wrapModeMap: () => wrapModeMap
36
- });
37
- module.exports = __toCommonJS(constants_exports);
38
- var import_l7_core = require("@antv/l7-core");
39
- var primitiveMap = {
40
- [import_l7_core.gl.POINTS]: "points",
41
- [import_l7_core.gl.LINES]: "lines",
42
- [import_l7_core.gl.LINE_LOOP]: "line loop",
43
- [import_l7_core.gl.LINE_STRIP]: "line strip",
44
- [import_l7_core.gl.TRIANGLES]: "triangles",
45
- [import_l7_core.gl.TRIANGLE_FAN]: "triangle fan",
46
- [import_l7_core.gl.TRIANGLE_STRIP]: "triangle strip"
47
- };
48
- var usageMap = {
49
- [import_l7_core.gl.STATIC_DRAW]: "static",
50
- [import_l7_core.gl.DYNAMIC_DRAW]: "dynamic",
51
- [import_l7_core.gl.STREAM_DRAW]: "stream"
52
- };
53
- var dataTypeMap = {
54
- [import_l7_core.gl.BYTE]: "int8",
55
- [import_l7_core.gl.UNSIGNED_INT]: "int16",
56
- [import_l7_core.gl.INT]: "int32",
57
- [import_l7_core.gl.UNSIGNED_BYTE]: "uint8",
58
- [import_l7_core.gl.UNSIGNED_SHORT]: "uint16",
59
- [import_l7_core.gl.UNSIGNED_INT]: "uint32",
60
- [import_l7_core.gl.FLOAT]: "float"
61
- };
62
- var formatMap = {
63
- [import_l7_core.gl.ALPHA]: "alpha",
64
- [import_l7_core.gl.LUMINANCE]: "luminance",
65
- [import_l7_core.gl.LUMINANCE_ALPHA]: "luminance alpha",
66
- [import_l7_core.gl.RGB]: "rgb",
67
- [import_l7_core.gl.RGBA]: "rgba",
68
- [import_l7_core.gl.RGBA4]: "rgba4",
69
- [import_l7_core.gl.RGB5_A1]: "rgb5 a1",
70
- [import_l7_core.gl.RGB565]: "rgb565",
71
- [import_l7_core.gl.DEPTH_COMPONENT]: "depth",
72
- [import_l7_core.gl.DEPTH_STENCIL]: "depth stencil"
73
- };
74
- var mipmapMap = {
75
- [import_l7_core.gl.DONT_CARE]: "dont care",
76
- [import_l7_core.gl.NICEST]: "nice",
77
- [import_l7_core.gl.FASTEST]: "fast"
78
- };
79
- var filterMap = {
80
- [import_l7_core.gl.NEAREST]: "nearest",
81
- [import_l7_core.gl.LINEAR]: "linear",
82
- [import_l7_core.gl.LINEAR_MIPMAP_LINEAR]: "mipmap",
83
- [import_l7_core.gl.NEAREST_MIPMAP_LINEAR]: "nearest mipmap linear",
84
- [import_l7_core.gl.LINEAR_MIPMAP_NEAREST]: "linear mipmap nearest",
85
- [import_l7_core.gl.NEAREST_MIPMAP_NEAREST]: "nearest mipmap nearest"
86
- };
87
- var wrapModeMap = {
88
- [import_l7_core.gl.REPEAT]: "repeat",
89
- [import_l7_core.gl.CLAMP_TO_EDGE]: "clamp",
90
- [import_l7_core.gl.MIRRORED_REPEAT]: "mirror"
91
- };
92
- var colorSpaceMap = {
93
- [import_l7_core.gl.NONE]: "none",
94
- [import_l7_core.gl.BROWSER_DEFAULT_WEBGL]: "browser"
95
- };
96
- var depthFuncMap = {
97
- [import_l7_core.gl.NEVER]: "never",
98
- [import_l7_core.gl.ALWAYS]: "always",
99
- [import_l7_core.gl.LESS]: "less",
100
- [import_l7_core.gl.LEQUAL]: "lequal",
101
- [import_l7_core.gl.GREATER]: "greater",
102
- [import_l7_core.gl.GEQUAL]: "gequal",
103
- [import_l7_core.gl.EQUAL]: "equal",
104
- [import_l7_core.gl.NOTEQUAL]: "notequal"
105
- };
106
- var blendEquationMap = {
107
- [import_l7_core.gl.FUNC_ADD]: "add",
108
- [import_l7_core.gl.MIN_EXT]: "min",
109
- [import_l7_core.gl.MAX_EXT]: "max",
110
- [import_l7_core.gl.FUNC_SUBTRACT]: "subtract",
111
- [import_l7_core.gl.FUNC_REVERSE_SUBTRACT]: "reverse subtract"
112
- };
113
- var blendFuncMap = {
114
- [import_l7_core.gl.ZERO]: "zero",
115
- [import_l7_core.gl.ONE]: "one",
116
- [import_l7_core.gl.SRC_COLOR]: "src color",
117
- [import_l7_core.gl.ONE_MINUS_SRC_COLOR]: "one minus src color",
118
- [import_l7_core.gl.SRC_ALPHA]: "src alpha",
119
- [import_l7_core.gl.ONE_MINUS_SRC_ALPHA]: "one minus src alpha",
120
- [import_l7_core.gl.DST_COLOR]: "dst color",
121
- [import_l7_core.gl.ONE_MINUS_DST_COLOR]: "one minus dst color",
122
- [import_l7_core.gl.DST_ALPHA]: "dst alpha",
123
- [import_l7_core.gl.ONE_MINUS_DST_ALPHA]: "one minus dst alpha",
124
- [import_l7_core.gl.CONSTANT_COLOR]: "constant color",
125
- [import_l7_core.gl.ONE_MINUS_CONSTANT_COLOR]: "one minus constant color",
126
- [import_l7_core.gl.CONSTANT_ALPHA]: "constant alpha",
127
- [import_l7_core.gl.ONE_MINUS_CONSTANT_ALPHA]: "one minus constant alpha",
128
- [import_l7_core.gl.SRC_ALPHA_SATURATE]: "src alpha saturate"
129
- };
130
- var stencilFuncMap = {
131
- [import_l7_core.gl.NEVER]: "never",
132
- [import_l7_core.gl.ALWAYS]: "always",
133
- [import_l7_core.gl.LESS]: "less",
134
- [import_l7_core.gl.LEQUAL]: "lequal",
135
- [import_l7_core.gl.GREATER]: "greater",
136
- [import_l7_core.gl.GEQUAL]: "gequal",
137
- [import_l7_core.gl.EQUAL]: "equal",
138
- [import_l7_core.gl.NOTEQUAL]: "notequal"
139
- };
140
- var stencilOpMap = {
141
- [import_l7_core.gl.ZERO]: "zero",
142
- [import_l7_core.gl.KEEP]: "keep",
143
- [import_l7_core.gl.REPLACE]: "replace",
144
- [import_l7_core.gl.INVERT]: "invert",
145
- [import_l7_core.gl.INCR]: "increment",
146
- [import_l7_core.gl.DECR]: "decrement",
147
- [import_l7_core.gl.INCR_WRAP]: "increment wrap",
148
- [import_l7_core.gl.DECR_WRAP]: "decrement wrap"
149
- };
150
- var cullFaceMap = {
151
- [import_l7_core.gl.FRONT]: "front",
152
- [import_l7_core.gl.BACK]: "back"
153
- };
154
- // Annotate the CommonJS export names for ESM import in node:
155
- 0 && (module.exports = {
156
- blendEquationMap,
157
- blendFuncMap,
158
- colorSpaceMap,
159
- cullFaceMap,
160
- dataTypeMap,
161
- depthFuncMap,
162
- filterMap,
163
- formatMap,
164
- mipmapMap,
165
- primitiveMap,
166
- stencilFuncMap,
167
- stencilOpMap,
168
- usageMap,
169
- wrapModeMap
170
- });