Propane::Proxy
The sole purpose of the Propane::Proxy
module is to provide access to the Propane::App
variables and methods similar to the access to Inner classes afforded by vanilla processing. To do this your class should include Propane::Proxy
as below:-
class MyClass
include Propane::Proxy
# access to sketch methods and variables is similar to java Inner class
end
Now we know this is not kosher
and as you get more comfortable with propane you may eschew this egregious hack, but initially at least you will find it highly convenient. There are plenty of examples included with the samples (because it so damn convenient). See frame_of_reference sketch and Plane and Cylinder classes
The hair shirted brigade might want to take a look at forwardable
and make their classes extend Forwardable
instead. There are some examples include with the samples see the revolute_joint pbox2d example with the Windmill and ParticleSystem classes for example.