Repository navigation
Hot reload v2 - #283
Hot reload v2#283tychedelia wants to merge 1 commit into
Conversation
388e748 to
15dde19
Compare
|
Visual regression: 1 changed of 43 cases
If these changes are intentional, add the baseline |
|
Haven't tested yet, but I like this direction a lot. We should think of a similarly shaped hot-reloading solution for Processing 5.0 |
|
Tested this locally and hot reloading works really well. I tried all three ways of turning it on. I edited draw(), constants, a sibling module, and size() in setup(), and tried syntax and runtime errors. It recovered every time. Found two things while testing:
I think it's because the unused uniform gets stripped, so there's nothing to carry the value over from. It's pretty common to hit when you comment out a color for a second. I also ran an LLM over the diff for a deeper look and left the few things that seemed worth it as comments on the code. |
Uses jurigged to hot reload our python sketches. It does some sketchy magic to patch functions in place rather than requiring a restart of the sketch.
There are now three ways to turn it on:
run(hot_reload=True)PROCESSING_HOT_RELOAD=1processing_pymodule entrypoint that removes the need for explicitrunentirely:python -m processing_py run --hot-reload sketch.py