@Fredrik:
Thanks for your input! To answer your questions:

a) Loading progress is something that will be added at some point, but
it's a bigger issue than one might realize at first thought. I've
explained it in another thread (
http://groups.google.com/group/away3d-dev/browse_thread/thread/994b415c554b7c9e/ee8544570f7aaee2
) but would love to have more input on how the community would like to
see it work. The most reliable way I see is to provide a set of
properties called numFilesLoaded and currentFileProgress. It will then
be up to the programmer (you) to decide whether you want a loading par
that only cares about currentFileProgress (i.e. will jump back to zero
for every dependency) or if you want to calculate the total progress
from knowing the number of files:

p = (loader.numFilesLoaded + loader.curFileProgress) / numFiles;

b) If you are using the AssetLoader, you will need to listen for the
ASSET_COMPLETE event that will be fired every time the parser finds an
asset (e.g. a mesh, material, bitmap et c) in the loaded resource
(including dependencies.) If you are using the AssetLibrary, all
assets will be added to the library and you can wait for
RESOURCE_COMPLETE and then retrieve the assets using getAsset().

Not all parsers currently report all assets correctly (i.e. some only
report the top-level container but not the contained meshes, some
ignore to report texture bitmaps et c) so the implementation is not
completely reliable at this point. If you find any issues, please let
us know!


Cheers
/R


On May 14, 4:41 pm, fredrik <[email protected]> wrote:
> I think this is really nice news!
>
> But there are some mysteries to me. Perhaps these things just are not
> implemented yet, but I would still like to point out some of the
> troubles I had when using the new model loading the assets.
> a) I see there are no events beeing dispatched for the loading
> progress. (It would of course be nice to have some possibility to
> provide some feedback to the always impatient user.)
> b) I also wonder how I should be able to access the loaded asset (an
> image texture for example) in the AssetLoader. In the the old
> ResourceEvent there was a resource object from which I could extract
> the needed bitmapdata.
>
> Thanks for a wonderful work with the framework!
>
> /Fredrik
>
> On 5 Maj, 20:01, Richard Olsson <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hello Away3D community!
>
> > This is a heads up that in a moment, I will be pushing changes to the 
> > GitHub repository (SVN will follow in the next couple of days) that will 
> > likely break any code that you have that uses Broomstick (Away3D 4.0 
> > alpha). This is because of some major incompatible changes that we're 
> > making to the way that assets are loaded and managed in Away3D 4.0. (In the 
> > unlikely event that your code doesn't load assets at all, it might be 
> > unaffected.)
>
> > We wanted to make these changes right now, while Away3D is still in alpha, 
> > and we believe strongly that this is the best loading framework that we 
> > have ever had in Away3D (and probably better than most if not all competing 
> > engines out there.)
>
> > The short version is that we have removed the ResourceManager (which you 
> > are probably currently using to load assets) and replaced it with three 
> > different classes that can be used for loading: The AssetLibrary (with 
> > asset management features), the AssetLoader (for simple loading of files 
> > including dependencies) and the Loader3D (for easily loading assets into a 
> > scene.)
>
> > For those interested in a slightly longer description of the new loading 
> > framework, I have attached a five page PDF outlining the design principles, 
> > features and basic usage of the new loading classes. We hope this will ease 
> > your transition while waiting for proper documentation.
>
> > Remember that Away3D 4 is still alpha, and things might still change, but 
> > we feel a lot more comfortable with the new solution, and I think that we 
> > will be able to keep it more or less stable through to the final release of 
> > Away3D 4.0.
>
> > The examples have been updated as well (all apart from the ones that use 
> > MD5, so those are still broken. Please bear with us while we fix them.) 
> > Example code for the AssetLibrary, AssetLoader and Loader3D will be coming 
> > shortly as well.
>
> > Thanks for your understanding, and if you have any questions, comments, 
> > feature requests or bug reports: Fire away! ;)
>
> > /Richard, Away3D
>
> >  LoadingInAway4.pdf
> > 147KVisaHämta

Reply via email to