PIXI.filters.SimpleLightmapFilter
class SimpleLightmapFilter extends PIXI.Filter
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.
displayObject.filters = [new SimpleLightmapFilter(texture, 0x666666)];
Constructor
new PIXI.filters.SimpleLightmapFilter(texture: PIXI.Texture, color: Array<number> | number, alpha: number) → {}
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). |
Summary
Properties from SimpleLightmapFilter
number |
When setting |
Array<number> | number |
|
PIXI.Texture |
|
Properties inherited from Filter
boolean |
|
PIXI.BLEND_MODES |
|
boolean |
If enabled is true the filter is applied, if false it will not. |
boolean |
|
PIXI.MSAA_QUALITY |
The samples of the filter. |
number |
|
number |
|
PIXI.State |
The WebGL state the filter requires to render. |
Properties inherited from Shader
PIXI.Program |
Program that the shader uses. |
Dict<any> |
|
Public Properties
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