Crate kgltf[−][src]
A minimal crate for loading glTF.
This crate is auto-generated from the specification’s Json Schema, so some comments may not exactly match the Rust names.
Structs
Accessor | A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL’s |
AccessorSparse | Sparse storage of attributes that deviate from their initialization value. |
AccessorSparseIndices | Index array of size |
AccessorSparseValues | Array of size |
Animation | A keyframe animation. |
AnimationChannel | Targets an animation’s sampler at a node’s property. |
AnimationChannelTarget | The index of the node and TRS property to target. |
AnimationSampler | Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target). |
Asset | Metadata about the glTF asset. |
Buffer | A buffer points to binary geometry, animation, or skins. |
BufferView | A view into a buffer generally representing a subset of the buffer. |
Camera | A camera’s projection. A node can reference a camera to apply a transform to place the camera in the scene. |
CameraOrthographic | An orthographic camera containing properties to create an orthographic projection matrix. |
CameraPerspective | A perspective camera containing properties to create a perspective projection matrix. |
Extension | Dictionary object with extension-specific objects. |
GLB | A GLTF with all of its data included within a buffer. |
GlTf | The root object for a glTF asset. |
Image | Image data used to create a texture. Image can be referenced by URI or |
Material | The material appearance of a primitive. |
MaterialNormalTextureInfo | The normal map texture. |
MaterialOcclusionTextureInfo | The occlusion map texture. |
MaterialPbrMetallicRoughness | A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of |
Mesh | A set of primitives to be rendered. A node can contain one mesh. A node’s transform places the mesh in the scene. |
MeshPrimitive | Geometry to be rendered with the given material. |
Node | A node in the node hierarchy. When the node contains |
Sampler | Texture sampler properties for filtering and wrapping modes. |
Scene | The root nodes of a scene. |
Skin | Joints and matrices defining a skin. |
Texture | A texture and its sampler. |
TextureInfo | The base color texture. |
Enums
AccessorComponentType | The datatype of components in the attribute. |
AccessorSparseIndicesComponentType | The indices data type. |
AccessorType | Specifies if the attribute is a scalar, vector, or matrix. |
AnimationChannelTargetPath | The name of the node’s TRS property to modify, or the “weights” of the Morph Targets it instantiates. For the “translation” property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the “rotation” property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the “scale” property, the values are the scaling factors along the x, y, and z axes. |
AnimationSamplerInterpolation | Interpolation algorithm. |
BufferViewTarget | The target that the GPU buffer should be bound to. |
CameraType | Specifies if the camera uses a perspective or orthographic projection. |
GLBError | |
ImageMimeType | The image’s MIME type. Required if |
MaterialAlphaMode | The alpha rendering mode of the material. |
MeshPrimitiveMode | The type of primitives to render. |
SamplerMagFilter | Magnification filter. |
SamplerMinFilter | Minification filter. |
SamplerWrapS | s wrapping mode. |
SamplerWrapT | t wrapping mode. |
Traits
FromJson | |
ToJson |