Mesh

:= []

Turns mesh names into the mesh ids that a Draw carries.

primitive : Primitive -> U32

The fixed mesh id of a Primitive: cube 1, sphere 2, plane 3. The Primitives load at startup and never unload, so you need no Pack.

resolve : Manifest, Str -> U32

The mesh id of a name in the Manifest. Call it once, in loaded, and keep the id in your Model. A name that the engine did not load gives 0, the Fallback mesh, and prints the name.

clip : Manifest, Str, Str -> U32

The Clip id of a Clip of a skinned mesh, by the mesh's name and the Clip's name in the file. Call it once, in loaded, and keep the id in your Model for a Draw's pose. A mesh or Clip name that is not in the Manifest gives 0, which draws the bind pose, and prints the names.

clip_duration : Manifest, U32 -> F32

The duration in seconds of the Clip with this Clip id, the time of its last key. Give it to Pose.loop to repeat the Clip. Clip id 0, or an id that is not in the Manifest, gives 0.

Manifest : List({ name : Str, id : U32, duration : F32, clips : List({ name : Str, id : U32, duration : F32 }) })

The name-to-id list that loaded gets for one Pack. It has the same shape as Vocabulary.Manifest.

Primitive : [Cube, Sphere, Plane]

The meshes that the engine builds itself. A loaded file has no tag. Give its name to resolve.