Papervisionの勉強(パーティクルの作成) matsu4512 forked:1favorite:5lines:26license : MIT License modified : 2009-06-11 12:46:16 Embed Tweet package { import com.adobe.viewsource.ViewSource; import flash.display.Sprite; import flash.events.Event; import flash.events.MouseEvent; import org.papervision3d.materials.special.ParticleMaterial; import org.papervision3d.objects.special.ParticleField; import org.papervision3d.view.BasicView; [SWF(backgroundColor=0x000000, width = 800, height=800)] public class Papervision9 extends Sprite { public function Papervision9() { //初期設定 var world:BasicView = new BasicView(); world.startRendering(); addChild(world); //生成するパーティクルの設定。色とアルファ値 var particleMat:ParticleMaterial = new ParticleMaterial(0xFFFFFF, 1); //大きさ2000の立方体の中に大きさ4のパーティクルを500個生成 var particles:ParticleField = new ParticleField(particleMat, 500, 4, 2000, 2000, 2000); world.scene.addChild(particles); addEventListener(Event.ENTER_FRAME, function():void{ particles.rotationY -= (stage.mouseX - stage.stageWidth/2)/100; particles.rotationX -= (stage.mouseY - stage.stageHeight/2)/100; }); } } } Code Fullscreen Preview Fullscreen siouxcitizen.. skn ashtail john0 : papervisionpatricle naoto5959 : 3Dpapervision3dparticles 3D papervision papervision3d particles patricle world particles rotationX rotationY mouseY mouseX MouseEvent.ENTER_FRAME addEventListener addChild Sprite sort new page view favorite forked pv422 forked from: Papervisionの勉強(パー.. 1031no forked:0 favorite:0lines:26 (diff:2)