PIXI.filters.ReflectionFilter
class ReflectionFilter extends PIXI.Filter
Applies a reflection effect to simulate the reflection on water with waves.
Constructor
new PIXI.filters.ReflectionFilter(options: object) → {}
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options | object |
<optional> |
The optional parameters of Reflection effect. |
|
options.mirror | number |
<optional> |
true |
|
options.boundary | number |
<optional> |
0.5 |
Vertical position of the reflection point, default is 50% (middle) smaller numbers produce a larger reflection, larger numbers produce a smaller reflection. |
options.amplitude | number |
<optional> |
[0, 20] |
Starting and ending amplitude of waves |
options.waveLength | number |
<optional> |
[30, 100] |
Starting and ending length of waves |
options.alpha | number |
<optional> |
[1, 1] |
Starting and ending alpha values |
options.time | number |
<optional> |
0 |
Time for animating position of waves |
Summary
Properties from ReflectionFilter
ReflectionFilterOptions |
Default constructor options |
Array<number> |
|
Array<number> |
|
number |
|
boolean |
|
number |
Time for animating position of waves |
Array<number> |
|
Properties inherited from Filter
boolean |
|
PIXI.BLEND_MODES |
|
boolean |
If enabled is true the filter is applied, if false it will not. |
boolean |
|
PIXI.MSAA_QUALITY |
The samples of the filter. |
number |
|
number |
|
PIXI.State |
The WebGL state the filter requires to render. |
Properties inherited from Shader
PIXI.Program |
Program that the shader uses. |
Dict<any> |
|
Public Properties
static defaults: ReflectionFilterOptions
Default constructor options
amplitude: Array<number> = [0, 20]
Starting and ending amplitude of waves
boundary: number = 0.5
Vertical position of the reflection point, default is 50% (middle) smaller numbers produce a larger reflection, larger numbers produce a smaller reflection.
mirror: boolean = true
true
to reflect the image, false
for waves-only
waveLength: Array<number> = [30, 100]
Starting and ending length of waves