Add statistics panel

This commit is contained in:
2022-05-25 22:00:13 +08:00
parent ce99b17fcb
commit 2dbbd0952a
9 changed files with 220 additions and 6 deletions
+5
View File
@@ -44,6 +44,11 @@ class Setting extends Emitter<ISettingEvents> {
*/
public layout: Layout = new Layout();
/**
* 是否显示线性图表
*/
public lineChartType: boolean = false;
/**
* 设置参数
*/
+2
View File
@@ -38,6 +38,7 @@ interface IStatusEvent {
physicsLoop: number;
recordLoop: number;
offlineLoop: number;
modelUpdate: void;
mouseModChange: void;
focusObjectChange: void;
focusLabelChange: void;
@@ -132,6 +133,7 @@ class Status extends Emitter<IStatusEvent> {
this.actuator.on("loop", (t) => { this.emit("physicsLoop", t) });
this.actuator.on("record", (t) => { this.emit("recordLoop", t) });
this.actuator.on("offline", (t) => { this.emit("offlineLoop", t) });
this.actuator.on("modelUpdate", () => { this.emit("modelUpdate") });
// 对象变化事件
this.model.on("objectChange", () => this.emit("objectChange"));