The Buffer
supplies the BufferView
with a single cohesive chunk of binary data. The BufferView
supplies the Accessor
with a sequence of bytes -- this can be contiguous or interleaved. The Accessor
turns the sequence of bytes into a sequence of components -- bytes, shorts, ints, floats -- and combines the components into actual elements, such as a three-element vector or a 4x4-element matrix.
The Accessor
ultimately serves up its typed, structured content to Mesh Primitive
, Animation
and Skin
objects, and that is where we will actually maintain the state. This means accessors, bufferViews and buffers are all derived entities, constructed during glTF generation.
For animations and skins, BufferView
allocation should be straight-forward; we might choose to make one per accessor or some amount of combination (e.g. per-animation, per-animation-frame). The accessor instantiation, too, should be pretty basic; there is no interleaving to worry about.
The mesh primitives, however, are a