@antv/l7-renderer 2.20.9 → 2.20.11
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/es/device/DeviceTexture2D.js +4 -0
- package/es/device/index.d.ts +1 -0
- package/es/device/index.js +4 -8
- package/es/regl/index.d.ts +1 -0
- package/es/regl/index.js +3 -0
- package/lib/device/DeviceTexture2D.js +4 -0
- package/lib/device/index.js +3 -0
- package/lib/regl/index.js +3 -0
- package/package.json +6 -6
|
@@ -45,6 +45,10 @@ var DeviceTexture2D = /*#__PURE__*/function () {
|
|
|
45
45
|
pixelFormat = Format.U8_LUMINANCE;
|
|
46
46
|
} else if (type === gl.FLOAT && format === gl.RGB) {
|
|
47
47
|
pixelFormat = Format.F32_RGB;
|
|
48
|
+
} else if (type === gl.FLOAT && format === gl.RGBA) {
|
|
49
|
+
pixelFormat = Format.F32_RGBA;
|
|
50
|
+
} else if (type === gl.FLOAT && format === gl.RED) {
|
|
51
|
+
pixelFormat = Format.F32_R;
|
|
48
52
|
} else {
|
|
49
53
|
throw new Error("create texture error, type: ".concat(type, ", format: ").concat(format));
|
|
50
54
|
}
|
package/es/device/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export default class DeviceRendererService implements IRendererService {
|
|
|
25
25
|
* Current FBO.
|
|
26
26
|
*/
|
|
27
27
|
currentFramebuffer: DeviceFramebuffer | null;
|
|
28
|
+
queryVerdorInfo: () => string;
|
|
28
29
|
init(canvas: HTMLCanvasElement, cfg: IRenderConfig): Promise<void>;
|
|
29
30
|
beginFrame(): void;
|
|
30
31
|
endFrame(): void;
|
package/es/device/index.js
CHANGED
|
@@ -23,6 +23,9 @@ var DeviceRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/fun
|
|
|
23
23
|
var _this = this;
|
|
24
24
|
_classCallCheck(this, DeviceRendererService);
|
|
25
25
|
_defineProperty(this, "uniformBuffers", []);
|
|
26
|
+
_defineProperty(this, "queryVerdorInfo", function () {
|
|
27
|
+
return _this.device.queryVendorInfo().platformString;
|
|
28
|
+
});
|
|
26
29
|
_defineProperty(this, "createModel", function (options) {
|
|
27
30
|
return new DeviceModel(_this.device, options, _this);
|
|
28
31
|
});
|
|
@@ -126,14 +129,7 @@ var DeviceRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/fun
|
|
|
126
129
|
}
|
|
127
130
|
_createClass(DeviceRendererService, [{
|
|
128
131
|
key: "init",
|
|
129
|
-
value:
|
|
130
|
-
/**
|
|
131
|
-
* Current render pass.
|
|
132
|
-
*/
|
|
133
|
-
/**
|
|
134
|
-
* Current FBO.
|
|
135
|
-
*/
|
|
136
|
-
function () {
|
|
132
|
+
value: function () {
|
|
137
133
|
var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(canvas, cfg) {
|
|
138
134
|
var enableWebGPU, shaderCompilerPath, deviceContribution, swapChain, gl;
|
|
139
135
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
package/es/regl/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export default class ReglRendererService implements IRendererService {
|
|
|
18
18
|
private width;
|
|
19
19
|
private height;
|
|
20
20
|
private isDirty;
|
|
21
|
+
queryVerdorInfo: () => string;
|
|
21
22
|
init(canvas: HTMLCanvasElement, cfg: IRenderConfig, gl?: regl.Regl): Promise<void>;
|
|
22
23
|
getPointSizeRange(): any;
|
|
23
24
|
testExtension(name: string): boolean;
|
package/es/regl/index.js
CHANGED
|
@@ -27,6 +27,9 @@ var ReglRendererService = (_dec = injectable(), _dec(_class = /*#__PURE__*/funct
|
|
|
27
27
|
var _this = this;
|
|
28
28
|
_classCallCheck(this, ReglRendererService);
|
|
29
29
|
_defineProperty(this, "uniformBuffers", []);
|
|
30
|
+
_defineProperty(this, "queryVerdorInfo", function () {
|
|
31
|
+
return 'WebGL1';
|
|
32
|
+
});
|
|
30
33
|
_defineProperty(this, "createModel", function (options) {
|
|
31
34
|
return new ReglModel(_this.gl, options);
|
|
32
35
|
});
|
|
@@ -62,6 +62,10 @@ var DeviceTexture2D = class {
|
|
|
62
62
|
pixelFormat = import_g_device_api.Format.U8_LUMINANCE;
|
|
63
63
|
} else if (type === import_l7_core.gl.FLOAT && format === import_l7_core.gl.RGB) {
|
|
64
64
|
pixelFormat = import_g_device_api.Format.F32_RGB;
|
|
65
|
+
} else if (type === import_l7_core.gl.FLOAT && format === import_l7_core.gl.RGBA) {
|
|
66
|
+
pixelFormat = import_g_device_api.Format.F32_RGBA;
|
|
67
|
+
} else if (type === import_l7_core.gl.FLOAT && format === import_l7_core.gl.RED) {
|
|
68
|
+
pixelFormat = import_g_device_api.Format.F32_R;
|
|
65
69
|
} else {
|
|
66
70
|
throw new Error(`create texture error, type: ${type}, format: ${format}`);
|
|
67
71
|
}
|
package/lib/device/index.js
CHANGED
|
@@ -54,6 +54,9 @@ var import_webgl = require("./utils/webgl");
|
|
|
54
54
|
var DeviceRendererService = class {
|
|
55
55
|
constructor() {
|
|
56
56
|
this.uniformBuffers = [];
|
|
57
|
+
this.queryVerdorInfo = () => {
|
|
58
|
+
return this.device.queryVendorInfo().platformString;
|
|
59
|
+
};
|
|
57
60
|
this.createModel = (options) => new import_DeviceModel.default(this.device, options, this);
|
|
58
61
|
this.createAttribute = (options) => new import_DeviceAttribute.default(this.device, options);
|
|
59
62
|
this.createBuffer = (options) => new import_DeviceBuffer.default(this.device, options);
|
package/lib/regl/index.js
CHANGED
|
@@ -53,6 +53,9 @@ var import_ReglTexture2D = __toESM(require("./ReglTexture2D"));
|
|
|
53
53
|
var ReglRendererService = class {
|
|
54
54
|
constructor() {
|
|
55
55
|
this.uniformBuffers = [];
|
|
56
|
+
this.queryVerdorInfo = () => {
|
|
57
|
+
return "WebGL1";
|
|
58
|
+
};
|
|
56
59
|
this.createModel = (options) => new import_ReglModel.default(this.gl, options);
|
|
57
60
|
this.createAttribute = (options) => new import_ReglAttribute.default(this.gl, options);
|
|
58
61
|
this.createBuffer = (options) => new import_ReglBuffer.default(this.gl, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/l7-renderer",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "xiaoiver",
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
"tsc": "tsc --project tsconfig.build.json"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@antv/g-device-api": "^1.4.
|
|
28
|
-
"@antv/l7-core": "2.20.
|
|
29
|
-
"@antv/l7-utils": "2.20.
|
|
27
|
+
"@antv/g-device-api": "^1.4.10",
|
|
28
|
+
"@antv/l7-core": "2.20.11",
|
|
29
|
+
"@antv/l7-utils": "2.20.11",
|
|
30
30
|
"@babel/runtime": "^7.7.7",
|
|
31
31
|
"inversify": "^5.0.1",
|
|
32
32
|
"reflect-metadata": "^0.2.1",
|
|
33
33
|
"regl": "1.6.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@antv/l7-test-utils": "2.20.
|
|
36
|
+
"@antv/l7-test-utils": "2.20.11",
|
|
37
37
|
"gl": "^6.0.2"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "40b9c778934bbcef548f1060bddf6de988b75c00"
|
|
43
43
|
}
|