SceneLoader module

I’m trying to use es6 modules, which are awsome, by the way :slight_smile: but I cann’t find SceneLoader module.
I tryied to add babylon-loaders package but still wasn’t able to find SceneLoader module.

One more.
On Scene I’m getting an error. It is saying that createDefaultEnvironment is not a function.
I imported the scene like this

import { Scene } from “@babylonjs/core/scene”

createDefaultEnvironment is part of helpers cause it is rather big, you need to import “@babylonjs/core/Helpers/sceneHelpers” to augment the scene functionnalities.

scene loader is here : import { SceneLoader } from “@babylonjs/core/Loading/sceneLoader”;

And you need to import “@babylonjs/core/Loading/Plugins/babylonFileLoader” for loading babylon files.

As loaders are plugin they won t be in your app unless you import them for side effects.

I am currently writing an exhaustive doc for this part.

Many thanks.
It is working well now.
Definetly we need these details on doc page.

1 Like