• Searches for a given component type in the given object.

    Type Parameters

    • T extends IComponent

    Parameters

    • obj: Object3D<Object3DEventMap>

      The object to search in.

    • componentType: Constructor<T>

      The type of the component to search for.

    Returns T | null

    The first component of the given type found in the given object.

    Example

    const myComponent = getComponent(myObject, MyComponent);
    

Generated using TypeDoc