obj loader “percentloaded”

Software: Away3D 4.x

pool338, Jr. Member
Posted: 13 April 2012 08:41 AM   Total Posts: 37

Hi,
i am looking for a method to display a progressbar (or something else), to display the loading progress of an obj file.

It seems that the loader in away 4 doesn’t support the “percentloaded” method anymore.

Is there a different method to get the loading-progress?

   

Richard Olsson, Administrator
Posted: 13 April 2012 09:51 AM   Total Posts: 1192   [ # 1 ]

No, and for good reason. This is a topic that has been discussed often before and the problems described, but in short the problem is that there is no way for Away3D of knowing how many files it will need to load (including dependencies) and hence the total progress.

If you know, and an exact percentage is necessary, I suggest you manually load the files using URLLoader and then parse them using the loadData() methods on AssetLoader, AssetLibrary or Loader3D (depending on what you want to use.)

   

pool338, Jr. Member
Posted: 13 April 2012 10:05 AM   Total Posts: 37   [ # 2 ]

That is exactly what i’m currently doing:

Loader3D.enableParser(OBJParser);
   
_loader = new Loader3D();
   
_loader.addEventListener(LoaderEvent.RESOURCE_COMPLETEonResourceComplete);
   
_loader.load(new URLRequest(fileName));
   
_view.scene.addChild(_loader); 

But how can i know how much kB (for Example) the loader has loaded already?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X