Package | starling.filters |
Class | public class GlowFilter |
Inheritance | GlowFilter FragmentFilter EventDispatcher Object |
Property | Defined By | ||
---|---|---|---|
alpha : Number The alpha value of the glow. | GlowFilter | ||
alwaysDrawToBackBuffer : Boolean Indicates if the last filter pass is always drawn directly to the back buffer. | FragmentFilter | ||
blur : Number The amount of blur with which the glow is created. | GlowFilter | ||
color : uint The color of the glow. | GlowFilter | ||
isCached : Boolean [read-only] Indicates if the filter is cached (via the cache method). | FragmentFilter | ||
numPasses : int [read-only] Indicates the number of rendering passes required for this filter. | FragmentFilter | ||
padding : Padding Padding can extend the size of the filter texture in all directions. | FragmentFilter | ||
resolution : Number [override] | GlowFilter | ||
textureFormat : String The format of the filter texture. | FragmentFilter | ||
textureSmoothing : String The smoothing mode of the filter texture. | FragmentFilter |
Method | Defined By | ||
---|---|---|---|
GlowFilter(color:uint = 0xffff00, alpha:Number = 1.0, blur:Number = 1.0, resolution:Number = 0.5) Initializes a new GlowFilter instance with the specified parameters. | GlowFilter | ||
addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | ||
cache():void Caches the filter output into a texture. | FragmentFilter | ||
clearCache():void Clears the cached output of the filter. | FragmentFilter | ||
dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | ||
dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | ||
dispose():void [override] Disposes all resources that have been created by the filter. | GlowFilter | ||
hasEventListener(type:String, listener:Function = null):Boolean If called with one argument, figures out if there are any listeners registered for
the given event type. | EventDispatcher | ||
process(painter:Painter, helper:IFilterHelper, input0:Texture = null, input1:Texture = null, input2:Texture = null, input3:Texture = null):Texture Does the actual filter processing. | FragmentFilter | ||
removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | ||
removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher | ||
Renders the filtered target object. | FragmentFilter |
alpha | property |
alpha:Number
The alpha value of the glow. Values between 0 and 1 modify the opacity; values > 1 will make it stronger, i.e. produce a harder edge.
The default value is 1.0
.
public function get alpha():Number
public function set alpha(value:Number):void
blur | property |
blur:Number
The amount of blur with which the glow is created.
The number of required passes will be Math.ceil(value) × 2
.
The default value is 1.0
.
public function get blur():Number
public function set blur(value:Number):void
color | property |
color:uint
The color of the glow.
The default value is 0xffff00
.
public function get color():uint
public function set color(value:uint):void
resolution | property |
resolution:Number
[override] public function get resolution():Number
public function set resolution(value:Number):void
GlowFilter | () | Constructor |
public function GlowFilter(color:uint = 0xffff00, alpha:Number = 1.0, blur:Number = 1.0, resolution:Number = 0.5)
Initializes a new GlowFilter instance with the specified parameters.
Parameterscolor:uint (default = 0xffff00 ) — the color of the glow
| |
alpha:Number (default = 1.0 ) — the alpha value of the glow. Values between 0 and 1 modify the
opacity; values > 1 will make it stronger, i.e. produce a harder edge.
| |
blur:Number (default = 1.0 ) — the amount of blur used to create the glow. Note that high
values will cause the number of render passes to grow.
| |
resolution:Number (default = 0.5 ) — the resolution of the filter texture. '1' means full resolution,
'0.5' half resolution, etc.
|
dispose | () | method |
override public function dispose():void
Disposes all resources that have been created by the filter.