threejs-worldgen
    Preparing search index...

    Function raySphere

    • Ray–sphere intersection (sphere at the origin). Uses the closest-approach form, which stays accurate when the ray starts very far away.

      Parameters

      Returns [number, number] | null

      [near, far] distances along the ray, or null on a miss.