Commit Graph

9 Commits

Author SHA1 Message Date
Lee-Orr 4c44182b20 rename storyteller api 2024-04-02 13:24:51 -04:00
Lee-Orr bcf37696e9 clippy + fmt + comments 2024-03-29 14:53:21 -04:00
Lee-Orr 299d8f6e9b load assets locally from indexeddb 2024-03-29 14:42:48 -04:00
Lee-Orr 10759af963 save and load keyframe data (#97) 2024-03-21 15:20:50 -04:00
Brandon Thomas 116079fc48 simplify conditional compilation and fix bug 2024-03-21 00:06:11 -04:00
Brandon Thomas ba97339b1b conditional compilation of async compat (#95)
Problems with the previous code:

- `async-compat` is necessary for headless mode (cli server rendering)
to load remote scenes from the API without blowing up. Without it, the
code complains about the lack of a Tokio runtime.

- Unfortunately, `async-compat` doesn't work with WASM and the entire
web build is broken by its presence.

This change introduces conditional compilation so `async-compat` is only
leveraged in headless mode.
2024-03-20 22:36:28 -04:00
Lee-Orr 89487e5889 Headless remote assets issues (#94)
Co-authored-by: Danny McGee <dannymcgee@gmail.com>
2024-03-20 21:45:09 -04:00
Danny McGee 7b06d48c5d Scene storage backend integration (#51)
This PR adds Storyteller.ai API integration for saving and loading
Storyteller Studio scenes to/from the backend.

### Known issues
* The skybox is not currently stored in the serialized scene format
2024-02-23 22:04:06 -05:00
Danny McGee 6ca2a992e5 Storyteller.ai API integration (#49)
This PR integrates asset retrieval from the Storyteller.ai back-end API,
and begins implementing long-term scene saving and storage.

### Media retrieval
Instead of fetching raw asset URLs, going forward, media files from
remote sources (e.g., in URL parameters) should be specified with a path
like the following:
```
remote://<token>.<filetype>
```
where
* `token` is a media token (e.g., "m_70b77neq9jsgmy5v31mekzchcbd223")
* `filetype` is a file extension appropriate for the type of file being
  fetched (e.g., "gltf")

The `remote` protocol will be recognized by a [custom asset
reader](https://github.com/storytold/storyteller-bevy/blob/70726db111f6ccafd47feb055c5546540fef1786/studio/src/remote/reader.rs)
which will retrieve the file by calling a Storyteller API endpoint.

### Scene storage
Additionally, this PR begins laying the groundwork for
storing/retrieving Bevy scenes to/from the backend instead of solely
in-memory. This work is still incomplete -- as of this PR, a button has
been added to the web UI allowing the user to download the scene
file locally for testing/debugging purposes.

### Test URL
Media retrieval from the backend can be tested by [visiting this
URL](https://deploy-preview-49--storyteller-studio.netlify.app/?mode=viewer&mixamo=remote://m_70b77neq9jsgmy5v31mekzchcbd223.gltf)
in Chrome with the `--disable-web-security` flag (to bypass CORS errors)
2024-02-23 21:05:32 -05:00