By the end of this guide you’ll haveDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BunnyNabbit/celaria-formats/llms.txt
Use this file to discover all available pages before exploring further.
celaria-formats installed, a .cmap file parsed into a JavaScript object, and a modified map serialized back to a binary buffer. All examples use ES module syntax.
Parse a .cmap file
Read a
.cmap file from disk and pass the buffer to CelariaMap.parse().parse-map.mjs
CelariaMap.parse() returns a CelariaMap instance with all map objects deserialized into typed JavaScript classes. The instances array holds every object placed in the map — blocks, spheres, barriers, and more.Inspect instances
Filter
map.instances by class or instanceId to work with specific object types.inspect-instances.mjs
Modify and serialize
Change properties on instances and call
map.serialize() to produce a binary buffer you can write back to disk.modify-map.mjs
serialize() on CelariaMap defaults to version 2. You can pass a version number explicitly — for example map.serialize(2) — if you need to target a specific format.Next steps
Reading maps
A deeper look at parsing both
.cmap and .ecmap formats.Writing maps
Build or transform maps and write them back to binary.
Map objects
Learn about every object type and how to work with them.
CelariaMap API
Full reference for the
CelariaMap class.