Skip to content

tileCellCenter

tileCellCenter(p, tx, ty): Vec2Like

Defined in: tilemap/tileGeometry.ts:58

The center of cell (tx, ty) in the layer’s local space (y-up, layer origin at 0,0). Add the layer entity’s world position to get world coords. Mirrors the C++ renderer’s (worldX, worldY) per-tile center exactly, so a painted map and an imported one place a given cell at the same point.

TileGridParams

number

number

Vec2Like