MCPcopy Create free account
hub / github.com/adobe/react-spectrum / pct

Function pct

packages/@react-spectrum/ai/src/loader/react.tsx:57–60  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

55// ─────────────────────────────────────────────────────────────
56
57function pct(frame) {
58 // Frame → keyframe offset percentage, trimmed of noise.
59 return `${+((frame / TOTAL_FRAMES) * 100).toFixed(4)}%`;
60}
61
62function cb(coeffs) {
63 return `cubic-bezier(${coeffs.join(',')})`;

Callers 1

emitKeyframesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected