Cazka / diepAPI

An API for https://diep.io
MIT License
15 stars 8 forks source link

Viewport detection is buggy #34

Closed Cazka closed 2 years ago

Cazka commented 2 years ago

When someone has a very specific aspect ratio, the viewport detection can fail.

this if statement in particular will cause this issue. https://github.com/Cazka/diepAPI/blob/bc4a4aed6d8dae237cdea1892773394589429546/src/minimap.ts#L72

we can add more checks:

if ctx.globalAlpha == 0.1 if ctx.fillStyle == #00000 if transform.e and transform.f are inside the minimap

Cazka commented 2 years ago

Closed by #40