show max render time in debug stats
This commit is contained in:
parent
eb98c88d08
commit
7aa579f9ab
2 changed files with 5 additions and 7 deletions
1
notes.md
1
notes.md
|
|
@ -102,6 +102,7 @@
|
||||||
* `F` gcode output option as zip for multiple or flip ops or tool change
|
* `F` gcode output option as zip for multiple or flip ops or tool change
|
||||||
* `F` maintain several part orientations + op chains in a single profile
|
* `F` maintain several part orientations + op chains in a single profile
|
||||||
|
|
||||||
|
* `P` decrease cutting speed when entire tool is engaged (start of roughing)
|
||||||
* `P` port arc code from FDM export to CAM export
|
* `P` port arc code from FDM export to CAM export
|
||||||
* `P` common part pre-analyze to speed up 'slice' and improve shadow (overhangs)
|
* `P` common part pre-analyze to speed up 'slice' and improve shadow (overhangs)
|
||||||
* `P` redo all path route / planning in prepare to account for terrain before camOut
|
* `P` redo all path route / planning in prepare to account for terrain before camOut
|
||||||
|
|
|
||||||
|
|
@ -1285,8 +1285,7 @@
|
||||||
let animates = 0;
|
let animates = 0;
|
||||||
let rateStart = Date.now();
|
let rateStart = Date.now();
|
||||||
|
|
||||||
let renders = 0;
|
let renders = [];
|
||||||
let renderSum = 0;
|
|
||||||
let renderStart;
|
let renderStart;
|
||||||
|
|
||||||
function animate() {
|
function animate() {
|
||||||
|
|
@ -1297,17 +1296,15 @@
|
||||||
fps = 1000 * animates / delta;
|
fps = 1000 * animates / delta;
|
||||||
animates = 0;
|
animates = 0;
|
||||||
rateStart = now;
|
rateStart = now;
|
||||||
renderTime = renders ? renderSum / renders : 0;
|
renderTime = Math.max(0, ...renders);
|
||||||
renders = 0;
|
renders.length = 0;
|
||||||
renderSum = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
requestAnimationFrame(animate);
|
requestAnimationFrame(animate);
|
||||||
if (docVisible && !freeze && Date.now() - lastAction < 1500) {
|
if (docVisible && !freeze && Date.now() - lastAction < 1500) {
|
||||||
renderStart = Date.now();
|
renderStart = Date.now();
|
||||||
renderer.render(SCENE, camera);
|
renderer.render(SCENE, camera);
|
||||||
renderSum += Date.now() - renderStart;
|
renders.push(Date.now() - renderStart);
|
||||||
renders++;
|
|
||||||
} else {
|
} else {
|
||||||
fps = 0;
|
fps = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue