Technology
Papervision3D Planeの回転
2010-08-31ActionScript
Papervision3Dの簡単な練習。10枚のPlaneを横方向に回転させます。
package { import flash.events.Event; import org.papervision3d.materials.ColorMaterial; import org.papervision3d.objects.primitives.Plane; import org.papervision3d.view.BasicView; public class test001 extends BasicView{ protected var planes:Array; public function test001():void{ var colorMaterial:ColorMaterial; var plane:Plane; planes=new Array(); for(var i:int;i<10;++i){ colorMaterial = new ColorMaterial(0x0000FF, 0.5); colorMaterial.doubleSided = true; plane = new Plane(colorMaterial, 100, 100); plane.x=50*(i-5); planes.push(plane); scene.addChild(plane); } startRendering(); } override protected function onRenderTick(event:Event = null):void{ super.onRenderTick(event); for(var i:int;i<10;++i){ planes[i].yaw(i); } } } }
Topic
- Languages (24)
- ActionScript (8)
- C# (1)
- Java (6)
- Android (2)
- JavaScript (5)
- JavaScript (4)
- node.js (1)
- Perl (4)
- Database (3)
- MySQL (3)
- Miscellaneous (5)