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

Function recomposeValue

animateplus.js:235–240  ·  view source on GitHub ↗
([from, to], strings, round, easing)

Source from the content-addressed store, hash-verified

233 from + (to - from) * easing;
234
235const recomposeValue = ([from, to], strings, round, easing) =>
236 strings.reduce((style, string, index) => {
237 const previous = index - 1;
238 const value = getCurrentValue(from[previous], to[previous], easing);
239 return style + (round && index < 4 ? Math.round(value) : value) + string;
240 });
241
242const createStyles = (keyframes, easing) =>
243 keyframes.reduce((styles, {property, numbers, strings, round}) => {

Callers 1

createStylesFunction · 0.85

Calls 1

getCurrentValueFunction · 0.85

Tested by

no test coverage detected