Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Gltf = Gltf {}
- data Asset = Asset {}
- data Image = Image {}
- data MagFilter
- data MinFilter
- data Material = Material {}
- data MaterialAlphaMode
- data Mesh = Mesh {}
- data Node = Node {
- nodeChildren :: Vector Int
- nodeMeshId :: Maybe Int
- nodeName :: Maybe Text
- nodeRotation :: Maybe (V4 Float)
- nodeScale :: Maybe (V3 Float)
- nodeTranslation :: Maybe (V3 Float)
- nodeWeights :: [Float]
- data MeshPrimitive = MeshPrimitive {}
- data PbrMetallicRoughness = PbrMetallicRoughness {}
- data MeshPrimitiveMode
- data Sampler = Sampler {}
- data SamplerWrap
- data Texture = Texture {}
- data TextureInfo = TextureInfo {
- textureId :: Int
- textureTexCoord :: Int
- _asset :: Lens' Gltf Asset
- _images :: Lens' Gltf (Vector Image)
- _materials :: Lens' Gltf (Vector Material)
- _meshes :: Lens' Gltf (Vector Mesh)
- _nodes :: Lens' Gltf (Vector Node)
- _samplers :: Lens' Gltf (Vector Sampler)
- _textures :: Lens' Gltf (Vector Texture)
- _assetVersion :: Lens' Asset Text
- _assetCopyright :: Lens' Asset (Maybe Text)
- _assetGenerator :: Lens' Asset (Maybe Text)
- _assetMinVersion :: Lens' Asset (Maybe Text)
- _imageData :: Lens' Image (Maybe ByteString)
- _imageMimeType :: Lens' Image Text
- _imageName :: Lens' Image (Maybe Text)
- _materialAlphaCutoff :: Lens' Material Float
- _materialAlphaMode :: Lens' Material MaterialAlphaMode
- _materialDoubleSided :: Lens' Material Bool
- _materialEmissiveFactor :: Lens' Material (V3 Float)
- _materialName :: Lens' Material (Maybe Text)
- _materialPbrMetallicRoughness :: Lens' Material (Maybe PbrMetallicRoughness)
- _meshPrimitives :: Lens' Mesh (Vector MeshPrimitive)
- _meshWeights :: Lens' Mesh (Vector Float)
- _meshName :: Lens' Mesh (Maybe Text)
- _nodeChildren :: Lens' Node (Vector Int)
- _nodeMeshId :: Lens' Node (Maybe Int)
- _nodeName :: Lens' Node (Maybe Text)
- _nodeRotation :: Lens' Node (Maybe (V4 Float))
- _nodeScale :: Lens' Node (Maybe (V3 Float))
- _nodeTranslation :: Lens' Node (Maybe (V3 Float))
- _nodeWeights :: Lens' Node [Float]
- _samplerMagFilter :: Lens' Sampler (Maybe MagFilter)
- _samplerMinFilter :: Lens' Sampler (Maybe MinFilter)
- _samplerName :: Lens' Sampler (Maybe Text)
- _samplerWrapS :: Lens' Sampler SamplerWrap
- _samplerWrapT :: Lens' Sampler SamplerWrap
- _textureName :: Lens' Texture (Maybe Text)
- _textureSamplerId :: Lens' Texture (Maybe Int)
- _textureSourceId :: Lens' Texture (Maybe Int)
- _meshPrimitiveMaterial :: Lens' MeshPrimitive (Maybe Int)
- _meshPrimitiveIndices :: Lens' MeshPrimitive (Vector Word16)
- _meshPrimitiveMode :: Lens' MeshPrimitive MeshPrimitiveMode
- _meshPrimitiveNormals :: Lens' MeshPrimitive (Vector (V3 Float))
- _meshPrimitivePositions :: Lens' MeshPrimitive (Vector (V3 Float))
- _pbrBaseColorFactor :: Lens' PbrMetallicRoughness (V4 Float)
- _pbrBaseColorTexture :: Lens' PbrMetallicRoughness (Maybe TextureInfo)
- _pbrMetallicFactor :: Lens' PbrMetallicRoughness Float
- _pbrRoughnessFactor :: Lens' PbrMetallicRoughness Float
- _textureInfoId :: Lens' TextureInfo Int
- _textureInfoTexCoord :: Lens' TextureInfo Int
Data constructors
The root data type for a glTF asset
Gltf | |
|
Metadata about the glTF asset
Asset | |
|
Image data used to create a texture.
Image | |
|
Magnification filter.
Instances
Enum MagFilter Source # | |
Defined in Text.GLTF.Loader.Gltf succ :: MagFilter -> MagFilter # pred :: MagFilter -> MagFilter # fromEnum :: MagFilter -> Int # enumFrom :: MagFilter -> [MagFilter] # enumFromThen :: MagFilter -> MagFilter -> [MagFilter] # enumFromTo :: MagFilter -> MagFilter -> [MagFilter] # enumFromThenTo :: MagFilter -> MagFilter -> MagFilter -> [MagFilter] # | |
Show MagFilter Source # | |
Eq MagFilter Source # | |
Minification Filter.
MinNearest | |
MinLinear | |
MinNearestMipmapNearest | |
MinLinearMipmapNearest | |
MinNearestMipmapLinear | |
MinLinearMipmapLinear |
Instances
Enum MinFilter Source # | |
Defined in Text.GLTF.Loader.Gltf succ :: MinFilter -> MinFilter # pred :: MinFilter -> MinFilter # fromEnum :: MinFilter -> Int # enumFrom :: MinFilter -> [MinFilter] # enumFromThen :: MinFilter -> MinFilter -> [MinFilter] # enumFromTo :: MinFilter -> MinFilter -> [MinFilter] # enumFromThenTo :: MinFilter -> MinFilter -> MinFilter -> [MinFilter] # | |
Show MinFilter Source # | |
Eq MinFilter Source # | |
The material appearance of a primitive
Material | |
|
data MaterialAlphaMode Source #
Alpha rendering mode of a material
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. |
Instances
Enum MaterialAlphaMode Source # | |
Defined in Text.GLTF.Loader.Gltf succ :: MaterialAlphaMode -> MaterialAlphaMode # pred :: MaterialAlphaMode -> MaterialAlphaMode # toEnum :: Int -> MaterialAlphaMode # fromEnum :: MaterialAlphaMode -> Int # enumFrom :: MaterialAlphaMode -> [MaterialAlphaMode] # enumFromThen :: MaterialAlphaMode -> MaterialAlphaMode -> [MaterialAlphaMode] # enumFromTo :: MaterialAlphaMode -> MaterialAlphaMode -> [MaterialAlphaMode] # enumFromThenTo :: MaterialAlphaMode -> MaterialAlphaMode -> MaterialAlphaMode -> [MaterialAlphaMode] # | |
Show MaterialAlphaMode Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> MaterialAlphaMode -> ShowS # show :: MaterialAlphaMode -> String # showList :: [MaterialAlphaMode] -> ShowS # | |
Eq MaterialAlphaMode Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: MaterialAlphaMode -> MaterialAlphaMode -> Bool # (/=) :: MaterialAlphaMode -> MaterialAlphaMode -> Bool # |
A set of primitives to be rendered
Mesh | |
|
A node in the node hierarchy
Node | |
|
data MeshPrimitive Source #
Geometry to be rendered with the given material
MeshPrimitive | |
|
Instances
Show MeshPrimitive Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> MeshPrimitive -> ShowS # show :: MeshPrimitive -> String # showList :: [MeshPrimitive] -> ShowS # | |
Eq MeshPrimitive Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: MeshPrimitive -> MeshPrimitive -> Bool # (/=) :: MeshPrimitive -> MeshPrimitive -> Bool # |
data PbrMetallicRoughness Source #
A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
PbrMetallicRoughness | |
|
Instances
Show PbrMetallicRoughness Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> PbrMetallicRoughness -> ShowS # show :: PbrMetallicRoughness -> String # showList :: [PbrMetallicRoughness] -> ShowS # | |
Eq PbrMetallicRoughness Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: PbrMetallicRoughness -> PbrMetallicRoughness -> Bool # (/=) :: PbrMetallicRoughness -> PbrMetallicRoughness -> Bool # |
data MeshPrimitiveMode Source #
The topology type of primitives to render.
Instances
Enum MeshPrimitiveMode Source # | |
Defined in Text.GLTF.Loader.Gltf succ :: MeshPrimitiveMode -> MeshPrimitiveMode # pred :: MeshPrimitiveMode -> MeshPrimitiveMode # toEnum :: Int -> MeshPrimitiveMode # fromEnum :: MeshPrimitiveMode -> Int # enumFrom :: MeshPrimitiveMode -> [MeshPrimitiveMode] # enumFromThen :: MeshPrimitiveMode -> MeshPrimitiveMode -> [MeshPrimitiveMode] # enumFromTo :: MeshPrimitiveMode -> MeshPrimitiveMode -> [MeshPrimitiveMode] # enumFromThenTo :: MeshPrimitiveMode -> MeshPrimitiveMode -> MeshPrimitiveMode -> [MeshPrimitiveMode] # | |
Show MeshPrimitiveMode Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> MeshPrimitiveMode -> ShowS # show :: MeshPrimitiveMode -> String # showList :: [MeshPrimitiveMode] -> ShowS # | |
Eq MeshPrimitiveMode Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: MeshPrimitiveMode -> MeshPrimitiveMode -> Bool # (/=) :: MeshPrimitiveMode -> MeshPrimitiveMode -> Bool # |
Texture sampler properties for filtering and wrapping modes.
Sampler | |
|
data SamplerWrap Source #
Sampler wrapping mode.
Instances
Enum SamplerWrap Source # | |
Defined in Text.GLTF.Loader.Gltf succ :: SamplerWrap -> SamplerWrap # pred :: SamplerWrap -> SamplerWrap # toEnum :: Int -> SamplerWrap # fromEnum :: SamplerWrap -> Int # enumFrom :: SamplerWrap -> [SamplerWrap] # enumFromThen :: SamplerWrap -> SamplerWrap -> [SamplerWrap] # enumFromTo :: SamplerWrap -> SamplerWrap -> [SamplerWrap] # enumFromThenTo :: SamplerWrap -> SamplerWrap -> SamplerWrap -> [SamplerWrap] # | |
Show SamplerWrap Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> SamplerWrap -> ShowS # show :: SamplerWrap -> String # showList :: [SamplerWrap] -> ShowS # | |
Eq SamplerWrap Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: SamplerWrap -> SamplerWrap -> Bool # (/=) :: SamplerWrap -> SamplerWrap -> Bool # |
A texture and its sampler.
Texture | |
|
data TextureInfo Source #
Reference to a texture.
TextureInfo | |
|
Instances
Show TextureInfo Source # | |
Defined in Text.GLTF.Loader.Gltf showsPrec :: Int -> TextureInfo -> ShowS # show :: TextureInfo -> String # showList :: [TextureInfo] -> ShowS # | |
Eq TextureInfo Source # | |
Defined in Text.GLTF.Loader.Gltf (==) :: TextureInfo -> TextureInfo -> Bool # (/=) :: TextureInfo -> TextureInfo -> Bool # |
Lenses
Top-level Gltf Lenses
_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.
_samplers :: Lens' Gltf (Vector Sampler) Source #
A Vector of Texture Samplers. Texture Sampler defines properties for filtering and wrapping modes.
Asset Lenses
_assetCopyright :: Lens' Asset (Maybe Text) Source #
A copyright message suitable for display to credit the content creator.
_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
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.
_materialEmissiveFactor :: Lens' Material (V3 Float) Source #
The factors for the emissive color of the material.
_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.
Node Lenses
_nodeTranslation :: Lens' Node (Maybe (V3 Float)) Source #
The node's translation along the x, y, and z axes.
Sampler Lenses
_samplerWrapS :: Lens' Sampler SamplerWrap Source #
S (U) wrapping mode.
_samplerWrapT :: Lens' Sampler SamplerWrap Source #
T (V) wrapping mode.
Texture Lenses
_textureSamplerId :: Lens' Texture (Maybe Int) Source #
The index of the sampler used by this texture.
MeshPrimitive Lenses
_meshPrimitiveMaterial :: Lens' MeshPrimitive (Maybe Int) Source #
The index of the material to apply to this primitive when rendering.
_meshPrimitiveIndices :: Lens' MeshPrimitive (Vector Word16) Source #
A Vector of vertex indices.
_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.
_pbrBaseColorTexture :: Lens' PbrMetallicRoughness (Maybe TextureInfo) Source #
The base color texture
_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).