flint
Flint Particle System with Papervision3D
Flint -> http://flintparticles.org/
Flint is very cool. It just has a bit of a learning curve (as does Papervision3D). Here’s a “Hello Word” example that I hope will help. There are MANY other options that I’m not covering here. This is just about as simple as it gets with still having some kind of movement.
package { import org.flintparticles.common.actions.Action; import org.flintparticles.common.actions.Age; import org.flintparticles.common.counters.Steady; import org.flintparticles.common.initializers.Lifetime; import org.flintparticles.threeD.actions.Move; import org.flintparticles.threeD.actions.RandomDrift; import org.flintparticles.threeD.emitters.Emitter3D; import org.flintparticles.threeD.geom.Vector3D; import org.flintparticles.threeD.initializers.Position; import org.flintparticles.threeD.initializers.Velocity; import org.flintparticles.threeD.papervision3d.PV3DRenderer; import org.flintparticles.threeD.papervision3d.initializers.PV3DObjectClass; import org.flintparticles.threeD.zones.PointZone; import org.flintparticles.threeD.zones.Zone3D; import org.papervision3d.objects.primitives.Sphere; import org.papervision3d.view.BasicView; [SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")] public class Papervision3DWithFlint extends BasicView { private const NUM_SPHERES_PER_SECOND:Number = 1; private var emitter:Emitter3D; private var pv3dRenderer:PV3DRenderer; public function Papervision3DWithFlint() { emitter = new Emitter3D(); emitter.counter = new Steady(NUM_SPHERES_PER_SECOND); //initializers var displayObject3dType:PV3DObjectClass = new PV3DObjectClass(Sphere); emitter.addInitializer(displayObject3dType); var starting3DPosition:Vector3D = new Vector3D( 0, -700, 0); var starting3DZone:Zone3D = new PointZone(starting3DPosition); var startingPosition:Position = new Position(starting3DZone); emitter.addInitializer(startingPosition); var direction:Vector3D = new Vector3D(0, 100, 0); var zone:Zone3D = new PointZone(direction); var velocity:Velocity = new Velocity(zone); emitter.addInitializer(velocity); var lifetime:Lifetime = new Lifetime(20); emitter.addInitializer(lifetime); //actions var ageAction:Action = new Age(); emitter.addAction(ageAction); var moveAction:Action = new Move(); emitter.addAction(moveAction); var drift:Action = new RandomDrift(1000, 0, 1000); emitter.addAction( drift ); //Flint renderer matches emitter 3d coordinates to pv3d coordinates //*does not actually render the pv3d scene* pv3dRenderer = new PV3DRenderer(scene); pv3dRenderer.addEmitter(emitter); //start emitter emitter.start(); //start pv3d rendering startRendering(); } } }
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
- FDT Theme Designer
- 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
Recent Comments
- شقق للبيع في الاردن on Moving to johnlindquist.com
- Annakhan006 on Augmented Reality – Recursive Webcam
- Yarout on Augmented Reality – Recursive Webcam
- Vivon on about
- Josh @ Wall Stickers on Moving to johnlindquist.com
- 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
Categories
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||
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


