Packageorg.flintparticles.twoD.renderers
Classpublic class PixelRenderer
InheritancePixelRenderer Inheritance BitmapRenderer Inheritance SpriteRendererBase Inheritance flash.display.Sprite

The PixelRenderer draws particles as single pixels on a Bitmap display object. The region of the particle system covered by this bitmap object must be defined in the canvas property of the PixelRenderer. Particles outside this region are not drawn.

The PixelRenderer allows the use of BitmapFilters to modify the appearance of the bitmap. Every frame, under normal circumstances, the Bitmap used to display the particles is wiped clean before all the particles are redrawn. However, if one or more filters are added to the renderer, the filters are applied to the bitmap instead of wiping it clean. This enables various trail effects by using blur and other filters. You can also disable the clearing of the particles by setting the clearBetweenFrames property to false.

The PixelRenderer has mouse events disabled for itself and any display objects in its display list. To enable mouse events for the renderer or its children set the mouseEnabled or mouseChildren properties to true.



Public Properties
 PropertyDefined By
 InheritedbitmapData : BitmapData
[read-only] The bitmap data of the renderer.
BitmapRenderer
 Inheritedcanvas : Rectangle
The canvas is the area within the renderer on which particles can be drawn.
BitmapRenderer
 InheritedclearBetweenFrames : Boolean
Controls whether the display is cleared between each render frame.
BitmapRenderer
 Inheritedemitters : Vector.<Emitter>
The array of all emitters being rendered by this renderer.
SpriteRendererBase
 InheritedpostFilters : Array
The array of all filters being applied before rendering.
BitmapRenderer
 InheritedpreFilters : Array
The array of all filters being applied before rendering.
BitmapRenderer
 Inheritedsmoothing : Boolean
BitmapRenderer
Protected Properties
 PropertyDefined By
 Inherited_bitmapData : BitmapData
BitmapRenderer
 Inherited_particles : Array
SpriteRendererBase
 InheritedZERO_POINT : Point
[static]
BitmapRenderer
Public Methods
 MethodDefined By
  
PixelRenderer(canvas:Rectangle)
The constructor creates a PixelRenderer.
PixelRenderer
 Inherited
addEmitter(emitter:Emitter):void
Adds the emitter to the renderer.
SpriteRendererBase
 Inherited
addFilter(filter:BitmapFilter, postRender:Boolean = false):void
The addFilter method adds a BitmapFilter to the renderer.
BitmapRenderer
 Inherited
Clears any palette map that has been set for the renderer.
BitmapRenderer
 Inherited
removeEmitter(emitter:Emitter):void
Removes the emitter from the renderer.
SpriteRendererBase
 Inherited
removeFilter(filter:BitmapFilter):void
Removes a BitmapFilter object from the Renderer.
BitmapRenderer
 Inherited
setPaletteMap(red:Array = null, green:Array = null, blue:Array = null, alpha:Array = null):void
Sets a palette map for the renderer.
BitmapRenderer
Protected Methods
 MethodDefined By
 Inherited
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.
SpriteRendererBase
 Inherited
Create the Bitmap and BitmapData objects
BitmapRenderer
  
drawParticle(particle:Particle2D):void
[override] Used internally to draw the particles.
PixelRenderer
 Inherited
SpriteRendererBase
 Inherited
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.
SpriteRendererBase
 Inherited
renderParticles(particles:Array):void
[override] 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.
BitmapRenderer
 Inherited
updateParticles(ev:Event):void
SpriteRendererBase
Constructor Detail
PixelRenderer()Constructor
public function PixelRenderer(canvas:Rectangle)

The constructor creates a PixelRenderer. After creation it should be added to the display list of a DisplayObjectContainer to place it on the stage and should be applied to an Emitter using the Emitter's renderer property.

Parameters
canvas:Rectangle
Method Detail
drawParticle()method
override protected function drawParticle(particle:Particle2D):void

Used internally to draw the particles.

Parameters

particle:Particle2D