import echo::{Context, Cell, prev_cell_sp, contain};
import lygia::color::hueShift::hueShift;
import lygia::math::rotate2d::rotate2d;
fn map_cell(i: Cell, ctx: Context) -> Cell {
var p = contain(i.sp, ctx.resolution);
var o = i;
let c = prev_cell_sp(rotate2d(0.05) * i.sp + vec2(0));
o.ch = c.ch;
o.fg = c.fg;
o.bg = c.bg;
// o.fg = vec3(1, 0, 0);
o.fg = hueShift(o.fg, 0.05) * 1.01;
o.bg = mix(i.bg, o.bg, 0.99);
return echo::map_cell_selection(o, i, ctx);
}