@antv/l7-renderer 2.21.1 → 2.21.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.
Files changed (53) hide show
  1. package/es/device/DeviceAttribute.js +26 -32
  2. package/es/device/DeviceBuffer.js +31 -49
  3. package/es/device/DeviceCache.js +136 -170
  4. package/es/device/DeviceElements.js +32 -38
  5. package/es/device/DeviceFramebuffer.js +76 -104
  6. package/es/device/DeviceModel.js +358 -384
  7. package/es/device/DeviceTexture2D.js +103 -122
  8. package/es/device/constants.js +117 -34
  9. package/es/device/index.js +254 -381
  10. package/es/device/utils/HashMap.js +71 -138
  11. package/es/device/utils/pipeline.js +6 -1
  12. package/es/device/utils/typedarray.js +23 -24
  13. package/es/device/utils/webgl.js +7 -6
  14. package/es/index.js +5 -4
  15. package/es/regl/ReglAttribute.js +17 -33
  16. package/es/regl/ReglBuffer.js +25 -40
  17. package/es/regl/ReglElements.js +21 -36
  18. package/es/regl/ReglFramebuffer.js +24 -44
  19. package/es/regl/ReglModel.js +266 -306
  20. package/es/regl/ReglRenderbuffer.js +19 -36
  21. package/es/regl/ReglTexture2D.js +72 -103
  22. package/es/regl/constants.js +133 -21
  23. package/es/regl/index.js +205 -289
  24. package/lib/device/DeviceAttribute.d.ts +13 -0
  25. package/lib/device/DeviceBuffer.d.ts +18 -0
  26. package/lib/device/DeviceCache.d.ts +14 -0
  27. package/lib/device/DeviceElements.d.ts +13 -0
  28. package/lib/device/DeviceFramebuffer.d.ts +24 -0
  29. package/lib/device/DeviceModel.d.ts +53 -0
  30. package/lib/device/DeviceModel.js +22 -15
  31. package/lib/device/DeviceTexture2D.d.ts +23 -0
  32. package/lib/device/constants.d.ts +35 -0
  33. package/lib/device/index.d.ts +68 -0
  34. package/lib/device/index.js +58 -36
  35. package/lib/device/utils/HashMap.d.ts +24 -0
  36. package/lib/device/utils/pipeline.d.ts +1 -0
  37. package/lib/device/utils/typedarray.d.ts +7 -0
  38. package/lib/device/utils/webgl.d.ts +1 -0
  39. package/lib/index.d.ts +6 -0
  40. package/lib/regl/ReglAttribute.d.ts +16 -0
  41. package/lib/regl/ReglBuffer.d.ts +17 -0
  42. package/lib/regl/ReglElements.d.ts +14 -0
  43. package/lib/regl/ReglFramebuffer.d.ts +16 -0
  44. package/lib/regl/ReglModel.d.ts +46 -0
  45. package/lib/regl/ReglModel.js +21 -11
  46. package/lib/regl/ReglRenderbuffer.d.ts +16 -0
  47. package/lib/regl/ReglTexture2D.d.ts +22 -0
  48. package/lib/regl/constants.d.ts +43 -0
  49. package/lib/regl/index.d.ts +56 -0
  50. package/lib/regl/index.js +70 -48
  51. package/package.json +14 -18
  52. package/CHANGELOG.md +0 -350
  53. package/LICENSE.md +0 -21
@@ -1,41 +1,24 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
1
+ // src/regl/ReglRenderbuffer.ts
3
2
  import { formatMap } from "./constants";
