| Package | com.desuade.partigen.renderers |
| Class | public class PixelRenderer |
| Inheritance | PixelRenderer BitmapRenderer StandardRenderer Renderer flash.events.EventDispatcher |
| Language Version : | ActionScript 3 |
| Since : | 29.04.2010 |
| Runtime Versions : | AIR 1.0, Flash Player 9.0.0 |
| Property | Defined By | ||
|---|---|---|---|
![]() | active : Boolean [read-only]
If the renderer is running. | BitmapRenderer | |
![]() | automagic : Boolean [read-only]
If the renderer is currently running in automagic mode. | BitmapRenderer | |
![]() | bitmapdata : BitmapData
The BitmapData to render to. | BitmapRenderer | |
![]() | fade : Number
The amount of fade to perform on the BitmapData.
A value of 0 will instantly fade the BitmapData, leaving no trail.
A value of 1 will not fade the BitmapData, "painting" the screen.
Any value in between will fade the BitmapData, like a motion trail.
| BitmapRenderer | |
![]() | fadeBlur : int
The amount of blur to perform on the fade. | BitmapRenderer | |
![]() | offset : Point
This is a Point for the offset of the bitmapdata. | BitmapRenderer | |
![]() | order : String
The visual stacking order for new particles to be created – 'top', 'bottom', or 'random'. | StandardRenderer | |
| particles : Object [read-only]
An object of all the current particles in the renderer. | PixelRenderer | ||
![]() | predraw : Boolean = false
If true, this draws the particles first, then applies the fade/fadeblur, then the renderfunc. | BitmapRenderer | |
![]() | renderfunc : Function
What function to run on the bitmap on each render. | BitmapRenderer | |
![]() | target : DisplayObjectContainer
A visible DisplayObject that will "hold" the particles on the screen. | StandardRenderer | |
| Method | Defined By | ||
|---|---|---|---|
PixelRenderer(width:int, height:int, automagic:Boolean = true)
This creates a new PixelRenderer to render PixelParticles.
Note: If regular Particles are used, it will convert them into a single pixel. | PixelRenderer | ||
addParticle(p:IBasicParticle):void [override]
This adds a particle to the display. | PixelRenderer | ||
![]() | automagicModeStart():void
This starts the automagic mode that will automagically start/stop the renderer based on need. | BitmapRenderer | |
![]() | automagicModeStop():void
This stops the automagic mode that automagically starts/stops the renderer based on need. | BitmapRenderer | |
![]() | clear():void
This clears the BitmapData on the renderer. | BitmapRenderer | |
removeAllParticles():void [override]
This removes all current particles from the renderer. | PixelRenderer | ||
removeParticle(p:IBasicParticle):void [override]
This removes a particle from the display. | PixelRenderer | ||
resize(width:int, height:int):void [override]
This "resizes" the BitmapData for the renderer. | PixelRenderer | ||
![]() | start():void
Starts the renderer writing to the BitmapData. | BitmapRenderer | |
![]() | stop():void
Stops the renderer from writing to the BitmapData. | BitmapRenderer | |
| Method | Defined By | ||
|---|---|---|---|
drawMethod():void [override]
| PixelRenderer | ||
| particles | property |
particles:Object [read-only] An object of all the current particles in the renderer.
public function get particles():Object| PixelRenderer | () | Constructor |
public function PixelRenderer(width:int, height:int, automagic:Boolean = true)
This creates a new PixelRenderer to render PixelParticles.
Note: If regular Particles are used, it will convert them into a single pixel. For best performance, set your emitter.particleBaseClass to PixelParticle or BasicPixelParticle.
Parameterswidth:int — The width of the Bitmap.
| |
height:int — The height of the Bitmap.
| |
automagic:Boolean (default = true) — If the renderer should start in automagic mode (starts/stops renderer based on need).
|
| addParticle | () | method |
override public function addParticle(p:IBasicParticle):voidThis adds a particle to the display.
Parameters
p:IBasicParticle — The particle to add.
|
| drawMethod | () | method |
override protected function drawMethod():void
| removeAllParticles | () | method |
override public function removeAllParticles():voidThis removes all current particles from the renderer. Note: all the particle still exist and run in memory, unless you remove them in their pool as well.
| removeParticle | () | method |
override public function removeParticle(p:IBasicParticle):voidThis removes a particle from the display.
Parameters
p:IBasicParticle — The particle to remove.
|
| resize | () | method |
override public function resize(width:int, height:int):voidThis "resizes" the BitmapData for the renderer. Dispatches resize event to listening BitmapCanvases.
Parameters
width:int — The new width
| |
height:int — The new height
|