'
'

delete "light"
power "glow" to 100


background #f00

?size = 60
?step = 6

?min = 4
?max = ?size'/ 2-1
?alpha_step = 100 / ?size


for ?min to ?max step ?step as ?sz
	
	?name = "voxel-?sz"
	?alpha = (?max - ?sz) * ?alpha_step
	
	'update
	create sprite ?sz as ?name
	
	color 100, ?alpha * 2, ?alpha, ?alpha
	add ?name frame 1, 1, 1 to ?sz, ?sz, ?sz
	
	'craft ?name center
	paint ?name to "ui"
	
next

' animation

?angle = 0
color 1
font size 2

do
	
	clear screen
	trace text "frame = " + (frame) center 0, 90
	trace text "fps = " + (fps) center 0, 80
	
	?angle + (delta)
	
	move "camera" to 0, 0, ?size * (1 + (cos ?angle / 4) / 2)
	
	for ?min to ?max step ?step as ?sz
		?name = "voxel-?sz"
		?offset = ?sz * (cos ?angle / 3)
		turn ?name by .2 * (delta), (delta), ?offset / (?size)
	next
	
	update
	
loop
x