I performed a system upgrade some time ago after which I started noticing some issues with Chromium. One of the issues involved Chromium hanging for a couple of seconds before my Three.js r85 project started to load. I have upgraded to Three.js r90 and this issue disappeared.
However, toDataUrl() appears to not work anymore even with the latest version of Three.js. Here's a CodePen by Shiva Saxena that's similar to my own code and works perfectly well in Firefox, but not in Chromium:
renderer = new THREE.WebGLRenderer({ preserveDrawingBuffer: true });
I have also tried an approach without setting preserveDrawingBuffer
to true and calling toDataUrl() immediately after a call to render the scene. It also doesn't work anymore.
renderer.render( scene, camera );
var screenshot = renderer.domElement.toDataURL();
Is anyone else experiencing this behavior? Is there an alternative to using toDataUrl() for rendering a texture onto an image?
Chromium Version 65.0.3325.146 (Developer Build) (64-bit)