simpler calculation
This commit is contained in:
parent
e57ebb51a8
commit
866490795d
1 changed files with 1 additions and 1 deletions
|
@ -76,9 +76,9 @@ fn setup(
|
|||
const TILES: i32 = 9;
|
||||
const TILE_SIZE: f32 = 50.;
|
||||
const GAP_SIZE: f32 = 10.;
|
||||
const OFFSET: f32 = (TILE_SIZE + GAP_SIZE) / 2.;
|
||||
const TOTAL_WIDTH: f32 = (TILE_SIZE + GAP_SIZE) * TILES as f32;
|
||||
const TILE_SPACE: f32 = TOTAL_WIDTH / TILES as f32;
|
||||
const OFFSET: f32 = TILE_SPACE / 2.;
|
||||
const CENTER: f32 = TOTAL_WIDTH / 2.;
|
||||
|
||||
let tile_mesh = Mesh2dHandle(meshes.add(Rectangle::new(TILE_SIZE, TILE_SIZE)));
|
||||
|
|
Loading…
Reference in a new issue