Hey Guys!
I’m trying to load an embedded obj-file with away3d 4.0. The mtl-file is also embedded an the dependencies are set like that:
var mtl_context:AssetLoaderContext = new AssetLoaderContext();
mtl_context.mapUrlToData("shoe.mtl", SHOE_MTL);
_modelLoader = new Loader3D();
_modelLoader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, _onResourceComplete);
_modelLoader.parseData(SHOE_OBJ, null,mtl_context);
Now the compiler throws an exception fault, that SHOE_MTL is not of type ByteArray. SHOW_MTL is embedded as Class, and i saw this approach in one of the broomstick-examples in github… what am i doing wrong?
working around the embedding thing is no oppurtunity.
Thanks in advance for your help!