Home

Awesome

Logo


What is differ?

A Separating Axis Theorem collision library for haxe

haxe


Facts

Quick look

A simple collision example

    var circle = new Circle( 300, 200, 50 );
    var box = Polygon.rectangle( 0, 0, 50, 150 );

    box.rotation = 45;

    var collideInfo = Collision.shapeWithShape( circle, box );

    if(collideInfo != null) {
        //use collideInfo.separationX
        //    collideInfo.separationY
        //    collideInfo.normalAxisX
        //    collideInfo.normalAxisY
        //    collideInfo.overlap
    }

See tests/ for usage examples and tests

Other notes

API documentation

https://snowkit.github.io/differ/

Demos

Main Contributors

view all contributors


History

1.4.0 (Latest release, haxelib)

1.3.0

The goal of this release is as follows :

All of this was achieved, with the following changes.

1.2.0

The biggest change for sure, renamed hxcollision to differ Now that the library is getting more use its better to have a consistent name and to have a more explicit path. Think of "differ" as a diff tool for shapes/rays, it tells you how shapes differ (i.e the separation).

1.1.0

1.0.4

1.0.3

1.0.2

1.0.1

1.0.0