We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › P5MultiLayer - Stacking Processing Sketches
Page Index Toggle Pages: 1
P5MultiLayer - Stacking Processing Sketches (Read 1045 times)
P5MultiLayer - Stacking Processing Sketches
Jun 27th, 2006, 3:18pm
 
I've written some Java which will allow sketches to be stacked one on top of another.

Why's it useful? You can make up simple sketches which do simple things, and then combine them in more complex ways. Layers of functionality can then be added and removed dynamically. This was really written with component/sketch re-usability in mind.

How does it work? It works by using a composite and proxy patterns. Instead of sketches calling methods on PApplet, it uses a proxy. These proxys then call the methods on the real PApplet. When a event is reported to the PApplet, e.g. mousePressed(), all the proxies get informed.

Drawbacks?
Unfortunately:
* it requires modification to the compiled code (SketchClass.java) files,
* is annoying to maintain across versions (i.e. new methods are not automatically supported).

Questions:
I'm not entirely sure where this would fit in to the current tool chain - where would you put it
Naming - has any one got a good name for it - P5Layer is the current name, but I'm betting there are better names. Naming - are there any naming conventions to follow.
Demand - is any one interested in this sort of thing? If so, I'll try and post some kind of demo for folks to try.
Re: P5MultiLayer - Stacking Processing Sketches
Reply #1 - Jul 18th, 2006, 4:12am
 
I'd love to see it, gullcatcher. At some point, I could see a use for a general container Java app with various uses. In the meantime, seeing others' experiments / ideas would be great!
Re: P5MultiLayer - Stacking Processing Sketches
Reply #2 - Aug 15th, 2006, 2:08pm
 
would love to mess around with this - post it if you can. just thinking about how to implement layering / compositing of different parts of a sketch - this would be fantastic...
Re: P5MultiLayer - Stacking Processing Sketches
Reply #3 - Aug 20th, 2006, 8:31am
 
This is very cool stuff. I've been doing VJing stuff with this, but only manually implenting different P5 sketches into one giant sketch. I'm glad to see this come to fruition!
Page Index Toggle Pages: 1