You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.
Plugins should use SupClient.registerPlugin in some agreed-upon bundle (public/bundles/import.js?) to declare accepted media types or extensions and expose import methods.
Then, in onTreeViewDrop, we should look through event.dataTransfer.files for media type or extensions matches. If there are multiple matches, open a dialog to ask the user to choose what to do.
Finally, call the exposed import methods which will use ProjectClient to edit the project, and see assets be magically imported! :O
Gave this some more thought. We can't have imports happen directly in project/index.html because that would involve loading all kinds of heavy files directly (THREE.js, etc.). And we probably want to be able to configure various things when importing anyway. For instance, we could have a file that is imported as multiple assets and you might want to only enable some of them?
I guess project/index.js should load a simple bundle for each plugin that will do a quick check of whether the files can be imported with it (based on extensions mostly) and report one or more "import offers" back. Then we should have an import tab that loads an iframe for each import offer that has been selected by the user and does the actual work? Something like that...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Plugins should use
SupClient.registerPlugin
in some agreed-upon bundle (public/bundles/import.js
?) to declare accepted media types or extensions and expose import methods.In client/src/project/index.ts, we can load up the
import.js
bundles for each plugin (similar to how we loaddocumentation.js
bundles)Then, in
onTreeViewDrop
, we should look throughevent.dataTransfer.files
for media type or extensions matches. If there are multiple matches, open a dialog to ask the user to choose what to do.Finally, call the exposed import methods which will use
ProjectClient
to edit the project, and see assets be magically imported! :OSee also superpowers/superpowers-game#30
The text was updated successfully, but these errors were encountered: