flash on 2010-1-11 CompositeMaterial
♥0 |
Line 23 |
Modified 2010-01-11 12:51:16 |
MIT License
archived:2017-03-10 15:37:45
ActionScript3 source code
/**
* Copyright albatrus_jp ( http://wonderfl.net/user/albatrus_jp )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/wQp2
*/
package {
import flash.display.Sprite;
import flash.events.*;
import org.papervision3d.view.*;
import org.papervision3d.materials.*;
import org.papervision3d.materials.special.*;
import org.papervision3d.objects.primitives.*;
public class FlashTest extends BasicView{
private var sphere:Sphere;
public function FlashTest() {
var material:CompositeMaterial = new CompositeMaterial();
material.addMaterial(new WireframeMaterial(0x0000ff));
material.addMaterial(new ColorMaterial(0xffff00));
sphere = new Sphere(material,200,10,10);
scene.addChild(sphere);
startRendering();
addEventListener(Event.ENTER_FRAME,loop);
}
private function loop(e:Event):void{
sphere.rotationY += 0.5;
}
}
}