Packageorg.flintparticles.common.renderers
Classpublic class FlexRendererBase
InheritanceFlexRendererBase Inheritance mx.core.UIComponent
Implements Renderer
Subclasses BitmapRenderer, DisplayObjectRenderer, VectorLineRenderer

The base class used by all the Flex compatible renderers. This class manages various aspects of the rendering process.

The class will add every emitter it should renderer to it's internal collection of emitters. It will listen for the appropriate events on the emitter and will then call the protected methods addParticle, removeParticle and renderParticles at the appropriate times. Many derived classes need only implement these three methods to manage the rendering of the particles.



Public Properties
 PropertyDefined By
  emitters : Vector.<Emitter>
The array of all emitters being rendered by this renderer.
FlexRendererBase
Protected Properties
 PropertyDefined By
  _particles : Array
FlexRendererBase
Public Methods
 MethodDefined By
  
The constructor creates a FlexRendererBase class.
FlexRendererBase
  
addEmitter(emitter:Emitter):void
Adds the emitter to the renderer.
FlexRendererBase
  
removeEmitter(emitter:Emitter):void
Removes the emitter from the renderer.
FlexRendererBase
Protected Methods
 MethodDefined By
  
addParticle(particle:Particle):void
The addParticle method is called when a particle is added to one of the emitters that is being rendered by this renderer.
FlexRendererBase
  
FlexRendererBase
  
measure():void
[override] private
FlexRendererBase
  
removeParticle(particle:Particle):void
The removeParticle method is called when a particle is removed from one of the emitters that is being rendered by this renderer.
FlexRendererBase
  
renderParticles(particles:Array):void
The renderParticles method is called during the render phase of each frame if the state of one of the emitters being rendered by this renderer has changed.
FlexRendererBase
  
updateParticles(ev:Event):void
FlexRendererBase
Property Detail
_particlesproperty
protected var _particles:Array

emittersproperty 
emitters:Vector.<Emitter>

The array of all emitters being rendered by this renderer. This is exposed to enable setting of the emitters in mxml files. It is not intended to be used from Actionscript code.


Implementation
    public function get emitters():Vector.<Emitter>
    public function set emitters(value:Vector.<Emitter>):void
Constructor Detail
FlexRendererBase()Constructor
public function FlexRendererBase()

The constructor creates a FlexRendererBase class.

Method Detail
addEmitter()method
public function addEmitter(emitter:Emitter):void

Adds the emitter to the renderer. When an emitter is added, the renderer invalidates its display so the renderParticles method will be called on the next render event in the frame update.

Parameters

emitter:Emitter — The emitter that is added to the renderer.

addParticle()method 
protected function addParticle(particle:Particle):void

The addParticle method is called when a particle is added to one of the emitters that is being rendered by this renderer.

Parameters

particle:Particle — The particle.

emitterUpdated()method 
protected function emitterUpdated(ev:EmitterEvent):void

Parameters

ev:EmitterEvent

measure()method 
override protected function measure():void

private

removeEmitter()method 
public function removeEmitter(emitter:Emitter):void

Removes the emitter from the renderer. When an emitter is removed, the renderer invalidates its display so the renderParticles method will be called on the next render event in the frame update.

Parameters

emitter:Emitter — The emitter that is removed from the renderer.

removeParticle()method 
protected function removeParticle(particle:Particle):void

The removeParticle method is called when a particle is removed from one of the emitters that is being rendered by this renderer.

Parameters

particle:Particle — The particle.

renderParticles()method 
protected function renderParticles(particles:Array):void

The renderParticles method is called during the render phase of each frame if the state of one of the emitters being rendered by this renderer has changed.

Parameters

particles:Array — The particles being managed by all the emitters being rendered by this renderer. The particles are in no particular order.

updateParticles()method 
protected function updateParticles(ev:Event):void

Parameters

ev:Event