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.

BaseCelariaMap is the abstract base class shared by CelariaMap and EditableCelariaMap. It defines all properties that appear in both map formats — the instance list, checkpoint ordering, map name, sun rotation, and preview camera. You do not instantiate this class directly; use one of its concrete subclasses instead.
Do not instantiate BaseCelariaMap directly. Use CelariaMap.parse(), EditableCelariaMap.parse(), or construct a subclass instance to build a map programmatically.

Static properties

fileSignature

BaseCelariaMap.fileSignature // ""
An empty string in the base class. Each subclass overrides this with the magic bytes specific to its file format: "celaria_map" for CelariaMap and "celaria_edi" for EditableCelariaMap.

Instance properties

instances

map.instances // (Block | Sphere | PlayerSpawnPoint | Barrier | TutorialHologram)[]
An array of all map objects. Each element is an instance of one of the five map object classes. The array is populated in the order objects appear in the binary file. Use instanceId or instanceof to distinguish object types when iterating:
import { Block } from "celaria-formats"

const blocks = map.instances.filter(i => i instanceof Block)
// or
const blocks = map.instances.filter(i => i.instanceId === 0)
See the map objects guide for the full list of instance types and their instanceId values.

checkpointOrder

map.checkpointOrder // OrderedSet<Block>
An OrderedSet containing the checkpoint and goal blocks in the order they must be visited. The last entry in the set is treated as the goal block during serialization. This set is populated automatically during parsing. When building a map programmatically, add checkpoint blocks to this set in the sequence you want the player to follow, with the final destination (goal) added last.

name

map.name         // string getter
map.name = "…"   // string setter
The display name of the map. Stored as ASCII in the binary format.
Throws Error("New name is longer than 255 bytes.") if the assigned string encodes to more than 255 ASCII bytes. Keep names short.
map.name = "My Custom Map"  // OK
map.name = "A".repeat(300)  // throws Error

sunRotationHorizontal

map.sunRotationHorizontal // number, default: 45
The horizontal rotation of the sun in degrees. Stored as a 32-bit float in the binary format. Controls the azimuth of in-game directional lighting.

sunRotationVertical

map.sunRotationVertical // number, default: 55
The vertical rotation of the sun in degrees. Stored as a 32-bit float. Controls the elevation angle of in-game directional lighting.

previewCamera

map.previewCamera // { from: Vector3, to: Vector3 }
// default: { from: [0, 0, 0], to: [0, 0, 0] }
The position and target of the camera shown in the map preview. Both from and to are Vector3 values ([number, number, number]), stored as double-precision floats.
map.previewCamera.from = [10, 5, -20]
map.previewCamera.to   = [0, 0, 0]

version

map.version // number
The format version read from the binary file during parsing. This value is set automatically by parse() and reflects the version byte stored in the file header. It is not set on a freshly constructed instance.

CelariaMap

Finalized map format extending this base class.

EditableCelariaMap

Editable map format extending this base class.

OrderedSet

The ordered set type used for checkpoint sequencing.

Types

Type definitions including Vector3.

Build docs developers (and LLMs) love