I'm having some issues to find the easiest way to loop through a grid, setting the tiles in a tilemap based on the rgb-values of a sprite pasted onto the canvas..
At this time I use 32 values of gray.
I use : (canvas.redAt(x,y)+canvas.greenAt(x,y)+canvas.blueAt(x,y))/3 to get the gray value between 0 and 255 and based on that set the tile at that position to one of the 32 tiles (going from black to white)..
Although I think I am close to getting it to work the way I want to, I thought I might try here to get some input and pointers on ways to do it easier and/or quicker..
There might be some very fun ways to use this, or just the tilemap exported as json, I actually don't know..
Maybe it's just one of my crazy ideas..