Skip to content

Function: shardFor() ​

ts
function shardFor(
   x, 
   y, 
   cellSize, 
   world?
): string;

Defined in: world.ts:12

The id of the room responsible for a position, for a world cut into square cells cellSize units wide. Positions may be negative. The result is a valid room id, e.g. overworld_3_-2.

Parameters ​

ParameterTypeDefault value
xnumberundefined
ynumberundefined
cellSizenumberundefined
world?string"world"

Returns ​

string

MIT licence. Tickflare is an independent project and is not affiliated with Cloudflare.