Skip to content
Testaroo
gltf2.2 KB

glTF: JSON Cube (embedded)

A 10 mm cube as text glTF 2.0: the JSON scene with its binary buffer embedded as a data URI, the human-readable sibling of the GLB. For testing glTF parsers and GLB↔glTF conversion.

Loading 3D preview…

Interactive preview rendered from the equivalent glTF (cube.glb); drag to orbit. Download the file above for the GLTF original.

Specifications

Format
glTF 2.0 (JSON + embedded buffer)
Solid
10 mm cube
Triangles
12
Vertices
24
Units
mm

Testing contract

Expected to pass
Scenario
Exercise glTF: JSON Cube (embedded) in its mesh workflow. A 10 mm cube as text glTF 2.0: the JSON scene with its binary buffer embedded as a data URI, the human-readable sibling of the GLB.
Expected result
90 text lines, decoded as UTF-8; first nonempty line is '{'. Declared feature checks: solid=10 mm cube; triangles=12; vertices=24; units=mm.

What is a .gltf file?

glTF (.gltf, GL Transmission Format) is the 'JPEG of 3D', a JSON scene description referencing geometry, PBR materials, textures, and animation, with binary buffers stored alongside or as a .bin. It is the standard for web and real-time 3D.

How to use this file

Use an example .gltf file to test glTF loaders (three.js, model-viewer), PBR material handling, and glTF-to-GLB packing.

How to use this file for testing

“glTF: JSON Cube (embedded)” is a deterministic Testaroo fixture for Conversion testing. The same content exported across many formats and linked as a group, so you can convert one and diff against the expected twin.

Documented properties for this file: glTF 2.0 (JSON + embedded buffer). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.

3D and CAD fixtures carry one small, documented solid or scene. Convert and inspect against the known geometry, units, and structure; format twins let you diff interchange fidelity, and the 3D viewer previews the actual mesh.

Code examples

import trimesh  # pip install trimesh

mesh = trimesh.load("cube.gltf")
print(mesh.bounds, mesh.faces.shape)

Generated by generation/models.py. Free for any use, no attribution required, license.