Tuesday, March 10, 2020

Interests Beyond Scratch :: Things I'm Making and Creating :: Is there something like a

-ShadowsHiding- :

Sheep_maker wrote:

The touching blocks are very slow because they have to compare every pixel of a sprite. Outside of Scratch, people usually use math for collisions

I'm not exactly sure what you'd want a touching colour thing for. If you want to get the colour of a pixel at a certain point on a <canvas>, you can use ctx.getImageData(x, y, 1, 1)
Thanks! Wasn't exactly what I was looking for, but I can definitely (and will!) use it to get the desired effect. Thank you!

from Latest posts on Things I'm Making and Creating https://ift.tt/2IDWzM6

No comments:

Post a Comment