p5canvas
p5canvas copied to clipboard
Pin p5canvas to one file
While working with multiple files (for example when dealing with classes), it would be great if p5canvas could be "pinned" to one file somehow. Right now, when I switch a tab, the p5canvas will try to run a class file, but will obviously not receive any draw instructions.
So, having the ability to keep p5canvas on my "main" file, would be helpful.
of course, the pinning should be optional, because it's also quite useful that p5canvas automatically displays what is active. I don't want to change that current behavior, I think that should remain the default.
I have thought about that already, but had no good solution for the UI. Do you have any idea for that? Dropdown of the available files and automatic to select?
I'm not quite sure, mostly because I don't know what VS Code / Codium allow you to do with appropriate amounts of work. My high-fidelity mockup features a neat pushpin that would allow you to pin this tab down.
also another possibility would be some heuristic that decides "this has no common p5js function calls on the top level, we're not switching to this file".