Skip to main content

ConeLightComponent

Emits light restricted to a directional angular wedge, cutting through any DarknessComponent veil.

Hierarchy

Index

Constructors

constructor

Properties

publicangle

angle: number

publiccolor

color: Color

publiccurrentIntensity

currentIntensity: number

Runtime intensity after flicker calculations are applied, written by the FlickerSystem

optionalreadonlyinheriteddependencies

dependencies?: ComponentCtor<Component>[]

Optionally list any component types this component depends on If the owner entity does not have these components, new components will be added to the entity

Only components with zero-arg constructors are supported as automatic component dependencies

publicdirection

direction: number

publicenabled

enabled: boolean

publicoptionalflicker

flicker?: FlickerOptions

publicintensity

intensity: number

inheritedowner

owner: Entity<any> | null = null

Current owning Entity, if any, of this component. Null if not added to any Entity

publicradius

radius: number

publicsoftness

softness: number

Methods

inheritedclone

  • Clones any properties on this component, if that property value has a clone() method it will be called


    Returns Component

inheriteddeserialize

  • deserialize(data: Record<string, any>): void
  • Parameters

    • data: Record<string, any>

    Returns void

optionalinheritedonAdd

  • Optional callback called when a component is added to an entity


    Parameters

    Returns void

optionalinheritedonRemove

  • onRemove(previousOwner: Entity): void
  • Optional callback called when a component is removed from an entity


    Parameters

    Returns void

inheritedserialize

  • serialize(): Record<string, any>
  • Returns Record<string, any>

inheritedtoJSON

  • toJSON(pretty?: boolean): string
  • Parameters

    • pretty: boolean = false

    Returns string