groworld/plant-eyes/test-scripts/spark.scm

25 lines
617 B
Scheme
Raw Normal View History

2009-09-28 08:57:29 +00:00
(clear)
(texture (load-texture "textures/spark.png"))
(hint-unlit)
(define (build-pickup x y)
(let ((p (build-ribbon 30)))
(with-primitive p
(pdata-index-map!
(lambda (i p)
(vector (cos (/ i x)) (sin (/ i y)) (/ i (pdata-size))))
"p")
(pdata-index-map!
(lambda (i p)
(* 0.3 (sin (* 3.141 (/ i (pdata-size))))))
"w")
(pdata-map!
(lambda (c)
(vector 1 1 1))
"c"))
p))
(build-pickup 5 3)