I'm starting to look at ofelia (excited about this, actually ).
But I find myself confused about what images and variables.
I managed to make my own patch doing:
- [ofSetup] -> [load ...( -> ofImage name
- [ofDraw] -> [ofImage name ...]
... and it draws the picture properly.
But I saw other examples using the images within an [ofelia f] object -- for example, the pointillism example loads the image into [ofImage $0-img] and then has [ofDraw] -> [ofRequire $0-img] -> ... -> [ofelia f; local img, m = a[1].image, a[2]; ...]
.
So I made [ofDraw] -> [ofRequire name] -> [ofelia f; ...]
and now I don't know what to do.
name:draw(...)
just throws a lot of nil reference errors into the console window... but clearly example files are able to use images within [ofelia f]...? If I have "require"d name, then I suppose "name" should be available somehow?
What is the relationship between the [ofRequire] objects and the implicit a
argument?
Apologies if this is supposed to be obvious. I went looking for a tutorial series and I didn't find anything, so I'm attempting to infer first principles from examples. That can take you only so far.
Thanks,
hjh