simpler calculation
parent
e57ebb51a8
commit
866490795d
|
@ -76,9 +76,9 @@ fn setup(
|
||||||
const TILES: i32 = 9;
|
const TILES: i32 = 9;
|
||||||
const TILE_SIZE: f32 = 50.;
|
const TILE_SIZE: f32 = 50.;
|
||||||
const GAP_SIZE: f32 = 10.;
|
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 TOTAL_WIDTH: f32 = (TILE_SIZE + GAP_SIZE) * TILES as f32;
|
||||||
const TILE_SPACE: f32 = TOTAL_WIDTH / TILES as f32;
|
const TILE_SPACE: f32 = TOTAL_WIDTH / TILES as f32;
|
||||||
|
const OFFSET: f32 = TILE_SPACE / 2.;
|
||||||
const CENTER: f32 = TOTAL_WIDTH / 2.;
|
const CENTER: f32 = TOTAL_WIDTH / 2.;
|
||||||
|
|
||||||
let tile_mesh = Mesh2dHandle(meshes.add(Rectangle::new(TILE_SIZE, TILE_SIZE)));
|
let tile_mesh = Mesh2dHandle(meshes.add(Rectangle::new(TILE_SIZE, TILE_SIZE)));
|
||||||
|
|
Loading…
Reference in New Issue