magic-pixels
    Preparing search index...

    Class PointLight

    Light radiating from a point in all directions, like a light bulb. Its position is the translation of the world matrix; its orientation is irrelevant. Intensity falls off with the square of the distance, so values are larger than for a directional light (a bulb a few units away needs an intensity of several).

    Hierarchy (View Summary)

    Index
    • Parameters

      • color: string | Color = '#ffffff'

        a Color or a hex string, white by default

      • intensity: number = 1

        multiplies the colour, 1 by default

      • range: number = 0

        distance beyond which the light contributes nothing; 0 (the default) means no cutoff, only the inverse-square falloff

      Returns PointLight

    children: Object3D[] = []
    color: Color

    the light's colour, used as linear RGB; the alpha channel is ignored

    intensity: number = 1

    multiplies the colour, 1 by default

    localMatrix: Mat4 = ...

    transform relative to the parent

    matrixAutoUpdate: boolean = true

    When true (the default), updateWorldMatrix() recomposes localMatrix from position, rotation and scale. Set to false to write localMatrix yourself; flag changes with worldMatrixNeedsUpdate.

    parent: Object3D | null = null
    position: Vector = ...

    translation relative to the parent

    quaternion: Quaternion = ...

    rotation relative to the parent, as a unit quaternion

    range: number = 0

    distance beyond which the light contributes nothing; 0 (the default) means no cutoff, only the inverse-square falloff

    rotation: Vector = ...

    rotation relative to the parent, as Euler angles in radians applied in XYZ order; kept in sync with quaternion

    scale: Vector = ...

    scale factors per axis

    visible: boolean = true

    invisible objects and their children are not rendered

    worldMatrix: Mat4 = ...

    transform relative to the scene root

    worldMatrixNeedsUpdate: boolean = false

    set to true after changing localMatrix manually

    • Rotate so that the object's +Z axis points at target. Cameras override this and point their -Z axis (the viewing direction) instead.

      Parameters

      • target: Vector

        a point in the parent's coordinate system

      • up: Vector = DEFAULT_UP

        the up direction, +Y by default

      Returns this

    • Recompose localMatrix from position, quaternion and scale, after bringing quaternion and rotation in sync (see the class description).

      Returns this

    • Update the world matrices of this object and its descendants.

      Parameters

      • force: boolean = false

        recompute even if nothing was flagged as changed

      Returns void