I see there are different engines, what’s the engine in playground? Try to replace it use new BABYLON.NullEngine or new BABYLON.Engine, but it looks like it does not work
On the playground the engine has already been created for us before createScene or delayCreateScene is called. If you have WEBGL2 or 1 selected then it’s of type Engine and if you have WEBGPU selected then it’s of type WebGPUEngine.
But you can also use createEngine to create the engine yourself and then you can choose the type and options directly, like below.
But if I use the createEngine() method, it still shows this error Test | Babylon.js Playground (babylonjs.com)
On the playground createEngine is already called for us and the result assigned to the variable named engine. In the above playground I passed that variable to the Scene constructor.