Skip to main content

Documentation 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 gives you a structured JavaScript API for working with Celaria’s binary map formats. Whether you want to inspect existing maps, create new levels programmatically, or transform map data, this library handles the binary parsing and serialization so you don’t have to.

Quickstart

Install the library and parse your first Celaria map file in minutes.

Reading maps

Learn how to parse .cmap and .ecmap files into JavaScript objects.

Writing maps

Serialize map data back to binary buffers for use in Celaria.

API Reference

Full reference for all exported classes, methods, and types.

Supported formats

celaria-formats reads and writes two map formats used by Celaria:
FormatExtensionClassDescription
Celaria Map.cmapCelariaMapFinalized map with checkpoint medal times
Editable Celaria Map.ecmapEditableCelariaMapEditable map format for the in-game editor
UV Map.cuvdataCelariaUvMapUV texture coordinate data for map blocks

Get started

1

Install the package

Add celaria-formats to your project using your preferred package manager.
npm install celaria-formats
2

Import and parse a map

Read a map file from disk and parse it into a structured object.
import fs from "node:fs"
import { CelariaMap } from "celaria-formats"

const buffer = fs.readFileSync("./myMap.cmap")
const map = CelariaMap.parse(buffer)

console.log(map.name)       // Map name
console.log(map.instances)  // Array of map objects
3

Work with map instances

Inspect or modify the map’s objects — blocks, spheres, barriers, and more.
import { Block } from "celaria-formats"

// Find all speed blocks
const speedBlocks = map.instances.filter(
  instance => instance instanceof Block && instance.type === Block.types.speed
)

Build docs developers (and LLMs) love