Small library for generating claude-code like unicde block mascots, and providing animations when they do stuff
1
fork

Configure Feed

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

fix: arms are 1 row, legs only overhang when numlegs > width/2

- Arms now render on a single row at the vertical midpoint
- Leg overhang (1 col outside body) only activates when legs would
be too cramped (numlegs > width/2), otherwise stays within body

+6 -9
+6 -9
src/main.rs
··· 56 56 format!("\x1b[38;2;{};{};{}m\u{2588}\x1b[0m", r, g, b) 57 57 } 58 58 59 - /// Build a leg row mask. Legs span from 1 col outside the body on each side, 60 - /// giving a total span of width+2. Returns a vec of bools of that total width, 61 - /// where index 0 = 1 col left of body. Also returns the offset (1) so the 62 - /// caller knows how to align it. 59 + /// Build a leg row mask. If numlegs > width/2, legs extend 1 col outside the 60 + /// body on each side for extra space. Returns a vec of bools and the overhang amount. 63 61 fn leg_mask(width: usize, numlegs: usize) -> (Vec<bool>, usize) { 64 - let overhang = 1usize; 62 + let overhang = if numlegs > width / 2 { 1 } else { 0 }; 65 63 let total = width + 2 * overhang; 66 64 let mut mask = vec![false; total]; 67 65 if numlegs == 0 { ··· 121 119 let eye_left = width / 3; 122 120 let eye_right = width - 1 - (width / 3); 123 121 124 - // Arm vertical range: middle portion of the body 125 - let arm_top = height / 3; 126 - let arm_bottom = height - 1 - (height / 3); 122 + // Arm row: single row at the vertical middle of the body 123 + let arm_row = height / 2; 127 124 128 125 let arm_pad = armsize; 129 126 let total_width_chars = arm_pad + width + arm_pad; ··· 132 129 133 130 // -- Body rows (with arms and eyes) -- 134 131 for row in 0..height { 135 - let has_arms = row >= arm_top && row <= arm_bottom; 132 + let has_arms = row == arm_row; 136 133 137 134 for col in 0..total_width_chars { 138 135 let in_left_arm = col < arm_pad;