API

Function createDirectionalLight

  • Creates a directional light shining along direction (a parallel light source, like the sun).

    Parameters

    • direction: [number, number, number]

      World-space direction the light travels along.

    • intensity: number = 1

      Scalar multiplier applied to the light's diffuse and specular contribution.

    Returns DirectionalLight

    Plain DirectionalLight data to be added to a scene via addToScene.