mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-19 16:15:04 +00:00
Hotfix: Fix frame rate indicator removed for production.
This commit is contained in:
1 parent
b2f989b0b7
commit
a09f52330f
2 files changed
+38
-38
No files matched your search
@@ -279,26 +279,26 @@ export class EditEngine {
|
||||
|
||||
public async setupStage() {
|
||||
// Frame rate inicator
|
||||
const textNode = new Konva.Text({
|
||||
x: 10,
|
||||
y: 80,
|
||||
text: "",
|
||||
fontSize: 18,
|
||||
fontFamily: "Source Sans 3",
|
||||
fill: "white",
|
||||
});
|
||||
const anim = new Konva.Animation((frame) => {
|
||||
if (frame && import.meta.env.DEV) {
|
||||
const timeDiff = frame.timeDiff;
|
||||
const frameRate = frame.frameRate;
|
||||
textNode.setText(
|
||||
`FrameTime: ${timeDiff.toFixed(0)} ms\nFrameRate: ${frameRate.toFixed(0)} fps`,
|
||||
);
|
||||
}
|
||||
}, this.mediaLayer);
|
||||
// const textNode = new Konva.Text({
|
||||
// x: 10,
|
||||
// y: 80,
|
||||
// text: "",
|
||||
// fontSize: 18,
|
||||
// fontFamily: "Source Sans 3",
|
||||
// fill: "white",
|
||||
// });
|
||||
// const anim = new Konva.Animation((frame) => {
|
||||
// if (frame && import.meta.env.DEV) {
|
||||
// const timeDiff = frame.timeDiff;
|
||||
// const frameRate = frame.frameRate;
|
||||
// textNode.setText(
|
||||
// `FrameTime: ${timeDiff.toFixed(0)} ms\nFrameRate: ${frameRate.toFixed(0)} fps`,
|
||||
// );
|
||||
// }
|
||||
// }, this.mediaLayer);
|
||||
|
||||
anim.start();
|
||||
this.uiLayer.add(textNode);
|
||||
// anim.start();
|
||||
// this.uiLayer.add(textNode);
|
||||
this.addKeyboardShortcuts();
|
||||
}
|
||||
|
||||
|
||||
@@ -561,26 +561,26 @@ export class Engine {
|
||||
|
||||
public async setupStage() {
|
||||
// Frame rate inicator
|
||||
const textNode = new Konva.Text({
|
||||
x: 10,
|
||||
y: 80,
|
||||
text: "",
|
||||
fontSize: 18,
|
||||
fontFamily: "Source Sans 3",
|
||||
fill: "white",
|
||||
});
|
||||
const anim = new Konva.Animation((frame) => {
|
||||
if (frame && import.meta.env.DEV) {
|
||||
const timeDiff = frame.timeDiff;
|
||||
const frameRate = frame.frameRate;
|
||||
textNode.setText(
|
||||
`FrameTime: ${timeDiff.toFixed(0)} ms\nFrameRate: ${frameRate.toFixed(0)} fps`,
|
||||
);
|
||||
}
|
||||
}, this.mediaLayer);
|
||||
// const textNode = new Konva.Text({
|
||||
// x: 10,
|
||||
// y: 80,
|
||||
// text: "",
|
||||
// fontSize: 18,
|
||||
// fontFamily: "Source Sans 3",
|
||||
// fill: "white",
|
||||
// });
|
||||
// const anim = new Konva.Animation((frame) => {
|
||||
// if (frame && import.meta.env.DEV) {
|
||||
// const timeDiff = frame.timeDiff;
|
||||
// const frameRate = frame.frameRate;
|
||||
// textNode.setText(
|
||||
// `FrameTime: ${timeDiff.toFixed(0)} ms\nFrameRate: ${frameRate.toFixed(0)} fps`,
|
||||
// );
|
||||
// }
|
||||
// }, this.mediaLayer);
|
||||
|
||||
anim.start();
|
||||
this.uiLayer.add(textNode);
|
||||
// anim.start();
|
||||
//this.uiLayer.add(textNode);
|
||||
this.addKeyboardShortcuts();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user