Files
lan-manager/web/node_modules/@antv/g-webgpu-engine/es/webgl/ReglElements.js
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

44 lines
1.2 KiB
JavaScript

import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import { gl } from '@antv/g-webgpu-core';
import { dataTypeMap, usageMap } from './constants';
/**
* @see https://github.com/regl-project/regl/blob/gh-pages/API.md#elements
*/
var ReglElements = /*#__PURE__*/function () {
function ReglElements(reGl, options) {
_classCallCheck(this, ReglElements);
this.elements = void 0;
var data = options.data,
usage = options.usage,
type = options.type,
count = options.count;
this.elements = reGl.elements({
data: data,
usage: usageMap[usage || gl.STATIC_DRAW],
type: dataTypeMap[type || gl.UNSIGNED_BYTE],
count: count
});
}
_createClass(ReglElements, [{
key: "get",
value: function get() {
return this.elements;
}
}, {
key: "subData",
value: function subData(_ref) {
var data = _ref.data;
this.elements.subdata(data);
}
}, {
key: "destroy",
value: function destroy() {
this.elements.destroy();
}
}]);
return ReglElements;
}();
export { ReglElements as default };
//# sourceMappingURL=ReglElements.js.map