Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Jbox2D Debug Renderer

This renderer is adapted to Jbox2D version 2.2.1.1 It will probably work with other versions, but it may need a few changes

Currently implemented shapes: CircleShape, PolygonShape, EdgeShape and joints.

Example of uses:

Quick start, with default settings

    public Physics() {
        world = new World(gravity);
        new JBox2DDebugRenderer(world, 5);
    }

Customizable

    public Physics() {
        world = new World(gravity);
        Jbox2DDebugConfig config = new Jbox2DDebugConfig();
        config.setPixelsPerUnit(PPU);
	config.setColorPolygon(Color.BLUE);
        new JBox2DDebugRenderer(world, config, 5);
    }

You can set-up following things:

    public void setTitle(String title);

    public void setColorBackground(Color colorBackground);

    public void setColorPolygon(Color colorPolygon);

    public void setColorCircle(Color colorCircle);

    public void setColorEdge(Color colorEdge);

    public void setAlpha(float alpha);

About

Debug renderer for jBox2D

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages