quil

lspector 2016-10-08T20:13:31.000003Z

I'm trying to load-image an image file, but I can't figure out where to put it so it will be found. Docs say "images must be located in the data directory of the current sketch" but I'm not sure what that is and it doesn't work at the root of the quil project or in a data folder at the root. In the FAQ on plugins there's mention of ":resource-paths in project.clj" and maybe that's relevant? But I'm not sure what to put there...

lspector 2016-10-08T23:42:09.000004Z

Ah, figured it out. It finds it in the root directory, but I couldn't load it and bind it to a var using a top-level (def foo (q/load-image... call in my core.clj file; I had to replace that with (def foo (atom nil)) and then do (reset! foo (q/load-image... in my setup function. Makes sense in retrospect but wasn't obvious to me, and I had to extrapolate from some things I found on stackoverflow, where others were asking related questions. Perhaps this could be more clear in the docs? Anyway, I got it now.