4
-
5
- /**
6
- * adaptor for regl.Renderbuffer
7
- * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#renderbuffers
8
- */
9
- var ReglRenderbuffer = /*#__PURE__*/function () {
10
- function ReglRenderbuffer(reGl, options) {
11
- _classCallCheck(this, ReglRenderbuffer);
12
- var width = options.width,
13
- height = options.height,
14
- format = options.format;
3
+ var ReglRenderbuffer = class {
4
+ constructor(reGl, options) {
5
+ const { width, height, format } = options;
15
6
  this.renderbuffer = reGl.renderbuffer({
16
- width: width,
17
- height: height,
7
+ width,
8
+ height,
18
9
  format: formatMap[format]
19
10
  });
20
11
  }
21
- _createClass(ReglRenderbuffer, [{
22
- key: "get",
23
- value: function get() {
24
- return this.renderbuffer;
25
- }
26
- }, {
27
- key: "destroy",
28
- value: function destroy() {
29
- this.renderbuffer.destroy();
30
- }
31
- }, {
32
- key: "resize",
33
- value: function resize(_ref) {
34
- var width = _ref.width,
35
- height = _ref.height;
36
- this.renderbuffer.resize(width, height);
37
- }
38
- }]);
39
- return ReglRenderbuffer;
40
- }();
41
- export { ReglRenderbuffer as default };
12
+ get() {
13
+ return this.renderbuffer;
14
+ }
15
+ destroy() {
16
+ this.renderbuffer.destroy();
17
+ }
18
+ resize({ width, height }) {
19
+ this.renderbuffer.resize(width, height);
20
+ }
21
+ };
22
+ export {
23
+ ReglRenderbuffer as default
24
+ };
@@ -1,55 +1,41 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
4
- import { gl } from '@antv/l7-core';
5
- import { colorSpaceMap, dataTypeMap, filterMap, formatMap, mipmapMap, wrapModeMap } from "./constants";
6
-
7
- /**
8
- * adaptor for regl.Buffer
9
- * @see https://github.com/regl-project/regl/blob/gh-pages/API.md#buffers
10
- */
11
- var ReglTexture2D = /*#__PURE__*/function () {
12
- function ReglTexture2D(reGl, options) {
13
- _classCallCheck(this, ReglTexture2D);
14
- _defineProperty(this, "isDestroy", false);
15
- var data = options.data,
16
- _options$type = options.type,
17
- type = _options$type === void 0 ? gl.UNSIGNED_BYTE : _options$type,
18
- width = options.width,
19
- height = options.height,
20
- _options$flipY = options.flipY,
21
- flipY = _options$flipY === void 0 ? false : _options$flipY,
22
- _options$format = options.format,
23
- format = _options$format === void 0 ? gl.RGBA : _options$format,
24
- _options$mipmap = options.mipmap,
25
- mipmap = _options$mipmap === void 0 ? false : _options$mipmap,
26
- _options$wrapS = options.wrapS,
27
- wrapS = _options$wrapS === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapS,
28
- _options$wrapT = options.wrapT,
29
- wrapT = _options$wrapT === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapT,
30
- _options$aniso = options.aniso,
31
- aniso = _options$aniso === void 0 ? 0 : _options$aniso,
32
- _options$alignment = options.alignment,
33
- alignment = _options$alignment === void 0 ? 1 : _options$alignment,
34
- _options$premultiplyA = options.premultiplyAlpha,
35
- premultiplyAlpha = _options$premultiplyA === void 0 ? false : _options$premultiplyA,
36
- _options$mag = options.mag,
37
- mag = _options$mag === void 0 ? gl.NEAREST : _options$mag,
38
- _options$min = options.min,
39
- min = _options$min === void 0 ? gl.NEAREST : _options$min,
40
- _options$colorSpace = options.colorSpace,
41
- colorSpace = _options$colorSpace === void 0 ? gl.BROWSER_DEFAULT_WEBGL : _options$colorSpace,
42
- _options$x = options.x,
43
- x = _options$x === void 0 ? 0 : _options$x,
44
- _options$y = options.y,
45
- y = _options$y === void 0 ? 0 : _options$y,
46
- _options$copy = options.copy,
47
- copy = _options$copy === void 0 ? false : _options$copy;
1
+ // src/regl/ReglTexture2D.ts
2
+ import { gl } from "@antv/l7-core";
3
+ import {
4
+ colorSpaceMap,
5
+ dataTypeMap,
6
+ filterMap,
7
+ formatMap,
8
+ mipmapMap,
9
+ wrapModeMap
10
+ } from "./constants";
11
+ var ReglTexture2D = class {
12
+ constructor(reGl, options) {
13
+ this.isDestroy = false;
14
+ const {
15
+ data,
16
+ type = gl.UNSIGNED_BYTE,
17
+ width,
18
+ height,
19
+ flipY = false,
20
+ format = gl.RGBA,
21
+ mipmap = false,
22
+ wrapS = gl.CLAMP_TO_EDGE,
23
+ wrapT = gl.CLAMP_TO_EDGE,
24
+ aniso = 0,
25
+ alignment = 1,
26
+ premultiplyAlpha = false,
27
+ mag = gl.NEAREST,
28
+ min = gl.NEAREST,
29
+ colorSpace = gl.BROWSER_DEFAULT_WEBGL,
30
+ x = 0,
31
+ y = 0,
32
+ copy = false
33
+ } = options;
48
34
  this.width = width;
49
35
  this.height = height;
50
- var textureOptions = {
51
- width: width,
52
- height: height,
36
+ const textureOptions = {
37
+ width,
38
+ height,
53
39
  // @ts-ignore
54
40
  type: dataTypeMap[type],
55
41
  format: formatMap[format],
@@ -58,68 +44,51 @@ var ReglTexture2D = /*#__PURE__*/function () {
58
44
  // @ts-ignore
59
45
  mag: filterMap[mag],
60
46
  min: filterMap[min],
61
- alignment: alignment,
62
- flipY: flipY,
47
+ alignment,
48
+ flipY,
63
49
  colorSpace: colorSpaceMap[colorSpace],
64
- premultiplyAlpha: premultiplyAlpha,
65
- aniso: aniso,
50
+ premultiplyAlpha,
51
+ aniso,
66
52
  // copy pixels from current bind framebuffer
67
- x: x,
68
- y: y,
69
- copy: copy
53
+ x,
54
+ y,
55
+ copy
70
56
  };
71
57
  if (data) {
72
- // @ts-ignore
73
58
  textureOptions.data = data;
74
59
  }
75
- if (typeof mipmap === 'number') {
60
+ if (typeof mipmap === "number") {
76
61
  textureOptions.mipmap = mipmapMap[mipmap];
77
- } else if (typeof mipmap === 'boolean') {
62
+ } else if (typeof mipmap === "boolean") {
78
63
  textureOptions.mipmap = mipmap;
79
64
  }
80
65
  this.texture = reGl.texture(textureOptions);
81
66
  }
82
- _createClass(ReglTexture2D, [{
83
- key: "get",
84
- value: function get() {
85
- return this.texture;
86
- }
87
- }, {
88
- key: "update",
89
- value: function update() {
90
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
91
- this.texture(props);
92
- }
93
- }, {
94
- key: "bind",
95
- value: function bind() {
96
- // @ts-ignore
97
- this.texture._texture.bind();
98
- }
99
- }, {
100
- key: "resize",
101
- value: function resize(_ref) {
102
- var width = _ref.width,
103
- height = _ref.height;
104
- this.texture.resize(width, height);
105
- this.width = width;
106
- this.height = height;
107
- }
108
- }, {
109
- key: "getSize",
110
- value: function getSize() {
111
- return [this.width, this.height];
112
- }
113
- }, {
114
- key: "destroy",
115
- value: function destroy() {
116
- if (!this.isDestroy) {
117
- var _this$texture;
118
- (_this$texture = this.texture) === null || _this$texture === void 0 || _this$texture.destroy();
119
- }
120
- this.isDestroy = true;
67
+ get() {
68
+ return this.texture;
69
+ }
70
+ update(props = {}) {
71
+ this.texture(props);
72
+ }
73
+ bind() {
74
+ this.texture._texture.bind();
75
+ }
76
+ resize({ width, height }) {
77
+ this.texture.resize(width, height);
78
+ this.width = width;
79
+ this.height = height;
80
+ }
81
+ getSize() {
82
+ return [this.width, this.height];
83
+ }
84
+ destroy() {
85
+ var _a;
86
+ if (!this.isDestroy) {
87
+ (_a = this.texture) == null ? void 0 : _a.destroy();
121
88
  }
122
- }]);
123
- return ReglTexture2D;
124
- }();
125
- export { ReglTexture2D as default };
89
+ this.isDestroy = true;
90
+ }
91
+ };
92
+ export {
93
+ ReglTexture2D as default
94
+ };
@@ -1,21 +1,133 @@
1
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _blendFuncMap;
3
- /**
4
- * @desc 由于 regl 使用大量字符串而非 WebGL 常量,因此需要映射
5
- */
6
- import { gl } from '@antv/l7-core';
7
- // @see https://github.com/regl-project/regl/blob/gh-pages/lib/constants/primitives.json
8
- export var primitiveMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.POINTS, 'points'), gl.LINES, 'lines'), gl.LINE_LOOP, 'line loop'), gl.LINE_STRIP, 'line strip'), gl.TRIANGLES, 'triangles'), gl.TRIANGLE_FAN, 'triangle fan'), gl.TRIANGLE_STRIP, 'triangle strip');
9
- export var usageMap = _defineProperty(_defineProperty(_defineProperty({}, gl.STATIC_DRAW, 'static'), gl.DYNAMIC_DRAW, 'dynamic'), gl.STREAM_DRAW, 'stream');
10
- export var dataTypeMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.BYTE, 'int8'), gl.INT, 'int32'), gl.UNSIGNED_BYTE, 'uint8'), gl.UNSIGNED_SHORT, 'uint16'), gl.UNSIGNED_INT, 'uint32'), gl.FLOAT, 'float');
11
- export var formatMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.ALPHA, 'alpha'), gl.LUMINANCE, 'luminance'), gl.LUMINANCE_ALPHA, 'luminance alpha'), gl.RGB, 'rgb'), gl.RGBA, 'rgba'), gl.RGBA4, 'rgba4'), gl.RGB5_A1, 'rgb5 a1'), gl.RGB565, 'rgb565'), gl.DEPTH_COMPONENT, 'depth'), gl.DEPTH_STENCIL, 'depth stencil');
12
- export var mipmapMap = _defineProperty(_defineProperty(_defineProperty({}, gl.DONT_CARE, 'dont care'), gl.NICEST, 'nice'), gl.FASTEST, 'fast');
13
- export var filterMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.NEAREST, 'nearest'), gl.LINEAR, 'linear'), gl.LINEAR_MIPMAP_LINEAR, 'mipmap'), gl.NEAREST_MIPMAP_LINEAR, 'nearest mipmap linear'), gl.LINEAR_MIPMAP_NEAREST, 'linear mipmap nearest'), gl.NEAREST_MIPMAP_NEAREST, 'nearest mipmap nearest');
14
- export var wrapModeMap = _defineProperty(_defineProperty(_defineProperty({}, gl.REPEAT, 'repeat'), gl.CLAMP_TO_EDGE, 'clamp'), gl.MIRRORED_REPEAT, 'mirror');
15
- export var colorSpaceMap = _defineProperty(_defineProperty({}, gl.NONE, 'none'), gl.BROWSER_DEFAULT_WEBGL, 'browser');
16
- export var depthFuncMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.NEVER, 'never'), gl.ALWAYS, 'always'), gl.LESS, 'less'), gl.LEQUAL, 'lequal'), gl.GREATER, 'greater'), gl.GEQUAL, 'gequal'), gl.EQUAL, 'equal'), gl.NOTEQUAL, 'notequal');
17
- export var blendEquationMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.FUNC_ADD, 'add'), gl.MIN_EXT, 'min'), gl.MAX_EXT, 'max'), gl.FUNC_SUBTRACT, 'subtract'), gl.FUNC_REVERSE_SUBTRACT, 'reverse subtract');
18
- export var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_blendFuncMap, gl.ZERO, 'zero'), gl.ONE, 'one'), gl.SRC_COLOR, 'src color'), gl.ONE_MINUS_SRC_COLOR, 'one minus src color'), gl.SRC_ALPHA, 'src alpha'), gl.ONE_MINUS_SRC_ALPHA, 'one minus src alpha'), gl.DST_COLOR, 'dst color'), gl.ONE_MINUS_DST_COLOR, 'one minus dst color'), gl.DST_ALPHA, 'dst alpha'), gl.ONE_MINUS_DST_ALPHA, 'one minus dst alpha'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, 'constant color'), gl.ONE_MINUS_CONSTANT_COLOR, 'one minus constant color'), gl.CONSTANT_ALPHA, 'constant alpha'), gl.ONE_MINUS_CONSTANT_ALPHA, 'one minus constant alpha'), gl.SRC_ALPHA_SATURATE, 'src alpha saturate'));
19
- export var stencilFuncMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.NEVER, 'never'), gl.ALWAYS, 'always'), gl.LESS, 'less'), gl.LEQUAL, 'lequal'), gl.GREATER, 'greater'), gl.GEQUAL, 'gequal'), gl.EQUAL, 'equal'), gl.NOTEQUAL, 'notequal');
20
- export var stencilOpMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.ZERO, 'zero'), gl.KEEP, 'keep'), gl.REPLACE, 'replace'), gl.INVERT, 'invert'), gl.INCR, 'increment'), gl.DECR, 'decrement'), gl.INCR_WRAP, 'increment wrap'), gl.DECR_WRAP, 'decrement wrap');
21
- export var cullFaceMap = _defineProperty(_defineProperty({}, gl.FRONT, 'front'), gl.BACK, 'back');
1
+ // src/regl/constants.ts
2
+ import { gl } from "@antv/l7-core";
3
+ var primitiveMap = {
4
+ [gl.POINTS]: "points",
5
+ [gl.LINES]: "lines",
6
+ [gl.LINE_LOOP]: "line loop",
7
+ [gl.LINE_STRIP]: "line strip",
8
+ [gl.TRIANGLES]: "triangles",
9
+ [gl.TRIANGLE_FAN]: "triangle fan",
10
+ [gl.TRIANGLE_STRIP]: "triangle strip"
11
+ };
12
+ var usageMap = {
13
+ [gl.STATIC_DRAW]: "static",
14
+ [gl.DYNAMIC_DRAW]: "dynamic",
15
+ [gl.STREAM_DRAW]: "stream"
16
+ };
17
+ var dataTypeMap = {
18
+ [gl.BYTE]: "int8",
19
+ // [gl.UNSIGNED_INT]: 'int16',
20
+ [gl.INT]: "int32",
21
+ [gl.UNSIGNED_BYTE]: "uint8",
22
+ [gl.UNSIGNED_SHORT]: "uint16",
23
+ [gl.UNSIGNED_INT]: "uint32",
24
+ [gl.FLOAT]: "float"
25
+ };
26
+ var formatMap = {
27
+ [gl.ALPHA]: "alpha",
28
+ [gl.LUMINANCE]: "luminance",
29
+ [gl.LUMINANCE_ALPHA]: "luminance alpha",
30
+ [gl.RGB]: "rgb",
31
+ [gl.RGBA]: "rgba",
32
+ [gl.RGBA4]: "rgba4",
33
+ [gl.RGB5_A1]: "rgb5 a1",
34
+ [gl.RGB565]: "rgb565",
35
+ [gl.DEPTH_COMPONENT]: "depth",
36
+ [gl.DEPTH_STENCIL]: "depth stencil"
37
+ };
38
+ var mipmapMap = {
39
+ [gl.DONT_CARE]: "dont care",
40
+ [gl.NICEST]: "nice",
41
+ [gl.FASTEST]: "fast"
42
+ };
43
+ var filterMap = {
44
+ [gl.NEAREST]: "nearest",
45
+ [gl.LINEAR]: "linear",
46
+ [gl.LINEAR_MIPMAP_LINEAR]: "mipmap",
47
+ [gl.NEAREST_MIPMAP_LINEAR]: "nearest mipmap linear",
48
+ [gl.LINEAR_MIPMAP_NEAREST]: "linear mipmap nearest",
49
+ [gl.NEAREST_MIPMAP_NEAREST]: "nearest mipmap nearest"
50
+ };
51
+ var wrapModeMap = {
52
+ [gl.REPEAT]: "repeat",
53
+ [gl.CLAMP_TO_EDGE]: "clamp",
54
+ [gl.MIRRORED_REPEAT]: "mirror"
55
+ };
56
+ var colorSpaceMap = {
57
+ [gl.NONE]: "none",
58
+ [gl.BROWSER_DEFAULT_WEBGL]: "browser"
59
+ };
60
+ var depthFuncMap = {
61
+ [gl.NEVER]: "never",
62
+ [gl.ALWAYS]: "always",
63
+ [gl.LESS]: "less",
64
+ [gl.LEQUAL]: "lequal",
65
+ [gl.GREATER]: "greater",
66
+ [gl.GEQUAL]: "gequal",
67
+ [gl.EQUAL]: "equal",
68
+ [gl.NOTEQUAL]: "notequal"
69
+ };
70
+ var blendEquationMap = {
71
+ [gl.FUNC_ADD]: "add",
72
+ [gl.MIN_EXT]: "min",
73
+ [gl.MAX_EXT]: "max",
74
+ [gl.FUNC_SUBTRACT]: "subtract",
75
+ [gl.FUNC_REVERSE_SUBTRACT]: "reverse subtract"
76
+ };
77
+ var blendFuncMap = {
78
+ [gl.ZERO]: "zero",
79
+ [gl.ONE]: "one",
80
+ [gl.SRC_COLOR]: "src color",
81
+ [gl.ONE_MINUS_SRC_COLOR]: "one minus src color",
82
+ [gl.SRC_ALPHA]: "src alpha",
83
+ [gl.ONE_MINUS_SRC_ALPHA]: "one minus src alpha",
84
+ [gl.DST_COLOR]: "dst color",
85
+ [gl.ONE_MINUS_DST_COLOR]: "one minus dst color",
86
+ [gl.DST_ALPHA]: "dst alpha",
87
+ [gl.ONE_MINUS_DST_ALPHA]: "one minus dst alpha",
88
+ [gl.CONSTANT_COLOR]: "constant color",
89
+ [gl.ONE_MINUS_CONSTANT_COLOR]: "one minus constant color",
90
+ [gl.CONSTANT_ALPHA]: "constant alpha",
91
+ [gl.ONE_MINUS_CONSTANT_ALPHA]: "one minus constant alpha",
92
+ [gl.SRC_ALPHA_SATURATE]: "src alpha saturate"
93
+ };
94
+ var stencilFuncMap = {
95
+ [gl.NEVER]: "never",
96
+ [gl.ALWAYS]: "always",
97
+ [gl.LESS]: "less",
98
+ [gl.LEQUAL]: "lequal",
99
+ [gl.GREATER]: "greater",
100
+ [gl.GEQUAL]: "gequal",
101
+ [gl.EQUAL]: "equal",
102
+ [gl.NOTEQUAL]: "notequal"
103
+ };
104
+ var stencilOpMap = {
105
+ [gl.ZERO]: "zero",
106
+ [gl.KEEP]: "keep",
107
+ [gl.REPLACE]: "replace",
108
+ [gl.INVERT]: "invert",
109
+ [gl.INCR]: "increment",
110
+ [gl.DECR]: "decrement",
111
+ [gl.INCR_WRAP]: "increment wrap",
112
+ [gl.DECR_WRAP]: "decrement wrap"
113
+ };
114
+ var cullFaceMap = {
115
+ [gl.FRONT]: "front",
116
+ [gl.BACK]: "back"
117
+ };
118
+ export {
119
+ blendEquationMap,
120
+ blendFuncMap,
121
+ colorSpaceMap,
122
+ cullFaceMap,
123
+ dataTypeMap,
124
+ depthFuncMap,
125
+ filterMap,
126
+ formatMap,
127
+ mipmapMap,
128
+ primitiveMap,
129
+ stencilFuncMap,
130
+ stencilOpMap,
131
+ usageMap,
132
+ wrapModeMap
133
+ };