tinygltf

TinyGLTF is a library for loading JSON serialized (embedded) GLTF models.

Members

Aliases

ARRAY_TYPE
alias ARRAY_TYPE = Type.ARRAY_TYPE

Array type enumerator. D type Value[].

BINARY_TYPE
alias BINARY_TYPE = Type.BINARY_TYPE

Binary type enumerator. D type ubyte[].

BOOL_TYPE
alias BOOL_TYPE = Type.BOOL_TYPE

Boolean type enumerator. D type bool.

INT_TYPE
alias INT_TYPE = Type.INT_TYPE

Integer type enumerator. D type int.

NULL_TYPE
alias NULL_TYPE = Type.NULL_TYPE

Null type enumerator. D type nothing/null.

OBJECT_TYPE
alias OBJECT_TYPE = Type.OBJECT_TYPE

Object type enumerator. D type Value[string].

REAL_TYPE
alias REAL_TYPE = Type.REAL_TYPE

Double type enumerator. D type double.

STRING_TYPE
alias STRING_TYPE = Type.STRING_TYPE

String type enumerator. D type string.

Classes

Accessor
class Accessor

A typed view into a buffer view that contains raw binary data.

Animation
class Animation

A keyframe animation.

AnimationChannel
class AnimationChannel

Holds animation channels. Animations channels are the root of the animation in the model. An animation channel combines an animation sampler with a target property being animated.

AnimationSampler
class AnimationSampler

An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.

Asset
class Asset

Metadata about the glTF asset.

Buffer
class Buffer

A buffer points to binary geometry, animation, or skins.

BufferView
class BufferView

A view into a buffer generally representing a subset of the buffer.

Mesh
class Mesh

A set of primitives to be rendered. Its global transform is defined by a node that references it.

Model
class Model

Model is the container used to store all the decoded JSON data. It loads all the data automatically through it's methods.

Node
class Node

A node in the node hierarchy. When the node contains skin, all mesh.primitives MUST contain JOINTS_0 and WEIGHTS_0 attributes. A node MAY have either a matrix or any combination of translation/rotation/scale (TRS) properties. TRS properties are converted to matrices and postmultiplied in the T * R * S order to compose the transformation matrix. First the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), matrix MUST NOT be present.

Primitive
class Primitive

Geometry to be rendered with the given material.

Sampler
class Sampler

Texture sampler properties for filtering and wrapping modes.

Skin
class Skin

Joints and matrices defining a skin.

Value
class Value

Simple class to represent a JSON object.

Enums

Type
enum Type

Enumerators for Values to define which type they are.

Manifest constants

TINYGLTF_COMPONENT_TYPE_BYTE
enum TINYGLTF_COMPONENT_TYPE_BYTE;

GLTF data component type BYTE.

TINYGLTF_COMPONENT_TYPE_DOUBLE
enum TINYGLTF_COMPONENT_TYPE_DOUBLE;

OpenGL double type. Note that some of glTF 2.0 validator does not; support double type even the schema seems allow any value of integer: https://github.com/KhronosGroup/glTF/blob/b9884a2fd45130b4d673dd6c8a706ee21ee5c5f7/specification/2.0/schema/accessor.schema.json#L22

TINYGLTF_COMPONENT_TYPE_FLOAT
enum TINYGLTF_COMPONENT_TYPE_FLOAT;

GLTF data component type FLOAT.

TINYGLTF_COMPONENT_TYPE_INT
enum TINYGLTF_COMPONENT_TYPE_INT;

GLTF data component type INTEGER.

TINYGLTF_COMPONENT_TYPE_SHORT
enum TINYGLTF_COMPONENT_TYPE_SHORT;

GLTF data component type SHORT.

TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE
enum TINYGLTF_COMPONENT_TYPE_UNSIGNED_BYTE;

GLTF data component type UNSIGNED BYTE.

TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT
enum TINYGLTF_COMPONENT_TYPE_UNSIGNED_INT;

GLTF data component type UNSIGNED INTEGER.

TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT
enum TINYGLTF_COMPONENT_TYPE_UNSIGNED_SHORT;

