Skip to content

Commit

Permalink
Cleanup second pass condition + comment
Browse files Browse the repository at this point in the history
Second pass only needed for staggerY/X-Axis (even or odd)
  • Loading branch information
jtmcdole committed Sep 11, 2022
1 parent 982eb67 commit 226da80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/flame_tiled/lib/src/renderable_tile_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ class _RenderableTileLayer extends _RenderableLayer<TileLayer> {
offsetY + -ssin * anchorX - scos * anchorY,
);

if ((_map.staggerAxis == StaggerAxis.x && staggerY > 0) ||
(_map.staggerAxis == StaggerAxis.y && staggerX > 0)) {
// A second pass is only needed in the case of staggery.
if (_map.staggerAxis == StaggerAxis.x && staggerY > 0) {
xSecondPass.add(_Transform(src, transform, flips.flip, batch));
} else {
batch.addTransform(
Expand Down Expand Up @@ -679,8 +679,8 @@ class _RenderableTileLayer extends _RenderableLayer<TileLayer> {
offsetY + -ssin * anchorX - scos * anchorY,
);

if ((_map.staggerAxis == StaggerAxis.x && staggerY > 0) ||
(_map.staggerAxis == StaggerAxis.y && staggerX > 0)) {
// A second pass is only needed in the case of staggery.
if (_map.staggerAxis == StaggerAxis.x && staggerY > 0) {
xSecondPass.add(_Transform(src, transform, flips.flip, batch));
} else {
batch.addTransform(
Expand Down

0 comments on commit 226da80

Please sign in to comment.