-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render the output to an image #79
Comments
Nothing here is going to work without support for webgl. You need this to run outside of a browser? |
wow quick response, awesome! |
Oh yeah that's not a problem. You can grab it straight from the canvas itself with It shouldn't matter whether the canvas has a 2d context or webgl. It's up to you to convert the resulting dataURI into a file, either on the server or in the browser, but that's easy enough. A little Googling should find you a solution or two. |
If you really really want an image like a blob which the user can save out of the box, you can try using .toBlob on a supporting browser you can also specify quality of jpeg image created. |
On a second thought though @brianchirls having a direct method / output form which literally emits a file sounds pretty reasonable .target(fileNode);
// and later
fileNode.getFile(); // async call gets the rendered file.. Not that it was hard to write self but it can be cool to have. |
is it possible to grab a frame and rasterize/output it as an image?
for example to share the current image on facebook? I tried using phantomjs but I get a WebGL error
phantom stdout: ReferenceError: Can't find variable: WebGLFramebuffer
This is probably because PhantomJs does not support webgl..
The text was updated successfully, but these errors were encountered: