We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top level locals in a sketch need to be parsed in as instance variables to be visible to functions as well as blocks.
n = 100 particles = [] def dump s=300 fill false matrix do translate width/2-s/2, height/2-s/2 shape do particles.each_pair { |p, q| curve_vertex p * s, q * s } end end end setup do n.times { particles << rand } end draw do dump 300 end
Should turn into
self.class.send :attr_accessor, :n, :particles @n = 100 @particles = [] def dump s=300 fill false matrix do translate width/2-s/2, height/2-s/2 shape do particles.each_pair { |p, q| curve_vertex p * s, q * s } end end end setup do n.times { particles << rand } end draw do dump 300 end
The text was updated successfully, but these errors were encountered:
This can certainly be done using Rubinius's compiler tools, but can it be done in a cross-Ruby way?
Sorry, something went wrong.
Postponed due to hurricane.
This syntax may be axed. How important is it to emulate Processing so literally?
No branches or pull requests
Top level locals in a sketch need to be parsed in as instance variables to be visible to functions as well as blocks.
Should turn into
The text was updated successfully, but these errors were encountered: