Files
houseplan-card/demo/performance/led-chunk-request.mjs
T
Matysh 416d2fae71 perf(led): avoid redundant tube and barrier calculations
Preserve exact light fields while culling provably distant occluders,
reusing physical tube paths across camera updates and excluding LED emitter
data from aligned architectural fingerprints. Cover output equivalence,
in-place invalidation, resize tags and hyphenated benchmark chunk hashes.

Issue: #788
User-Visible: yes
2026-10-03 19:18:49 +03:00

8 lines
420 B
JavaScript

/** Stable LED chunk identity for request accounting, independent of its hash. */
export function ledChunkRequestName(url) {
const name = url.replace(/[?#].*$/, '').replace(/.*\//, '');
// Rollup's base64url hashes may themselves contain '-' (even first).
// Capture the known prefix instead of removing a last-hyphen suffix.
return /^(led-strip-(?:runtime|field|editor))-[\w-]+\.js$/.exec(name)?.[1] ?? null;
}