@antv/l7-renderer 2.20.20 → 2.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,8 +19,6 @@ var DeviceTexture2D = /*#__PURE__*/function () {
19
19
  _options$wrapT = options.wrapT,
20
20
  wrapT = _options$wrapT === void 0 ? gl.CLAMP_TO_EDGE : _options$wrapT,
21
21
  aniso = options.aniso,
22
- _options$mipmap = options.mipmap,
23
- mipmap = _options$mipmap === void 0 ? false : _options$mipmap,
24
22
  _options$mag = options.mag,
25
23
  mag = _options$mag === void 0 ? gl.NEAREST : _options$mag,
26
24
  _options$min = options.min,
@@ -48,7 +46,6 @@ var DeviceTexture2D = /*#__PURE__*/function () {
48
46
  flipY = _options$flipY === void 0 ? false : _options$flipY,
49
47
  _options$format = options.format,
50
48
  format = _options$format === void 0 ? gl.RGBA : _options$format,
51
- aniso = options.aniso,
52
49
  _options$alignment = options.alignment,
53
50
  alignment = _options$alignment === void 0 ? 1 : _options$alignment,
54
51
  _options$usage = options.usage,
@@ -1,18 +1,18 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _typedArrayCtorMap, _primitiveMap, _sizeFormatMap, _hintMap, _wrapModeMap, _depthFuncMap, _cullFaceMap, _blendEquationMap, _blendFuncMap, _stencilOpMap, _stencilFuncMap;
2
+ var _blendFuncMap;
3
3
  import { AddressMode, BlendFactor, BlendMode, BufferFrequencyHint, CompareFunction, CullMode, Format, PrimitiveTopology, StencilOp } from '@antv/g-device-api';
4
4
  import { gl } from '@antv/l7-core';
5
- export var typedArrayCtorMap = (_typedArrayCtorMap = {}, _defineProperty(_typedArrayCtorMap, gl.FLOAT, Float32Array), _defineProperty(_typedArrayCtorMap, gl.UNSIGNED_BYTE, Uint8Array), _defineProperty(_typedArrayCtorMap, gl.SHORT, Int16Array), _defineProperty(_typedArrayCtorMap, gl.UNSIGNED_SHORT, Uint16Array), _defineProperty(_typedArrayCtorMap, gl.INT, Int32Array), _defineProperty(_typedArrayCtorMap, gl.UNSIGNED_INT, Uint32Array), _typedArrayCtorMap);
6
- export var primitiveMap = (_primitiveMap = {}, _defineProperty(_primitiveMap, gl.POINTS, PrimitiveTopology.POINTS), _defineProperty(_primitiveMap, gl.LINES, PrimitiveTopology.LINES), _defineProperty(_primitiveMap, gl.LINE_LOOP, PrimitiveTopology.LINES), _defineProperty(_primitiveMap, gl.LINE_STRIP, PrimitiveTopology.LINE_STRIP), _defineProperty(_primitiveMap, gl.TRIANGLES, PrimitiveTopology.TRIANGLES), _defineProperty(_primitiveMap, gl.TRIANGLE_FAN, PrimitiveTopology.TRIANGLES), _defineProperty(_primitiveMap, gl.TRIANGLE_STRIP, PrimitiveTopology.TRIANGLE_STRIP), _primitiveMap);
7
- export var sizeFormatMap = (_sizeFormatMap = {}, _defineProperty(_sizeFormatMap, 1, Format.F32_R), _defineProperty(_sizeFormatMap, 2, Format.F32_RG), _defineProperty(_sizeFormatMap, 3, Format.F32_RGB), _defineProperty(_sizeFormatMap, 4, Format.F32_RGBA), _sizeFormatMap);
8
- export var hintMap = (_hintMap = {}, _defineProperty(_hintMap, gl.STATIC_DRAW, BufferFrequencyHint.STATIC), _defineProperty(_hintMap, gl.DYNAMIC_DRAW, BufferFrequencyHint.DYNAMIC), _defineProperty(_hintMap, gl.STREAM_DRAW, BufferFrequencyHint.DYNAMIC), _hintMap);
9
- export var wrapModeMap = (_wrapModeMap = {}, _defineProperty(_wrapModeMap, gl.REPEAT, AddressMode.REPEAT), _defineProperty(_wrapModeMap, gl.CLAMP_TO_EDGE, AddressMode.CLAMP_TO_EDGE), _defineProperty(_wrapModeMap, gl.MIRRORED_REPEAT, AddressMode.MIRRORED_REPEAT), _wrapModeMap);
10
- export var depthFuncMap = (_depthFuncMap = {}, _defineProperty(_depthFuncMap, gl.NEVER, CompareFunction.NEVER), _defineProperty(_depthFuncMap, gl.ALWAYS, CompareFunction.ALWAYS), _defineProperty(_depthFuncMap, gl.LESS, CompareFunction.LESS), _defineProperty(_depthFuncMap, gl.LEQUAL, CompareFunction.LEQUAL), _defineProperty(_depthFuncMap, gl.GREATER, CompareFunction.GREATER), _defineProperty(_depthFuncMap, gl.GEQUAL, CompareFunction.GEQUAL), _defineProperty(_depthFuncMap, gl.EQUAL, CompareFunction.EQUAL), _defineProperty(_depthFuncMap, gl.NOTEQUAL, CompareFunction.NOTEQUAL), _depthFuncMap);
11
- export var cullFaceMap = (_cullFaceMap = {}, _defineProperty(_cullFaceMap, gl.FRONT, CullMode.FRONT), _defineProperty(_cullFaceMap, gl.BACK, CullMode.BACK), _cullFaceMap);
12
- export var blendEquationMap = (_blendEquationMap = {}, _defineProperty(_blendEquationMap, gl.FUNC_ADD, BlendMode.ADD), _defineProperty(_blendEquationMap, gl.MIN_EXT, BlendMode.MIN), _defineProperty(_blendEquationMap, gl.MAX_EXT, BlendMode.MAX), _defineProperty(_blendEquationMap, gl.FUNC_SUBTRACT, BlendMode.SUBSTRACT), _defineProperty(_blendEquationMap, gl.FUNC_REVERSE_SUBTRACT, BlendMode.REVERSE_SUBSTRACT), _blendEquationMap);
13
- export var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_blendFuncMap, gl.ZERO, BlendFactor.ZERO), _defineProperty(_blendFuncMap, gl.ONE, BlendFactor.ONE), _defineProperty(_blendFuncMap, gl.SRC_COLOR, BlendFactor.SRC), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_COLOR, BlendFactor.ONE_MINUS_SRC), _defineProperty(_blendFuncMap, gl.SRC_ALPHA, BlendFactor.SRC_ALPHA), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_ALPHA, BlendFactor.ONE_MINUS_SRC_ALPHA), _defineProperty(_blendFuncMap, gl.DST_COLOR, BlendFactor.DST), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_COLOR, BlendFactor.ONE_MINUS_DST), _defineProperty(_blendFuncMap, gl.DST_ALPHA, BlendFactor.DST_ALPHA), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_ALPHA, BlendFactor.ONE_MINUS_DST_ALPHA), _defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, BlendFactor.CONST), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_COLOR, BlendFactor.ONE_MINUS_CONSTANT), _defineProperty(_blendFuncMap, gl.CONSTANT_ALPHA, BlendFactor.CONST), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_ALPHA, BlendFactor.ONE_MINUS_CONSTANT), _defineProperty(_blendFuncMap, gl.SRC_ALPHA_SATURATE, BlendFactor.SRC_ALPHA_SATURATE), _blendFuncMap);
14
- export var stencilOpMap = (_stencilOpMap = {}, _defineProperty(_stencilOpMap, gl.REPLACE, StencilOp.REPLACE), _defineProperty(_stencilOpMap, gl.KEEP, StencilOp.KEEP), _defineProperty(_stencilOpMap, gl.ZERO, StencilOp.ZERO), _defineProperty(_stencilOpMap, gl.INVERT, StencilOp.INVERT), _defineProperty(_stencilOpMap, gl.INCR, StencilOp.INCREMENT_CLAMP), _defineProperty(_stencilOpMap, gl.DECR, StencilOp.DECREMENT_CLAMP), _defineProperty(_stencilOpMap, gl.INCR_WRAP, StencilOp.INCREMENT_WRAP), _defineProperty(_stencilOpMap, gl.DECR_WRAP, StencilOp.DECREMENT_WRAP), _stencilOpMap);
15
- export var stencilFuncMap = (_stencilFuncMap = {}, _defineProperty(_stencilFuncMap, gl.ALWAYS, CompareFunction.ALWAYS), _defineProperty(_stencilFuncMap, gl.EQUAL, CompareFunction.EQUAL), _defineProperty(_stencilFuncMap, gl.GEQUAL, CompareFunction.GEQUAL), _defineProperty(_stencilFuncMap, gl.GREATER, CompareFunction.GREATER), _defineProperty(_stencilFuncMap, gl.LEQUAL, CompareFunction.LEQUAL), _defineProperty(_stencilFuncMap, gl.LESS, CompareFunction.LESS), _defineProperty(_stencilFuncMap, gl.NEVER, CompareFunction.NEVER), _defineProperty(_stencilFuncMap, gl.NOTEQUAL, CompareFunction.NOTEQUAL), _stencilFuncMap);
5
+ export var typedArrayCtorMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.FLOAT, Float32Array), gl.UNSIGNED_BYTE, Uint8Array), gl.SHORT, Int16Array), gl.UNSIGNED_SHORT, Uint16Array), gl.INT, Int32Array), gl.UNSIGNED_INT, Uint32Array);
6
+ export var primitiveMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.POINTS, PrimitiveTopology.POINTS), gl.LINES, PrimitiveTopology.LINES), gl.LINE_LOOP, PrimitiveTopology.LINES), gl.LINE_STRIP, PrimitiveTopology.LINE_STRIP), gl.TRIANGLES, PrimitiveTopology.TRIANGLES), gl.TRIANGLE_FAN, PrimitiveTopology.TRIANGLES), gl.TRIANGLE_STRIP, PrimitiveTopology.TRIANGLE_STRIP);
7
+ export var sizeFormatMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 1, Format.F32_R), 2, Format.F32_RG), 3, Format.F32_RGB), 4, Format.F32_RGBA);
8
+ export var hintMap = _defineProperty(_defineProperty(_defineProperty({}, gl.STATIC_DRAW, BufferFrequencyHint.STATIC), gl.DYNAMIC_DRAW, BufferFrequencyHint.DYNAMIC), gl.STREAM_DRAW, BufferFrequencyHint.DYNAMIC);
9
+ export var wrapModeMap = _defineProperty(_defineProperty(_defineProperty({}, gl.REPEAT, AddressMode.REPEAT), gl.CLAMP_TO_EDGE, AddressMode.CLAMP_TO_EDGE), gl.MIRRORED_REPEAT, AddressMode.MIRRORED_REPEAT);
10
+ export var depthFuncMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.NEVER, CompareFunction.NEVER), gl.ALWAYS, CompareFunction.ALWAYS), gl.LESS, CompareFunction.LESS), gl.LEQUAL, CompareFunction.LEQUAL), gl.GREATER, CompareFunction.GREATER), gl.GEQUAL, CompareFunction.GEQUAL), gl.EQUAL, CompareFunction.EQUAL), gl.NOTEQUAL, CompareFunction.NOTEQUAL);
11
+ export var cullFaceMap = _defineProperty(_defineProperty({}, gl.FRONT, CullMode.FRONT), gl.BACK, CullMode.BACK);
12
+ export var blendEquationMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.FUNC_ADD, BlendMode.ADD), gl.MIN_EXT, BlendMode.MIN), gl.MAX_EXT, BlendMode.MAX), gl.FUNC_SUBTRACT, BlendMode.SUBSTRACT), gl.FUNC_REVERSE_SUBTRACT, BlendMode.REVERSE_SUBSTRACT);
13
+ export var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_blendFuncMap, gl.ZERO, BlendFactor.ZERO), gl.ONE, BlendFactor.ONE), gl.SRC_COLOR, BlendFactor.SRC), gl.ONE_MINUS_SRC_COLOR, BlendFactor.ONE_MINUS_SRC), gl.SRC_ALPHA, BlendFactor.SRC_ALPHA), gl.ONE_MINUS_SRC_ALPHA, BlendFactor.ONE_MINUS_SRC_ALPHA), gl.DST_COLOR, BlendFactor.DST), gl.ONE_MINUS_DST_COLOR, BlendFactor.ONE_MINUS_DST), gl.DST_ALPHA, BlendFactor.DST_ALPHA), gl.ONE_MINUS_DST_ALPHA, BlendFactor.ONE_MINUS_DST_ALPHA), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, BlendFactor.CONST), gl.ONE_MINUS_CONSTANT_COLOR, BlendFactor.ONE_MINUS_CONSTANT), gl.CONSTANT_ALPHA, BlendFactor.CONST), gl.ONE_MINUS_CONSTANT_ALPHA, BlendFactor.ONE_MINUS_CONSTANT), gl.SRC_ALPHA_SATURATE, BlendFactor.SRC_ALPHA_SATURATE));
14
+ export var stencilOpMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.REPLACE, StencilOp.REPLACE), gl.KEEP, StencilOp.KEEP), gl.ZERO, StencilOp.ZERO), gl.INVERT, StencilOp.INVERT), gl.INCR, StencilOp.INCREMENT_CLAMP), gl.DECR, StencilOp.DECREMENT_CLAMP), gl.INCR_WRAP, StencilOp.INCREMENT_WRAP), gl.DECR_WRAP, StencilOp.DECREMENT_WRAP);
15
+ export var stencilFuncMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, gl.ALWAYS, CompareFunction.ALWAYS), gl.EQUAL, CompareFunction.EQUAL), gl.GEQUAL, CompareFunction.GEQUAL), gl.GREATER, CompareFunction.GREATER), gl.LEQUAL, CompareFunction.LEQUAL), gl.LESS, CompareFunction.LESS), gl.NEVER, CompareFunction.NEVER), gl.NOTEQUAL, CompareFunction.NOTEQUAL);
16
16
 
