Ported some examples
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
;
|
||||
(echo "Loading prelude.lisp")
|
||||
;
|
||||
(def frame-rect (frame))
|
||||
; translate
|
||||
(defn translate
|
||||
(r p)
|
||||
(clone r
|
||||
(rect
|
||||
(of p :x)
|
||||
(of p :y)
|
||||
(of r :w)
|
||||
(of r :h))))
|
||||
(rect p:x p:y r:w r:h)))
|
||||
; times
|
||||
(defn times
|
||||
(v f)
|
||||
|
||||
@@ -204,22 +204,18 @@ function Commander (ronin) {
|
||||
|
||||
// Splash
|
||||
|
||||
this.splash = `; welcome to ronin - v2.1
|
||||
this.splash = `; welcome to ronin - v2.2
|
||||
(clear)
|
||||
; ronin path
|
||||
(def align {
|
||||
:x (sub (of (frame) :c) 500)
|
||||
:y (sub (of (frame) :m) 150)})
|
||||
:x (sub frame-rect:c 500)
|
||||
:y (sub frame-rect:m 150)})
|
||||
; outline
|
||||
(fill
|
||||
(svg
|
||||
(of align :x)
|
||||
(of align :y) "M15,15 L15,15 L285,15 L285,285 L15,285 Z") "#fff")
|
||||
(svg align:x align:y "M15,15 L15,15 L285,15 L285,285 L15,285 Z") "#fff")
|
||||
; stroke
|
||||
(stroke
|
||||
(svg
|
||||
(of align :x)
|
||||
(of align :y) "M60,60 L195,60 A45,45 0 0,1 240,105 A45,45 0 0,1 195,150 L60,150 M195,150 A45,45 0 0,1 240,195 L240,240 ") 5 "#000")`
|
||||
(svg align:x align:y "M60,60 L195,60 A45,45 0 0,1 240,105 A45,45 0 0,1 195,150 L60,150 M195,150 A45,45 0 0,1 240,195 L240,240 ") 5 "#000")`
|
||||
|
||||
String.prototype.insert = function (s, i) { return [this.slice(0, i), `${s}`, this.slice(i)].join('') }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user