LensFlare.Flare Class

Module: Misc

LensFlare Flare constructor.

A flare is composed by a texture, size, distance, blending mode, color and opacity level.

Item Index

Methods

add

(
  • texture
  • size
  • distance
  • blending
  • color
  • opacity
)

Add texture to the lensFlare object.

Parameters:

  • texture Texture

    Texture to be used for the new layer.

  • size Number

    Size in pixels (-1 = use texture.width)

  • distance Number

    Distance (0-1) from light source (0=at light source)

  • blending Number

    Blending mode to be used.

  • color Color

    Texture color

  • opacity Number

    Texture opacity

copy

(
  • source
)
LensFlare

Copy lensflare object data to this.

Parameters:

Returns:

LensFlare:

Self for chaining.

toJSON

(
  • meta
)
Object

Serialize lensflare data to json.

Parameters:

  • meta Object

    Metadata.

Returns:

Object:

Serialized data.

updateLensFlares

()

Update lens flares update positions on all flares based on the screen position Set myLensFlare.customUpdateCallback to alter the flares in your project specific way.