@nativescript-community/additween
Version:
Additive tweening library for smooth animations
17 lines • 531 B
JavaScript
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const PlainObjectReducer = {
clone: function (obj) {
const target = {};
for (const key in obj) {
target[key] = obj[key];
}
return target;
},
reduce: function (targetState, toState, fromState, pos) {
for (const key in targetState) {
targetState[key] -= (toState[key] - fromState[key]) * pos;
}
return targetState;
},
};
//# sourceMappingURL=PlainObjectReducer.js.map