await visibility(), (() => {
const scene = new ln.Scene()
const n = 15
for( var x = -n*1.5; x <=n*1.5; x++) {
for( let y = -n; y <= n; y++ ) {
let p = Math.random()*0.25 + 0.2
let dx = Math.random()*0.5 - 0.25
let dy = Math.random()*0.5 - 0.25
let fx = x + dx*0
let fy = y + dy*0
let fz = Math.random() * max_height + .1
let shape = new ln.Cube(new ln.Vector(fx - p, fy - p, 0), new ln.Vector(fx + p, fy + p, fz))
scene.add(shape)
}
}
const offset = .5;
const eye = new ln.Vector(offset, -n, cam_y)
const center = new ln.Vector(0,1,0)
const up = new ln.Vector(0, 0, 1)
const r = 7.5;
scene.add( new ln.OutlineSphere( center, up, new ln.Vector(-offset,n+(r*2),r/2), r*2) )
const width = 512*1.5
const height = 512
const paths = scene.render(eye, center, up, width, height, 90, 1, 100, 0.01)
return svg`${ln.toSVG(paths, width, height)}`
})()