您会使用哪种技术进行物理模拟 SVG 或 Canvas?

发布于 2024-09-24 01:30:41 字数 238 浏览 5 评论 0原文

我正在开始一个转换物理模拟的新项目(在 Adob​​e Director 中创建) 到更新的平台,即 html5 canvas 或 SVG。由于几个原因,我想避免使用 Flash。我正在寻找 Canvas 或 SVG 最适合该项目的建议和原因。我读到 SVG 更适合交互性,这在这种情况下很重要,但它对于动画来说并不是最好的。 Canvas 在动画方面表现更好,但它在交互方面表现不佳,所以我听说过。有谁有canvas交互方面的经验吗,真的那么难吗?请指教。谢谢

I'm starting a new project converting physics simulations(created in Adobe Director)
to a more current platform namely html5 canvas or SVG. I would like to avoid Flash for a few reasons. I'm looking for recommendations and reasons why either canvas or SVG would fit this project best. I have read that SVG is better for interactivity which in this case is important but that it is not the best with animation. Canvas is better at animations but it struggles with interaction so I have heard. Does anyone have experience with the interaction side of canvas, is it really that difficult? Please advise. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

最美的太阳 2024-10-01 01:30:41

有关画布框架和库的讨论,请参阅此问题:

HTML canvas JavaScript 库和框架的当前技术水平如何?

列出的一些画布库在对象交互方面复制了 SVG,达到了相当高的标准。 fabric.js 看起来特别漂亮,目前正在积极开发中。

See this question for discussion of canvas frameworks and libraries:

What is the current state of the art in HTML canvas JavaScript libraries and frameworks?

A few of the canvas libraries listed replicate SVG in terms of object interaction to a fairly high standard. fabric.js looks particularly nice and is currently being actively developed.

复古式 2024-10-01 01:30:41

canvas 中的交互性并不一定那么困难(有很多 js 库可以帮助您)。 svg 中的动画是完全可以实现的,请参见 svg-wow.org。请记住,您可以根据需要混合搭配 svg 和 canvas,以便利用每种技术的优势,如所示 此处

Interactivity in canvas doesn't have to be all that difficult (there are quite a few js libraries out there to help you). And animation in svg is quite possible to do, see e.g svg-wow.org. Remember that you can mix and match svg and canvas as you see fit in order to use the strengths of each of these technolgies, as demonstrated here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文