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.
Instance is the root class in the map-object hierarchy. Every object that can appear inside a Celaria map — blocks, spheres, barriers, and more — extends Instance. It is responsible for defining the one property all objects share: their position in the world. You should never instantiate Instance directly; use one of its concrete subclasses instead.
Constructor
position to [0, 0, 0]. Subclass constructors call this via super() before setting their own properties.
Properties
The world-space position of the object as an
[x, y, z] tuple. Defaults to [0, 0, 0].Celaria uses Z as the gravity axis, so Z represents the vertical dimension. X and Y span the horizontal plane.Getters
Returns the numeric identifier that distinguishes this object type during binary serialization. Each concrete subclass returns a fixed value.
instanceId | Class | Description |
|---|---|---|
0 | Block | Rectangular geometry block |
1 | Sphere | Collectible red sphere |
2 | PlayerSpawnPoint | Player starting position |
3 | Barrier (wall) | Physics barrier oriented as a wall |
4 | Barrier (floor) | Physics barrier oriented as a floor |
128 | TutorialHologram | Tutorial hologram display object |
Identifying instances at runtime
Because all map objects share theInstance base class, you can use instanceId to branch on object type without importing every subclass:
instanceof checks against the concrete classes:
Related
Block
Rectangular prism geometry with multiple surface types.
Sphere
Collectible red sphere placed in the level.
PlayerSpawnPoint
Marks where the player appears at the start of a run.
Barrier
Invisible physics barrier that slows players.
TutorialHologram
Hologram display object used in tutorial levels.
Map objects guide
Overview of all map object types and how to use them.