| Package | org.flintparticles.common.renderers |
| Class | public class RendererBase |
| Inheritance | RendererBase Object |
| Implements | Renderer |
| Subclasses | Away3DRenderer, PV3DParticleRenderer, PV3DPixelRenderer, PV3DRenderer |
The class will add every emitter it should renderer to it's internal array 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.
| Property | Defined By | ||
|---|---|---|---|
| emitters : Vector.<Emitter>
The array of all emitters being rendered by this renderer. | RendererBase | ||
| Method | Defined By | ||
|---|---|---|---|
The constructor creates a RendererBase class. | RendererBase | ||
addEmitter(emitter:Emitter):void
Adds the emitter to the renderer. | RendererBase | ||
removeEmitter(emitter:Emitter):void
Removes the emitter from the renderer. | RendererBase | ||
| Method | Defined 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. | RendererBase | ||
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. | RendererBase | ||
renderParticles(particles:Array):void
The renderParticles method is called during the render phase of
every frame if the state of one of the emitters being rendered
by this renderer has changed. | RendererBase | ||
| emitters | property |
emitters:Vector.<Emitter>The array of all emitters being rendered by this renderer.
public function get emitters():Vector.<Emitter> public function set emitters(value:Vector.<Emitter>):void| RendererBase | () | Constructor |
public function RendererBase()The constructor creates a RendererBase class.
| addEmitter | () | method |
public function addEmitter(emitter:Emitter):voidAdds 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):voidThe 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.
|
| removeEmitter | () | method |
public function removeEmitter(emitter:Emitter):voidRemoves 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):voidThe 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):voidThe renderParticles method is called during the render phase of every 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.
|