• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 9931830354
89%

Build:
DEFAULT BRANCH: main
Ran 15 Jul 2024 12:25AM UTC
Jobs 1
Files 218
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2024 12:21AM UTC coverage: 90.383% (+0.01%) from 90.373%
9931830354

push

github

web-flow
fix: rewrite ClosestLine and PolygonPolygonClosestLine logic for improved accuracy on sloped polygons (#3124)


Improves accuracy of PolygonPolygonClosestLine and ClosestLine functions. Big disclaimer, I heavily relied on ChatGPT for the math logic here... extra eyes greatly appreciated. I myself plan to do a deeper review on the math here before merging.

Before:

https://github.com/user-attachments/assets/a0d9d5d5-76e9-4e05-8459-15b6a48b0dcb

After:


https://github.com/user-attachments/assets/85d4410b-2bf2-4f51-90e2-4ee828a9693b


I also think there's a faster way to do the `PolygonPolygonClosestLine` logic. Right now it iterates over each side of the polygon, draws a line, and returns the shortest result. Potentially it could use SAT to determine the closest sides, but I had unexpected results

```ts
PolygonPolygonClosestLine(polygonA: PolygonCollider, polygonB: PolygonCollider) {
    const aSat = SeparatingAxis.findPolygonPolygonSeparation(polygonA, polygonB);
    const bSat = SeparatingAxis.findPolygonPolygonSeparation(polygonB, polygonA);

    return ClosestLine2(aSat.side, bSat.side);
}
```

https://github.com/user-attachments/assets/be6460cb-7786-4864-93aa-d8053478aa53

5578 of 7126 branches covered (78.28%)

38 of 46 new or added lines in 1 file covered. (82.61%)

12472 of 13799 relevant lines covered (90.38%)

25011.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9931830354.1 15 Jul 2024 12:25AM UTC 0
90.38
GitHub Action Run
Source Files on build 9931830354
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9931830354
  • 2745795a on github
  • Prev Build on main (#9919423720)
  • Next Build on main (#9931830355)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc