Skip to content

Conversation

@pcone
Copy link
Contributor

@pcone pcone commented Sep 22, 2022

Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

Solution

Make the docs better!

/// Generate a `TextureAtlas` by splitting a texture into a grid where each
/// `tile_size` by `tile_size` grid-cell is one of the textures in the atlas
/// `tile_size` by `tile_size` grid-cell is one of the textures in the
/// atlas. Resulting TextureAtlas is indexed left to right, top to bottom.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// atlas. Resulting TextureAtlas is indexed left to right, top to bottom.
/// atlas. The iteration order of the texture after splitting is left to right, top to bottom.

Perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about 'The textures array in the resulting TextureAtlas is ordered left to right, top to bottom'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the last wording proposed.

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-Rendering Drawing game state to the screen A-Assets Load files from disk to use for things like images, models, and sounds labels Sep 22, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging as trivial :)

bors r+

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 22, 2022
bors bot pushed a commit that referenced this pull request Sep 22, 2022
# Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

## Solution

Make the docs better!
@bors
Copy link
Contributor

bors bot commented Sep 22, 2022

Build failed:

@alice-i-cecile
Copy link
Member

bors retry

bors bot pushed a commit that referenced this pull request Sep 22, 2022
# Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

## Solution

Make the docs better!
@bors
Copy link
Contributor

bors bot commented Sep 22, 2022

@bors bors bot changed the title Clarify index order in TextureAtlas::from_grid [Merged by Bors] - Clarify index order in TextureAtlas::from_grid Sep 22, 2022
@bors bors bot closed this Sep 22, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 19, 2022
# Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

## Solution

Make the docs better!
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

## Solution

Make the docs better!
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

Docs on from_grid/from_grid_with_padding aren't clear on indexing order.

## Solution

Make the docs better!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets Load files from disk to use for things like images, models, and sounds A-Rendering Drawing game state to the screen C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants