Skip to content

An exercise in basic SVG animation using javascript

Notifications You must be signed in to change notification settings

shiftinterrupt/basic-svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic SVG

A minimal SVG library in JavaScript supporting animations.

Demo

https://shiftinterrupt.github.io/basic-svg/

Usage

const svg = Svg('body').attrs({
    width: '1700',
    height: '800'
});

const square = svg.append('square', {
    origin: [ 100, 50 ],
    radius: 20
}).styles({
    fill: 'purple'
});

animate(square, [
    translate([ 2000, 500 ], SIN),
    rotate(16 * PI),
    oscillate([ 100, 100 ], 6)
], 1000);

About

An exercise in basic SVG animation using javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published