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 ships TypeScript type definitions in types/data.mts. These types are used throughout the library for JSDoc annotations, so you get accurate type hints in editors even in plain JavaScript projects. You can also import them directly in TypeScript projects.
import type { Vector3, MedalTimes, UvData, FlatVector3 } from "celaria-formats/types/data.mts"
In JavaScript projects, you can reference these types in JSDoc annotations without any TypeScript compilation step:
/** @type {import("celaria-formats/types/data.mts").Vector3} */
const position = [0, 0, 10]
Celaria uses a non-standard coordinate system where Z is the vertical (gravity) axis, not Y. When you see a Vector3 representing position or scale, keep in mind that [x, y, z] means Z is up/down.

Vector types

Vector3

A 3D coordinate or scale value. Type: [number, number, number] Used for position and scale on most map instances (Block, Sphere, PlayerSpawnPoint, TutorialHologram). The third element (index 2) is the Z axis, which is the gravity/vertical axis in Celaria.
const position: Vector3 = [12.5, 0, 3.0] // x=12.5, y=0, z=3 (3 units above ground)

Vector2

A 2D coordinate value. Type: [number, number] Used where only two axes are relevant.
const coords: Vector2 = [4.0, 8.5]

FlatVector3

The union type used for Barrier.scale. A FlatVector3 is either an XYRestrainedVector3 (floor barrier) or an XZRestrainedVector3 (wall barrier). Type: XYRestrainedVector3 | XZRestrainedVector3 Because barriers are flat surfaces, one axis of their scale is always 0. The specific constrained type depends on the barrier’s orientation.

XYRestrainedVector3

Scale type for floor barriers. The Z component (vertical axis) is always 0. Type: [number, number, 0]
const floorScale: XYRestrainedVector3 = [5.0, 3.0, 0]

XZRestrainedVector3

Scale type for wall barriers. The Y component is always 0. Type: [number, 0, number]
const wallScale: XZRestrainedVector3 = [5.0, 0, 2.5]

MedalTimes

Medal time thresholds for a checkpoint or goal block. Used as the type of Block.medalTimes in CelariaMap. Type: object All values are in game ticks, not milliseconds. The exact tick rate depends on the game version.
Game ticks are discrete game frames, not wall-clock milliseconds. The conversion between ticks and seconds depends on the game’s tick rate. Do not assume a fixed millisecond value per tick.
platinum
number
required
Platinum medal time in game ticks. The fastest (hardest) threshold.
gold
number
required
Gold medal time in game ticks.
silver
number
required
Silver medal time in game ticks.
bronze
number
required
Bronze medal time in game ticks. The slowest (easiest) threshold.
const times: MedalTimes = {
  platinum: 300,
  gold: 450,
  silver: 600,
  bronze: 900,
}

UvData

A single UV mapping entry returned by CelariaUvMap.parse(). Each entry describes UV coordinates for one face of one block. Type: object
blockId
number
required
The ID of the block this UV data belongs to.
faceId
number
required
Which face of the block the UV coordinates apply to. Ranges from 0 to 5 for a cube (six faces).
startX
number
required
UV start X coordinate (float).
startY
number
required
UV start Y coordinate (float).
endX
number
required
UV end X coordinate (float).
endY
number
required
UV end Y coordinate (float).
const entry: UvData = {
  blockId: 42,
  faceId: 2,
  startX: 0.0,
  startY: 0.0,
  endX: 0.5,
  endY: 0.5,
}
For usage, see the CelariaUvMap reference and the UV maps guide.

Build docs developers (and LLMs) love