News for hackers. Stuff that matters.
Re:A useful front-end confetti animation library by eyelidlessness on Thursday April 25, 2024 @03:57PM (#40162258)
Canvas draws raster images, anything resembling an object in your drawing logic is already tracked separately by necessity. So regardless, you’d presumably check against whatever data model you’re using to determine what to draw.
Re:A useful front-end confetti animation library by lupire on Thursday April 25, 2024 @06:20PM (#40163795)
By what time the user clicks, there's no reason for the program to need to remember what they drew where.
Re:A useful front-end confetti animation library by eyelidlessness on Thursday April 25, 2024 @10:17PM (#40165285)
If that’s the case, what other object with coordinates would you reference on a canvas to determine whether it was clicked?