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 (options)

Name Type Attributes Description
options OutlineFilterOptions <optional>

Options for the OutlineFilter constructor.

Example

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

Extends

  • Filter *

Members

DEFAULT_OPTIONS OutlineFilterOptions staticreadonly

Default values for options.

MAX_SAMPLES number static

The maximum number of samples for rendering outline.

Default Value:
  • 100

MIN_SAMPLES number static

The minimum number of samples for rendering outline.

Default Value:
  • 1

alpha number

Coefficient for alpha multiplication

Default Value:
  • 1

color ColorSource

The color value of the ambient color

Default Value:
  • 0x000000
Example
[1.0, 1.0, 1.0] = 0xffffff

knockout boolean

Whether to only render outline, not the contents.

Default Value:
  • false

quality number

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

Default Value:
  • 0.1

thickness number

The thickness of the outline

Default Value:
  • 1