This is a modified version of FlxWaveSprite by Tim Hely
Constructor
new(?Mode:FlxWaveMode, Strength:Int = 10, Center:Float = 0.5, Speed:Float = 3, Wavelength:Int = 5, ?Direction:FlxWaveDirection, InterlaceOffset:Float = 0)
Creates a new FlxEffectWave, which applies a wave-distortion effect.
Parameters:
Mode | Which Mode you would like to use for the effect. ALL = applies a constant distortion throughout the image, END = makes the effect get stronger towards the bottom of the image, and START = the reverse of END. |
---|---|
Strength | How strong you want the effect. |
Center | The 'center' of the effect when using END or START modes. Anything before(END)/after(START) this point on the image will have no distortion effect. Ratio based on the bitmapData size. |
Speed | How fast you want the effect to move. Higher values = faster. |
Wavelength | How long waves are. |
Direction | Which Direction you want the effect to be applied (HORIZONTAL or VERTICAL). |
InterlaceOffset | The wave ratio to offset every odd line of the bitmapData. Must be a value between 0 and 1; |
Variables
center:Float
The 'center' of our sprite (where the wave effect should start/end). Ratio based on the bitmapData size.
interlaceOffset:Float
The wave ratio to offset every odd line of the BitmapData
. Must be a value between 0 and 1.
2.1.0
.