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
Sent from my iPhone
as for the questions ...
the new async nature means that we will needto wait for the model to
completely load before adding it to the scene or use it, right?
we're goind to receive a general "complete" event from the
AssetLibrary for everything we load or we will get some kind of
reference from the AssetLibrary.load method, to add specific listeners
to it? in the former case, how can we distinguish between multiple
assets that could be loaded at the same time?
in the end i don't really understand the getAsset("meshName") method:
if we load a big model with a lot of meshes inside, we can retrieve a
singular mesh contained there, without the need of adding the whole
"world" to our scene?
we can also reference directly textures or other kind of assets?
Bianco Alessandro
2011/5/6 richardolsson <r...@richardolsson.se>:
I know that the previous synchronous way was achieved by using a
container and, even if it's quicker to use in some circumstances, I
like the new async mode a lot more.
That said, I'm glad we would still be able to use the dirty way with
Loader3D for simpler tasks.
Even the rest of the inner logics is very clear and it really makes
sense to me. Being able to listen to events from a specific loading
request and knowing which kind of assets are being completed are great
features.
Just another quick question:
In case multiple resources sharing a common asset name, what will happen?
For example, for some reason I load two car models, both with meshes
named "body", "wheel" etc. how do i decide which one to retrieve via
getAsset("name") ? I'll have to use the multiton nature of the
AssetLibrary or it has something to do with the AssetLoaderContext?
btw, great work, can't wait to test it :)
Bianco Alessandro
2011/5/6 richardolsson <r...@richardolsson.se>:
thanks for these insights Richard, can't wait to see it in the svn to
start playing with
i could make an exception for this time, we'll see :) it depends if i
find the time to play before the svn is updated or not
btw, I guess that soon or later i'll have to give up and start using
git, the rest of the world demands it :)