API

Function CreateHotSpotFromCamera

  • Generates a HotSpot from a camera by computing its spherical coordinates (alpha, beta, radius) relative to a target point.

    The target point is determined using the camera's forward ray:

    • If the ray intersects with a mesh in the model, the intersection point is used as the target.
    • If no intersection is found, a fallback target is calculated by projecting the distance between the camera and the model's center along the camera's forward direction.

    Parameters

    • model: any

      The reference model used to determine the target point.

    • camera: Camera

      The camera from which the HotSpot is generated.

    Returns Promise<any>

    A HotSpot object.