Away3D Lite:ExCollada

采用FastTemplate模板:

默认start()

// Template setup designed for speed. 
public class ExCollada extends FastTemplate
{
}
 

onInit():

// Fired on instantiation of the template.
override protected function onInit():void
{
    // Defines the text appearing in the template title.
    // 标题描述3D物体的个数和面数
    // Away3DLite: Collada Example. Object3D(s): 5, Face(s): 10294
	title += " : Collada Example.";
	Debug.active = true;
	camera.z = -1000;
	
    // Collada文件类
	collada = new Collada();
	collada.scaling = 600;
	collada.centerMeshes = true;
	
	loader = new Loader3D();
	loader.loadGeometry("assets/chameleon.dae", collada);
	loader.addEventListener(Loader3DEvent.LOAD_SUCCESS, onSuccess);
	scene.addChild(loader);
}

 

onPreRender():

// Fired at the beginning of a render loop.
override protected function onPreRender():void
{
    scene.rotationY++;
}

 

交互动作:

private function onMouseDown(event:MouseEvent = null):void
{
	if (loaded)
    // material.debug
    // Switches on the debug outlines around each face drawn with the material.
		model.materialLibrary.getMaterial("material_0_1_0ID").material.debug = true;
}
 

FastTemplate类:public属性:

 

 

FastTemplate类:public方法:

 

FastTemplate类:protected方法:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值