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

    Type Parameters

    Parameters

    • obj: Object3D

      The object to search in.

    • componentType: Constructor<T>

      The type of the component to search for.

    Returns null | T

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

    const myComponent = getComponent(myObject, MyComponent);
    
MMNEPVFCICPMFPCPTTAAATR