Home Forums Procoding PS5.js


This topic contains 5 replies, has 1 voice, and was last updated by  audiocommander 5 years, 9 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1045

    pablillo jose


    Today it was announced: What about supporting this also… or away that processing.js and this could be complementary to each other. And maybe even the use of it in Procoding.

    pablillo josé



    Hi pablillo josé,

    thanks for notifying me, this looks great!
    I’m currently on vacation, but I’ll definitely look into this as soon as I’m back. Until then you can always create an HTML5 or HTML5/Canvas project and add p5.js manually as resource.

    Thanks again,
    best, Michael


    pablillo jose

    Great! Thanks to you Michael!

    Have a great time in vacation!

    pablillo josé


    pablillo jose

    Any research done? It would be interesting how these two efforts, your included… could be merge and work together…
    How you tried to implement this in procoding?




    p5 seems to do some unknown things in the background to get a reference to the “sketch.js” file. While in theory it should be fully compatible to Procoding, I could not make it work yet by just adding the p5.js as a resource (which usually works).

    Unfortunately there are also some licensing issues with P5 that will prevent me from adding P5 as a general template to Procoding. While the library itself is under GNU which is debatable but should be okay for an integration in Procoding (there were massive problems with GNU in the past for apps in the AppStore). However, the p5 reference is licensed under a non-commercial creative commons, which means I will not be able to include the ref in Procoding, which is a required necessity for any library I’m going to add. As soon as I charge 1 $ for my app, it is considered commercial, so I cannot use anything under CC-NC. I know that there are many developers ignoring this (e.g. providing an offline Processing reference in the AppStore for 99 ct), but I’m very strict about licensing issues. That is also the reason btw, why the processing.js reference is not included for offline usage and only accessible online with kind permission from the guys from

    Sorry about that, it looked really promising until I studied the licensing terms ;-(

    Nevertheless, I’ll have to look and see if I may find a workaround, so that you can at least add p5.js to a default HTML project sketch via Procoding’s resource loader. Will keep you updated!




    okay, that wasn’t too complicated.

    1. create a new HTML5 Sketch (not a canvas based one, as P5 creates its own canvas)

    2. just add p5.js as a resource (you might want to add the dom and sound as well, though sound will only work on iOS and on OSX only as preview and not within Procoding OSX)

    3. add these lines at the beginning of your sketch:

    /*jshint newcap:false,
    undef:false */

    // instantiate p5 in global mode
    new p5();

    the jshint option comments are just to silence some jshint warnings.
    The relevant line of code is new p5(); that starts p5 in global mode.

    I tried the Interactivity demo:

    Hope this helps,
    have fun!


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘PS5.js’ is closed to new replies.