feedback5 R5: split the battle effect system into modules

public/js/render/fx.js becomes a re-export barrel. Speeds, camera heights, fonts, the kind table and the shared tunables move verbatim into public/js/render/fx/*.js. FxSystem keeps its constructor, clear, update, counts and destroy; the other methods move verbatim into container classes installed on FxSystem.prototype in source order. simSpeeds and fontsReady each stay one instance. The dynamic import of /sim/constants.js stays next to setSimProjectileSpeeds.
This commit is contained in:
sganggs committed 2026-10-05 17:13:07 +08:00
1 parent eb04f5dfa4
commit c1b8292f92
16 files changed
+2385 -2224

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
// public/js/render/fx/limits.js — shared fx tunables used by more than one effect module.
const MAX_PARTICLES = { high: 1400, medium: 800, low: 360 };
const SKILL_GOLD = 0xffd45a;
const NO_OPTS = Object.freeze({});
const clamp = (v, lo, hi) => (v < lo ? lo : v > hi ? hi : v);
const easeOut = (t) => 1 - (1 - t) * (1 - t);
export { MAX_PARTICLES, SKILL_GOLD, NO_OPTS, clamp, easeOut };