mikaxyz/elm-gltf/2.0.0

NOTE: the latest version is 5.0.0

Gltf.Camera

A camera’s projection as defined in the glTF specification.

type alias Camera =
{ name : Maybe String
, index : Index
, projection : Projection
}
type Index
= Index Int

Use this to get a cameraByIndex

= Perspective PerspectiveCamera
| Orthographic OrthographicCamera

Specifies if the camera uses a perspective or orthographic projection.

type alias OrthographicCamera =
{ xMag : Float
, yMag : Float
, zFar : Float
, zNear : Float
}

An orthographic camera containing properties to create an orthographic projection matrix.

type alias PerspectiveCamera =
{ yFov : Float
, zNear : Float
, aspectRatio : Maybe Float
, zFar : Maybe Float
}

A perspective camera containing properties to create a perspective projection matrix.