evomind / static /js /shared.js
GitHub Actions
Deploy 11b65b5
30d0968
Raw History Blame Contribute Delete
291 Bytes
export const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
export const clamp = (v, a, b) => Math.min(b, Math.max(a, v));
export const smooth = (a, b, v) => { const t = clamp((v - a) / (b - a), 0, 1); return t * t * (3 - 2 * t); };
export const flags = { paused: false };