Closed j2l closed 3 years ago
Bump, I hope you're fine. If it's just work piling up, would you please let me know when you'll be available :) Thanks
Hello
Sorry for the late response you should be able to access the rendering canvas in program.canvas
IN nunuStudio should be fairly direct to get a screenshot of the canvas but you will have to set the rendering config to preserveDrawingBuffer in the program object.
function update(delta) {
if(Keyboard.keyJustPressed(Keyboard.S)) {
var data = program.canvas.toDataURL("png");
FileSystem.writeFileBase64("screenshot.png", data);
}
}
Thank you! Unfortunately, all I get is a transparent PNG, not a screenshot, here it is: Totally transparent
Any idea?
Hello, Happy Easter!
Also need WebGL 1.0 to work Closing
So it is only woking with webgl 1.0 correct?
Thanks a lot Happy easter
Yes, only WebGL 1.0
Reading ThreeJS documentation and forum, I understand that we can take a screenshot of WebGLRenderer (inside the canvas), but I don't get how to relate to the actual WebGLRenderer and when I instantiate a new one I get a black picture Reading https://discourse.threejs.org/t/save-composer-frame-to-jpg/22055 and its response https://jsfiddle.net/a3ns02b5/ I successfully run this script from the editor:
It takes and saves a screenshot from a new Renderer, an empty one, right? How to refer to the actual one?
I can't read the menu content but I guess program has the WebGLRenderer preserveDrawingBuffer settings, right?
Additionally, I'd like to save it on my server to build a gallery for the user, any idea how to POST the file?