Make Rig builder follow Bevy's current paradigm of passing tuples
Opened this issue · 3 comments
janhohenheim commented
As Bevy changed the API for bundle and system (and soon plugin) adding to accept tuples instead of multiple calls to a builder function, I think we should follow suit:
Rig::builder()
.with(Position::new(Vec3::ZERO))
.with(YawPitch::new().yaw_degrees(45.0).pitch_degrees(-30.0))
.with(Smooth::new_position(0.3))
.with(Smooth::new_rotation(0.3))
.with(Arm::new(Vec3::Z * 4.0))
.build()
becomes
Rig::builder()
.with((
Position::new(Vec3::ZERO),
YawPitch::new().yaw_degrees(45.0).pitch_degrees(-30.0),
Smooth::new_position(0.3),
Smooth::new_rotation(0.3),
Arm::new(Vec3::Z * 4.0)
))
.build()
janhohenheim commented
Nevermind, just realized this is a consequence of dolly
's design
BlackPhlox commented
I mean it is more ergonomic, we could change the api in dolly submodule and upstream the changes to real dolly project. You got me hooked, I'm reopning this :)
BlackPhlox commented
There is a relevant implementation of plugins tuple in bevy, we might be able to resuse the all_tuples macro referenced here