开发者

Document-free canvas for Web Worker

Is there any implementation of canvas without document.createElement('canvas')?

I want to work with canvas in web worker but i can't pass canvas data to it via worker.postMessage(), because canvas is HTMLElement.

var canvas = document.createElement('canvas'), worker = new Worker('canvas.js');
worker.postMessage(canvas.getData())开发者_高级运维;

Also i don't want to pass canvas's ImageData to web worker because i don't want to implement context2d.drawImage() manually.


Nope. Sorry, ImageData is your only recourse here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