Small World Engine API Reference - v0.46.1
    Preparing search index...

    Class DirectionalLight

    Directional light that emits light in a specific direction.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    behaviors: Behavior[] = []
    bounds: BoundingVolume | undefined = undefined
    cascadeCameras: Camera[] = []

    The shadow cameras for each cascade.

    cascadeSplitLambda: number

    Ratio between uniform and logarithmic split.

    cascadeSplits: number[] = []

    The far depth split distances for each cascade.

    castShadow: boolean

    Whether the light casts shadows.

    children: Object3D[] = []
    color: Color

    The color of the light.

    direction: Vector3D

    The direction of the light.

    frustumCulled: boolean = true
    geometry: GeometryDataInterface | undefined = undefined
    inFrustum: boolean = true
    intensity: number

    The intensity of the light.

    isPickable: boolean = false
    isStatic: boolean = false
    isVisible: boolean = true
    localMatrix: Matrix4 = ...
    material: AbstractMaterial | undefined = undefined
    name: string = ""
    numCascades: number

    Number of shadow cascades.

    onPointerClick?: () => void
    onPointerDown?: (ray: Ray, intersectionPoint: Vector3D) => void
    onPointerEnter?: () => void
    onPointerLeave?: () => void
    onPointerMove?: (ray: Ray) => void
    onPointerUp?: () => void
    parent: Object3D | undefined = undefined
    position: Vector3D = ...
    receiveShadow: boolean = false
    rotation: Vector3D = ...
    scale: Vector3D = ...
    shadowBias: number

    A small offset to prevent shadow acne.

    shadowCamera: Camera | undefined

    The camera used to render the shadow map for this light.

    shadowNormalBias: number

    An offset along the surface normal to prevent shadow acne.

    shadowResolution: number

    The resolution of the shadow map for this light.

    type: LightType = LightType.DIRECTIONAL

    The type of the light.

    uuid: string = ...
    worldMatrix: Matrix4 = ...

    Methods