GLTF data component type UNSIGNED SHORT.

TINYGLTF_MODE_LINE
enum TINYGLTF_MODE_LINE;

OpenGL rendering mode LINE.

TINYGLTF_MODE_LINE_LOOP
enum TINYGLTF_MODE_LINE_LOOP;

OpenGL rendering mode LINE LOOP.

TINYGLTF_MODE_LINE_STRIP
enum TINYGLTF_MODE_LINE_STRIP;

OpenGL rendering mode LINE STRIP.

TINYGLTF_MODE_POINTS
enum TINYGLTF_MODE_POINTS;

OpenGL rendering mode POINTS.

TINYGLTF_MODE_TRIANGLES
enum TINYGLTF_MODE_TRIANGLES;

OpenGL rendering mode TRIANGLES.

TINYGLTF_MODE_TRIANGLE_FAN
enum TINYGLTF_MODE_TRIANGLE_FAN;

OpenGL rendering mode TRIANGLE FAN.

TINYGLTF_MODE_TRIANGLE_STRIP
enum TINYGLTF_MODE_TRIANGLE_STRIP;

OpenGL rendering mode TRIANGLE STRIP.

TINYGLTF_PARAMETER_TYPE_BOOL
enum TINYGLTF_PARAMETER_TYPE_BOOL;

GLTF Boolean parameter type.

TINYGLTF_PARAMETER_TYPE_BOOL_VEC2
enum TINYGLTF_PARAMETER_TYPE_BOOL_VEC2;

GLTF Boolean Vector 2 parameter type.

TINYGLTF_PARAMETER_TYPE_BOOL_VEC3
enum TINYGLTF_PARAMETER_TYPE_BOOL_VEC3;

GLTF Boolean Vector 3 parameter type.

TINYGLTF_PARAMETER_TYPE_BOOL_VEC4
enum TINYGLTF_PARAMETER_TYPE_BOOL_VEC4;

GLTF Boolean Vector 4 parameter type.

TINYGLTF_PARAMETER_TYPE_BYTE
enum TINYGLTF_PARAMETER_TYPE_BYTE;

GLTF data component type BYTE.

TINYGLTF_PARAMETER_TYPE_FLOAT
enum TINYGLTF_PARAMETER_TYPE_FLOAT;

GLTF data component type FLOAT.

TINYGLTF_PARAMETER_TYPE_FLOAT_MAT2
enum TINYGLTF_PARAMETER_TYPE_FLOAT_MAT2;

GLTF float Matrix 2x2 parameter type.

TINYGLTF_PARAMETER_TYPE_FLOAT_MAT3
enum TINYGLTF_PARAMETER_TYPE_FLOAT_MAT3;

GLTF float Matrix 3x3 parameter type.

TINYGLTF_PARAMETER_TYPE_FLOAT_MAT4
enum TINYGLTF_PARAMETER_TYPE_FLOAT_MAT4;

GLTF float Matrix 4x4 parameter type.

TINYGLTF_PARAMETER_TYPE_FLOAT_VEC2
enum TINYGLTF_PARAMETER_TYPE_FLOAT_VEC2;

GLTF float Vector 2 parameter type.

TINYGLTF_PARAMETER_TYPE_FLOAT_VEC3
enum TINYGLTF_PARAMETER_TYPE_FLOAT_VEC3;

GLTF float Vector 3 parameter type.

TINYGLTF_PARAMETER_TYPE_FLOAT_VEC4
enum TINYGLTF_PARAMETER_TYPE_FLOAT_VEC4;

GLTF float Vector 4 parameter type.

TINYGLTF_PARAMETER_TYPE_INT
enum TINYGLTF_PARAMETER_TYPE_INT;

GLTF data component type INTEGER.

TINYGLTF_PARAMETER_TYPE_INT_VEC2
enum TINYGLTF_PARAMETER_TYPE_INT_VEC2;

GLTF integer Vector 2 parameter type.

TINYGLTF_PARAMETER_TYPE_INT_VEC3
enum TINYGLTF_PARAMETER_TYPE_INT_VEC3;

GLTF integer Vector 3 parameter type.

