PIXI.filters.GodrayFilter
class GodrayFilter extends PIXI.Filter
GordayFilter, originally by Alain Galvan


displayObject.filters = [new GodrayFilter()];
Constructor
new PIXI.filters.GodrayFilter(options: object) → {}
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
| options | object |
<optional> |
Filter options |
|
| options.angle | number |
<optional> |
30 |
Angle/Light-source of the rays. |
| options.gain | number |
<optional> |
0.5 |
General intensity of the effect. |
| options.lacunarity | number |
<optional> |
2.5 |
The density of the fractal noise. |
| options.parallel | boolean |
<optional> |
true |
|
| options.time | number |
<optional> |
0 |
The current time position. |
| options.center | PIXI.Point | number<Array> |
<optional> |
[0,0] |
Focal point for non-parallel rays,
to use this |
| options.alpha | number |
<optional> |
1.0 |
the alpha, defaults to 1, affects transparency of rays |
Summary
Properties from GodrayFilter
| GodrayFilterOptions |
Default for constructior options. |
| number |
|
| number |
|
| number[] | PIXI.Point |
|
| number |
|
| number |
|
| boolean |
|
| number |
The current time. |
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
alpha: number = 1
The alpha (opacity) of the rays. 0 is fully transparent, 1 is fully opaque.
angle: number = 30
The angle/light-source of the rays in degrees. For instance, a value of 0 is vertical rays, values of 90 or -90 produce horizontal rays.
center: number[] | PIXI.Point
The position of the emitting point for light rays
only used if parallel is set to false.
gain: number = 0.5
General intensity of the effect. A value closer to 1 will produce a more intense effect, where a value closer to 0 will produce a subtler effect.
lacunarity: number = 2.5
The density of the fractal noise. A higher amount produces more rays and a smaller amound produces fewer waves.
parallel: boolean = true
true if light rays are parallel (uses angle),
false to use the focal center point