layer = (color) => `<g>
${array(n).map((ns,idx) => {
const v = PVector(PVector.random(PVector(0, 0), PVector(0,0)).x,((h/n) * idx * 1.25));
const pts = [v.clone()]
const this_seed = seed;
for(let i = 0; i < trailLength; i++){
const angle2 = simplex.noise3D(v.x/noiseScale, v.y/noiseScale, seed) * TAU/2
const angle = simplex.noise3D(v.x/noiseScale, v.y/noiseScale, this_seed) * TAU/4
console.log(angle)
const dir = PVector.fromAngle(angle)
v.add(dir.setMag(stepLength))
if(!(v.x > 0 && v.x < w && v.y > 0 && v.y < h)) break
pts.push(v.clone())
}
const points = pts.map ( d => [d.x,d.y]);
return `<path stroke="${color}" d="${line(points)}" fill="none" />`
}).join('\n')}
</g>`