Jump to content

Problem to load meshes online


Boz
 Share

Recommended Posts

Hello there ! (:

This is my first topic and post on this forum, I practise WebGL (started with Three.js) few month ago and I discovered babylonjs, the more "game-oriented" aspect is very pleasant, thanks for this nice framework :D

 

I have play with some elements (cameras, lights, skyboxes, etc), following tutorials on github, and now I want to load meshes.

I heard that you can't load meshes locally and have to put your files online ? I have downloaded "LoadScene" ZIP and tried to run locally, failed. I put it online, success. Cool.

 

So I decided to apply this method to my project, but I got strange errors, like "TypeError : array is undefined", inside my babylon.js file.

I discovered I can load a scene (I kept scene.babylon) only with babylon.js script in ZIP, not with babylon.1.11.js or babylon.1.10.0.js. But I don't know which version is (source here from this tuto : http://www.babylonjs.com/tutorials/blogs/loadScene/loadScene.zip)

 

I is a problem of compatibility from older version of babylon.js ?

 

And could you explain me how to load a file online ? I mean, why the LoadScene example works perfectly without setting Mime types, .htaccess, nothing.. And why it doesn't work with babylon 1.10+ ? :/

 

Thanks in advance for your responses ;)

 

See you soon :D

Pouet--

Link to comment
Share on other sites

Hi Pouet, welcome to the forum.  Good to have you with us.

 

    I am not an expert, but scene.babylon is very old.  Here is what I did.  Go to https://github.com/BabylonJS/Samples and choose "Download ZIP" in the lower right corner.  Maybe you already have the master samples, though.  See the sample called Blender?  Load that file (blender.babylon) instead.  I think it will work better.  Be sure to put all of its files in the right place.

 

Or...

 

I made a zip file for you, with all the files for blender.babylon in it, and also babylon.1.11.0.js, and also hand.minified-1.3.7.js, and I adjusted the script tags in loadScene.html for those newer files.  You can download it here

 

When I made a folder on my webserver using the things in this zip, and then browsed to loadScene.html, everything worked for me.  (except for a little error about a manifest file - which did not cause the scene to fail).

 

http://urbanproductions.com/wingy/babylon/loadscene/loadScene2.html

 

I think... http://www.babylonjs.com/tutorials/blogs/loadScene/loadScene.zip ... is old, and needs to be refreshed with a new scene.babylon and some newer versions of babylon.js and hand.js.  Again, welcome to the forum and to babylon.js.  Take care.

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...