animate-square
Animator of squares with canvas.
Installation
npm install --save animate-square
Usage
;;;; // Create store.const animateSquaresStore = ; // Add 30 random (position, size, moving direction) squares.forlet i = 0; i < 30; ++i animateSquaresStore; // Make container component.const ConnectedComponent = Component; // Animation.const onReactDOMRendered = { const goNextStep = { // Use `Actions.goNextStep()` to move squares with timestamp. animateSquaresStore; window; } window;} ReactDOM;
Demo
cd node_module/animate-square/demonpm installnpm start
Open demo page on http://localhost:3000