Module bevy_tiles::coords

source ·
Expand description

Provides helper functions for interacting with coordiantes.

Structs§

  • Allows for iteration between all coordinates in between two corners.

Functions§

  • Calculate the coordinate of a chunk from a given tile coordinate and chunk size
  • Calculate the coordinate of a tile relative to the origin of it’s chunk.
  • Calculate the coordinate of a tile from it’s index in a chunk, and the chunk coordinate.
  • Calculate the index of a tile within it’s chunk.
  • Find the highest index possible in a chunk.
  • Calculate the tile coordinate given a world coordinate and the scale_f of the tile coordinates to world coordinates. (For example, if tiles are being represented by 16x16 pixel sprites, the scale factor should be set to 16)