PIXI.filters.GlowFilter

class GlowFilter extends PIXI.Filter

GlowFilter, originally by mishaa codepen.
originalfilter


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

Constructor


new PIXI.filters.GlowFilter(options: number) → {}
Parameters:
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.

Summary


Properties from GlowFilter

GlowFilterOptions
static defaults

Default values for options.

number
color = 0xFFFFFF
number
innerStrength = 0
boolean
knockout = false
number
outerStrength = 4

Properties inherited from Filter

boolean
autoFit = true
PIXI.BLEND_MODES
blendMode = PIXI.BLEND_MODES.NORMAL
boolean
enabled

If enabled is true the filter is applied, if false it will not.

boolean
legacy
PIXI.MSAA_QUALITY
multisample

The samples of the filter.

number
padding
number
resolution
PIXI.State
state

The WebGL state the filter requires to render.

Properties inherited from Shader

PIXI.Program
program

Program that the shader uses.

Dict<any>
uniforms

Methods inherited from Filter

void
apply(filterManager: PIXI.FilterSystem, input: PIXI.RenderTexture, output: PIXI.RenderTexture, clearMode: PIXI.CLEAR_MODES, _currentState: object)

Public Properties


defaults GlowFilter.ts:33
static defaults: GlowFilterOptions

Default values for options.

color GlowFilter.ts:81
color: number = 0xFFFFFF

The color of the glow.

innerStrength GlowFilter.ts:107
innerStrength: number = 0

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

knockout GlowFilter.ts:120
knockout: boolean = false

Only draw the glow, not the texture itself

outerStrength GlowFilter.ts:94
outerStrength: number = 4

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


Powered by webdoc!