Making a js game engine

anyone know how i can fix the clipping outline?

as you can see here its a little bit of a problem on my engine and any way i can think to fix it such as scaling it out evenly on all sides uses up too much extra resources… when i originally started this engine on firefox like ~3 years ago it was not a problem

as far as i assume its because of the AA sampling from outside of the clipping area causing an alpha bleedover ?

well it looks like if you have 3x ctx.fillRect then it will remove the “borders” but it will cost some amount of performance

another way is to just make the shape ~1px larger but thats MUCH slower than just doping fill/drawImage line… altho i am somewhat bad at math and things so might be faster with some better code that’s beyond my current abilities right now lol

but i still hold out hope that it can be fixed without needing to use extra resources