New games every week!
Circular Cutting Blog
4th December 2020
Today I need to figure out how to slice an image into a circle, and slap it neatly inside the testcard.

-=-=-

This shouldn't be "too" hard.
There are some lovely functions within Javascript for doing overlays and masks and the like.
Unfortunately, last time I tested it, it didn't quite work out when drawing to a canvas.
Of course, that was a few years ago, when I'd just started work on Shoebox, and in all that time, I'm fairly sure the basic Javascript capabilities would have improved significantly..
.. but there's a nagging feeling that I'm going to end up having to do it all myself.

Instead, then, I'll probably copy the requested image to a resized area, and then run it through a per-pixel function that can strip out pixels beyond a certain radius.
That oughta work, right!?
Hmm.

Not sure how fast it'll be, though.
We'll see.
Views 86, Upvotes 12  
Daily Blog , Testcard
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Circular Cutting - AGameAWeek