TINYGLTF_PARAMETER_TYPE_INT_VEC4
enum TINYGLTF_PARAMETER_TYPE_INT_VEC4;

GLTF integer Vector 4 parameter type.

TINYGLTF_PARAMETER_TYPE_SHORT
enum TINYGLTF_PARAMETER_TYPE_SHORT;

GLTF data component type SHORT.

TINYGLTF_PARAMETER_TYPE_UNSIGNED_BYTE
enum TINYGLTF_PARAMETER_TYPE_UNSIGNED_BYTE;

GLTF data component type UNSIGNED BYTE.

TINYGLTF_PARAMETER_TYPE_UNSIGNED_INT
enum TINYGLTF_PARAMETER_TYPE_UNSIGNED_INT;

GLTF data component type UNSIGNED INTEGER.

TINYGLTF_PARAMETER_TYPE_UNSIGNED_SHORT
enum TINYGLTF_PARAMETER_TYPE_UNSIGNED_SHORT;

GLTF data component type UNSIGNED SHORT.

TINYGLTF_TEXTURE_FILTER_LINEAR
enum TINYGLTF_TEXTURE_FILTER_LINEAR;

OpenGL texture filtering mode LINEAR.

TINYGLTF_TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR
enum TINYGLTF_TEXTURE_FILTER_LINEAR_MIPMAP_LINEAR;

OpenGL texture filtering mode LINEAR MIPMAP LINEAR.

TINYGLTF_TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST
enum TINYGLTF_TEXTURE_FILTER_LINEAR_MIPMAP_NEAREST;

OpenGL texture filtering mode LINEAR MIPMAP NEAREST.

TINYGLTF_TEXTURE_FILTER_NEAREST
enum TINYGLTF_TEXTURE_FILTER_NEAREST;

OpenGL texture filtering mode NEAREST.

TINYGLTF_TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR
enum TINYGLTF_TEXTURE_FILTER_NEAREST_MIPMAP_LINEAR;

OpenGL texture filtering mode NEAREST MIPMAP LINEAR.

TINYGLTF_TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST
enum TINYGLTF_TEXTURE_FILTER_NEAREST_MIPMAP_NEAREST;

OpenGL texture filtering mode NEAREST MIPMAP NEAREST.

TINYGLTF_TEXTURE_WRAP_CLAMP_TO_EDGE
enum TINYGLTF_TEXTURE_WRAP_CLAMP_TO_EDGE;

OpenGL texture wrap mode CLAMP TO EDGE.

TINYGLTF_TEXTURE_WRAP_MIRRORED_REPEAT
enum TINYGLTF_TEXTURE_WRAP_MIRRORED_REPEAT;

OpenGL texture wrap mode MIRRORED REPEAT.

TINYGLTF_TEXTURE_WRAP_REPEAT
enum TINYGLTF_TEXTURE_WRAP_REPEAT;

OpenGL texture wrap mode REPEAT.

TINYGLTF_TYPE_MAT2
enum TINYGLTF_TYPE_MAT2;

GLTF Matrix 2x2 data type.

TINYGLTF_TYPE_MAT3
enum TINYGLTF_TYPE_MAT3;

GLTF Matrix 3x3 data type.

TINYGLTF_TYPE_MAT4
enum TINYGLTF_TYPE_MAT4;

GLTF Matrix 4x4 data type.

TINYGLTF_TYPE_MATRIX
enum TINYGLTF_TYPE_MATRIX;

GLTF Matrix data type.

TINYGLTF_TYPE_SCALAR
enum TINYGLTF_TYPE_SCALAR;

GLTF Scalar data type.

TINYGLTF_TYPE_VEC2
enum TINYGLTF_TYPE_VEC2;

GLTF Vector 2 data type.

TINYGLTF_TYPE_VEC3
enum TINYGLTF_TYPE_VEC3;

GLTF Vector 3 data type.

TINYGLTF_TYPE_VEC4
enum TINYGLTF_TYPE_VEC4;

GLTF Vector 4 data type.

TINYGLTF_TYPE_VECTOR
enum TINYGLTF_TYPE_VECTOR;

GLTF Vector data type.

Meta