A positional light source within a View.

Hierarchy (View Summary)

Constructors

Properties

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
id: string

ID of this PointLight, unique within the View.

view: View

The View to which this PointLight belongs.

Accessors

  • get constantAttenuation(): number
  • Gets the constant attenuation factor for this PointLight.

    Default value is 0.

    Returns number

    The constant attenuation factor.

  • set constantAttenuation(value: number): void
  • Sets the constant attenuation factor for this PointLight.

    Default value is 0.

    Parameters

    • value: number

      The constant attenuation factor.

    Returns void

  • get intensity(): number
  • Gets the intensity of this PointLight.

    Default value is 1.0 for maximum intensity.

    Returns number

    The PointLight's intensity.

  • set intensity(intensity: number): void
  • Sets the intensity of this PointLight.

    Default intensity is 1.0 for maximum intensity.

    Parameters

    • intensity: number

      The PointLight's intensity

    Returns void

  • get linearAttenuation(): number
  • Gets the linear attenuation factor for this PointLight.

    Default value is 0.

    Returns number

    The linear attenuation factor.

  • set linearAttenuation(value: number): void
  • Sets the linear attenuation factor for this PointLight.

    Default value is 0.

    Parameters

    • value: number

      The linear attenuation factor.

    Returns void

  • get quadraticAttenuation(): number
  • Gets the quadratic attenuation factor for this PointLight.

    Default value is 0.

    Returns number

    The quadratic attenuation factor.

  • set quadraticAttenuation(value: number): void
  • Sets the quadratic attenuation factor for this PointLight.

    Default value is 0.

    Parameters

    • value: number

      The quadratic attenuation factor.

    Returns void

Methods

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.