This repository has no description
0

Configure Feed

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

🍱 Continue Schedule Hell

+23 -4
+23 -4
examples/schedule-hell/src/scenes/intro.rs
··· 70 70 let mut claps = canvas.random_layer_within( 71 71 &mut ctx.extra.rng, 72 72 "claps", 73 - &ctx.extra.bass_pattern_at.translated(2, 0), 73 + &Region::from_center_and_size( 74 + canvas.world_region.center(), 75 + (2, 2), 76 + )?, 74 77 ); 78 + 75 79 claps.paint_all_objects(Fill::Solid(Color::Red)); 76 80 canvas.add_or_replace_layer(claps); 77 81 Ok(()) ··· 82 86 let mut foley = canvas.random_layer_within( 83 87 &mut ctx.extra.rng, 84 88 "percs", 85 - &ctx.extra.bass_pattern_at.translated(2, 0), 89 + &Region::from_center_and_size( 90 + canvas.world_region.center(), 91 + (2, 2), 92 + )?, 86 93 ); 87 94 foley.paint_all_objects(Fill::Translucent(Color::Red, 0.5)); 88 95 canvas.add_or_replace_layer(foley); ··· 94 101 let mut qanda = canvas.random_curves_within( 95 102 &mut ctx.extra.rng, 96 103 "qanda", 97 - &ctx.extra.bass_pattern_at.translated(-1, -1).enlarged(1, 1), 104 + &Region::from_center_and_size( 105 + canvas.world_region.center(), 106 + (4, 4), 107 + )?, 98 108 3..=5, 99 109 ); 100 110 qanda.paint_all_objects(Fill::Solid(Color::Orange)); ··· 122 132 }) 123 133 .on_note("goup", &|canvas, ctx| { 124 134 let canvas_line_width = canvas.object_sizes.default_line_width; 135 + 136 + let area = Region::from_center_and_size( 137 + canvas.world_region.center(), 138 + (6, 6), 139 + )?; 140 + let hole = area.resized(-4, -4); 141 + 125 142 let mut goup = canvas.random_curves_within( 126 143 &mut ctx.extra.rng, 127 144 "goup", 128 - &ctx.extra.bass_pattern_at.translated(0, 2), 145 + &area, 129 146 3..=5, 130 147 ); 148 + 149 + goup.remove_all_objects_in(&hole); 131 150 goup.paint_all_objects(Fill::Solid(Color::Green)); 132 151 goup.object_sizes.default_line_width = 133 152 canvas_line_width * 4.0 * ctx.stem("goup").velocity_relative();