Skip to content

Commit 358ab77

Browse files
authored
bevy_proto_bsn asset improvements and rename (#185)
* Add retain_scene_with and retain_child_scenes_with * Relax type bounds by replacing Clone/Default derives with manual impls * Expand the list of registered ReflectConstruct for upstream components * Rename bevy_bsn -> bevy_proto_bsn * Rename .bsn -> .proto_bsn * Rename bsn macro -> pbsn * Add workaround/hack for loading assets using @-syntax in .proto_bsn-files * Add Prefab component for more convenient BSN asset spawn/reload * Rename bevy_bsn folder -> bevy_proto_bsn * Add ReflectedBsn as an alternative ready-to-patch BSN asset * Simplify and fix prefab bugs * CI please 🤞
1 parent 3e1dad5 commit 358ab77

35 files changed

+948
-358
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ bevy_focus = { path = "bevy_widgets/bevy_focus" }
7373
# general crates
7474
bevy_editor_core = { path = "crates/bevy_editor_core" }
7575
bevy_asset_preview = { path = "crates/bevy_asset_preview" }
76-
bevy_bsn = { path = "crates/bevy_bsn" }
76+
bevy_proto_bsn = { path = "crates/bevy_proto_bsn" }
7777
bevy_editor = { path = "crates/bevy_editor" }
7878
bevy_editor_camera = { path = "crates/bevy_editor_camera" }
7979
bevy_editor_launcher = { path = "crates/bevy_editor_launcher" }

crates/bevy_bsn/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

crates/bevy_bsn/examples/bsn_asset.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

crates/bevy_bsn/examples/bsn_asset_hot.rs

Lines changed: 0 additions & 49 deletions
This file was deleted.

crates/bevy_bsn/src/construct_reflect.rs

Lines changed: 0 additions & 106 deletions
This file was deleted.

crates/bevy_proto_bsn/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "bevy_proto_bsn"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
bevy_proto_bsn_ast = { path = "src/ast", version = "0.1.0" }
8+
bevy_proto_bsn_macros = { path = "src/macros", version = "0.1.0" }
9+
10+
bevy = { workspace = true }
11+
thiserror = { workspace = true }
12+
variadics_please = { workspace = true }
13+
14+
[lints]
15+
workspace = true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
(Transform, Visibility::Inherited) [
2+
(
3+
SceneRoot(@"alien.glb#Scene0"),
4+
RotateMe,
5+
),
6+
(
7+
PointLight { shadows_enabled: true },
8+
Transform {
9+
translation: Vec3 { x: 4.0, y: 8.0, z: 4.0 },
10+
},
11+
),
12+
Prefab(@"3d_scene_child.proto_bsn")
13+
]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(
2+
SceneRoot(@"alien.glb#Scene0"),
3+
Transform {
4+
translation: Vec3 { x: 0.4, z: 0.3 },
5+
scale: Vec3 { x: 0.5, y: 0.5, z: 0.5 },
6+
}
7+
)
35 KB
Binary file not shown.

0 commit comments

Comments
 (0)