-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify anim schedule call #30
Comments
Or, we use |
拆分动画帧与运行,创建动画帧和play分开也没啥影响吧,还好区分,要么就是函数式贯彻到底,最后一个比较好
|
好ww 其实最开始设计 不过如果一个 let transform_anim = rects[j + 1]
.begin_transform() // sth like `TransformBuilder`
.shift(-shift_right)
.set_fill_color(manim::BLUE_C.with_alpha(0.5));
.finish() // construct an normal `AnimSchedule`
.apply();
timeline.play(
anim
.with_duration(anim_step_duration)
.with_rate_func(linear)
); |
分开的话,更好抓重点,逻辑性也强一些,emm 类似编程范式吧,没必要非得一个步骤就完成,上边这样的就挺好,数据准备和执行分开,内存释放rust不用管,写着也方便 |
嗯嗯确实~感谢反馈~(^.^) |
This is TOO LONG:
If custom attributes can be applied to expressions, then we can implement a macro to write it like:
However it is not supported now, see rust-lang/rust#54727.
To support optional param, another solution is by
macro_rules!
, but it does not have easy support of "unordered optional params":Or, work on another direction:
The text was updated successfully, but these errors were encountered: