I want to train a neural network, which will use the pixels array as input but I don’t want it to constantly render it while I am training it. Is it possible to not render any of the lines and vertices I drew but let it keep adjusting the pixels array? I need the pixels array. I’m not sure if this is the right place to ask this, perhaps it has more to do with javascript than p5, but thought i’d ask here first
Thanks for the inputs! So, creating a P5.image, I would be creating a new “image” where I can set the background color and draw things like image.line(x,y) (let’s just say i called the p5.image object “image”) and it will just do that “in the background” without rendering anything and when I call its own pixels array I will be able to see the background color and this line that I drew? That’s pretty much what I need. Also, it will be more efficient right? I mean, it will take shorter time to draw a line let’s say because it won’t actually have to render anything, but rather just change the values in the pixels array
Ah, well guess I can just try it later today when I have time ahha
Ok, I just realized I can’t draw a line on an image, I can only adjust the individual pixels. I need to be able to draw a line, also I use curveVertex. I wanna create like a canvas object where I can interact just as I would the rendered canvas, but this one should just update the pixels array accordingly and not render anything on the screen
edit: And my lines are not straight and not 1 pixel wide, I cant just draw a line manually by adjusting the pixels array myself