创建在线协作绘图:构建块可能是什么?

发布于 2024-11-27 23:30:53 字数 802 浏览 2 评论 0原文

我想知道如何创建一个在线协作绘图环境。 基本上,我的想法是两个或更多人可以通过浏览器访问同一张纸并一起绘制一些东西。

我的问题是如何实现这一点。 具体来说,我知道可能有无数的解决方案,但我绝对不是该领域的专家,我很想知道这些解决方案是什么以及为什么一个解决方案应该优于另一个解决方案。

首先,一些“约束”

  • 没有 Flash/Silverlight
  • 界面应该是点击式的(也就是说,不像 此处

到目前为止,我提出的潜在解决方案如下:

  • processing.js - 在我看来,它并没有真正广泛使用。无论如何,它是一个有效的替代方案吗?
  • HTML5——它足够成熟吗?从我所看到的(例如此处),我感觉现在还为时过早一个阶段。 (顺便说一句,关于 HTML5/js 的并行讨论正在进行 这里
  • 还有什么吗?

任何意见都是非常受欢迎的! :)

I was wondering about creating an online collaborative drawing environment.
Basically, what I have in mind is that two or more people can access the same sheet through their browsers and draw something together.

My question here is how this could be accomplished.
Specifically, I understand that there might be a zillion solutions, but I'm definitely not an expert in this field and I would love to know what these solutions are and why a solution should be preferred to another.

First of all, some "constraints"

  • no Flash/Silverlight
  • interface should be point and click (that is, not like here)

So far, the potential solutions I've come up with are the following:

  • processing.js - It seems to me that its not really widespread. Is it a valid alternative anyway?
  • HTML5 - is it mature enough? From what I see (e.g. here), I've got the feeling it's still in too early a stage. (BTW, a parallel discussion about HTML5/js is going on here)
  • Anything else?

Any input is most welcome! :)

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

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

发布评论

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

评论(1

月亮邮递员 2024-12-04 23:30:53

您必须在支持的浏览器方面做出一些让步。实际的绘图本身相当简单,只需使用 Canvas 元素即可,谷歌甚至有一个库可以使画布在 << 中工作。 IE8也是如此。

协作/多用户部分是棘手的部分,您可以查看 HTML Websockets,但它们相对较新,目前主流浏览器不支持。剩下的要么是通过闪存的套接字,要么是一种称为长轮询的技术。基本上,您有一个将持续很长时间的 AJAX 调用,并且当获取一些新数据时,服务器只会结束连接。另请参阅:彗星

You would have to make some concessions in what browsers you'd support. The actual drawing itself is fairly easy, just use the Canvas element for that, google even has a library that will make canvas work in < IE8 too.

The collaboration/multiuser part is the tricky part, you could look into HTML Websockets, but they are relatively new, and not supported in the mainstream browsers at the moment. Whats left is either sockets through flash, or a technique called long polling. Basicly you have an AJAX call which will last very long, and the server just ends the connection when some new data is aquired. See also: Comet

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