-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decompose
Grid.getShapedArea()
so we can reuse logic between grids
We now calculate these things separately: 1. Which way the token is facing on the grid. 2. The shape of the light itself. 3. The shape of the token's footprint contribution to the light (for cones). With this we gain the following benefits: 1. `IsometricGrid` can reuse the main shape logic and just transform the result. No more duplicated logic. 2. The code should be more approachable as each method does One Thing™. Lights on isometric grids act literally the same as for square grids, just rotated and foreshortened. This fixes some related bugs, e.g., beams not getting visually shorted when vertical. It also means iso grids now have a full set of accurate lights available, e.g., hexes no longer default to ellipses.
- Loading branch information
1 parent
be5aa69
commit cc98fef
Showing
3 changed files
with
154 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters