gltf-loader-0.3.0.0: High level GlTF loader
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.GLTF.Loader.Gltf

Synopsis

Data constructors

data Gltf Source #

The root data type for a glTF asset

Instances

Instances details
Show Gltf Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

showsPrec :: Int -> Gltf -> ShowS #

show :: Gltf -> String #

showList :: [Gltf] -> ShowS #

Eq Gltf Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Gltf -> Gltf -> Bool #

(/=) :: Gltf -> Gltf -> Bool #

data Asset Source #

Metadata about the glTF asset

Constructors

Asset 

Fields

Instances

Instances details
Show Asset Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

showsPrec :: Int -> Asset -> ShowS #

show :: Asset -> String #

showList :: [Asset] -> ShowS #

Eq Asset Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Asset -> Asset -> Bool #

(/=) :: Asset -> Asset -> Bool #

data Image Source #

Image data used to create a texture.

Constructors

Image 

Fields

Instances

Instances details
Show Image Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

showsPrec :: Int -> Image -> ShowS #

show :: Image -> String #

showList :: [Image] -> ShowS #

Eq Image Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

data MagFilter Source #

Magnification filter.

Constructors

MagLinear 
MagNearest 

data Material Source #

The material appearance of a primitive

Constructors

Material 

Fields

Instances

Instances details
Show Material Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Eq Material Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

data MaterialAlphaMode Source #

Alpha rendering mode of a material

Constructors

Blend

The alpha value is used to composite the source and destination areas.

Mask

The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alphaCutoff value.

Opaque

The alpha value is ignored, and the rendered output is fully opaque.

data Mesh Source #

A set of primitives to be rendered

Constructors

Mesh 

Fields

Instances

Instances details
Show Mesh Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

showsPrec :: Int -> Mesh -> ShowS #

show :: Mesh -> String #

showList :: [Mesh] -> ShowS #

Eq Mesh Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Mesh -> Mesh -> Bool #

(/=) :: Mesh -> Mesh -> Bool #

data Node Source #

A node in the node hierarchy

Constructors

Node 

Fields

Instances

Instances details
Show Node Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

Eq Node Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

data MeshPrimitive Source #

Geometry to be rendered with the given material

Constructors

MeshPrimitive 

Fields

Instances

Instances details
Show MeshPrimitive Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Eq MeshPrimitive Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

data PbrMetallicRoughness Source #

A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.

Constructors

PbrMetallicRoughness 

Fields

data Sampler Source #

Texture sampler properties for filtering and wrapping modes.

Constructors

Sampler 

Fields

Instances

Instances details
Show Sampler Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Eq Sampler Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Sampler -> Sampler -> Bool #

(/=) :: Sampler -> Sampler -> Bool #

data Texture Source #

A texture and its sampler.

Constructors

Texture 

Fields

Instances

Instances details
Show Texture Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Eq Texture Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Methods

(==) :: Texture -> Texture -> Bool #

(/=) :: Texture -> Texture -> Bool #

data TextureInfo Source #

Reference to a texture.

Constructors

TextureInfo 

Fields

  • textureId :: Int

    The index of the texture.

  • textureTexCoord :: Int

    This integer value is used to construct a string in the format TEXCOORD_set_index which is a reference to a key in mesh.primitives.attributes (e.g. a value of 0 corresponds to TEXCOORD_0).

Instances

Instances details
Show TextureInfo Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Eq TextureInfo Source # 
Instance details

Defined in Text.GLTF.Loader.Gltf

Lenses

Top-level Gltf Lenses

_asset :: Lens' Gltf Asset Source #

Metadata about the glTF asset

_images :: Lens' Gltf (Vector Image) Source #

A Vector of Images. An Image defines data used to create a texture.

_materials :: Lens' Gltf (Vector Material) Source #

A Vector of Materials. A Material defines the appearance of a primitive.

_meshes :: Lens' Gltf (Vector Mesh) Source #

A Vector of Meshes. A Mesh is a set of primitives to be rendered.

_nodes :: Lens' Gltf (Vector Node) Source #

A Vector of Nodes in the hierarchy.

_samplers :: Lens' Gltf (Vector Sampler) Source #

A Vector of Texture Samplers. Texture Sampler defines properties for filtering and wrapping modes.

_textures :: Lens' Gltf (Vector Texture) Source #

A texture and its sampler.

Asset Lenses

_assetVersion :: Lens' Asset Text Source #

The glTF version that this asset targets.

_assetCopyright :: Lens' Asset (Maybe Text) Source #

A copyright message suitable for display to credit the content creator.

_assetGenerator :: Lens' Asset (Maybe Text) Source #

Tool that generated this glTF model.

_assetMinVersion :: Lens' Asset (Maybe Text) Source #

The minimum glTF version that this asset targets

Image Lenses

_imageData :: Lens' Image (Maybe ByteString) Source #

The binary data of the image

_imageMimeType :: Lens' Image Text Source #

The image’s media type.

_imageName :: Lens' Image (Maybe Text) Source #

The user-defined name of this object.

Material Lenses

_materialAlphaCutoff :: Lens' Material Float Source #

Specifies the cutoff threshold when in MASK alpha mode.

_materialAlphaMode :: Lens' Material MaterialAlphaMode Source #

The material's alpha rendering mode enumeration specifying the interpretation of the alpha value of the base color.

_materialDoubleSided :: Lens' Material Bool Source #

Specifies whether the material is double sided.

_materialEmissiveFactor :: Lens' Material (V3 Float) Source #

The factors for the emissive color of the material.

_materialName :: Lens' Material (Maybe Text) Source #

The user-defined name of this object.

_materialPbrMetallicRoughness :: Lens' Material (Maybe PbrMetallicRoughness) Source #

Metallic roughness Physically Based Rendering (PBR) methodology parameter values.

Mesh Lenses

_meshPrimitives :: Lens' Mesh (Vector MeshPrimitive) Source #

A Vector of primitives, each defining geometry to be rendered.

_meshWeights :: Lens' Mesh (Vector Float) Source #

A Vector of weights to be applied to the morph targets.

_meshName :: Lens' Mesh (Maybe Text) Source #

The user-defined name of this object.

Node Lenses

_nodeChildren :: Lens' Node (Vector Int) Source #

The indices of this node's children.

_nodeMeshId :: Lens' Node (Maybe Int) Source #

The index of the mesh in this node.

_nodeName :: Lens' Node (Maybe Text) Source #

The user-defined name of this object.

_nodeRotation :: Lens' Node (Maybe (V4 Float)) Source #

The node's unit quaternion rotation.

_nodeScale :: Lens' Node (Maybe (V3 Float)) Source #

The node's non-uniform scale

_nodeTranslation :: Lens' Node (Maybe (V3 Float)) Source #

The node's translation along the x, y, and z axes.

_nodeWeights :: Lens' Node [Float] Source #

The weights of the instantiated morph target.

Sampler Lenses

_samplerName :: Lens' Sampler (Maybe Text) Source #

The user-defined name of this object.

Texture Lenses

_textureName :: Lens' Texture (Maybe Text) Source #

The user-defined name of this object.

_textureSamplerId :: Lens' Texture (Maybe Int) Source #

The index of the sampler used by this texture.

_textureSourceId :: Lens' Texture (Maybe Int) Source #

The index of the image used by this texture.

MeshPrimitive Lenses

_meshPrimitiveMaterial :: Lens' MeshPrimitive (Maybe Int) Source #

The index of the material to apply to this primitive when rendering.

_meshPrimitiveMode :: Lens' MeshPrimitive MeshPrimitiveMode Source #

The topology type of primitives to render.

_meshPrimitiveNormals :: Lens' MeshPrimitive (Vector (V3 Float)) Source #

A Vector of vertex normals.

_meshPrimitivePositions :: Lens' MeshPrimitive (Vector (V3 Float)) Source #

A Vector of vertex positions.

PbrMetallicRoughness Lenses

_pbrBaseColorFactor :: Lens' PbrMetallicRoughness (V4 Float) Source #

The factors for the base color of the material.

_pbrMetallicFactor :: Lens' PbrMetallicRoughness Float Source #

The factor for the metalness of the material.

_pbrRoughnessFactor :: Lens' PbrMetallicRoughness Float Source #

The factor for the roughness of the material.

TextureInfo Lenses

_textureInfoId :: Lens' TextureInfo Int Source #

The index of the texture.

_textureInfoTexCoord :: Lens' TextureInfo Int Source #

This integer value is used to construct a string in the format TEXCOORD_set_index which is a reference to a key in mesh.primitives.attributes (e.g. a value of 0 corresponds to TEXCOORD_0).