Class: GlowFilter

PIXI.filters~GlowFilter

GlowFilter, originally by mishaa codepen.
originalfilter

new GlowFilter (options)

Name Type Description
options number optional

Options for glow.

Name Type Default Description
distance number 10 optional

The distance of the glow. Make it 2 times more for resolution=2. It can't be changed after filter creation.

outerStrength number 4 optional

The strength of the glow outward from the edge of the sprite.

innerStrength number 0 optional

The strength of the glow inward from the edge of the sprite.

color number 0xffffff optional

The color of the glow.

quality number 0.1 optional

A number between 0 and 1 that describes the quality of the glow. The higher the number the less performant.

knockout boolean false optional

Toggle to hide the contents and only show glow.

See:
Example
someSprite.filters = [
     new GlowFilter({ distance: 15, outerStrength: 2 })
 ];

Extends

  • PIXI.Filter

Members

color number

The color of the glow.

Default Value:
  • 0xFFFFFF

innerStrength number

The strength of the glow inward from the edge of the sprite.

Default Value:
  • 0

knockout boolean

Only draw the glow, not the texture itself

Default Value:
  • false

outerStrength number

The strength of the glow outward from the edge of the sprite.

Default Value:
  • 4