diff --git a/src/states/linear/constants.rs b/src/states/linear/constants.rs index ae03297..3099699 100644 --- a/src/states/linear/constants.rs +++ b/src/states/linear/constants.rs @@ -6,8 +6,13 @@ pub const CENTER_Y: f32 = 0.0; // pub const FACTOR_RADIUS: f32 = FACTOR as f32 / 2.0; +// основная размерность и масштаб +pub const SCALE: f32 = 1.0; pub const STEP: f32 = FACTOR as f32 / SCALE; -pub const SCALE: f32 = 2.0; + +// зависимые размеры +pub const ROUND_BALL_SIZE: f32 = STEP; +pub const BALL_RADIUS: f32 = ROUND_BALL_SIZE / 2.0; // Z-INDEXES pub const ROUND_BALL_Z: f32 = 10.0; diff --git a/src/states/linear/system_ball.rs b/src/states/linear/system_ball.rs index b74b174..be907ed 100644 --- a/src/states/linear/system_ball.rs +++ b/src/states/linear/system_ball.rs @@ -26,7 +26,7 @@ pub fn spawn_round_ball( commands.spawn(( Sprite { image, - custom_size: Some(Vec2::splat(STEP)), + custom_size: Some(Vec2::splat(ROUND_BALL_SIZE)), ..default() }, Transform::from_translation((track.segments[0].start_pos).extend(ROUND_BALL_Z)),