API

Function computePointerVisual

  • Pure geometry for the laser + cursor given a ray and a hit distance. Separated from mesh mutation so it is unit-testable without a GPU device.

    Parameters

    • origin: readonly [number, number, number]

      Ray origin (world).

    • forward: readonly [number, number, number]

      Unit ray direction (world) — the converted target ray's +Z axis.

    • hitDistance: number

      Distance to the hit, or a value < 0 / non-finite for a miss.

    • maxLength: number

      Beam length used when there is no hit.

    Returns PointerVisual