Class: GlowFilter

GlowFilter

GlowFilter, originally by mishaa codepen.
originalfilter

new GlowFilter (options)

Name Type Attributes Default Description
options number <optional>

Options for glow.

options.distance number <optional>
10

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

options.outerStrength number <optional>
4

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

options.innerStrength number <optional>
0

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

options.color number <optional>
0xffffff

The color of the glow.

options.quality number <optional>
0.1

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

options.knockout boolean <optional>
false

Toggle to hide the contents and only show glow.

See:

Example


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

Extends

  • PIXI.Filter

Members

GlowFilter.defaults GlowFilterOptions staticreadonly

Default values for options.

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