Skip to content

Voxel-model architecture ​

VoxelModelState is the server's headless model. Its snapshot holds three ordered parts: the nodes (blocks and folders), the material library (materials and material folders) and the animation set links. The stored file adds a version and the texture reference, which stay outside the live snapshot. It also leaves out the transform vectors that match BlockTransform.create() and an activeFaces list that names every face in faces order. The decoder fills both back in, so the snapshot, the commands and VoxelModelState.toJSON() always hold full blocks. Linked animation sets become catalog dependencies of the model. The shared room and persistence lifecycle is shown in asset workspace architecture.

Folders have no transform. A block's transform is relative to the nearest block above it, folders skipped. A move that changes a block's transform parent carries the rewritten transforms in the same command. A block points to a material by ID, never to a material folder. Removing a node removes its subtree; removing a material clears it from the blocks that used it in the same command.

Animation sets target blocks by name path, not by ID. A link can remap a track to another block path, or ignore it; at most one link is the model's own set, which holds the clips made for this model. See animation bindings.

Collision keys ​

The default resolver is last write wins. The arbiter checks the tree rules through state.accepts() before the conflict keys, and the room commits the keys after the event append. A removal holds the keys of the values it erases but is only refused for them when it carries a basis, as an undo does: an undo that would erase a peer's newer edit is refused. Clients check the same tree rules on peer commands and on the replay of their pending ones; a pending command the tree refuses leaves the tree until the server's snapshot repairs it. See the network API for command and client details.