Skip to content

Use-Code/hgr-motion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hager - Animations

Animations are played with Lottie. The file client/js/index.js contains a simple example of implementation.

import Lottie from 'lottie-web'

const container = document.getElementById('myContainer');

const animation = Lottie.loadAnimation({
	container: container, // the container in the dom
	renderer: 'svg',
	loop: true, // some may be true, some may be false, see client/js/index.js 
	autoplay: true, 
	path: 'client/assets/anim-data/anim.json' // available in client/assets/anim-data in josn format
});

Each animation is available in client/assets/anim-data, in json format, ready to be managed by Lottie.

Live preview

https://use-code.github.io/hgr-motion/

Run the preview locally

git clone https://github.com/Use-Code/hgr-motion.git
cd hgr-motion
npm install
npm start # starts on localhost:4480

Webpack compiles the files in the dist/ folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published