Issue
As at 2021-06-28, there is some variation across versions in how Babylon.js handles the loading of base-64 encoded glTF data from data URLs.
Version 4.2.0 of Babylon.js does not accept data URLs of the form data:;base64,ABC...
.
Instead, the data URL must either exclude the semicolon (data:base64,ABC...
), or must explicitly specify the mime type followed by a semicolon (data:application/octet-stream;base64,ABC...
).
In contrast, the preview version of Babylon.js requires a semicolon (data:;base64,ABC...
) or an explicit mime type plus a semicolon. Without the semicolon, the glTF doesn’t load (JSON parsing error).
Repro
https://playground.babylonjs.com/#1DPEBZ#1
Significance
This issue matters to me because a tool that I created used the semicolon-less approach to generate HTML reports containing inline glTF models while also using the preview version of Babylon.js to render the models in the browser.
Everything was peachy until recently when the models stopped loading because of the semicolon issue, presumably when the code around base64 data URLs was tightened up. I’m kicking myself because if I’d only specified a mime-type then everything would have been fine. Duh.
If I had access to the broken reports then I’d just write a script to fix them, but the reports are generated by customers. Double duh.
Expectations
I’ve marked this a bug, but that’s not really fair because all you have done is improve your compliance with RFC 2397.
I guess I’m just hoping that you’ll take pity on me and add a special case to the base64 parser in preview to accommodate the 4.2.0 semicolon-less behavior.