Coding Global Background
Coding Global

Drawing smth from an array

Archived 3 months ago
2 messages
2 members
4 months ago
Open in Discord
S
Sarp
Verified

Lets say that I have an array just like this: [ 1, 0, 0 1, 1, 0 1, 1, 1 1, 1,0 ] I wanna convert this to a drawing (each value in the array being 1x1 pixel) using the HTML/JS canvas api. I couldn't figure it out myself and I don't really know which technical term it correlates to thus I couldn't Google it myself.

Replies (2)