Jump to content

Can't get gltf or glb files to load


MattB
 Share

Recommended Posts

I'm pretty new to all this, so I'm sure its something stupid.  I went through the Babylon 101 tutorial and used the template html file, I then added

BABYLON.SceneLoader.Append("assets/", "Alien.glb", scene, function (scene) {

and downloaded the Alien.glb file from Babylon's site.  But it will not show up and the debug layer gives this error:  

BABYLON.JS LOGS
[13:23:56]: glTF Loader: t._loader._onReadyObservable.addOnce is not a function

[13:23:56]: Unable to load from assets/Alien.glb: t._loader._onReadyObservable.addOnce is not a function

 If I change it to a sample .obj file it works fine.  I also can't get it to work with the Boombox.gltf from the Babylon samples (or any other GLTF files I've created from blender).  I'm running this on a Wamp server (which I also am new at).  Attached is my index.html.

 

Thanks for any help!

index.html

Link to comment
Share on other sites

Make sure to get both loader and Babylon.js from the preview folder (or preview.babylonjs.com)

There is a discrepancy here between the loader and bjs version

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...