Skip to content

Releases: Jackie-Aniki/check2d

v9.30.1

02 Oct 17:04

Choose a tag to compare

v9.27.6

06 Jun 16:46

Choose a tag to compare

v9.27.4

08 May 16:49

Choose a tag to compare

  • fix #91
  • add test for it

v9.27.2

06 May 17:09

Choose a tag to compare

  • bumped deps

v9.27.1

06 May 12:16

Choose a tag to compare

  • reduced bundle from 500 to 250 kb because map in esm was taking so much (if you need it just copy it from repo)

v9.27.0

06 May 12:04

Choose a tag to compare

v9.26.2

25 Mar 00:49

Choose a tag to compare

  • fix #87
  • fix #89
  • some tests
  • some small refactor

v9.25.0

16 Feb 21:55

Choose a tag to compare

implemented #86 and added tests

v9.24.0

10 Nov 04:17

Choose a tag to compare

added another simpler live online js edit https://code.pietal.dev/#/boilerplate/detect-collisions?pans=html,console to links in readme

added Usage in Browsers readme section

added explanation of third parameter in https://github.com/Prozi/detect-collisions?tab=readme-ov-file#raycasting System.raycast

v9.20.0

01 Nov 03:51

Choose a tag to compare

You can provide custom class to body create functions:

    import { System, Polygon } from "detect-collisions";

    const physics = new System();

    class MyPolygon extends Polygon {
      constructor(position, points, options) {
        super(position, points, options);
        this.foo = "bar";
      }
    }

    // create minimal MyPolygon and insert to system
    const myPolygon = physics.createPolygon({}, [{}], {}, MyPolygon);

    // true
    console.log(myPolygon.foo === "bar");
  });

this may be useful for any customizations

last optional parameter of system.create* is a class that extends the base class (extends Box for createBox, extends Circle for createCircle, etc.)