munum - v0.3.0
    Preparing search index...

    Function lookAtDir

    • Calculate the look-at direction Vec3 vector from pitch (up/down) and yaw (left/right) angles in radians. It looks towards -Z axis when pitch = 0 and yaw = 0. This can be used with lookAt method to build an FPS camera view matrix by: viewMatrix = lookAt(eye, lookAtDir(yaw, pitch).add(eye), new Vec3(0, 1, 0));

      Type Parameters

      • W extends TypedArray = Float64Array<ArrayBufferLike>

      Parameters

      • pitch: number
      • yaw: number
      • out: Vec3<W> = ...

      Returns Vec3<W>