import echo::{Context, Cell, contain};
import lygia::generative::snoise::snoise3;
fn map_cell(i: Cell, ctx: Context) -> Cell {
var p = contain(i.sp, ctx.resolution);
var o = i;
let speed = 0.15;
let frequency = 2f;
let noiseAmount = snoise3(vec3(ctx.time * speed, p * frequency));
o.fg.r += max(0, noiseAmount);
o.bg.r += max(0, noiseAmount);
o.ch += u32(pow(noiseAmount, 2f) * 4);
return echo::map_cell_selection(o, i, ctx);
}