Reputation: 6952
So I read today about babylonJS and I was blown away by it. I'm trying to figure out how to load an entire 3d scene into babylon. I've managed to export a 3d model of spider man and have the .babylon file but then what? In the document it only states
"Importing scene from 3D assets
Babylon.js can load scenes from a file format called .babylon. This file format is based on JSON and contains all required data to create a complete scene."
Any ideas on how to achieve this? Thanks
Upvotes: 5
Views: 5356
Reputation: 1767
Once you have a .babylon
file, you can call the SceneLoader.Load function:
BABYLON.SceneLoader.Load("", "scene.babylon", engine, function (newScene) {
});
the Load
function takes the following parameters:
More details here: https://www.eternalcoding.com/?p=313
Upvotes: 6