Added spiral to splash

This commit is contained in:
Devine Lu Linvega 2019-07-26 17:36:40 +09:00
parent 9240dc4cb8
commit 180277d3eb

View File

@ -210,9 +210,36 @@ function Commander (ronin) {
this.splash = `; welcome to ronin - v2.2
(clear)
; ronin path
(def align {
:x (sub frame-rect:c 500)
:y (sub frame-rect:m 150)})
(defn rec
(v)
(if
(gt v 0)
(
; params
(def spiral-x
(add frame-rect:c
(mul
(cos
(add
(div v 17)
(time 0.001)))
(div v 2))))
(def spiral-y
(add frame-rect:m
(mul
(sin
(div v 11))
(div v 2))))
(def spiral-r v)
; draw
(stroke
(circle spiral-x spiral-y spiral-r) 1 "#72dec211")
(rec
(sub v 0.3)))))
(rec 300)
(def align { :x
(sub frame-rect:c 150) :y
(sub frame-rect:m 150)})
; outline
(fill
(svg align:x align:y "M15,15 L15,15 L285,15 L285,285 L15,285 Z") "#fff")