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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Next Next commit
Fix comment
  • Loading branch information
AlexandreSi committed Sep 17, 2024
commit 98c355ac527472de238704fc41f13d586ff7ab0f
20 changes: 10 additions & 10 deletions newIDE/app/src/InstancesEditor/TileSetVisualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ type TileMapCoordinates = {| x: number, y: number |};
/**
* Returns the tile id in a tile set.
* This id corresponds to the index of the tile if the tile set
* is flattened so that each column is put right after the previous one.
* is flattened so that each row is put right after the previous one.
* Example:
* 1 | 4 | 7
* 2 | 5 | 8
* 3 | 6 | 9
* @param argument Object that contains x the horizontal position of the tile, y the vertical position and rowCount the number of rows in the tile set.
* 0 | 1 | 2
* 3 | 4 | 5
* 6 | 7 | 8
* @param argument Object that contains x the horizontal position of the tile, y the vertical position and columnCount the number of columns in the tile set.
* @returns the id of the tile.
*/
export const getTileIdFromGridCoordinates = ({
Expand All @@ -85,12 +85,12 @@ export const getTileIdFromGridCoordinates = ({
/**
* Returns the coordinates of a tile in a tile set given its id.
* This id corresponds to the index of the tile if the tile set
* is flattened so that each column is put right after the previous one.
* is flattened so that each row is put right after the previous one.
* Example:
* 1 | 4 | 7
* 2 | 5 | 8
* 3 | 6 | 9
* @param argument Object that contains id the id of the tile and rowCount the number of rows in the tile set.
* 0 | 1 | 2
* 3 | 4 | 5
* 6 | 7 | 8
* @param argument Object that contains the id of the tile and columnCount the number of columns in the tile set.
* @returns the id of the tile.
*/
export const getGridCoordinatesFromTileId = ({
Expand Down