this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

✨ Make hat circle go weeee correctly

authored by

Gwenn Le Bihan and committed by
Ewen Le Bihan
1168e513 80382dce

+9 -5
+9 -5
src/main.rs
··· 48 48 kicks.add_object("bottom left", circle_at(1, end_y), fill); 49 49 kicks.add_object("bottom right", circle_at(end_x, end_y), fill); 50 50 canvas.replace_or_create_layer(kicks); 51 + 52 + let mut ch = Layer::new("ch"); 53 + ch.add_object("dot", Object::SmallCircle(Anchor(2, 1)), Some(Fill::Solid(Color::Gray))); 54 + canvas.replace_or_create_layer(ch); 51 55 }) 52 56 .sync_audio_with(&args.flag_sync_with.unwrap()) 53 57 .on_note("anchor kick", &|canvas, ctx| { ··· 193 197 fn hat_region_cycle(world: &Region, current: &Region) -> (i32, i32) { 194 198 let (end_x, end_y) = { 195 199 let (x, y) = world.end; 196 - (x - 1, y - 1) 200 + (x - 2, y - 2) 197 201 }; 198 202 199 203 match current.start { 200 204 // top row 201 - (x, 0) if x <= end_x => (1, 0), 205 + (x, 1) if x < end_x => (1, 0), 202 206 // right column 203 - (x, y) if x == end_x && y <= end_y => (0, 1), 207 + (x, y) if x == end_x && y < end_y => (0, 1), 204 208 // bottom row 205 - (x, y) if y == end_y && x > 0 => (-1, 0), 209 + (x, y) if y == end_y && x > 1 => (-1, 0), 206 210 // left column 207 - (0, y) if y > 0 => (0, -1), 211 + (1, y) if y > 1 => (0, -1), 208 212 _ => unreachable!(), 209 213 } 210 214 }