createScreenshot seems to be working in STABLE, but broken in LATEST


#1

https://www.babylonjs-playground.com/index.html#4K7I4N

createScreenshot seems to be working in STABLE, but broken in LATEST?

to reproduce the error:
Run the above playground example in STABLE (works fine) and LATEST, which gives:

Uncaught TypeError: Cannot read property ‘toDataURL’ of undefined
at Function.e.EncodeScreenshotCanvasData (babylon.js:16)
at Function.e.CreateScreenshot (babylon.js:16)
at eval (eval at (index.js:556), :31:27)
at e._renderLoop (babylon.js:16)


#2

Thanks for reporting, looks like this is related to our module treeshaking improvements. Im working on a fix.


#3

Yes, it works in both versions now.

Thank you! good work! (thumbsup)