| Package | com.flashdynamix.motion.effects.core |
| Class | public class DisplacementEffect |
| Inheritance | DisplacementEffect FilterEffect flash.utils.Proxy |
| Implements | IEffect |
| Subclasses | BulgeEffect, BumpMapEffect, PerlinDisplacementEffect |
| Property | Defined by | ||
|---|---|---|---|
![]() | filter : BitmapFilter
The BitmapFilter to apply onto the BitmapData.
| FilterEffect | |
| mapBmd : BitmapData
The displacement BitmapData to be used.
| DisplacementEffect | ||
| mapPoint : Point
The position of the displacement mapBmd.
| DisplacementEffect | ||
![]() | pt : Point
The Point from which to apply the BitmapFilter
| FilterEffect | |
| Method | Defined by | ||
|---|---|---|---|
|
DisplacementEffect(mapBmd:BitmapData, scaleX:Number = 3, scaleY:Number = 3, componentX:uint = 1, componentY:uint = 1, mode:String = "clamp", mapPoint:Point = null, color:uint = 0, alpha:uint = 0)
| DisplacementEffect | ||
|
render(bmd:BitmapData):void
Renders the DisplacementEffect on to the specified BitmapData
| DisplacementEffect | ||
| mapBmd | property |
public var mapBmd:BitmapDataThe displacement BitmapData to be used.
| mapPoint | property |
public var mapPoint:PointThe position of the displacement mapBmd.
| DisplacementEffect | () | constructor |
public function DisplacementEffect(mapBmd:BitmapData, scaleX:Number = 3, scaleY:Number = 3, componentX:uint = 1, componentY:uint = 1, mode:String = "clamp", mapPoint:Point = null, color:uint = 0, alpha:uint = 0)Parameters
mapBmd:BitmapData — The displacement BitmapData to be used.
|
|
scaleX:Number (default = 3) — The multiplier to use to scale the x displacement result from the map calculation.
|
|
scaleY:Number (default = 3) — The multiplier to use to scale the y displacement result from the map calculation.
|
|
componentX:uint (default = 1) — Describes which color channel to use in the map image to displace the x result.Possible values are BitmapDataChannel constants:
|
|
componentY:uint (default = 1) — Describes which color channel to use in the map image to displace the y result.Possible values are BitmapDataChannel constants:
|
|
mode:String (default = "clamp") — The mode for the filter.Possible values are DisplacementMapFilterMode constants:
|
|
mapPoint:Point (default = null) — A value that contains the offset of the upper-left corner of the target display object from the upper-left corner of the map image.
|
|
color:uint (default = 0) — Specifies what color to use for out-of-bounds displacements.Values are in hexadecimal format. The default value for color is 0. Use this property if the mode property is set to DisplacementMapFilterMode.COLOR. |
|
alpha:uint (default = 0) — Specifies the alpha transparency value to use for out-of-bounds displacements.It is specified as a normalized value from 0.0 to 1.0. For example, .25 sets a transparency value of 25%. The default value is 0. Use this property if the mode property is set to DisplacementMapFilterMode.COLOR. |
| render | () | method |
public override function render(bmd:BitmapData):voidRenders the DisplacementEffect on to the specified BitmapData
Parametersbmd:BitmapData |