我无法将纹理应用于对象,我不知道为什么......
(AS3 搅拌机导出脚本和 Collada 导入也不适合我)
任何的想法?
var loader:Loader3D = new Loader3D();
loader.addEventListener( Loader3DEvent.LOAD_SUCCESS,
handler_loadSuccess );
var parser:Obj = new Obj();
loader.loadGeometry( "assets/objects/Test.obj", parser );
private function handler_loadSuccess( event:Loader3DEvent ):void
{
trace( "Success" );
mat = new ColorMaterial( 0xFFFFFF );
var mesh:Mesh = event.loader.handle as Mesh;
mesh.material = mat;
mesh.scale( 40 )
mesh.x = 300;
viewport.scene.addChild( mesh );
}