Class: SimpleLightmapFilter

SimpleLightmapFilter

SimpleLightmap, originally by Oza94 http://www.html5gamedevs.com/topic/20027-pixijs-simple-lightmapping/ http://codepen.io/Oza94/pen/EPoRxj

You have to specify filterArea, or suffer consequences. You may have to use it with filter.dontFit = true, until we rewrite this using same approach as for DisplacementFilter.

originalfilter

new SimpleLightmapFilter (texture, color, alpha)

Name Type Attributes Default Description
texture PIXI.Texture

a texture where your lightmap is rendered

color Array<number> | number <optional>
0x000000

An RGBA array of the ambient color

alpha number <optional>
1

Default alpha set independent of color (if it's a number, not array).

See:

Example


  displayObject.filters = [new SimpleLightmapFilter(texture, 0x666666)];

Extends

  • PIXI.Filter

Members

alpha number

When setting color as hex, this can be used to set alpha independently.

color Array<number> | number

An RGBA array of the ambient color or a hex color without alpha

texture PIXI.Texture

a texture where your lightmap is rendered