Mission Control Dashboard - Initial implementation
This commit is contained in:
12
node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs
generated
vendored
Normal file
12
node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
const isNotNull = (value) => value !== null;
|
||||
function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) {
|
||||
const resolvedKeyframes = keyframes.filter(isNotNull);
|
||||
const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1);
|
||||
const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;
|
||||
return !index || finalKeyframe === undefined
|
||||
? resolvedKeyframes[index]
|
||||
: finalKeyframe;
|
||||
}
|
||||
|
||||
export { getFinalKeyframe };
|
||||
//# sourceMappingURL=get-final.mjs.map
|
||||
Reference in New Issue
Block a user