Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ShadowCastingLight

Contains the required components used for rendering a shadow casted by a light.

Hierarchy

  • ShadowCastingLight

Index

Constructors

constructor

Properties

Optional camera

camera?: Camera

The camera to follow when using directional lights.

followCamera

followCamera: boolean = true

Value indicating if the shadow should follow the specified camera. If the camera is not set, the main camera will be used as default. Only available when using directional lights.

light

light: Light

renderer

renderer: Renderer

shadowArea

shadowArea: number = 50

The area in units of the shadow when using directional lights. Reducing the area will improve the quality of the shadow.

softness

softness: number = 0

The softness of the edges for the shadow.

Accessors

filterTexture

  • get filterTexture(): RenderTexture

lightViewProjection

  • get lightViewProjection(): Float32Array

shadowTexture

  • get shadowTexture(): RenderTexture

Methods

clear

  • clear(): void

destroy

  • destroy(): void

updateLightViewProjection

  • updateLightViewProjection(): void

Static isHighQualitySupported

  • isHighQualitySupported(renderer: Renderer): boolean
  • Returns a value indicating if high quality (32-bit precision) shadows is supported by current platform.

    Parameters

    • renderer: Renderer

      The renderer to use.

    Returns boolean

Static isMediumQualitySupported

  • isMediumQualitySupported(renderer: Renderer): boolean
  • Returns a value indicating if medium quality (16-bit precision) shadows is supported by current platform.

    Parameters

    • renderer: Renderer

      The renderer to use.

    Returns boolean

Generated using TypeDoc