Breaking Changes in version 9.16.x

Hey @Deltakosh / @sebavan … Has there been some breaking changes in the new 9.16.x ?

I have been able to run my player controller demos on the playground for years, just fine up until version 9.16.0 +

Here is version 9.15 (Works great)

But eve since the 9.16 builds i get all kind of error trying to the same playground:

Console error with the same exact playground that worked for before:

fileSaver.js:232 [Violation] Permissions policy violation: unload is not allowed in this document.
logger.ts:109 BJS - [00:17:49]: Babylon.js v9.16.1 - WebGPU1 engine
logger.ts:109 BJS - [00:17:49]: Babylon.js Toolkit v9.15.1 - R1
installHook.js:1 BJS - [00:17:49]: Unable to complete task samplescene: Unable to load from https://www.babylontoolkit.com/playground/samplescene.gltf: Class constructor GMe cannot be invoked without 'new': RuntimeError: Unable to load from https://www.babylontoolkit.com/playground/samplescene.gltf: Class constructor GMe cannot be invoked without 'new'
installHook.js:1 BJS - [00:17:49]: Unable to complete task playerarmature: Unable to load from https://www.babylontoolkit.com/playground/playerarmature.gltf: Class constructor GMe cannot be invoked without 'new': RuntimeError: Unable to load from https://www.babylontoolkit.com/playground/playerarmature.gltf: Class constructor GMe cannot be invoked without 'new'

installHook.js:1 BJS - [00:17:49]: Initial scene creation failed: undefined
installHook.js:1 Error: The playground timed out while running the scene.
    at $n._failRun (rendererComponent.tsx:250:70)
    at $n._compileAndRunAsync (rendererComponent.tsx:513:22)

Hey, let me check that!

Some syntax in the toolkit is incorrect. you are using new where you shouldn’t use new, and that breaks the ES2015 standard that we now use for UMD.

Class constructors should be initialized with new, not with apply. So this is something you will have to fix on your end in order to support a newer standard of JavaScript.

Shit… I dont explictly use apply for new… But I do have the base target for my older projects to still be compatible with that UMD build of my babylon.toolkit.js targets ES5… And that worked great for years… Now apperantly the lowest we can go ES2015.

I have to rebuild the Babylon Toolkit with min ES2015 target

Thanks @RaananW