多个用户在html5中同时访问同一画布进行绘制 [英] multiple users to access same canvas at same time in html5 to draw

查看:86
本文介绍了多个用户在html5中同时访问同一画布进行绘制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我访问多个用户多个用户在html5中同时访问同一个画布,以便选择颜色进行绘制。在少数样本中提到了颜色代码。所以它会反映在两个页面上。



我失败了,而我将它变成颜色选择工具。



请帮帮我。





谢谢,

解决方案

< a href =http://www.w3schools.com/html/html5_canvas.asp>画布 [ ^ ]是一个在浏览器上运行的元素。所以,你不能直接让两个用户同时使用它。



你可以做的也许是使用像SignalR [ ^ ]将更改发回服务器并在其他用户的浏览器上反映它以产生这种效果。



请看以下文章以便开始:



使用HTML5和SignalR的在线白板 [ ^ ]



http:// www。 danielroot.info/2013/01/a-signalr-whiteboard.html [ ^ ]

Can any one help me to access multiple users multiple users to access same canvas at same time in html5 to draw with selection of color. in few samples color code is mentioned. so it will reflect on both pages.

I am failing while i will make it color Selection Tool.

please help me.


Thanks,

解决方案

Canvas [^] is an element which runs on your browser itself. So, you can't directly let two users use it at the same time.

What you could do perhaps is use something like SignalR [^]to send the changes back to server and reflect it on other user's browsers to give this kind of effect.

Look at the following articles to get head start:

Online Whiteboard using HTML5 and SignalR[^]

http://www.danielroot.info/2013/01/a-signalr-whiteboard.html[^]


这篇关于多个用户在html5中同时访问同一画布进行绘制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