17
17
  // export const filterMap: {
18
18
  // [key: string]: FilterMode;
@@ -1,6 +1,5 @@
1
1
  import type { RenderPass, RenderTarget, SwapChain } from '@antv/g-device-api';
2
2
  import type { IAttribute, IAttributeInitializationOptions, IBuffer, IBufferInitializationOptions, IClearOptions, IElements, IElementsInitializationOptions, IExtensions, IFramebuffer, IFramebufferInitializationOptions, IModel, IModelInitializationOptions, IReadPixelsOptions, IRenderConfig, IRendererService, ITexture2D, ITexture2DInitializationOptions } from '@antv/l7-core';
3
- import 'reflect-metadata';
4
3
  import { RenderCache } from './DeviceCache';
5
4
  import DeviceFramebuffer from './DeviceFramebuffer';
6
5
  /**
@@ -2,12 +2,9 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
- var _dec, _class;
6
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
6
  import { Format, TextureUsage, TransparentBlack, ViewportOrigin, WebGLDeviceContribution, WebGPUDeviceContribution, colorNewFromRGBA } from '@antv/g-device-api';
8
7
  import { lodashUtil } from '@antv/l7-utils';
9
- import { injectable } from 'inversify';
10
- import 'reflect-metadata';
11
8
  import DeviceAttribute from "./DeviceAttribute";
12
9
  import DeviceBuffer from "./DeviceBuffer";
13
10
  import { RenderCache } from "./DeviceCache";
@@ -21,7 +18,7 @@ var isUndefined = lodashUtil.isUndefined;
21
18
  /**
22
19
  * Device API renderer
23
20
  */
