fixtures library

glTF fixtures made in code, in pure Dart: GlbWriter writes small .glb/.gltf files, skinnedBarGlb and mannequinGlb are ready-made skinned and animated models (CC0).

Unlike testing.dart, nothing here imports Flutter, so a tool run with dart run can use it (an example's or a template's model generator).

Classes

GlbWriter
Writes small glTF files for tests, so fixtures are generated, not checked-in binaries.

Functions

jointChainGlb(int joints) → Uint8List
A thin bar skinned to a chain of joints joints, each 0.1 m above the last, with a wave animation turning every joint a little about +Z and back over 1 s — for timing many joints.
mannequinGlb({List<double> body = const [0.85, 0.6, 0.35, 1], List<double> clothes = const [0.25, 0.35, 0.6, 1]}) → Uint8List
A box mannequin about 1.8 m tall, standing on y = 0 and facing +Z (glTF axes), skinned to 16 joints with an idle and a walk clip. Made in code, so it is free to use anywhere (CC0).
skinnedBarGlb({List<double> rgba = const [0.9, 0.2, 0.2, 1], double halfWidth = 0.1}) → Uint8List
A square bar 2 m tall standing on y = 0 (glTF axes), skinned to two joints: root at the origin and tip 1 m up (child of root). Below 0.5 m vertices follow root, above 1.5 m tip, between they blend.