How do I render older p5 code in processing? Doesn't work in browser..

edited February 2018 in JavaScript Mode

Hi there,

A lot of the creations on openprocessing.org, specifically the archived ones, don't work on the browser. So how do I render and create the actual art from the code? Thanks!

Answers

  • copy and paste the code into the processing editor, run them from there.

    link to a specific sketch if you want specific help

  • Hey there,

    Thanks for the reply. Here is an example of an archived post: https://www.openprocessing.org/sketch/20140#

    As stated on the website, the code will not render in browsers. And also, if I run it in the processing editor, it tries to render it by opening a browser window, and nothing shows up. So my question is, how do I get it to render? Is there some other software/plugin I need that will render older p5 code?

    Thanks!

  • edited February 2018
  • And also, if I run it in the processing editor, it tries to render it by opening a browser window, and nothing shows up.

    What version of Processing are you using? What mode are you in?

    If it's launching a browser, then look in your developer tools to see any errors you're getting.

  • Thanks for your replies guys. @GoToLoop, I wasn't aware of the other tabs! It worked for me when I used the empty sketch on the OpenProcessing site, but not on my processing editor on my Macbook pro. Also, some sketches work and others don't...

    Does this work for you? :

    https://www.openprocessing.org/sketch/8168#

    @KevinWorkman, I'm using Processing 3.3.6, and I get no errors, just a blank screen.

  • @kevinWorman, scratch that. I do have an error "Uncaught SyntaxError: Unexpected identifier"

  • The sketch has multiple tabs. Make sure you paste them all into the editor. What line contains the error? You need to take a closer look and look for syntax errors around that line.

  • edited February 2018 Answer ✓

    Does this work for you? : https://OpenProcessing.org/sketch/8168

    • Yes, it did as well! :>
    • Actually, there's no need to copy & paste it to another blank sketch. :-\"
    • Simply open the right panel and switch from Processing to Processing.js mode! :ar!
    • Processing.js (Pjs) mode works both for this sketch #8168 and that #20140 too! \m/
  • edited February 2018

    Also, some sketches work and others don't...

  • Thank you so much @gotoloop and @KevinWorkman! Makes sense now :) Cheers guys.

Sign In or Register to comment.