24
- var DeviceRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/function () {
21
+ var DeviceRendererService = /*#__PURE__*/function () {
25
22
  function DeviceRendererService() {
26
23
  var _this = this;
27
24
  _classCallCheck(this, DeviceRendererService);
@@ -418,5 +415,5 @@ var DeviceRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/fun
418
415
  }
419
416
  }]);
420
417
  return DeviceRendererService;
421
- }()) || _class);
418
+ }();
422
419
  export { DeviceRendererService as default };
@@ -1,6 +1,6 @@
1
1
  export declare function hashCodeNumberUpdate(hash: number, v?: number): number;
2
2
  export declare function hashCodeNumberFinish(hash: number): number;
3
- export declare function nullHashFunc<T>(k: T): number;
3
+ export declare function nullHashFunc(): number;
4
4
  export type EqualFunc<K> = (a: K, b: K) => boolean;
5
5
  export type HashFunc<K> = (a: K) => number;
6
6
  declare class HashBucket<K, V> {
@@ -22,7 +22,7 @@ export function hashCodeNumberFinish(hash) {
22
22
 
23
23
  // Pass this as a hash function to use a one-bucket HashMap (equivalent to linear search in an array),
24
24
  // which can be efficient for small numbers of items.
25
- export function nullHashFunc(k) {
25
+ export function nullHashFunc() {
26
26
  return 0;
27
27
  }
28
28
  var HashBucket = /*#__PURE__*/_createClass(function HashBucket() {
@@ -1,21 +1,21 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
- var _primitiveMap, _usageMap, _dataTypeMap, _formatMap, _mipmapMap, _filterMap, _wrapModeMap, _colorSpaceMap, _depthFuncMap, _blendEquationMap, _blendFuncMap, _stencilFuncMap, _stencilOpMap, _cullFaceMap;
2
+ var _blendFuncMap;
3
3
  /**
4
4
  * @desc 由于 regl 使用大量字符串而非 WebGL 常量,因此需要映射
5
5
  */
6
6
  import { gl } from '@antv/l7-core';
7
7
  // @see https://github.com/regl-project/regl/blob/gh-pages/lib/constants/primitives.json
8
- export var primitiveMap = (_primitiveMap = {}, _defineProperty(_primitiveMap, gl.POINTS, 'points'), _defineProperty(_primitiveMap, gl.LINES, 'lines'), _defineProperty(_primitiveMap, gl.LINE_LOOP, 'line loop'), _defineProperty(_primitiveMap, gl.LINE_STRIP, 'line strip'), _defineProperty(_primitiveMap, gl.TRIANGLES, 'triangles'), _defineProperty(_primitiveMap, gl.TRIANGLE_FAN, 'triangle fan'), _defineProperty(_primitiveMap, gl.TRIANGLE_STRIP, 'triangle strip'), _primitiveMap);
9
- export var usageMap = (_usageMap = {}, _defineProperty(_usageMap, gl.STATIC_DRAW, 'static'), _defineProperty(_usageMap, gl.DYNAMIC_DRAW, 'dynamic'), _defineProperty(_usageMap, gl.STREAM_DRAW, 'stream'), _usageMap);
10
- export var dataTypeMap = (_dataTypeMap = {}, _defineProperty(_dataTypeMap, gl.BYTE, 'int8'), _defineProperty(_dataTypeMap, gl.INT, 'int32'), _defineProperty(_dataTypeMap, gl.UNSIGNED_BYTE, 'uint8'), _defineProperty(_dataTypeMap, gl.UNSIGNED_SHORT, 'uint16'), _defineProperty(_dataTypeMap, gl.UNSIGNED_INT, 'uint32'), _defineProperty(_dataTypeMap, gl.FLOAT, 'float'), _dataTypeMap);
11
- export var formatMap = (_formatMap = {}, _defineProperty(_formatMap, gl.ALPHA, 'alpha'), _defineProperty(_formatMap, gl.LUMINANCE, 'luminance'), _defineProperty(_formatMap, gl.LUMINANCE_ALPHA, 'luminance alpha'), _defineProperty(_formatMap, gl.RGB, 'rgb'), _defineProperty(_formatMap, gl.RGBA, 'rgba'), _defineProperty(_formatMap, gl.RGBA4, 'rgba4'), _defineProperty(_formatMap, gl.RGB5_A1, 'rgb5 a1'), _defineProperty(_formatMap, gl.RGB565, 'rgb565'), _defineProperty(_formatMap, gl.DEPTH_COMPONENT, 'depth'), _defineProperty(_formatMap, gl.DEPTH_STENCIL, 'depth stencil'), _formatMap);
12
- export var mipmapMap = (_mipmapMap = {}, _defineProperty(_mipmapMap, gl.DONT_CARE, 'dont care'), _defineProperty(_mipmapMap, gl.NICEST, 'nice'), _defineProperty(_mipmapMap, gl.FASTEST, 'fast'), _mipmapMap);
13
- export var filterMap = (_filterMap = {}, _defineProperty(_filterMap, gl.NEAREST, 'nearest'), _defineProperty(_filterMap, gl.LINEAR, 'linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_LINEAR, 'mipmap'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_LINEAR, 'nearest mipmap linear'), _defineProperty(_filterMap, gl.LINEAR_MIPMAP_NEAREST, 'linear mipmap nearest'), _defineProperty(_filterMap, gl.NEAREST_MIPMAP_NEAREST, 'nearest mipmap nearest'), _filterMap);
14
- export var wrapModeMap = (_wrapModeMap = {}, _defineProperty(_wrapModeMap, gl.REPEAT, 'repeat'), _defineProperty(_wrapModeMap, gl.CLAMP_TO_EDGE, 'clamp'), _defineProperty(_wrapModeMap, gl.MIRRORED_REPEAT, 'mirror'), _wrapModeMap);
15
- export var colorSpaceMap = (_colorSpaceMap = {}, _defineProperty(_colorSpaceMap, gl.NONE, 'none'), _defineProperty(_colorSpaceMap, gl.BROWSER_DEFAULT_WEBGL, 'browser'), _colorSpaceMap);
16
- export var depthFuncMap = (_depthFuncMap = {}, _defineProperty(_depthFuncMap, gl.NEVER, 'never'), _defineProperty(_depthFuncMap, gl.ALWAYS, 'always'), _defineProperty(_depthFuncMap, gl.LESS, 'less'), _defineProperty(_depthFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_depthFuncMap, gl.GREATER, 'greater'), _defineProperty(_depthFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_depthFuncMap, gl.EQUAL, 'equal'), _defineProperty(_depthFuncMap, gl.NOTEQUAL, 'notequal'), _depthFuncMap);
17
- export var blendEquationMap = (_blendEquationMap = {}, _defineProperty(_blendEquationMap, gl.FUNC_ADD, 'add'), _defineProperty(_blendEquationMap, gl.MIN_EXT, 'min'), _defineProperty(_blendEquationMap, gl.MAX_EXT, 'max'), _defineProperty(_blendEquationMap, gl.FUNC_SUBTRACT, 'subtract'), _defineProperty(_blendEquationMap, gl.FUNC_REVERSE_SUBTRACT, 'reverse subtract'), _blendEquationMap);
18
- export var blendFuncMap = (_blendFuncMap = {}, _defineProperty(_blendFuncMap, gl.ZERO, 'zero'), _defineProperty(_blendFuncMap, gl.ONE, 'one'), _defineProperty(_blendFuncMap, gl.SRC_COLOR, 'src color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_COLOR, 'one minus src color'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA, 'src alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_SRC_ALPHA, 'one minus src alpha'), _defineProperty(_blendFuncMap, gl.DST_COLOR, 'dst color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_COLOR, 'one minus dst color'), _defineProperty(_blendFuncMap, gl.DST_ALPHA, 'dst alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_DST_ALPHA, 'one minus dst alpha'), _defineProperty(_blendFuncMap, gl.CONSTANT_COLOR, 'constant color'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_COLOR, 'one minus constant color'), _defineProperty(_blendFuncMap, gl.CONSTANT_ALPHA, 'constant alpha'), _defineProperty(_blendFuncMap, gl.ONE_MINUS_CONSTANT_ALPHA, 'one minus constant alpha'), _defineProperty(_blendFuncMap, gl.SRC_ALPHA_SATURATE, 'src alpha saturate'), _blendFuncMap);
19
- export var stencilFuncMap = (_stencilFuncMap = {}, _defineProperty(_stencilFuncMap, gl.NEVER, 'never'), _defineProperty(_stencilFuncMap, gl.ALWAYS, 'always'), _defineProperty(_stencilFuncMap, gl.LESS, 'less'), _defineProperty(_stencilFuncMap, gl.LEQUAL, 'lequal'), _defineProperty(_stencilFuncMap, gl.GREATER, 'greater'), _defineProperty(_stencilFuncMap, gl.GEQUAL, 'gequal'), _defineProperty(_stencilFuncMap, gl.EQUAL, 'equal'), _defineProperty(_stencilFuncMap, gl.NOTEQUAL, 'notequal'), _stencilFuncMap);
20
- export var stencilOpMap = (_stencilOpMap = {}, _defineProperty(_stencilOpMap, gl.ZERO, 'zero'), _defineProperty(_stencilOpMap, gl.KEEP, 'keep'), _defineProperty(_stencilOpMap, gl.REPLACE, 'replace'), _defineProperty(_stencilOpMap, gl.INVERT, 'invert'), _defineProperty(_stencilOpMap, gl.INCR, 'increment'), _defineProperty(_stencilOpMap, gl.DECR, 'decrement'), _defineProperty(_stencilOpMap, gl.INCR_WRAP, 'increment wrap'), _defineProperty(_stencilOpMap, gl.DECR_WRAP, 'decrement wrap'), _stencilOpMap);
21
- export var cullFaceMap = (_cullFaceMap = {}, _defineProperty(_cullFaceMap, gl.FRONT, 'front'), _defineProperty(_cullFaceMap, gl.BACK, 'back'), _cullFaceMap);
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');
@@ -3,7 +3,6 @@
3
3
  * @see https://github.com/regl-project/regl/blob/gh-pages/API.md
4
4
  */
5
5
  import type { IAttribute, IAttributeInitializationOptions, IBuffer, IBufferInitializationOptions, IClearOptions, IElements, IElementsInitializationOptions, IExtensions, IFramebuffer, IFramebufferInitializationOptions, IModel, IModelInitializationOptions, IReadPixelsOptions, IRenderConfig, IRendererService, ITexture2D, ITexture2DInitializationOptions } from '@antv/l7-core';
6
- import 'reflect-metadata';
7
6
  import regl from 'regl';
8
7
  import ReglFramebuffer from './ReglFramebuffer';
9
8
  /**
package/es/regl/index.js CHANGED
@@ -2,15 +2,12 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
2
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
- var _dec, _class;
6
5
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
6
  /**
8
7
  * render w/ regl
9
8
  * @see https://github.com/regl-project/regl/blob/gh-pages/API.md
10
9
  */
11
10
 
12
- import { injectable } from 'inversify';
13
- import 'reflect-metadata';
14
11
  import regl from 'regl';
15
12
  import ReglAttribute from "./ReglAttribute";
16
13
  import ReglBuffer from "./ReglBuffer";
@@ -22,7 +19,7 @@ import ReglTexture2D from "./ReglTexture2D";
22
19
  /**
23
20
  * regl renderer
24
21
  */
25
- var ReglRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/function () {
22
+ var ReglRendererService = /*#__PURE__*/function () {
26
23
  function ReglRendererService() {
27
24
  var _this = this;
28
25
  _classCallCheck(this, ReglRendererService);
@@ -201,7 +198,6 @@ var ReglRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/funct
201
198
  // wireframe
202
199
  'ANGLE_instanced_arrays' // VSM shadow map
203
200
  ],
204
-
205
201
  optionalExtensions: ['oes_texture_float_linear', 'OES_texture_float', 'EXT_texture_filter_anisotropic', 'EXT_blend_minmax', 'WEBGL_depth_texture', 'WEBGL_lose_context'],
206
202
  profile: true,
207
203
  onDone: function onDone(err, r) {
@@ -311,5 +307,5 @@ var ReglRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/funct
311
307
  value: function endFrame() {}
312
308
  }]);
313
309
  return ReglRendererService;
314
- }()) || _class);
310
+ }();
315
311
  export { ReglRendererService as default };
@@ -39,8 +39,6 @@ var DeviceTexture2D = class {
39
39
  wrapS = import_l7_core.gl.CLAMP_TO_EDGE,
40
40
  wrapT = import_l7_core.gl.CLAMP_TO_EDGE,
41
41
  aniso,
42
- mipmap = false,
43
- // premultiplyAlpha = false,
44
42
  mag = import_l7_core.gl.NEAREST,
45
43
  min = import_l7_core.gl.NEAREST
46
44
  } = options;
@@ -63,7 +61,6 @@ var DeviceTexture2D = class {
63
61
  height,
64
62
  flipY = false,
65
63
  format = import_l7_core.gl.RGBA,
66
- aniso,
67
64
  alignment = 1,
68
65
  usage = import_l7_core.TextureUsage.SAMPLED,
69
66
  // premultiplyAlpha = false,
@@ -25,15 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var __decorateClass = (decorators, target, key, kind) => {
29
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
30
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
31
- if (decorator = decorators[i])
32
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
33
- if (kind && result)
34
- __defProp(target, key, result);
35
- return result;
36
- };
37
28
 
38
29
  // src/device/index.ts
39
30
  var device_exports = {};
@@ -43,8 +34,6 @@ __export(device_exports, {
43
34
  module.exports = __toCommonJS(device_exports);
44
35
  var import_g_device_api = require("@antv/g-device-api");
45
36
  var import_l7_utils = require("@antv/l7-utils");
46
- var import_inversify = require("inversify");
47
- var import_reflect_metadata = require("reflect-metadata");
48
37
  var import_DeviceAttribute = __toESM(require("./DeviceAttribute"));
49
38
  var import_DeviceBuffer = __toESM(require("./DeviceBuffer"));
50
39
  var import_DeviceCache = require("./DeviceCache");
@@ -300,6 +289,3 @@ var DeviceRendererService = class {
300
289
  return this.isDirty;
301
290
  }
302
291
  };
303
- DeviceRendererService = __decorateClass([
304
- (0, import_inversify.injectable)()
305
- ], DeviceRendererService);
@@ -37,7 +37,7 @@ function hashCodeNumberFinish(hash) {
37
37
  hash += hash << 15;
38
38
  return hash >>> 0;
39
39
  }
40
- function nullHashFunc(k) {
40
+ function nullHashFunc() {
41
41
  return 0;
42
42
  }
43
43
  var HashBucket = class {
package/lib/regl/index.js CHANGED
@@ -25,15 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
  mod
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var __decorateClass = (decorators, target, key, kind) => {
29
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
30
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
31
- if (decorator = decorators[i])
32
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
33
- if (kind && result)
34
- __defProp(target, key, result);
35
- return result;
36
- };
37
28
 
38
29
  // src/regl/index.ts
39
30
  var regl_exports = {};
@@ -41,8 +32,6 @@ __export(regl_exports, {
41
32
  default: () => ReglRendererService
42
33
  });
43
34
  module.exports = __toCommonJS(regl_exports);
44
- var import_inversify = require("inversify");
45
- var import_reflect_metadata = require("reflect-metadata");
46
35
  var import_regl = __toESM(require("regl"));
47
36
  var import_ReglAttribute = __toESM(require("./ReglAttribute"));
48
37
  var import_ReglBuffer = __toESM(require("./ReglBuffer"));
@@ -243,6 +232,3 @@ var ReglRendererService = class {
243
232
  endFrame() {
244
233
  }
245
234
  };
246
- ReglRendererService = __decorateClass([
247
- (0, import_inversify.injectable)()
248
- ], ReglRendererService);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-renderer",
3
- "version": "2.20.20",
3
+ "version": "2.21.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "xiaoiver",
@@ -25,19 +25,17 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@antv/g-device-api": "^1.6.4",
28
- "@antv/l7-core": "2.20.20",
29
- "@antv/l7-utils": "2.20.20",
28
+ "@antv/l7-core": "2.21.1",
29
+ "@antv/l7-utils": "2.21.1",
30
30
  "@babel/runtime": "^7.7.7",
31
- "inversify": "^5.0.1",
32
- "reflect-metadata": "^0.2.1",
33
31
  "regl": "1.6.1"
34
32
  },
35
33
  "devDependencies": {
36
- "@antv/l7-test-utils": "2.20.20",
34
+ "@antv/l7-test-utils": "2.21.1",
37
35
  "gl": "^6.0.2"
38
36
  },
39
37
  "publishConfig": {
40
38
  "access": "public"
41
39
  },
42
- "gitHead": "1966dbadf9efee8d69d22beb4d89947c158da634"
40
+ "gitHead": "1e0d2e5920f479f77095a2c5eddda8a8d7ac9e0f"
43
41
  }