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

    Class AmbientLight

    Ambient light that illuminates all objects in the scene equally.

    Hierarchy (View Summary)

    Index
    behaviors: Behavior[] = []
    bounds: BoundingVolume | undefined = undefined

    The physical bounding volume of the object.

    castShadow: boolean

    Whether the light casts shadows.

    children: Object3D[] = []
    color: Color

    The color of the light.

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

    The intensity of the light.

    isCollidable: boolean = true

    Whether this object should generate bounds and participate in physics/raycasting. Defaults to true.

    isPickable: boolean = false
    isStatic: boolean = false
    isVisible: boolean = true
    localMatrix: Matrix4 = ...
    material: AbstractMaterial | undefined = undefined
    name: string = ""
    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
    rigidBody?: RigidBody
    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.

    tag?: string

    Optional app-defined category tag, for typed identification instead of matching on name.

    type: LightType = LightType.AMBIENT

    The type of the light.

    uuid: string = ...
    worldMatrix: Matrix4 = ...
    • Reads this object's position in world space, i.e. after resolving the full parent chain -- unlike position, which is always local to its immediate parent. Requires worldMatrix to be current (see updateMatrixWorld()).

      Parameters

      • out: Vector3D = ...

        Optional vector to write into, to avoid allocating one per call.

      Returns Vector3D