| Package | org.flintparticles.twoD.renderers |
| Class | public class PixelRenderer |
| Inheritance | PixelRenderer BitmapRenderer SpriteRendererBase flash.display.Sprite |
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.
| Method | Defined By | ||
|---|---|---|---|
PixelRenderer(canvas:Rectangle)
The constructor creates a PixelRenderer. | PixelRenderer | ||
![]() | addEmitter(emitter:Emitter):void
Adds the emitter to the renderer. | SpriteRendererBase | |
![]() | addFilter(filter:BitmapFilter, postRender:Boolean = false):void
The addFilter method adds a BitmapFilter to the renderer. | BitmapRenderer | |
![]() | clearPaletteMap():void
Clears any palette map that has been set for the renderer. | BitmapRenderer | |
![]() | removeEmitter(emitter:Emitter):void
Removes the emitter from the renderer. | SpriteRendererBase | |
![]() | removeFilter(filter:BitmapFilter):void
Removes a BitmapFilter object from the Renderer. | BitmapRenderer | |
![]() | setPaletteMap(red:Array = null, green:Array = null, blue:Array = null, alpha:Array = null):void
Sets a palette map for the renderer. | BitmapRenderer | |
| 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. | SpriteRendererBase | |
![]() | createBitmap():void
Create the Bitmap and BitmapData objects
| BitmapRenderer | |
drawParticle(particle:Particle2D):void [override]
Used internally to draw the particles. | PixelRenderer | ||
![]() | emitterUpdated(ev:EmitterEvent):void | SpriteRendererBase | |
![]() | 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 | |
![]() | 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 | |
![]() | updateParticles(ev:Event):void | SpriteRendererBase | |
| 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.
Parameterscanvas:Rectangle |
| drawParticle | () | method |
override protected function drawParticle(particle:Particle2D):voidUsed internally to draw the particles.
Parameters
particle:Particle2D |