Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to paint tilemap with a rectangle selection from the tileset #6977

Merged
merged 17 commits into from
Sep 23, 2024

Conversation

AlexandreSi
Copy link
Collaborator

@AlexandreSi AlexandreSi commented Sep 19, 2024

demo_painting_tiling.mp4

@AlexandreSi AlexandreSi changed the title Add rectangular tiling for tile maps Add possibility to paint tilemap with a rectangle selection from the tileset Sep 19, 2024
* B, D, F, H
* given as:
* [A, B, C, D, E, F, G, H]
* - The layout of the tiles rectangle is simple.
Copy link
Owner

Choose a reason for hiding this comment

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

Be more precise what "simple" means.

@@ -211,6 +218,7 @@ const SimpleTileMapEditor = ({
allowRectangleSelection={false}
onAtlasImageLoaded={onAtlasImageLoaded}
interactive={true}
onScrollY={onScrollY}
Copy link
Owner

Choose a reason for hiding this comment

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

Can you add a comment why this is necessary? Not obvious for the reader.

@@ -65,6 +66,14 @@ export default React.forwardRef<Props, ScrollViewInterface>(
);
}
},
/**
* Scroll the view to the target component.
Copy link
Owner

Choose a reason for hiding this comment

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

"Scroll the view by the offset passed as argument."

if (isTouchDevice) {
if (!touchStartCoordinates) return;

if (isLongTouch) {
Copy link
Owner

Choose a reason for hiding this comment

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

Add a comment explaining what this does:

"Distinguish between a long touch (to multi select tiles) and a scroll"
(for example)

@AlexandreSi AlexandreSi merged commit 1fa3f59 into master Sep 23, 2024
5 of 6 checks passed
@AlexandreSi AlexandreSi deleted the add-rectangular-tiling branch September 23, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants