0

I am working with paper.js in asp.net mvc4 application ,which helps in drawing on canvas region of HTML. I need your support for my requirement: When I draw on my canvas I want to make visible these drawings on other canvas who opened same page over internet. Paper.js provides a global variable called project.activeLayer to access items on view. I saved cavnas data in JSON format from active Layer , then I send this data through server communication. How can I rebuild the view in the canvas with same data. ? (or) Is there any way to do this without transmission of data.?

Thanks, surbob.

4

1 回答 1

0

这不会很简单。您所说的基本上与浏览器中带有caht cliints的聊天室相同。您需要将画布数据发送到服务器,然后让服务器更新连接到它的任何其他客户端。

可能最好的起点是聊天室示例并修改代码以处理画布数据。SignalR实时通信库可能有助于使测试变得更简单,并且它有很好的示例可以帮助您前进

于 2013-01-30T05:54:06.343 回答