Skip to content

Instantly share code, notes, and snippets.

@mhenry07
Last active October 22, 2021 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhenry07/e31d8c94db91fb823f2eed2fc1b43f15 to your computer and use it in GitHub Desktop.
Save mhenry07/e31d8c94db91fb823f2eed2fc1b43f15 to your computer and use it in GitHub Desktop.
glTF v2.0 Values Quick Reference

glTF v2.0 Values Quick Reference

Quick reference of glTF constants, enums, and allowed values based on the glTF v2.0 spec.

  • accessor.componentType:

    • 5120: BYTE
      • size: 1
    • 5121: UNSIGNED_BYTE
      • size: 1
    • 5122: SHORT
      • size: 2
    • 5123: UNSIGNED_SHORT
      • size: 2
    • 5125: UNSIGNED_INT
      • size: 4
    • 5126: FLOAT
      • size: 4
  • accessor.type:

    • "SCALAR"
      • scalar values
    • "VEC2"
      • 2D vectors
    • "VEC3"
      • 3D vectors
    • "VEC4"
      • 4D vectors
    • "MAT2"
      • 2x2 matrices
    • "MAT3"
      • 3x3 matrices
    • "MAT4"
      • 4x4 matrices
  • animation sampler.interpolation:

    • "LINEAR" (default)
    • "STEP"
    • "CUBICSPLINE"
  • bufferView.target:

    • 34962: ARRAY_BUFFER
      • for vertex attributes
    • 34963: ELEMENT_ARRAY_BUFFER
      • for vertex indices
  • camera.type:

    • "perspective"
    • "orthographic"
  • image.mimeType:

    • "image/jpeg"
    • "image/png"
  • indices.componentType:

    • 5121: UNSIGNED_BYTE
    • 5123: UNSIGNED_SHORT
    • 5125: UNSIGNED_INT
  • material.alphaMode:

    • "OPAQUE" (default)
    • "MASK"
    • "BLEND"
  • primitive.mode:

    • 0: POINTS
    • 1: LINES
    • 2: LINE_LOOP
    • 3: LINE_STRIP
    • 4: TRIANGLES (default)
    • 5: TRIANGLE_STRIP
    • 6: TRIANGLE_FAN
  • sampler.magFilter:

    • 9728: NEAREST
    • 9729: LINEAR
  • sampler.minFilter:

    • 9728: NEAREST
    • 9729: LINEAR
    • 9984: NEAREST_MIPMAP_NEAREST
    • 9985: LINEAR_MIPMAP_NEAREST
    • 9986: NEAREST_MIPMAP_LINEAR
    • 9987: LINEAR_MIPMAP_LINEAR
  • sampler.wrapS /

  • sampler.wrapT:

    • 33071: CLAMP_TO_EDGE
    • 33648: MIRRORED_REPEAT
    • 10497: REPEAT (default)
  • target.path:

    • "translation"
    • "rotation"
    • "scale"
    • "weights"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment