Beginner dev here. I’m a big fan of Processing and have used p5.js in personal projects. I wanted to try contributing to open source code to get some practice so I thought, why not p5?
Anyway, I watched The Coding Train’s intro video on contributing and have read the contributor docs. I understand how it works for the most part but I’m unsure of where to actually… put the code for the functionality I want to add.
The functionality: A method to color quantize the pixels in the pixels array that are populated after loading an image. Basically, take the image loaded in and spit a color palette that represents the colors in the image. I’ve used this functionality in a past project, so I have it all written and working, just need to tweak it so it works in the context of p5. It would need to make use of the pixels array (https://p5js.org/reference/#/p5/pixels) and maybe the p5 color object, but other than that it’s pretty much just crunching some numbers (I’m using the median cut algorithm to quantize the colors).
I was thinking it might go in the “pixels.js” or “image.js”… but it seems like the chunks of code for some of the methods in there actually live in the Renderer2D.js file. Can anyone provide some insight here?