hello,
I'm new to away3d and I want to load a *.3ds file in flash. That
works. But I can't see the materials I have set in 3ds max.
But the materials are in the 3ds file included because if I access the
materialLibrary and I do getMaterial('boog') flash returns [object
MaterialData].
How do I add these to the model?
this is the source:
import away3d.containers.View3D;
import away3d.loaders.Max3DS;
import away3d.loaders.Object3DLoader;
var view:View3D = new View3D();
view.x = stage.stageWidth/2;
view.y = stage.stageHeight/2;
view.camera.zoom = 11;
addChild(view);
var max3ds:Object3DLoader;
max3ds = Max3DS.load('slot.3DS');
max3ds.handle.rotationX = 90;
view.scene.addChild(max3ds);
view.camera.moveTo(max3ds.x, max3ds.y, max3ds.z);
var once:Boolean = false;
stage.addEventListener(Event.ENTER_FRAME, function () {
if
(max3ds.handle.materialLibrary && !once) {
trace(max3ds.handle.materialLibrary.getMaterial('blok'));
once = true;
}
view.camera.rotationY++;
view.render();
});
Kristof