(&mut self, pos: Vec2, up: Vec2)
| 747 | self.snow_bg.step(&self.args, dir); |
| 748 | } |
| 749 | |
| 750 | fn step(&mut self, dir: &Vec2) { |
| 751 | let yrange: Box<dyn Iterator<Item = usize>> = match dir.y { |
| 752 | -1 => Box::new((1..self.height).rev()), // down (process from bottom up) |
| 753 | _ => Box::new(0..self.height - 1), // up |
| 754 | }; |
| 755 | let xrange: Box<dyn Iterator<Item = usize>> = match dir.x { |
| 756 | -1 => Box::new((1..self.width).rev()), |
| 757 | _ => Box::new(0..self.width - 1), |
| 758 | }; |
| 759 | if dir.x == 0 { |
| 760 | for y in yrange { |
| 761 | for x in 0..self.width { |