Class: GodrayFilter

PIXI.filters~GodrayFilter

GordayFilter, originally by Alain Galvan

originalfilter

new GodrayFilter (options)

Name Type Description
options object optional

Filter options

Name Type Default Description
angle number 30 optional

Angle/Light-source of the rays.

gain number 0.5 optional

General intensity of the effect.

lacunrity number 2.5 optional

The density of the fractal noise.

parallel boolean true optional

true to use angle, false to use center

time number 0 optional

The current time position.

center PIXI.Point | Array.<number> [0,0] optional

Focal point for non-parallel rays, to use this parallel must be set to false.

alpha number 1.0 optional

the alpha, defaults to 1, affects transparency of rays

See:
Example
displayObject.filters = [new GodrayFilter()];

Extends

  • PIXI.Filter

Members

alpha number

The alpha (opacity) of the rays. 0 is fully transparent, 1 is fully opaque

Default Value:
  • 1

angle number

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.

Default Value:
  • 30

center PIXI.Point | Array.<number>

The position of the emitting point for light rays only used if parallel is set to false.

Default Value:
  • [0, 0]

gain number

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.

Default Value:
  • 0.5

lacunarity number

The density of the fractal noise. A higher amount produces more rays and a smaller amound produces fewer waves.

Default Value:
  • 2.5

parallel boolean

true if light rays are parallel (uses angle), false to use the focal center point

Default Value:
  • true

time number

The current time.

Default Value:
  • 0