bytev-charts-beta
Version:
基于echarts和JavaScript及ES6封装的一个可以直接调用的图表组件库,内置主题设计,简单快捷,且支持用户自定义配置; npm 安装方式: npm install bytev-charts 若启动提示还需额外install插件,则运行 npm install @babel/runtime-corejs2 即可;
57 lines (45 loc) • 1.79 kB
JavaScript
import _Object$assign from "@babel/runtime-corejs2/core-js/object/assign";
import _Object$defineProperty from "@babel/runtime-corejs2/core-js/object/define-property";
import { OrthographicCamera, PlaneBufferGeometry, Mesh } from "../../../build/three.module.js";
function Pass() {
// if set to true, the pass is processed by the composer
this.enabled = true; // if set to true, the pass indicates to swap read and write buffer after rendering
this.needsSwap = true; // if set to true, the pass clears its buffer before rendering
this.clear = false; // if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.
this.renderToScreen = false;
}
_Object$assign(Pass.prototype, {
setSize: function
/* width, height */
setSize() {},
render: function
/* renderer, writeBuffer, readBuffer, deltaTime, maskActive */
render() {
console.error('THREE.Pass: .render() must be implemented in derived pass.');
}
}); // Helper for passes that need to fill the viewport with a single quad.
Pass.FullScreenQuad = function () {
var camera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
var geometry = new PlaneBufferGeometry(2, 2);
var FullScreenQuad = function FullScreenQuad(material) {
this._mesh = new Mesh(geometry, material);
};
_Object$defineProperty(FullScreenQuad.prototype, 'material', {
get: function get() {
return this._mesh.material;
},
set: function set(value) {
this._mesh.material = value;
}
});
_Object$assign(FullScreenQuad.prototype, {
dispose: function dispose() {
this._mesh.geometry.dispose();
},
render: function render(renderer) {
renderer.render(this._mesh, camera);
}
});
return FullScreenQuad;
}();
export { Pass };