Skip to content

YannickBochatay/JSYG.Animation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSYG.Animation

Animation plugin of JSYG framework

Demo

http://yannickbochatay.github.io/JSYG.Animation

Installation

npm install jsyg-animation

You can also install it with bower

Examples with webpack/babel

import Animation from "jsyg-animation"
import $ from "jquery"

let anim = new Animation("#myElmt")

anim.set({
    to : {
        x : 50,
        rotate : 45,
        color : "violet"
    }
})

$('#playButton').on("click", () => anim.play() )
$('#pauseButton').on("click", () => anim.pause() )
$('#stopButton').on("click", () => anim.stop() )
import Animation from "jsyg-animation"
import $ from "jquery"

let anim = new Animation("#myPath")

anim.play({
    to : {
        d : "M210,10 L290,20 L290,90 L210,100 Z"
    },
    easing : "swing",
    onanimate() {
        console.log( this.getAttribute("d") )
    }
})

About

Animation plugin of JSYG framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published