@Richard, coincidentally your commit fixed an issue I was about to post.  I
was using 3 Loader3D objects (with default AssetLibrary underpinning) to
load 3 separate OBJ models, each with their own textures.  Only the last OBJ
whose load I requested was ever completed and shown (with its texturemap, as
expected).  I just pulled down your latest Git commit and the issue is gone.

Many, many thanks!

On Mon, May 16, 2011 at 8:35 AM, John Brookes <[email protected]> wrote:

> Just tried swapping to assetLibrary. Doing the same loading two awd1 files.
> So have to use the namespace parameter.
>
> Using
>
> Loader3D.enableParser(AWD1Parser);
>
> AssetLibrary.load(new URLRequest(CAB_URL),new AWD1Parser(),null,'dafCab');
> AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE,
> onLoadComplete);
>
> AssetLibrary.load(new URLRequest(TRAILER_URL),new
> AWD1Parser(),null,'containerTrailer');
> AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETE,
> onLoadComplete);
>
>
> private function onLoadComplete(e:LoaderEvent):void
> {
> if (e.url == CAB_URL)
> {
>     var dafCabPivot: ObjectContainer3D =
> ObjectContainer3D(AssetLibrary.getAsset('main','dafCab'));
>     view.scene.addChild(dafCabPivot);
>     trace("dafCabPivot.position "+dafCabPivot.position);
> }
>
> if (e.url == TRAILER_URL)
> {
>     var trailerContainer: ObjectContainer3D =
> ObjectContainer3D(AssetLibrary.getAsset('main','containerTrailer'));
>     view.scene.addChild(trailerContainer);
>     trailerContainer.moveForward(130)
>     trailerContainer.rotationY = 180;
>     trace("trailerContainer.position "+trailerContainer.position);
> }
> }
>
>
>
> The above would trace
> trailerContainer.position Vector3D(0, 0, 130)
> dafCabPivot.position Vector3D(0, 0, 0)
>
> Which is expected and works fine.
>
>
> So I thought do really need to check the url anymore if I'm using an
> assetLibrary and removed the
> if (e.url == CAB_URL) & if (e.url == TRAILER_URL) but now the position is
> wrong.
>
> traces
> dafCabPivot.position Vector3D(0, 0, 0)
> trailerContainer.position Vector3D(0, 0, 130)
>
> dafCabPivot.position Vector3D(0, 0, 0)
> trailerContainer.position Vector3D(0, 0, 0)
>
>
> Is that the expected behaviour?
>
>


-- 
Ross Smith
[email protected]

Reply via email to