Re: Creating a library that has only pde files

edited December 2013 in JavaScript Mode

Hi there. Today I stumbled upon this thread in the old forum http://forum.processing.org/one/topic/creating-a-library-that-has-only-pde-files.html

I was working on my website and using quite a lot of processing.js so I wanted to split my code up as it became tedious and chaotic to scroll around in one big .pde file. I know little javascript and not a lot of HTML, so it took me a while to figure out a solution.

You can actualy load multiple sketches into one canvas, using this syntax:

<canvas id="canvas" data-processing-sources="sketchA.pde sketchB.pde">

This way you can kinda create something like libraries just from .pde files, at least in processing.js

I think the original thread wasn't specificly about .js but I decided to post the reply anyway because I didn't see a lot of people utilize this technique and maybe it helps someone.

Comments

  • thanks!! This should help with debugging too I think since one can isolate things.

Sign In or Register to comment.