$ show gibbok/animatelo
Animatelo is a JavaScript library that provides a collection of pre-built animations using the Web Animations API. It ports the popular animate.css library to the JavaScript-based animation model, allowing developers to apply animations like bounce, fade, slide, and more to DOM elements via a simple API (e.g., animatelo.bounce('#element')). The library consists of a core animation engine (src/animatelo.js) that handles element selection, option validation, and animation creation, with individual animation files defining keyframe sequences for specific effects. The architecture is modular, with each animation encapsulated in its own file that extends the main animatelo object, and a build process (via Gulp) concatenates and minifies the source for distribution. The library relies on the Web Animations API (with polyfill support for older browsers) and has no runtime dependencies, making it lightweight and easy to integrate into web projects.
The LLM identified 1 files worth highlighting for reuse:
The core animation engine that handles element selection (supporting strings, nodes, node lists, and HTML collections), option validation, and animation creation using the Web Animations API. It provides a reusable _animate function that abstracts the boilerplate of working with the Animation API, allowing any keyframe-based animation to be driven with consistent ID assignment and error handling. This component is isolated, self-contained, and could be extracted into a new project with minimal modification, demonstrating a clean separation of concerns between animation logic and specific effect definitions.