Proposal for p5.js

Hello there!

This is Tanvi Kumar, a second year undergraduate student from India. I am a software developer and enjoy dealing with algorithms and frontend web development. Link to my Github : github.com/tanvikumar

I'm motivated to contribute to p5.js this summer!

Improving file I/O methods

I've started trying to spot issues with methods. Another issue on Github has just been opened related to these methods. My plan for the next few days is to try and indentify and document these errors and if possible also try and figure out how they can be solved or if there are strict limitations for any methods. If so, I'd like to add that to the documentation of p5.js so users may know the limitations clearly. Examples and tests are both integral parts of anything open source to make it more user friendly. This is something I would accomplish given the oppurtunity.

I'd like to know if I'm on the right track and how I can start contributing to this specifically!

Algorithmic Composition with p5sound

A large part of my childhood was spent playing the keyboard and I enjoy dealing with algorithms. This project is where I believe I can make some exciting examples! I've gone through all the videos by Daniel Shiffman on his YouTube channel The Coding Train. Music is like mathematics, well, not as discrete but close! One of the things we lack today is the integration of sound in web applications. A very simple webpage or example could be having users choose notes and to then to generate all possible combinations so as to produce different variations of the same notes. This example can be extended in multiple ways but perhaps that could be left to the user!

It would be great if I could get in touch with the mentioned mentor for his project. (Jason Sigal)

Addon Library Development

I'm unsure if this would qualify as something being an entire library but it is something I really would like to integrate into p5.js since perhaps its main goal is to simply using javascript for animations!

Color!

While there are numerous ways to deal with colours already, there are certain things we could provide to users making it easier for them to handle colours. A list of what I've thought of :

  • randomColour() - returns a random color!
  • backgroundGrad(c1, c2, t) - changes background color from one to another in a slow gradient movement in time t.
  • continuousGrad() - a moving a gradient. Could be for backgrounds or parts of the canvas! Perhaps something that makes a rainbow!

It would be great to know if this is a possibilty!

Comments

  • Hi @tanvikumar!

    I/O: sounds like you're on the right track. the p5.js developer doc gives more information about how to start contributing to the project. you are welcome to jump in at any time by commenting, opening an issue, or addressing an issue: https://github.com/processing/p5.js/wiki/development

    addon: a color addon is definitely a possibility

  • Thanks @Imccart !

    I/O : Would finding out the limit of these methods be a good idea? That way we could provide a limit in the documentations so users can think about reducing the size of their data until another way is found?

    Addon : Will start adding functions to p5.prototype on my fork and see how that goes! Would opening up a discussion about color as an addon be a good idea? Hope is to get more ideas about what we can achieve by getting opinions and suggestions from others!

  • edited March 2018

    New Ideas for the color addon :

    • Functions that return HSB and HSL values for given RGB color or hex value for people who want to tamper with colors
    • Function that returns N colors between two colors.
    • Function that returns N hues of same color, lighter to darker.

    @Imccart I'd love suggestions to improve upon this!

  • @tanvikumar these all sound like they're on track and would make sense. I would think also about examples you could create that show use cases where the functions included in the addon are helpful.

  • @Imccart , Will do! Also came across the need for perhaps more essential functions :

    • Convert color from gamma to linear space by squaring the values of r, g and b .
    • Convertcolor from linear to gamma space by taking the square root of r, g and b.
    • addColors - Adds the r,g,b values of two colors.
    • addScalar - Adds a scalar number to r, g and b.
    • getHex - Returns hex representation of the color.
    • getHexString
  • edited March 2018

    This is my proposal draft : I would love suggestions from the mentors @Imccart and @shiffman or others who believe this proposal could use some tweaking!

    Proposal Draft

Sign In or Register to comment.