-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filesystem Access #447
Comments
If it's just about saving files, maybe we can just do this with the web File System API? The user clicks and it prompts them to save it somewhere. https://developer.mozilla.org/en-US/docs/Web/API/File_System_API |
Could do, although the ease of being able to save in-place might be nice, there might also be other use-cases for other system calls, though I don't personally have any in mind atm |
Immedeatly after writing this I remembered that I have a wip sketch on old hedron that reads the history file that virtualdj generates to add the track id to the screen/detect track changes, that would require being able to target a specific file on disk, and poll it in the background |
Man I gotta hear more about all the crazy things you're doing with Hedron! 😅 Ok well then it sounds like we need to use the main thread and expose some kind of api to sketches to tell it to read/write, as you've suggested. My initial thought was passing down some api object to the contructor, but maybe some event system is better. Haven't really thought about it too much yet! |
While I think it's good that the new Hedron will force web safety, it could be nice to have some filesystem access, even if it's an optional object that is only available when on desktop.
Use case I am thinking of is writing back out files that the sketch uses. For instance a splat map/point cloud sketch that can crop the map visually in the scene, but then also save the file back out in it's cropped form via a shot. The shot would just return early when
fs
(or a custom object) is undefined, or maybe use the event systemif (hedron.eventEnabled('write')) hedron.sendEvent('write', filename, this.getCroped())
The text was updated successfully, but these errors were encountered: