Multirious / bevy_tween

Flexible tweening plugin library for Bevy.
Apache License 2.0
87 stars 2 forks source link

"Span" prefix is unnecessarily verbose #11

Closed Multirious closed 4 months ago

Multirious commented 4 months ago

At early development, it's designed specifically that you can implement custom tweener and so the "Span" prefix is added to the default tweener in this crate to prevent confusion with possibly user custom tweener. But at later development I've realized that most people won't necessary need a custom tweener. "Span" prefix should be stripped out by default to reduce verbosity.

musjj commented 4 months ago

Speaking of verbosity, there might be some lessons that could be learned from https://github.com/nixon-voxell/bevy_motiongfx (and Motion Canvas). I really like how simple and brief the API is:

chain(&[
    all(&[
        commands.play(
            line_motion
                .transform
                .translate_add(Vec3::new(0.0, -100.0, 0.0)),
            1.5,
        ),
        commands.play(line_motion.line.extend(100.0), 1.0),
        commands.play(line_motion.stroke.style_to(10.0), 1.0),
    ]),
    all(&[
        commands.play(
            line_motion
                .transform
                .translate_add(Vec3::new(0.0, 100.0, 0.0)),
            1.5,
        ),
        commands.play(line_motion.line.extend(-100.0), 1.0),
        commands.play(line_motion.stroke.style_to(1.0), 1.0),
    ]),
])

So little unnecessary noise which makes constructing complex and long animations a lot easier.

But after using the plugin for a while, it very much feels that it's optimized for presentation rather than game and interactivity, which is why I ended up moving to bevy_tween.

Multirious commented 4 months ago

Yeah, the current builder API right now is made to help with boilerplates but prioritizes flexibility. Some more adjustments or additions could be made. I'd like to gather up more comments and ideas. I'm going to make a discussion for this. Edit: https://github.com/Multirious/bevy_tween/discussions/15#discussion-6515536, you can post your comment to here @musjj !. You might be interested in the general guideline in this post I've made https://github.com/Multirious/bevy_tween/discussions/15#discussioncomment-9133548

Multirious commented 4 months ago

Completed by 6c84c45fae4bef674d9806fb2ff553d5b9322871