PointLight

Home

A PointLight is an Urbject that implements the Light interface and shines at a defined location in 3D space with a linear drop off across all Trigons within a set radial distance, taking into account the normal difference of the Trigon from the direction that the light is originating from.

See also: Urbject, Light

Constructors

PointLight( ): PointLight Initializes with default attribute values.
PointLight( { radius?: number, position?: Vector, brightness?: number, color?: Color, state?: number, group?: number, superCopy?: Urbject } ): PointLight Initializes with the given values or default values if not provided. The default values are:

radius 10.0 The maximum radial distance that the light will reach.
position new Vector() the position of the light in 3D space. See also: Vector
brightness 1.0 The brightness of the light at its origin. Any value over 1 is considered "overexposed".
color new Color("WHITE") The color of the light. See also: Color
state Default from Urbject constructor See also: Urbject
group Default from Urbject constructor See also: Urbject
superCopy Default from Urbject constructor See also: Urbject

Variables

brightness: number The brightness of the light. Any value over 1 is considered "overexposed".
color: Color The color of the light. See also: Color
radius: number The maximum radial distance that the light will reach.

Functions

copy(options?: { shallow: boolean } ): PointLight Returns a copy of the PointLight. If shallow is true, the children of this Urbject will not be included in the copy.
getInstance(camera: Camera): FrameInstance Returns the FrameInstance of the Urbject with this light added. See also: Urbject, FrameInstance
intensityOn(t: Trigon): number Returns the intensity of the light on the given Trigon. The distance from the center of the Trigon and the orientation of the Trigon's normal vector are both used to calculate a variable intensity. See also: Trigon

Static Functions

PointLight.copy(l: PointLight, options?: { shallow: boolean } ): PointLight Returns a copy of the PointLight or a new PointLight from an Object with all of the necessary PointLight and Urbject public attributes. If shallow is true, the children of the Urbject will not be included in the copy.
PointLight.getInstance(l: PointLight, camera: Camera): FrameInstance Returns the FrameInstance of the given PointLight with its light added. See also: Urbject, FrameInstance
PointLight.intensityOn(l: PointLight, t: Trigon): number Returns the intensity of the light on the given Trigon. The distance from the center of the Trigon and the orientation of the Trigon's normal vector are both used to calculate a variable intensity. See also: Trigon

Home

Copyright © 2020 Trevor Richard