Ambient light component

AmbientLight

2024.1.31

yisky

Hierarchy (view full)

Constructors

Properties

_awoken: boolean = false
_enabled: boolean = false
entity: Entity
userData: {
    [key: string]: any;
}

Component user data

Component

Accessors

  • set color(value): void
  • Set color

    Parameters

    • value: ColorRepresentation

    Returns void

    AmbientLight

  • get enabled(): boolean
  • Indicates whether the component is enabled.

    Returns boolean

    Component

  • set enabled(value): void
  • Set whether the component is enabled.

    Parameters

    • value: boolean

    Returns void

    Component

  • set intensity(value): void
  • Set intensity

    Parameters

    • value: number

    Returns void

    AmbientLight

  • get light(): AmbientLight
  • Get three.js AmbientLight

    Returns AmbientLight

    AmbientLight

  • get scene(): Scene
  • Scene own the component

    Returns Scene

    Component

Methods

  • Protected

    Awake component callback

    Returns void

    Component

  • Protected

    Destroy callback

    Returns void

    AmbientLight

  • Protected

    Disable callback

    Returns void

    AmbientLight

  • Protected

    Enable callback

    Returns void

    AmbientLight

  • Destroy component

    Returns void

    Component

  • Clear subscribers

    Returns void

    EventDispatcher

  • Emit event

    Parameters

    • event: {
          type: string;
          [key: string]: any;
      }
      • [key: string]: any
      • type: string

    Returns void

    EventDispatcher

  • Unsubscribe a event, if the callback param is not defined, all subscribers of this type will be removed.

    Parameters

    Returns void

    EventDispatcher

  • Subscribe a event

    Parameters

    • type: string

      event type

    • callback: SubscriberCallbackFn

      callback functions

    • Optionaloptions: {
          priority?: Priority;
          target?: any;
      } = {}

      options

      • Optionalpriority?: Priority
      • Optionaltarget?: any

    Returns void

    EventDispatcher

  • Subscribe a event, just emit once

    Parameters

    Returns void

    EventDispatcher