ThreePipe
    Preparing search index...

    Interface ILight<TShadowSupport, TE>

    interface ILight<
        TShadowSupport extends LightShadow
        | undefined = LightShadow | undefined,
        TE extends IObject3DEventMap = IObject3DEventMap,
    > {
        _currentGeometry?:
            | null
            | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>;
        _currentMaterial?:
            | null
            | IMaterial<IMaterialEventMap>
            | IMaterial<IMaterialEventMap>[];
        _loadingPromise?: Promise<void>;
        _onGeometryUpdate?: EventListener2<
            "geometryUpdate",
            BufferGeometryEventMap,
            IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
        >;
        acceptChildEvents?: boolean;
        assetType: "light";
        autoUpgradeChildren?: boolean;
        boundingBox?: null | Box3;
        boundingSphere?: null | Sphere;
        children: IObject3D<IObject3DEventMap>[];
        geometry?: IGeometry<NormalBufferAttributes, BufferGeometryEventMap>;
        isCamera?: boolean;
        isLight: true;
        isLine?: boolean;
        isLine2?: boolean;
        isLineSegments?: boolean;
        isLineSegments2?: boolean;
        isMesh?: boolean;
        isMeshLine?: boolean;
        isScene?: boolean;
        isWidget?: boolean;
        lightObject: ILight<TShadowSupport, TE>;
        material?: IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[];
        materials?: IMaterial<IMaterialEventMap>[];
        modelObject: ILight<TShadowSupport, TE>;
        morphTargetDictionary?: Record<string, number>;
        morphTargetInfluences?: number[];
        objectProcessor?: IObjectProcessor;
        parent: null | IObject3D<IObject3DEventMap>;
        parentRoot?: null | IObject3D<IObject3DEventMap>;
        target?: Object3D<Object3DEventMap>;
        uiConfig?: UiObjectConfig<any, string, any>;
        userData: IObject3DUserData;
        add(...object: IObject3D<IObject3DEventMap>[]): this;
        autoCenter(setDirty?: boolean, undo?: boolean): this;
        autoScale(
            autoScaleRadius?: number,
            isCentered?: boolean,
            setDirty?: boolean,
            undo?: boolean,
        ): this;
        clone(recursive?: boolean): this;
        computeBoundingBox(): void;
        computeBoundingSphere(): void;
        computeLineDistances(): void;
        copy(
            source: this,
            recursive?: boolean,
            distanceFromTarget?: number,
            worldSpace?: boolean,
            ...args: any[],
        ): this;
        dispose(removeFromParent?: boolean): void;
        getObjectById<
            T extends IObject3D<IObject3DEventMap> = IObject3D<IObject3DEventMap>,
        >(
            id: number,
        ): undefined | T;
        getObjectByName<
            T extends IObject3D<IObject3DEventMap> = IObject3D<IObject3DEventMap>,
        >(
            name: string,
        ): undefined | T;
        getObjectByProperty<
            T extends IObject3D<IObject3DEventMap> = IObject3D<IObject3DEventMap>,
        >(
            name: string,
            value: string,
        ): undefined | T;
        pivotToBoundsCenter(setDirty?: boolean): () => void;
        pivotToPoint(point: Vector3, setDirty?: boolean): this;
        refreshUi(): void;
        remove(...object: IObject3D<IObject3DEventMap>[]): this;
        setDirty(e?: IObjectSetDirtyOptions): void;
        traverse(callback: (object: IObject3D) => void): void;
        traverseAncestors(callback: (object: IObject3D) => void): void;
        traverseVisible(callback: (object: IObject3D) => void): void;
        updateMorphTargets(): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    _currentGeometry?:
        | null
        | IGeometry<NormalBufferAttributes, BufferGeometryEventMap>
    _currentMaterial?:
        | null
        | IMaterial<IMaterialEventMap>
        | IMaterial<IMaterialEventMap>[]
    _loadingPromise?: Promise<void>

    A promise can be set by the object to indicate that the object is loading. This can be used by the scene, viewer, plugins to defer actions until the object is loaded.

    _onGeometryUpdate?: EventListener2<
        "geometryUpdate",
        BufferGeometryEventMap,
        IGeometry<NormalBufferAttributes, BufferGeometryEventMap>,
    >
    acceptChildEvents?: boolean

    Set to false to disable propagation of any events from its children.

    assetType: "light"
    autoUpgradeChildren?: boolean

    Set to false to disable automatic call of upgradeObject3D when a child is added.

    boundingBox?: null | Box3

    For InstancedMesh, SkinnedMesh etc

    boundingSphere?: null | Sphere

    For InstancedMesh, SkinnedMesh etc

    Array with object's children.

    THREE.Object3DGroup | Group for info on manually grouping objects.

    []

    isCamera?: boolean
    isLight: true

    Read-only flag to check if a given object is of type HemisphereLight.

    This is a constant value

    true

    isLine?: boolean
    isLine2?: boolean
    isLineSegments?: boolean
    isLineSegments2?: boolean
    isMesh?: boolean
    isMeshLine?: boolean
    isScene?: boolean
    isWidget?: boolean
    lightObject: ILight<TShadowSupport, TE>

    use this instead

    Same as material but always returns an array. To set, just set material property

    modelObject: ILight<TShadowSupport, TE>

    use object directly

    morphTargetDictionary?: Record<string, number>
    morphTargetInfluences?: number[]
    objectProcessor?: IObjectProcessor

    Object's parent in the scene graph.

    An object can have at most one parent.

    null

    parentRoot?: null | IObject3D<IObject3DEventMap>

    Parent/Ancestor of this object to bubble events to. This is set internally by setupObject3D.

    uiConfig?: UiObjectConfig<any, string, any>

    An object that can be used to store custom data about the Object3D.

    It should not hold references to functions as these will not be cloned.

    {}

    Methods

    • Moves the bounding box center of the object to the center of the world

      Parameters

      • OptionalsetDirty: boolean

        calls setDirty

      • Optionalundo: boolean

        undo any previous autoCenter operation

      Returns this

      true
      
    • Scales the object to fit the given radius.

      Parameters

      • OptionalautoScaleRadius: number

        optional (taken from userData.autoScaleRadius by default)

      • OptionalisCentered: boolean

        optional (taken from userData.isCentered by default)

      • OptionalsetDirty: boolean

        true by default

      • Optionalundo: boolean

        undo any previous autoScale operation

      Returns this

    • Returns a clone of this object and optionally all descendants.

      Parameters

      • Optionalrecursive: boolean

        If true, descendants of the object are also cloned. Default true

      Returns this

    • For InstancedMesh, SkinnedMesh etc Computes bounding box, updating .boundingBox attribute.

      Returns void

      Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

    • Copies value of all the properties from the source to this instance.

      Parameters

      • source: this
      • Optionalrecursive: boolean
      • OptionaldistanceFromTarget: number
      • OptionalworldSpace: boolean
      • ...args: any[]

      Returns this

    • Moves the object pivot to the center of the bounding box.

      The object will rotate around the new pivot.

      Parameters

      • OptionalsetDirty: boolean

        calls setDirty

      Returns () => void

      undo function

      true
      
    • Moves the object pivot to the given point

      The object will rotate around the new pivot.

      Parameters

      • point: Vector3

        point to move the pivot to

      • OptionalsetDirty: boolean

        calls setDirty

      Returns this

      undo function

      true
      
    • Executes the callback on this object and all descendants.

      Parameters

      • callback: (object: IObject3D) => void

        A function with as first argument an Object3D object.

      Returns void

      Note: Modifying the scene graph inside the callback is discouraged.