- 新增OperationDashboard.vue全屏大屏组件 - 添加6个核心KPI指标卡片: 进水总量/出水总量/产销差率/营收额/平均水质/报警次数 - 实现6个ECharts图表: 供水趋势/水质分布/报警统计/管网空间/设备状态/营收分析 - 创建静态HTML版本operation-dashboard.html,使用CDN加载Vue3/ECharts/Element Plus - 更新路由配置,添加/operation路径支持 - 修复nextTick导入问题,优化build脚本 🚧 开发者: bot_dev1 📝 任务: #38 [BI] 运营仪表盘 + 供水专题大屏
103 lines
2.3 KiB
JavaScript
103 lines
2.3 KiB
JavaScript
import Color from "../Core/Color.js";
|
|
import Frozen from "../Core/Frozen.js";
|
|
|
|
/**
|
|
* Represents a command to the renderer for clearing a framebuffer.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
*/
|
|
function ClearCommand(options) {
|
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
|
|
/**
|
|
* The value to clear the color buffer to. When <code>undefined</code>, the color buffer is not cleared.
|
|
*
|
|
* @type {Color}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.color = options.color;
|
|
|
|
/**
|
|
* The value to clear the depth buffer to. When <code>undefined</code>, the depth buffer is not cleared.
|
|
*
|
|
* @type {number}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.depth = options.depth;
|
|
|
|
/**
|
|
* The value to clear the stencil buffer to. When <code>undefined</code>, the stencil buffer is not cleared.
|
|
*
|
|
* @type {number}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.stencil = options.stencil;
|
|
|
|
/**
|
|
* The render state to apply when executing the clear command. The following states affect clearing:
|
|
* scissor test, color mask, depth mask, and stencil mask. When the render state is
|
|
* <code>undefined</code>, the default render state is used.
|
|
*
|
|
* @type {RenderState}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.renderState = options.renderState;
|
|
|
|
/**
|
|
* The framebuffer to clear.
|
|
*
|
|
* @type {Framebuffer}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.framebuffer = options.framebuffer;
|
|
|
|
/**
|
|
* The object who created this command. This is useful for debugging command
|
|
* execution; it allows you to see who created a command when you only have a
|
|
* reference to the command, and can be used to selectively execute commands
|
|
* with {@link Scene#debugCommandFilter}.
|
|
*
|
|
* @type {object}
|
|
*
|
|
* @default undefined
|
|
*
|
|
* @see Scene#debugCommandFilter
|
|
*/
|
|
this.owner = options.owner;
|
|
|
|
/**
|
|
* The pass in which to run this command.
|
|
*
|
|
* @type {Pass}
|
|
*
|
|
* @default undefined
|
|
*/
|
|
this.pass = options.pass;
|
|
}
|
|
|
|
/**
|
|
* Clears color to (0.0, 0.0, 0.0, 0.0); depth to 1.0; and stencil to 0.
|
|
*
|
|
* @type {ClearCommand}
|
|
*
|
|
* @constant
|
|
*/
|
|
ClearCommand.ALL = Object.freeze(
|
|
new ClearCommand({
|
|
color: new Color(0.0, 0.0, 0.0, 0.0),
|
|
depth: 1.0,
|
|
stencil: 0.0,
|
|
}),
|
|
);
|
|
|
|
ClearCommand.prototype.execute = function (context, passState) {
|
|
context.clear(this, passState);
|
|
};
|
|
export default ClearCommand;
|