Just finally kicking the tires with PsychoJS, and wondering about a few things. This is all basic conversion of some standard Builder practices:
- Resource management:
For this basic test experiment, I’m cycling through pre-made png’s with a standard trick - define the image filename in a variable (in a code component, not in the new “variable” component since it looks like that’s py only at the moment? Aims to change that?) at Start Routine and set the image’s path e.g. with Image Component: $imgPath -> set every repeat. However, doing this doesn’t register the images as resources, so they’re not compiled into the html, committed and uploaded, so I get resource not found errors. I see the ServerManager is responsible for resources, but it claims to not be exposed to the experiment and I only see methods for listing and downloading resources, not adding them.
In this case, when the list of resources is known but not explicit from the builder, what’s the best way to register them? Also, how are resources expired? When I tested a single image it was manually added, but not removed when I switched to using code for the file path. Should I add an issue to psyshojs to add a check to remove resources that are no longer required?
- Running locally / squashing noisy git commits at the end of the day
I see lots of dependencies (jquery, psychojs itself) are packaged in
/lib/vendor - is this being handled by a of package manager (npm) on pavlovia? If so, is there an easy way to vendor this all locally so that I don’t have to commit and push for literally every change and error I make while building the task? And if not, should we should consider adding an option to squash all the recent commits (by day?) to use meaningful git logs? Or would most users not care and that would just needlessly complicate the UI?
Interesting experience converting these so far! Glad to see it!