Class: Light

PIXI.lights.Light

Base light class.

new PIXI.lights.Light (color, brightness, material, vertices, indices)

Name Type Attributes Default Description
color number <optional>
0xFFFFFF

The color of the light.

brightness number <optional>
1

The brightness of the light, in range [0, 1].

material PIXI.lights.LightShader <optional>
vertices Float32Array <optional>
indices Uint16Array <optional>

Extends

  • PIXI.Mesh

Members

brightness number

Brightness

color number

The color of the lighting.

falloff Array<number>

Falloff

falloff Array<number>

The falloff attenuation coeficients.

Default Value:
  • [0.75, 3, 20]

lastLayer PIXI.layers.Layer

Last layer

Default Value:
  • undefined

lightHeight number

Light height

lightHeight number

The height of the light from the viewport.

Default Value:
  • 0.075

shaderName string | null

Shader name

Default Value:
  • undefined

useViewportQuad boolean readonly

Use Viewport Quad

useViewportQuad boolean

By default the light uses a viewport sized quad as the mesh.

Methods

syncShader (renderer) void

Sync Shader

Name Type Description
renderer PIXI.Renderer

Renderer