Package | com.desuade.partigen.renderers |
Class | public class BitmapRenderer |
Inheritance | BitmapRenderer ![]() ![]() ![]() |
Subclasses | PixelRenderer |
Language Version : | ActionScript 3 |
Since : | 04.08.2009 |
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 | |
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 | ||
---|---|---|---|
BitmapRenderer(width:int, height:int, order:String = top, automagic:Boolean = true)
Creates a new BitmapRenderer. | BitmapRenderer | ||
![]() | addParticle(p:IBasicParticle):void [override]
This adds a particle to the display. | StandardRenderer | |
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
This removes all current particles from the renderer. | StandardRenderer | |
![]() | removeParticle(p:IBasicParticle):void [override]
This removes a particle from the display. | StandardRenderer | |
resize(width:int, height:int):void
This "resizes" the BitmapData for the renderer. | BitmapRenderer | ||
start():void
Starts the renderer writing to the BitmapData. | BitmapRenderer | ||
stop():void
Stops the renderer from writing to the BitmapData. | BitmapRenderer |
active | property |
active:Boolean
[read-only] If the renderer is running.
public function get active():Boolean
automagic | property |
automagic:Boolean
[read-only] If the renderer is currently running in automagic mode.
public function get automagic():Boolean
bitmapdata | property |
public var bitmapdata:BitmapData
The BitmapData to render to.
fade | property |
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.
public function get fade():Number
public function set fade(value:Number):void
fadeBlur | property |
fadeBlur:int
The amount of blur to perform on the fade.
public function get fadeBlur():int
public function set fadeBlur(value:int):void
offset | property |
public var offset:Point
This is a Point for the offset of the bitmapdata.
predraw | property |
public var predraw:Boolean = false
If true, this draws the particles first, then applies the fade/fadeblur, then the renderfunc. If false, it draws the particles after (default).
renderfunc | property |
public var renderfunc:Function
What function to run on the bitmap on each render.
BitmapRenderer | () | Constructor |
public function BitmapRenderer(width:int, height:int, order:String = top, automagic:Boolean = true)
Creates a new BitmapRenderer. Use a BitmapCanvas object to display the particle bitmap.
Parameterswidth:int — The width of the Bitmap.
| |
height:int — The height of the Bitmap.
| |
order:String (default = top ) — The visual stacking order for new particles to be created – 'top', 'bottom', or 'random'.
| |
automagic:Boolean (default = true ) — If the renderer should start in automagic mode (starts/stops renderer based on need, recommended).
|
automagicModeStart | () | method |
public function automagicModeStart():void
This starts the automagic mode that will automagically start/stop the renderer based on need. This starts automatically by default when the renderer is created.
automagicModeStop | () | method |
public function automagicModeStop():void
This stops the automagic mode that automagically starts/stops the renderer based on need.
clear | () | method |
public function clear():void
This clears the BitmapData on the renderer.
resize | () | method |
public function resize(width:int, height:int):void
This "resizes" the BitmapData for the renderer. Dispatches resize event to listening BitmapCanvases.
Parameters
width:int — The new width
| |
height:int — The new height
|
start | () | method |
public function start():void
Starts the renderer writing to the BitmapData.
stop | () | method |
public function stop():void
Stops the renderer from writing to the BitmapData.