Class: OutlineFilter

OutlineFilter

OutlineFilter, originally by mishaa http://www.html5gamedevs.com/topic/10640-outline-a-sprite-change-certain-colors/?p=69966 http://codepen.io/mishaa/pen/emGNRB
originalfilter

new OutlineFilter (thickness, color, quality)

Name Type Attributes Default Description
thickness number <optional>
1

The tickness of the outline. Make it 2 times more for resolution 2

color number <optional>
0x000000

The color of the outline.

quality number <optional>
0.1

The quality of the outline from 0 to 1, using a higher quality setting will result in slower performance and more accuracy.

See:

Example


  someSprite.filters = [new OutlineFilter(2, 0x99ff99)];

Extends

  • PIXI.Filter

Members

OutlineFilter.MAX_SAMPLES number static

The maximum number of samples for rendering outline.

Default Value:
  • 100

OutlineFilter.MIN_SAMPLES number static

The minimum number of samples for rendering outline.

Default Value:
  • 1

color number

The color of the glow.

Default Value:
  • 0x000000

thickness number

The thickness of the outline.

Default Value:
  • 1