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

Function pct

packages/@react-spectrum/ai/src/loader/react.tsx:93–96  ·  view source on GitHub ↗
(frame, total)

Source from the content-addressed store, hash-verified

91// ─────────────────────────────────────────────────────────────
92
93function pct(frame, total) {
94 // Frame → keyframe offset percentage, trimmed of noise.
95 return `${+((frame / total) * 100).toFixed(4)}%`;
96}
97
98function cb(coeffs) {
99 return `cubic-bezier(${coeffs.join(',')})`;

Callers 1

emitKeyframesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected