Package:flare.materials.flsl
class: FLSLCompiler
Package: flare.materials.flsl
Class: public class FLSLCompiler
Inheritance: FLSLCompileràObject
Method Detail
compile () method
public static function compile(source:String):ByteArray
Compiles a new FLSL (Flare3D Layer Shader language).
Parameters
source:String — The source of the shader.
Returns ByteArray — A byte code generated by the source shader.
class: FLSLFilter
Package: flare.materials.flsl
Class: public class FLSLFilter
Inheritance: FLSLFilteràflash.events.EventDispatcher
Subclasses: AlphaMaskFilter, ColorFilter, ColorParticleFilter, EnvironmentFilter, FogFilter, LightFilter, NormalMapFilter, PlanarFilter, SpecularFilter, SpecularMapFilter, TextureFilter, VertexColorFilter
Property Detail
animated property
public var animated:Boolean
Gets or sets whatever the filter is animated or not.
blendMode property
blendMode:String
Gets or sets the mode how to blend between this and the last filter. This property only has effect if there exist a previous filter that affect the fragment (pixel) shader.
Implementation
public function get blendMode():String
public function set blendMode(value:String):void
byteCode property
byteCode:ByteArray
Returns the byte code used for this filter.
Implementation
public function get byteCode():ByteArray
public function set byteCode(value:ByteArray):void
name property
name:String [read-only]
Gets the filter program name.
Implementation
public function get name():String
namespace property
namespace:String [read-only]
Gets the filter program namespace.
Implementation
public function get namespace():String
params property
public var params:Array
A dynamic property that contains all parameters (FilterValue class) of the filter.
techniqueName property
techniqueName:String
Sets or gets the technique to use for this filter. You can get all available techniques for some filter using the techniques:Vector String property
Implementation
public function get techniqueName():String
public function set techniqueName(value:String):void
See also
techniques
techniques property
techniques:Vector.<String> [read-only]
Gets all thecniques availables on the filter.
Implementation
public function get techniques():Vector.<String>
See also
techniqueName
textures property
public var textures:Array
A dynamic property that contains all textures (FilterTexture class) of the filter.
Constructor Detail
FLSLFilter () Constructor
public function FLSLFilter(byteCode:ByteArray = null, blendMode:String, techniqueName:String = null)
Creates a new FLSL (Flare3D Layer Shader Language) Filter.
Parameters byteCode:ByteArray (default = null) — The generated byte code.
blendMode:String (default = NaN) — If the filter affect the fragment shader, how the blend this filter with the previous filters.
techniqueName:String (default = null) — The technique to use for the filter. If it is not specified, takes the first one.
Method Detail
clone () method
public function clone():FLSLFilter
Creates and returns a copy of the filter.
Returns FLSLFilter — The new cloned fitler.
createTechnique () method
public function createTechnique(name:String, vertexFunctions:Array = null, fragmentFunctions:Array = null):void
Creates a new dynamic technique.
Parameters
name:String — The name of the new technique.
vertexFunctions:Array (default = null) — An indexed Array of strings that contains all vertex functions names and parameters to use.
fragmentFunctions:Array (default = null) — An indexed Array of strings that contains all fragment functions names and parameters to use.
deleteTechnique () method
public function deleteTechnique(name:String):void
Deletes a previously defined technique.
Parameters
name:String — The name of the technique to delete.
dispose () method
public function dispose():void
dispose () method
public static function dispose():void
update () method
public function update():void
Update all filter parameters and send the changed values to all subscribed materials.
Event Detail
changeTechnique Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event
This event occurs whenever the technique or blendMode has changed.
See also
blendMode
techniqueName
techniques
Constant Detail
CHANGE_TECHNIQUE Constant
public static const CHANGE_TECHNIQUE:String = changeTechnique