NPM es6 createDefaultCamera not a function?

HI there

So whaty needs to be imported to make this work?

async function createScene() {
  engine = new Engine(document.createElement("canvas"), true); 
  scene = new Scene(engine);  
  scene.createDefaultCamera();
  engine.runRenderLoop(() => {
    scene.render();
  });
  await awaitingSceneReady();
}

Uncaught (in promise) TypeError: scene.createDefaultCamera is not a function

Hi,
Based on this

you have to import

@babylonjs/core/Helpers/sceneHelpers
4 Likes

thanks that did the trick :slight_smile:

1 Like