Reputation: 12439
I am trying to load .babylon
file. But it doesn't load any thing, the page is blank.
I was using the following links:
The sample files provided by the second link didn't work on my machine. Then I found that they need to be hosted on a server. After uploading the files on dropbox.com they started working but my file is still not working.
The code on the link:
BABYLON.SceneLoader.Load("", "scene.babylon", engine, function (newScene) {
I just changed it to:
BABYLON.SceneLoader.Load("", "myscene.babylon", engine, function (newScene) {
The error in the browser's console
is:
Uncaught TypeError: Cannot read property '0' of undefined babylon.js:1
BABYLON.Vector3.FromArray babylon.js:1
(anonymous function) babylon.js:11
request.onreadystatechange babylon.js:1
Additional Information:
myscene.babylon
is exported from blender
using Babylon Exporter
available on GitHub official link.
It only contains a cube
and a plane
.
Upvotes: 1
Views: 4649
Reputation: 1767
I also added the step to define MIME type on your webserver to this article (Thanks to David Rousset): How to load a .babylon file
Upvotes: 1
Reputation: 141
Does your file work in our online sandbox: http://www.babylonjs.com/sandbox ?
You just have to drag'n'drop your .babylon file into the sandbox. If it works, this means you have a webserver configuration issue.
Bye,
David
Upvotes: 2