Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render HTML in Canvas/WebGL

Is it possible to render HTML elements in Canvas or WebGL? (similar to how one can draw a video element texture in WebGL)

like image 456
Derek Avatar asked Jun 13 '11 19:06

Derek


4 Answers

Use this library https://github.com/PixelsCommander/HTML-GL it is as easy as wrap your content with <html-gl> tag.

like image 54
PixelCommander Avatar answered Sep 17 '22 18:09

PixelCommander


There is an attempt that can do the work near 80%. Fail to render dropdownlist, buttons and some more, but mostly items from the page are rendered.

See and download it from here.

http://html2canvas.hertzen.com/

also

http://hertzen.com/experiments/jsfeedback/

like image 13
Aristos Avatar answered Oct 12 '22 23:10

Aristos


You should also check out http://robert.ocallahan.org/2011/11/drawing-dom-content-to-canvas.html

It might throw a security error in Chrome but works fine in Firefox.

like image 5
Sujay Avatar answered Oct 12 '22 23:10

Sujay


No, it's currently not possible, not yet. But it is planned to include this functionality as pointed out in a video from 3rd WebGL Camp (at about 6:44).

like image 4
Artur Czajka Avatar answered Oct 13 '22 00:10

Artur Czajka