SnapFoo is a lightweight (~4.5k minified) animation library that compliments Snap.svg. The focus of SnapFoo is to simplify bringing elaborate scenes of SVG animations and interactions to life.
- Published SnapFoo to NPM
npm install snapfoo --save
- The
./srcdirectory now contains an updated copy of SnapFoo including minor ES6 additions - The
./distdirectory contains the production files that have ben transpiled toes-2015presets via Babel
- Greater support and flexibility for callbacks including scoping and when they execute
- Performance and various updates including ~newer jQuery features for SVG class manipulation
- Better support and features for path animations
- Updated support for multiple animations and classes within a single SVG container
- General overhaul and organization of features and naming
- Removed intervals for looping
- Removed stop(), set(), and clear() methods
NPM
npm install snapfoo --save
Manual
Download SnapFoo and include the ./dist/ build in your project after jQuery and Snap.svg. Once included, call the library for use:
const snapfoo = snapFoo("#theSVGContainer");- snapfoo.animate(): The primary animation call that receives an element or group of elements to animate based on theFramesObj object. Any element to be animated that does not already have an ID is appended the class "sf#" for a unique identifier.
- snapfoo.animatePath(): Animate an element or group of elements along a path. Any element to be animated that does not already have an ID is appended the class "sf#" for a unique identifier.
