MCPcopy Create free account
hub / github.com/bendc/animateplus / addPropertyKeyframes

Function addPropertyKeyframes

animateplus.js:220–226  ·  view source on GitHub ↗
(property, values)

Source from the content-addressed store, hash-verified

218 });
219
220const addPropertyKeyframes = (property, values) => {
221 const animatable = sanitize(values);
222 const strings = extractStrings(first(animatable));
223 const numbers = animatable.map(extractNumbers);
224 const round = first(strings).startsWith("rgb");
225 return {property, strings, numbers, round};
226};
227
228const createAnimationKeyframes = (keyframes, index) =>
229 Object.entries(keyframes).map(([property, values]) =>

Callers 1

createAnimationKeyframesFunction · 0.85

Calls 3

sanitizeFunction · 0.85
extractStringsFunction · 0.85
firstFunction · 0.85

Tested by

no test coverage detected