math docs
    Preparing search index...

    Variable fromVec3Const

    fromVec3: (
        out: spherical.Spherical,
        v: readonly [number, number, number],
    ) => spherical.Spherical = setFromVec3

    Type Declaration

      • (
            out: spherical.Spherical,
            v: readonly [number, number, number],
        ): spherical.Spherical
      • 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

    setFromVec3