Exploring how glTF files are stored
glTF files are stored as either plain text JSON files or in a more compact binary representation. The plain text variant commonly has a .gltf
extension, while the binary variant commonly has a .glb
extension.
There might be multiple files. A glTF file can choose to embed large chunks of binary data—even textures—or it can choose to store them in external files. This is reflected in the following screenshot of Blender3D's glTF export options:
Sample files provided with the downloadable content for this book are stored as glTF embedded files (.gltf
). This is the plain text variant of glTF that can be inspected with any text editor. More importantly, it's a single file to keep track of. Even though the files provided with this book are in the glTF embedded format, the final code will support loading the binary format and separate files (.bin
) as well...