Skip to content

Releases: Prozi/detect-collisions

v9.11.1

15 Jul 22:37
Compare
Choose a tag to compare

we got faster! 🔥

added a few magical improvements, and improved naming of params in docs

this is a benchmark from few commits before:
https://app.circleci.com/pipelines/github/Prozi/detect-collisions/415/workflows/e6f86657-f364-4ce8-b983-f4f0864fe8cb/jobs/360

> detect-collisions@9.9.4 benchmark-stress
> node -r pixi-shim -e 'import("./dist/benchmarks/index.js").then(({ stressBenchmark }) => stressBenchmark());'

┌─────────┬────────────────────────────┬─────────┬────────────────────┬───────────┬─────────┐
│ (index) │ Task Name                  │ ops/sec │ Average Time (ns)  │ Margin    │ Samples │
├─────────┼────────────────────────────┼─────────┼────────────────────┼───────────┼─────────┤
│ 0       │ 'stress test, items=1000'  │ '126'   │ 7923593.826771655  │ '±10.14%' │ 127     │
│ 1       │ 'stress test, items=2000'  │ '51'    │ 19304634.250000007 │ '±6.36%'  │ 52      │
│ 2       │ 'stress test, items=3000'  │ '31'    │ 32114035.15624994  │ '±5.62%'  │ 32      │
│ 3       │ 'stress test, items=4000'  │ '19'    │ 52447966.149999954 │ '±5.82%'  │ 20      │
│ 4       │ 'stress test, items=5000'  │ '11'    │ 84901515.83333318  │ '±4.76%'  │ 12      │
│ 5       │ 'stress test, items=6000'  │ '9'     │ 109472182.69999993 │ '±2.74%'  │ 10      │
│ 6       │ 'stress test, items=7000'  │ '7'     │ 135961302.60000008 │ '±2.22%'  │ 10      │
│ 7       │ 'stress test, items=8000'  │ '6'     │ 159949840.89999998 │ '±3.67%'  │ 10      │
│ 8       │ 'stress test, items=9000'  │ '4'     │ 200536707.80000103 │ '±1.54%'  │ 10      │
│ 9       │ 'stress test, items=10000' │ '4'     │ 221228030.29999924 │ '±6.09%'  │ 10      │
└─────────┴────────────────────────────┴─────────┴────────────────────┴───────────┴─────────┘
Done in 72.83s.

this is after changes:
https://app.circleci.com/pipelines/github/Prozi/detect-collisions/421/workflows/6e76f81f-fee6-4d6c-87e0-923e2880fbdc/jobs/367

> detect-collisions@9.11.1 benchmark-stress
> node -r pixi-shim -e 'import("./dist/benchmarks/index.js").then(({ stressBenchmark }) => stressBenchmark());'

┌─────────┬────────────────────────────┬─────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name                  │ ops/sec │ Average Time (ns)  │ Margin   │ Samples │
├─────────┼────────────────────────────┼─────────┼────────────────────┼──────────┼─────────┤
│ 0       │ 'stress test, items=1000'  │ '149'   │ 6681088.626666648  │ '±4.34%' │ 150     │
│ 1       │ 'stress test, items=2000'  │ '59'    │ 16753291.399999958 │ '±3.63%' │ 60      │
│ 2       │ 'stress test, items=3000'  │ '28'    │ 35010410.27586203  │ '±7.12%' │ 29      │
│ 3       │ 'stress test, items=4000'  │ '19'    │ 51137117.60000001  │ '±4.03%' │ 20      │
│ 4       │ 'stress test, items=5000'  │ '11'    │ 86016739.83333315  │ '±5.20%' │ 12      │
│ 5       │ 'stress test, items=6000'  │ '8'     │ 111907240.60000011 │ '±2.89%' │ 10      │
│ 6       │ 'stress test, items=7000'  │ '7'     │ 138337668.09999943 │ '±3.13%' │ 10      │
│ 7       │ 'stress test, items=8000'  │ '6'     │ 149393420.39999992 │ '±2.25%' │ 10      │
│ 8       │ 'stress test, items=9000'  │ '4'     │ 205487630.59999982 │ '±4.38%' │ 10      │
│ 9       │ 'stress test, items=10000' │ '4'     │ 208027424.3000007  │ '±2.54%' │ 10      │
└─────────┴────────────────────────────┴─────────┴────────────────────┴──────────┴─────────┘
Done in 76.81s.

values of course fluctuate but believe me we should be more performant by like 4%

v9.10.0

15 Jul 20:35
Compare
Choose a tag to compare

since I've finally found out that indexing by hashmap is fast but indexing array by number is instant get in javascript

I changed the way getSATTest and checkAInB work, possibly improving performance, but will have to check the benchmarks on circleci

v9.9.4

15 Jul 17:28
Compare
Choose a tag to compare

improved package readme regarding crucial thing that is body position

wrote that set position is in fact teleport
and move is a move towards angle with speed

also improved description of package fixing broken english (ponglish)

v9.9.3

15 Jul 13:45
Compare
Choose a tag to compare

few cool fixes/improvements like trimming not required dependencies

v9.9.0

15 Jul 03:06
Compare
Choose a tag to compare
  • merged #78
  • merged #79
  • in response to issue #77 updated typescript to ^5
  • in response to issue #68 clarified that setPosition is teleport and what OP wanted is most likely the new added function of body.move(speed, updateNow)

v9.8.0

30 May 19:45
Compare
Choose a tag to compare

publishing merged fix #76

v9.7.0

24 May 20:04
Compare
Choose a tag to compare

merged #75 introducing system.checkArea()

also tiny code improvements here and there but no breaking changes

v9.6.0

24 May 18:56
Compare
Choose a tag to compare

merged #74
after that updated stess demo to still have bounds on test above (minor fix)
used above as inspiration for comparision (numbers compare faster than strings ??)

v9.5.7

23 May 19:31
Compare
Choose a tag to compare

coffee

v9.5.5

23 May 16:29
Compare
Choose a tag to compare

release latest