Skip to content

Releases: Prozi/detect-collisions

v6.7.0

18 Jan 23:21
Compare
Choose a tag to compare
  • deprecated getPotentials() - please just use checkOne() or checkAll() instead - but I will not remove it, reasoning behind this is that inside this requires a filter to check is a potential returned body not being itself. so when you get 1000 potentials you will iterate over that twice
  • optimized checkOne() and checkAll() to not use getPotentials() inside
  • fixed drawBVH() to draw more, what I believe now is the full hierarchy of boxes (see demos - checkbox draw BVH)
  • checkOne and checkAll both now accept a function that returns boolean, if it returns true, then the checking is ended (this was already for checkOne but not for checkAll)
  • setAngle/setOffset returns the Body, like it should since it extends SAT.js
  • ellipses are isCentered = true, makes sense
  • added a few more tests ("Box even without inserting to system, gives collision results", others)
  • improve FPS counter in demos to check every second (more accurate)
  • reduce library size by removing demo from bundled files
  • readme part about benchmark updated, removed part about getPotentials(), other improvements/updates to readme
  • remove too often getOffsetWithAngle() (optimization)
  • optimize ensureConvex()
  • triangles are isConvex = true
  • export SATPolygon from SAT.js so it can be used by consumer of this library
  • fix: moving concave polygon (#43)
  • feat: optimize raycast to reuse same ray and not create Lines everytime
  • fix: rbush.toJSON, fromJSON functionality

v6.6.0

09 Nov 19:45
Compare
Choose a tag to compare
  • more deterministic tests (using seeded random / even distribution for stress test)
  • improved benchmark, made it part of Continuous Integration
  • improved docs
  • applied some minor optimizations
  • implemented working offset/setOffset for circles resolving #36 I guess

v6.5.4

06 Nov 21:54
Compare
Choose a tag to compare

minor optimization for padding

  • each body caches its bbox on insert

  • in detectCollision if bodies have padding and their actual bbox without padding doesn't collide we skip SAT phase

v6.5.1

05 Nov 20:49
Compare
Choose a tag to compare

I actually re-added updateBody(body) with depreciation warning because I don't want to break anything for consumers of this library

making the previous change non-breaking

v6.5.0

05 Nov 20:43
Compare
Choose a tag to compare

in relation to #38

I found that updateAABB shouldnt be public and updateBody has been integrated into insert

please use physics.insert(body) instead of physcis.updateBody(body) it does the same thing now, sorry for the breaking change

tests have been updated, all pass, demos work

v6.4.1

25 Aug 19:48
Compare
Choose a tag to compare
  • feat: added scale to stress demo
  • feat: added scaleX, scaleY getters
  • fix: fixed center() method was missing backing up points when used with setScale
  • fix: optimisation - setScale on circle doesn't update AABB anymore - you have to do it yourself like with Polygon
  • fix: types should allow body.setScale(x, y) even tho y is ignored for circle. I will test this shortly

v6.4.0

23 Aug 00:20
Compare
Choose a tag to compare
  • feat: another great feature for from @Codezilluh which is scaling bodies - scale getter and setScale functions
  • readme has been updated accordingly

v6.3.14

21 Aug 01:37
Compare
Choose a tag to compare
  • fix: update is convex on set points - the polygon might change state from convex to concave
  • fix: few more tests added and corner cases fixed (topic: concaves)
  • feat: optimize demo examples

v6.3.11

20 Aug 17:41
Compare
Choose a tag to compare

Thanks to contributions from @Codezilluh improved quite a lot in field of concave polygon detection

v6.3.7

18 Aug 18:07
Compare
Choose a tag to compare
  • fix: concave polygons not working correctly on circles with concave fixes - #33
  • fix: stress test no bounce case
  • feat: added center(), angle, setAngle() to all bodies for api consistency (they're just kind of useless in case of Points, Ellipses, Circles - but at least keep value)
  • feat: upgraded readme