动画代码放在哪里?
动画是视图和控制的奇怪组合,有时需要通过它们之间的延迟、代码回调等进行同步。
因此,在不特定于任何特定 GUI 框架的情况下,我应该将动画代码放在 MVC 架构中的哪里?
Animations are a strange mix of view and control, and they sometimes need to be synchronized with delays between them, callback to code, etc.
So, without being specific to any particular GUI framework, where should I put my animation code in a MVC architecture?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个非常普遍的问题,但如果可能的话,我倾向于将其完全纳入考虑范围。您可以将其视为具有最终值和持续时间的 jQuery 动画 - 您可以将其视为传递给视图,视图可以处理此时的所有事情。
This is such a general question, but I would be inclined to put this completely in the view if possible. You could think of it like jQuery animations which have a final value and a duration - you could think of this being handed off to the view, which could take care of everything at that point.