mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Skip fade on low fps
This commit is contained in:
parent
d5f7a78386
commit
31641bedad
@ -56,8 +56,14 @@ export class HUDWiresOverlay extends BaseHUDPart {
|
|||||||
|
|
||||||
update() {
|
update() {
|
||||||
const desiredAlpha = this.root.currentLayer === "wires" ? 1.0 : 0.0;
|
const desiredAlpha = this.root.currentLayer === "wires" ? 1.0 : 0.0;
|
||||||
|
|
||||||
|
// On low performance, skip the fade
|
||||||
|
if (this.root.entityMgr.entities.length > 5000 || this.root.dynamicTickrate.averageFps < 50) {
|
||||||
|
this.currentAlpha = desiredAlpha;
|
||||||
|
} else {
|
||||||
this.currentAlpha = lerp(this.currentAlpha, desiredAlpha, 0.12);
|
this.currentAlpha = lerp(this.currentAlpha, desiredAlpha, 0.12);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the wires value below the cursor
|
* Copies the wires value below the cursor
|
||||||
|
Loading…
Reference in New Issue
Block a user