Module dtiled.grid

A grid wraps a 2D array to provide specialized grid-based functionality.

Currently, the only grid type is RectGrid, which can serve as the base for an orthogonal or isometric map. HexGrid may be added in a later version to support hexagonal maps.

Functions

Name Description
createMask Generate a mask from a region of tiles based on a condition.
createMaskAround Same as createMask, but specify the offset of the mask's center rather than the top-left corner.
rectGrid Convenience function to wrap a RectGrid around a 2D array.

Structs

Name Description
RectGrid A grid of rectangular tiles. Wraps a 2D array to provide grid-based access to tiles.

Enum values

Name Type Description
isArray2D True if T is a static or dynamic array type.

Authors

rcorre

Copyright

Copyright © 2015, Ryan Roden-Corrent

License

MIT