Skip to content

Takes an SVG file as an input, and outputs Box2dWeb js code.

Notifications You must be signed in to change notification settings

kylophone/SVG-Box2dWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG-Box2dWeb

Parses all the circles, rectangles, and polygons in your SVG drawing. Defines and initalizes a Box2dWeb world with all its physics bodies & fixtures. Takes an SVG as an input, and outputs javascript that no one should ever have to code by hand. Note that all of your SVG elements should have a unique id attribute. Run the script with an SVG you've created and then have a look at demo.html in your browser.

Usage

cd SVG-Box2dWeb
python svg-box2dweb.py ./test.svg > ./js/level1.js

About

Takes an SVG file as an input, and outputs Box2dWeb js code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published