Skip to content
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

Screenshots of scenes or camera view #92

Open
andnovar opened this issue May 31, 2016 · 3 comments
Open

Screenshots of scenes or camera view #92

andnovar opened this issue May 31, 2016 · 3 comments

Comments

@andnovar
Copy link

I have been going through the API to check whether is possible to get a screenshot of the scene or from the camera view. Is it possible now ? Any idea how can I contribute maybe if not solved ?

@thothbot
Copy link
Owner

Hey, yes it is possible.

WebGL uses canvas element, where you can get an image using .toDataURL() js-method. Need to check if it is implemented in gwt, if not it is easy to add it (but for gwt-platform only)

@andnovar
Copy link
Author

https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL I see the method. Seems like GWT does it --> http://www.gwtproject.org/javadoc/latest/com/google/gwt/dom/client/CanvasElement.html#toDataUrl(java.lang.String)
It could be cool to add to the scene a method to call this directly to get a png/jpg. I think I can add this and do a pull request later on.

@thothbot
Copy link
Owner

Will be cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants