Jump to content

Using AssetsManager to load an OBJ file


octopus
 Share

Recommended Posts

I am trying to load an OBJ model file and I am getting failure.

Here is my code:

	var loader = new BABYLON.AssetsManager(scene);
	var table = loader.addMeshTask('table','','/obj/','table.obj');
	table.onSuccess = function(){
		console.debug('good');
	}
	table.onError = function(){
		console.debug('bad');
	}

	loader.load();
	console.debug(loader);

My console displays 'bad' and I am not sure how to get any more information about the failure. I do notice that my browser successfully loaded the table.obj file but got a 404 error when trying to load a table.obj.manifest file. I do not have a manifest file. Is this the reason for the error? I notice that the playground code here (http://www.babylonjs-playground.com/#28YUR5) also has issues loading the associated manifest files, but the code works. So this leads me to believe that the manifest files aren't necessary. So how then, can I get more information about why the OBJ file failed to load?

 

 

 

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