Exporting 3D Sketch with Libraries to the Web

edited March 2017 in JavaScript Mode

I'm trying to make my 3D sketch run on a webpage. I've had success in the past using processing.js, but I wasn't using any imports or external libraries.

I've read that it was possible to export a sketch as a java applet but I don't see that as an option in 3.2.1.

What would be the best way to go about getting a sketch like this running on the web? Is it even possible?



  • We can't use Java libraries in JS! You'll need to find an equivalent JS library! :-<

  • And I wouldn't recommend using P2 to just get th job done either, you're better off using p5.js and JavaScript libraries to do what you want.

  • I'd rather not have to rewrite the entire program with new JavaScript libraries. Is there no way to get the sketch into a jar and run it from that? It's not critical that I use JavaScript.

    And in the future I suppose it would be easier to use JavaScript libraries, but how would you develop with them? The processing IDE can't run JavaScript, correct?

  • Also I'm not familiar with p5.js, is it just an alternative to processing.js?

  • edited March 2017
    • Both Pjs & p5.js are JS libraries.
    • The former is also a Processing's API Java to JS transpiler.
    • That allows us to write our code in Java Mode and have them converted to JS.
    • While in p5.js, we can't write our sketches in Java syntax.
    • There's a p5.js Mode available to PDE too.
    • We can also write p5.js & Pjs sketches in this site: https://OpenProcessing.org/sketch/create
  • If your aim was to publish to the web, you should've used p5.js.

Sign In or Register to comment.