Skip to content

Commit 1378d3c

Browse files
committed
feat: add glTF/GLB export tool to Gen mode
Add gen_export_gltf tool that serializes the current Bevy scene (meshes, materials, transforms, hierarchy) into a binary .glb file using the gltf-json crate.
1 parent 7f3b729 commit 1378d3c

5 files changed

Lines changed: 568 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/gen/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ clap = { version = "4.5", features = ["derive"] }
2828
# 3D generation via Bevy
2929
bevy = "0.15"
3030
image = "0.25"
31+
32+
# glTF/GLB export
33+
gltf-json = { version = "1", features = ["names"] }

crates/gen/src/gen3d/commands.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ pub enum GenCommand {
3939
width: u32,
4040
height: u32,
4141
},
42+
ExportGltf {
43+
path: String,
44+
},
4245
}
4346

4447
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)