bytev-charts
Version:
基于echarts和JavaScript及ES6封装的一个可以直接调用的图表组件库,内置主题设计,简单快捷,且支持用户自定义配置; npm 安装方式: npm install bytev-charts 若启动提示还需额外install插件,则运行 npm install @babel/runtime-corejs2 即可;
36 lines (30 loc) • 968 B
JavaScript
import _classCallCheck from "@babel/runtime-corejs2/helpers/classCallCheck";
import _createClass from "@babel/runtime-corejs2/helpers/createClass";
import _WeakMap from "@babel/runtime-corejs2/core-js/weak-map";
var WebGPUObjects = /*#__PURE__*/function () {
function WebGPUObjects(geometries, info) {
_classCallCheck(this, WebGPUObjects);
this.geometries = geometries;
this.info = info;
this.updateMap = new _WeakMap();
}
_createClass(WebGPUObjects, [{
key: "update",
value: function update(object) {
var geometry = object.geometry;
var updateMap = this.updateMap;
var frame = this.info.render.frame;
if (updateMap.get(geometry) !== frame) {
this.geometries.update(geometry);
updateMap.set(geometry, frame);
}
}
}, {
key: "dispose",
value: function dispose() {
this.updateMap = new _WeakMap();
}
}]);
return WebGPUObjects;
}();
export default WebGPUObjects;