-
Notifications
You must be signed in to change notification settings - Fork 51
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
feature: ability to write yarn editor plugins inside yarn editor - Yarn Playground? #328
Comments
would be good if the user can write plugins even if they dont have a github account - the plugin code would be stored locally on their computer and be exportable somehow |
a work in progress demo of this in action - loading pixijs and passing to it the data from yarn |
We now have a plugin system set in place that allows creating them directly inside yarn and persisting them on the gist and local memory. You can even see a diff of your changes before committing them. You can use the plugin api to output a game in a single html file that has bondagejs or inkjs, the yarn editor story data and whatever external module you want to use to render it. You can also use it to alter yarn editor itself. Attach new buttons or render custom html straight inside yarn (need reloading it in the browser). |
Now testing a shareable link that also loads image resources from the gist where the yarn file is stored I still need to make this work properly, it doesnt. When a gist url is passed, yarn needs to use it instead of the local cache to load any resources. |
Yarn editor uses ace-editor, which can pretty easily be enabled to edit javascript syntax files.
Plugins can now be hosted on a gist, so in theory they can also be edited while hosted on that gist (we have the mechanism to load files from gists already)
The dream is to have a new settings button that lets you open the editor in js mode and edit the plugins. Then the process is to apply changes and hot reload.
The goal is to enable quick dev iteration directly in the browser - to add and remove custom features to yarn editor
Edit: This is now implemented, but there is more..
things done:
some things to improve
all demos so far are stored at:
https://gist.github.com/blurymind/2ff124dc94f936e8f7d96632f559aecb
a work in progress demo of this in action - loading pixijs and passing to it the data from yarn
https://blurymind.github.io/YarnClassic/?gistPlugins=2ff124dc94f936e8f7d96632f559aecb&pluginFile=yarn-output-pixi-bunnies.js&mode=test
The text was updated successfully, but these errors were encountered: