PS5.js

Home Forums Procoding PS5.js

Tagged: 

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

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

    pablillo jose

    Hey,

    Today it was announced: http://p5js.org. 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.

    thanks,
    pablillo josé

    #1046

    Michael

    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

    #1047

    pablillo jose

    Great! Thanks to you Michael!

    Have a great time in vacation!

    hugs,
    pablillo josé

    #1050

    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?

    #1051

    audiocommander
    Keymaster

    Hi,

    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 processingjs.org.

    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!

    Best,
    Michael

    #1052

    audiocommander
    Keymaster

    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,
    unused: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: http://p5js.org/learn/demos/Hello_P5_Interactivity_1.php

    Hope this helps,
    have fun!

    Best,
    Michael

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

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