UNPKG

just-animate

Version:
18 lines (17 loc) 521 B
import { isDOM } from '../lib/utils/inspect'; import { animate } from './animate'; import { appendUnits } from './append-units'; import { combineTransforms } from './transforms'; export const waapiPlugin = { name: 'web', animate, getValue(target, key) { return getComputedStyle(target)[key]; }, onWillAnimate(target, effects, propToPlugin) { if (isDOM(target.target)) { appendUnits(effects); combineTransforms(target, effects, propToPlugin); } } };