math docs
    Preparing search index...

    Function setFromVec3

    • Sets a Spherical from Cartesian Vec3 coordinates (Three.js / OpenGL convention): r = sqrt(x² + y² + z²) theta = atan2(x, z) (azimuthal angle in XZ plane from +Z) phi = acos(y / r) (polar angle from +Y)

      Parameters

      • out: spherical.Spherical

        the receiving Spherical

      • v: readonly [number, number, number]

        the source Vec3

      Returns spherical.Spherical

      out