mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
6ca2a992e5
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)
84 lines
1.7 KiB
TOML
84 lines
1.7 KiB
TOML
[package]
|
|
name = "studio"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
name = "studio"
|
|
crate-type = ["cdylib", "rlib"]
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "studio-standalone"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "studio-headless"
|
|
path = "src/main-headless.rs"
|
|
|
|
[dependencies]
|
|
bevy-inspector-egui = "0.22.0"
|
|
bevy_mod_raycast = "0.16.0"
|
|
bevy_rapier3d = "0.23.0"
|
|
bevy_mod_outline = "0.6.0"
|
|
bevy_web_asset = "0.7.0"
|
|
bitflags = "2.4.0"
|
|
console_error_panic_hook = { version = "0.1.7", optional = true }
|
|
itertools = "0.12.1"
|
|
js-sys = { version = "0.3.65", optional = true }
|
|
parking_lot = "0.12.1"
|
|
serde = "1.0.192"
|
|
serde-wasm-bindgen = { version = "0.6.1", optional = true }
|
|
serde_json = "1.0.108"
|
|
studio-bvh = { path = "../studio-bvh" }
|
|
wasm-bindgen = "0.2.84"
|
|
web-sys = { version = "0.3.65", optional = true, features = [
|
|
"CustomEvent",
|
|
"CustomEventInit",
|
|
"Document",
|
|
"HtmlElement",
|
|
"Window",
|
|
] }
|
|
clap = { version = "4.4.18", features = ["derive"] }
|
|
futures-intrusive = "0.5.0"
|
|
wgpu = "0.17.1"
|
|
futures-lite = "2.2.0"
|
|
futures = "0.3.30"
|
|
image = "0.24.8"
|
|
bytemuck = "1.14.1"
|
|
space_editor = {git = "https://github.com/rewin123/space_editor", rev = "ce83f86dc902787ab16213f3209276a784654df6"}
|
|
anyhow.workspace = true
|
|
|
|
[dependencies.reqwest]
|
|
version = "0.11.24"
|
|
features = [
|
|
"default",
|
|
"json",
|
|
"stream",
|
|
]
|
|
|
|
[features]
|
|
wasm = [
|
|
"dep:console_error_panic_hook",
|
|
"dep:js-sys",
|
|
"dep:serde-wasm-bindgen",
|
|
"dep:web-sys",
|
|
"bevy_rapier3d/wasm-bindgen",
|
|
]
|
|
desktop = []
|
|
|
|
[dependencies.bevy]
|
|
workspace = true
|
|
|
|
[dependencies.bevy_mod_picking]
|
|
version = "0.17.0"
|
|
default-features = false
|
|
features = [
|
|
"backend_bevy_ui",
|
|
"backend_rapier",
|
|
"backend_raycast",
|
|
"backend_sprite",
|
|
"debug",
|
|
"selection",
|
|
]
|