Module bevy_ecs_ldtk::utils
source · Expand description
Utility functions used internally by the plugin that have been exposed to the public api.
Functions§
- Performs
EntityInstance
toTransform
conversion - Simple conversion from a list of EntityDefinitions to a map using their Uids as the keys.
- Simple conversion from a list of LayerDefinitions to a map using their Uids as the keys.
- Performs GridCoords to LDtk grid coordinate conversion.
- Performs GridCoords to translation conversion, so that the resulting translation is in the the center of the tile.
- Performs GridCoords to translation conversion (relative to the layer), so that the resulting translation is in the the center of the tile.
- The
int_grid_csv
field of a LayerInstance is a 1-dimensionalVec<i32>
. This function can map the indices of this Vec to a corresponding GridCoords. - Performs LDtk grid coordinate to GridCoords conversion.
- Performs LDtk grid coordinate to translation conversion, so that the resulting translation is in the center of the tile.
- Performs LDtk grid coordinate to translation conversion, so that the resulting translation is in the center of the tile.
- Performs LDtk pixel coordinate to GridCoords conversion.
- Performs LDtk pixel coordinate to translation conversion.
- Performs LDtk pixel coordinate to translation conversion, with “pivot” support.
- Creates a SpriteBundle from the entity information available to the LdtkEntity::bundle_entity method.
- Creates a
LdtkSpriteSheetBundle
from the entity information available to the LdtkEntity::bundle_entity method. - Performs translation to GridCoords conversion.
- Performs translation to LDtk pixel coordinate conversion.