UNPKG

@proyecto26/animatable-component

Version:
47 lines (46 loc) • 2.17 kB
import { ANIMATIONS } from './common'; const BG_PAN_DEFAULT = { fillMode: 'both' }; const BG_PAN_LEFT = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 50%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 50%' }) ]; const BG_PAN_RIGHT = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 50%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 50%' }) ]; const BG_PAN_TOP = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '50% 100%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '50% 0%' }) ]; const BG_PAN_BOTTOM = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '50% 0%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '50% 100%' }) ]; const BG_PAN_TR = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 100%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 0%' }) ]; const BG_PAN_BR = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 0%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 100%' }) ]; const BG_PAN_BL = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 0%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 100%' }) ]; const BG_PAN_TL = [ Object.assign(Object.assign({ offset: 0 }, BG_PAN_DEFAULT), { backgroundPosition: '100% 100%' }), Object.assign(Object.assign({ offset: 1 }, BG_PAN_DEFAULT), { backgroundPosition: '0% 0%' }) ]; export default { [ANIMATIONS.BG_PAN_LEFT]: BG_PAN_LEFT, [ANIMATIONS.BG_PAN_RIGHT]: BG_PAN_RIGHT, [ANIMATIONS.BG_PAN_TOP]: BG_PAN_TOP, [ANIMATIONS.BG_PAN_BOTTOM]: BG_PAN_BOTTOM, [ANIMATIONS.BG_PAN_TR]: BG_PAN_TR, [ANIMATIONS.BG_PAN_BR]: BG_PAN_BR, [ANIMATIONS.BG_PAN_BL]: BG_PAN_BL, [ANIMATIONS.BG_PAN_TL]: BG_PAN_TL };