From 180277d3eb623f5e14c804930f5568dce2675e69 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 26 Jul 2019 17:36:40 +0900 Subject: [PATCH] Added spiral to splash --- desktop/sources/scripts/commander.js | 33 +++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js index 1122061..0d180a6 100644 --- a/desktop/sources/scripts/commander.js +++ b/desktop/sources/scripts/commander.js @@ -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")