hydra-synth / hydra

Livecoding networked visuals in the browser
https://hydra.ojack.xyz
GNU Affero General Public License v3.0
2.13k stars 255 forks source link

API for livecoding editor from within itself #157

Open ojack opened 2 years ago

ojack commented 2 years ago

It has come up a few times to be able to access certain functions for livecoding the editor from within itself.

All of this should be possible using javascript and css, but there may be cases where adding certain functions could make it easier. See discussion: https://github.com/ojack/hydra/pull/155

Creating an issue thread to discuss this idea here :)

geikha commented 2 years ago

While coding the features included in #155 , It also occured to me to include these functions in an object called editor (in practice, for example: editor.hide()). So I agree with this of course ! I wasn't that sure about how to approach it since I image we don't want to expose the whole editor object. hm

geikha commented 2 years ago

this particular topic also came out in a zoom session about the p5.js editor (s/o @catarak for the great work on the editor and for hosting such session). it wasn't much of a serious request but it was a desire. i can't recall who said it but they expressed something along the lines of "i imagine a future where we have a meta meta editor, so basically an editor where we edit the editor where we edit p5.js, and change whatever we want on the fly". it seems customization (and specially live customization) of coding tools is a growing topic in visual coding editors. I definitely want to start working on the editor API. I reckon the way to go about it would be to create a new editor-api.js file and class with private access to the actual editor and various public methods right?

geikha commented 2 years ago

related #97