Flint Pixels
package { import flash.events.Event; import flash.filters.BlurFilter; import org.flintparticles.common.actions.Age; import org.flintparticles.common.counters.Steady; import org.flintparticles.common.initializers.ColorInit; import org.flintparticles.common.initializers.Lifetime; import org.flintparticles.threeD.actions.Accelerate; import org.flintparticles.threeD.actions.Move; import org.flintparticles.threeD.emitters.Emitter3D; import org.flintparticles.threeD.geom.Vector3D; import org.flintparticles.threeD.initializers.Velocity; import org.flintparticles.threeD.papervision3d.PV3DPixelRenderer; import org.flintparticles.threeD.zones.DiscZone; import org.papervision3d.core.effects.BitmapLayerEffect; import org.papervision3d.core.geom.Pixels; import org.papervision3d.view.BasicView; import org.papervision3d.view.layer.BitmapEffectLayer; [SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")] public class FlintPixels extends BasicView { private var emitter:Emitter3D; private var flintRenderer:PV3DPixelRenderer; private var bitmapEffectLayer:BitmapEffectLayer; private var pixels:Pixels; public function FlintPixels() { camera.z = -300; setupPixels(); setupEmitter(); setupFlintRenderer(); emitter.start(); startRendering(); } private function setupPixels():void { bitmapEffectLayer = new BitmapEffectLayer(viewport); viewport.containerSprite.addLayer( bitmapEffectLayer ); pixels = new Pixels(bitmapEffectLayer); bitmapEffectLayer.addDisplayObject3D(pixels); scene.addChild(pixels); bitmapEffectLayer.addEffect(new BitmapLayerEffect(new BlurFilter(2, 2, 1))); } private function setupEmitter():void { emitter = new Emitter3D(); emitter.counter = new Steady( 500 ); emitter.addInitializer(new ColorInit(0xffcc0000, 0xffffffff)); emitter.addInitializer(new Velocity(new DiscZone(new Vector3D(0, 340, 0), new Vector3D(0, 1, 0), 100, 100))); emitter.addInitializer(new Lifetime(3)); emitter.addAction(new Move()); emitter.addAction(new Accelerate(new Vector3D(0, -300, 0))); emitter.addAction(new Age()); } private function setupFlintRenderer():void { flintRenderer = new PV3DPixelRenderer(pixels); flintRenderer.addEmitter(emitter); } override protected function onRenderTick(event:Event = null):void { pixels.rotationY += (viewport.containerSprite.mouseX - pixels.rotationY) * .3; pixels.rotationX += (viewport.containerSprite.mouseY - pixels.rotationX) * .3; renderer.renderScene(scene, camera, viewport); } } }
-
Holland Risley
-
John Lindquist
-
Piergiorgio Niero
-
Piergiorgio Niero
-
Seb
Search
Recommended Books
Speaking at FITC Toronto
Recent Posts
- Moving to johnlindquist.com
- AsyncCommand with Robotlegs, Signals, Flight, MinimalComps
- Search Widget – Robotlegs, Signals, Flight, Minimal Comps, Yahoo Astra
- FDT Super Awesome March Deal
- haXe Tutorial
- AS3 Signals Tutorial
- Preferred Video Tutorial Resolution?
- TweenMax – Tweening a timeline (Advanced Tweening)
- Robotlegs + Flight + Union Platform
- Back in the saddle
- Eclipse Theme Designer Preview
- RobotLegs Hello World Video Tutorial
- 10 Things Every Senior Flash Developer Should Know
- Efflex – 3D Effects for Flex
- MorphController – Mighty Morphing Papervision3D
Recent Comments
- list of lpn courses on SpringCamera3D and Driving a Car
- rn to bsn in montgomery al on archive
- PowerPoint Recovery on Eclipse Theme Designer Preview
- cheat mw3 on Test if a plane is within the view of the camera (aka testing if culled)
- Goa Hotels on Looking around the inside of a Sphere
- cheat gratuit on Looking around the inside of a Sphere
- Application Development on Robotlegs + Flight + Union Platform
- nexium on Moving Faces
- buy nexium on Holy Sphere
- buy aldara online on Tweening a “moveForward()” behavior
Categories
Archives
Preferred Video Tutorial Resolution
- 1024x768 (53%, 85 Votes)
- 1280x1024 (15%, 24 Votes)
- 1920x1080 (15%, 24 Votes)
- 800x600 (13%, 20 Votes)
- 480x320 (4%, 6 Votes)
- 640x480 (0%, 2 Votes)
Total Voters: 160

