bug: rects having weird corners when having an outlineComp
I have a rect object which im adding an outline to, it looks like this
The code is: `kaboom()
let square = add([ rect(100, 100, { radius: 10 }), pos(center()), outline(10, BLACK) ])`
seems like this is a issue with getArcPts() being only percise to integer angles instead of float angles
is not better outline() component being a shader?
@mflerackers
is not better outline() component being a shader?
MF has done a shader outline and it has some issues, for it to work properly you have to do some operation which is not too performant? plus the sprites also need padding in the spriteAtlas kaboom saves the sprites in so that might cause some issues
The reason is quite simple. Line joins are not supported. So even if you calculate the points for the line correctly, they aren't nicely joined. Lines are just drawn as separate segments with a butt linecap. So where lines at an angle join, you are going to have gaps. The solution is to add line join support for at least bevel join. Then the problem of the round rectangle outline is automatically fixed as well.
was fixed in: https://github.com/marklovers/kaplay/commit/40e5d8cfdd7f7831b439aca2b4088f9401afe137