ActionScript 3 Papervision3D View3D类
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 Papervision3D View3D类相关的知识,希望对你有一定的参考价值。
package com
{
import org.papervision3d.lights.PointLight3D;
import org.papervision3d.view.BasicView;
import org.papervision3d.objects.primitives.Sphere;
import org.papervision3d.materials.shaders.PhongShader;
import org.papervision3d.materials.shadematerials.PhongMaterial;
import org.papervision3d.core.proto.MaterialObject3D;
public class View3D extends BasicView
{
private var light:PointLight3D;
private var phongMaterial:MaterialObject3D;
public function View3D()
{
super();
createSomeObjectsOnTheScene();
this.startRendering();
}
public function createSomeObjectsOnTheScene():void
{
phongMaterial = new PhongMaterial(light, 0x6654FF, 0x060433, 150);
light = new PointLight3D();
light.x = 1000;
light.y = 5000;
light.z = -6000;
scene.addChild(light);
var tSphere:Sphere = new Sphere(phongMaterial, 50, 10, 10);
scene.addChild(tSphere);
}
}
}
以上是关于ActionScript 3 Papervision3D View3D类的主要内容,如果未能解决你的问题,请参考以下文章
ActionScript 3 ActionScript 3 SliceBitmap类
ActionScript 3 ActionScript 3中的XML循环
ActionScript 3 clickTag使用ActionScript 3
ActionScript 3 ActionScript 3中的反射
ActionScript 3 在ActionScript 3中嵌入字体
ActionScript 3 TextManager ActionScript 3.0类