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.

originalfilter


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

Constructor


new PIXI.filters.SimpleLightmapFilter(texture: PIXI.Texture, color: Array<number> | number, alpha: number) → {}
Parameters:
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
alpha

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

Array<number> | number
color
PIXI.Texture
texture

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

Public Properties


alpha SimpleLightmapFilter.ts:103
alpha: number

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

color SimpleLightmapFilter.ts:76
color: Array<number> | number

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

texture SimpleLightmapFilter.ts:63
texture: PIXI.Texture

a texture where your lightmap is rendered


Powered by webdoc!