Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stagas/animatrix
Create DOM Animations.
https://github.com/stagas/animatrix
Last synced: 13 days ago
JSON representation
Create DOM Animations.
- Host: GitHub
- URL: https://github.com/stagas/animatrix
- Owner: stagas
- License: mit
- Created: 2022-05-28T08:21:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T16:38:26.000Z (almost 2 years ago)
- Last Synced: 2024-09-15T00:11:21.173Z (about 2 months ago)
- Language: TypeScript
- Size: 28.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
animatrixCreate DOM Animations.
npm i animatrix
pnpm add animatrix
yarn add animatrix
## API
#
AnimSettings
Easing
[ number, number, number, number ]
KeyframeAnimation
{
# animation
Animation | null
breakTime
number
keyframes
Keyframe []
next
KeyframeAnimationDetails | null
onfinish
# ()
() =>
- void
KeyframeAnimationDetails
} # ManualAnimation
# state
# stop
# to
# update
} # ManualAnimationState
"preparing"
| "running"
| "finished"
StepAnimation
# state
# t
number
to
# update
} # StepAnimationState
"preparing"
| "running"
| "finished"
Easing
# BezierEasing
(mX1, mY1, mX2, mY2) # createKeyframeAnimation
(animSettings, target, getKeyframes, current) # current
createKeyframeAnimation(animSettings, target, getKeyframes, current) =>
#createManualAnimation
(anim) # anim
createManualAnimation<T>(anim) =>
createStepAnimation
(AnimSettings, anim) AnimSettings# anim
createStepAnimation<T>(AnimSettings, anim) =>
## Credits
- [event-toolkit](https://npmjs.org/package/event-toolkit) by [stagas](https://github.com/stagas) – Toolkit for DOM events.
- [is-mobile-agent](https://npmjs.org/package/is-mobile-agent) by [stagas](https://github.com/stagas) – Singleton boolean that is true when user agent is mobile or tablet.
## Contributing
[Fork](https://github.com/stagas/animatrix/fork) or [edit](https://github.dev/stagas/animatrix) and submit a PR.
All contributions are welcome!
## License
MIT © 2022 [stagas](https://github.com/stagas)