| Package | com.flashdynamix.motion.effects |
| Class | public dynamic class PerlinDisplacementEffect |
| Inheritance | PerlinDisplacementEffect DisplacementEffect FilterEffect flash.utils.Proxy |
| Implements | IEffect |
| Property | Defined by | ||
|---|---|---|---|
| baseX : int = 30
Frequency to use in the x direction.
For example, to generate a noise that is sized for a 64 x 128 image, pass the pixel width of 64 for the baseX value. | PerlinDisplacementEffect | ||
| baseY : int = 40
Frequency to use in the y direction.
For example, to generate a noise that is sized for a 64 x 128 image, pass the pixel height of 128 for the baseY value. | PerlinDisplacementEffect | ||
| channelOptions : uint = 1.0
The Channels which are rendered with the perlin noise :
| PerlinDisplacementEffect | ||
![]() | filter : BitmapFilter
The BitmapFilter to apply onto the BitmapData.
| FilterEffect | |
| fractalNoise : Boolean = false
If the value is true, the method generates fractal noise; otherwise, it generates turbulence.
| PerlinDisplacementEffect | ||
| grayScale : Boolean = false
Sets the perlin noise to render in grayscale.
| PerlinDisplacementEffect | ||
![]() | mapBmd : BitmapData
The displacement BitmapData to be used.
| DisplacementEffect | |
![]() | mapPoint : Point
The position of the displacement mapBmd.
| DisplacementEffect | |
| movement : String [write-only]
Sets the movement type which will be applied on the displacement
These options include :
| PerlinDisplacementEffect | ||
![]() | pt : Point
The Point from which to apply the BitmapFilter
| FilterEffect | |
| radiusX : Number = 3
The radiusX in pixels to be applied on to the displacement when the movement type is ORBIT.
| PerlinDisplacementEffect | ||
| radiusY : Number = 3
The radiusY in pixels to be applied on to the displacement when the movement type is ORBIT.
| PerlinDisplacementEffect | ||
| seed : int = 1
The random seed number to generate the perlin noise.
| PerlinDisplacementEffect | ||
| speedX : Number = 0.01
The x speed direction the displacement is offsetted by on each render.
The direction depends on the movement type. When the movement type is ORBIT it effects the speed of rotation in the x direction. When the movement type is DIRECTION it effects the offset speed in the x direction. | PerlinDisplacementEffect | ||
| speedY : Number = 0.01
The y speed direction the displacement is offsetted by on each render.
| PerlinDisplacementEffect | ||
| stitch : Boolean = true
If the value is true, the method attempts to smooth the transition edges of the image to create seamless textures for tiling as a bitmap fill.
| PerlinDisplacementEffect | ||
| Method | Defined by | ||
|---|---|---|---|
|
PerlinDisplacementEffect(width:int = 500, height:int = 500, scaleX:Number = 3, scaleY:Number = 3, octives:int = 2)
| PerlinDisplacementEffect | ||
|
render(bmd:BitmapData):void
Renders the PerlinDisplacementEffect on to the specified BitmapData.
| PerlinDisplacementEffect | ||
| Constant | Defined by | ||
|---|---|---|---|
| DIRECTION : String = "direction" [static]
An option for the movement option on the displacement
This will move the displacement in the x,y direction specified by the speedX and speedY. | PerlinDisplacementEffect | ||
| ORBIT : String = "orbit" [static]
An option for the movement option on the displacement.
This will move the displacement in an orbit path along the radiusX and radiusY. Rotating in an x direction and y direction specified by the speedX and speedY. | PerlinDisplacementEffect | ||
| baseX | property |
public var baseX:int = 30
Frequency to use in the x direction.
For example, to generate a noise that is sized for a 64 x 128 image, pass the pixel width of 64 for the baseX value.
| baseY | property |
public var baseY:int = 40
Frequency to use in the y direction.
For example, to generate a noise that is sized for a 64 x 128 image, pass the pixel height of 128 for the baseY value.
| channelOptions | property |
public var channelOptions:uint = 1.0The Channels which are rendered with the perlin noise :
| fractalNoise | property |
public var fractalNoise:Boolean = falseIf the value is true, the method generates fractal noise; otherwise, it generates turbulence. An image with turbulence has visible discontinuities in the gradient that can make it better approximate sharper visual effects like flames and ocean waves.
| grayScale | property |
public var grayScale:Boolean = falseSets the perlin noise to render in grayscale.
| movement | property |
movement:String [write-only]
Sets the movement type which will be applied on the displacement
These options include :
public function set movement(value:String):void
| radiusX | property |
public var radiusX:Number = 3The radiusX in pixels to be applied on to the displacement when the movement type is ORBIT.
| radiusY | property |
public var radiusY:Number = 3The radiusY in pixels to be applied on to the displacement when the movement type is ORBIT.
| seed | property |
public var seed:int = 1The random seed number to generate the perlin noise.
| speedX | property |
public var speedX:Number = 0.01
The x speed direction the displacement is offsetted by on each render.
The direction depends on the movement type.
When the movement type is ORBIT it effects the speed of rotation in the x direction.
When the movement type is DIRECTION it effects the offset speed in the x direction.
| speedY | property |
public var speedY:Number = 0.01
The y speed direction the displacement is offsetted by on each render.
The direction depends on the movement type.
When the movement type is ORBIT it effects the speed of rotation in the y direction.
When the movement type is DIRECTION it effects the offset speed in the y direction.
| stitch | property |
public var stitch:Boolean = trueIf the value is true, the method attempts to smooth the transition edges of the image to create seamless textures for tiling as a bitmap fill.
| PerlinDisplacementEffect | () | constructor |
public function PerlinDisplacementEffect(width:int = 500, height:int = 500, scaleX:Number = 3, scaleY:Number = 3, octives:int = 2)Parameters
width:int (default = 500) — The width in pixels to render the perlin noise.
|
|
height:int (default = 500) — The height in pixels to render the perlin noise.
|
|
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.
|
|
octives:int (default = 2) — Number of octaves or individual noise functions to combine to create this noise.
|
| render | () | method |
public override function render(bmd:BitmapData):voidRenders the PerlinDisplacementEffect on to the specified BitmapData.
Parametersbmd:BitmapData |
| DIRECTION | constant |
public static const DIRECTION:String = "direction"
An option for the movement option on the displacement
This will move the displacement in the x,y direction specified by the speedX and speedY.
| ORBIT | constant |
public static const ORBIT:String = "orbit"
An option for the movement option on the displacement.
This will move the displacement in an orbit path along the radiusX and radiusY.
Rotating in an x direction and y direction specified by the speedX and speedY.