Fixed issue with Lamda
This commit is contained in:
parent
6785286118
commit
0294c04858
@ -235,7 +235,7 @@ function Library (ronin) {
|
||||
this.sqrt = Math.sqrt // calculate the square root
|
||||
|
||||
this.sq = (a) => { // calculate the square
|
||||
return a * a;
|
||||
return a * a
|
||||
}
|
||||
|
||||
this.PI = Math.PI
|
||||
|
@ -152,7 +152,7 @@ function Lisp (lib = {}, includes = []) {
|
||||
}
|
||||
|
||||
const tokenize = function (input) {
|
||||
const i = input.replace(/^\;.*\n?/gm, '').replace('λ', 'lambda ').split('"')
|
||||
const i = input.replace(/^\;.*\n?/gm, '').replace(/λ /g, 'lambda ').split('"')
|
||||
return i.map(function (x, i) {
|
||||
return i % 2 === 0
|
||||
? x.replace(/\(/g, ' ( ')
|
||||
|
@ -1,14 +0,0 @@
|
||||
; gradients
|
||||
|
||||
(clear)
|
||||
(fill
|
||||
(svg "M405,15 L405,15 L150,150 L195,90 L240,135 L120,195 L75,90 L135,165 L120,225 L90,240 L60,210 L90,150 L255,180 L285,180 L285,165 ")
|
||||
(gradient
|
||||
(0 -50 600 175)
|
||||
("red" "orange" "blue" "green")))
|
||||
|
||||
(stroke
|
||||
(svg "M255,60 L255,60 L135,180 L75,60 L195,210 L120,225 L105,225 L165,255 L225,195 L255,135 L285,150") 1
|
||||
(gradient
|
||||
(50 0 180 0)
|
||||
("black" "white" "blue" "green")))
|
12
examples/basics/svg.gradient.lisp
Normal file
12
examples/basics/svg.gradient.lisp
Normal file
@ -0,0 +1,12 @@
|
||||
; gradients
|
||||
(clear)
|
||||
(fill
|
||||
(svg 0 0 "M405,15 L405,15 L150,150 L195,90 L240,135 L120,195 L75,90 L135,165 L120,225 L90,240 L60,210 L90,150 L255,180 L285,180 L285,165 ")
|
||||
(gradient
|
||||
(0 -50 600 175)
|
||||
("red" "orange" "blue" "green")))
|
||||
(stroke
|
||||
(svg 0 0 "M255,60 L255,60 L135,180 L75,60 L195,210 L120,225 L105,225 L165,255 L225,195 L255,135 L285,150") 1
|
||||
(gradient
|
||||
(50 0 180 0)
|
||||
("black" "white" "blue" "green")))
|
@ -1,6 +1,5 @@
|
||||
; animated recusive spiral
|
||||
; by @local_guru
|
||||
|
||||
(clear)
|
||||
(defn rec
|
||||
(v)
|
||||
@ -22,7 +21,8 @@
|
||||
(sin
|
||||
(div v 11))
|
||||
(div v 2)))
|
||||
(div v 2)) 1 "rgba(114,222, 194,0.1)")
|
||||
(div v 2)) 1 "rgba
|
||||
(114,222, 194,0.1)")
|
||||
(rec
|
||||
(sub v 0.3)))))
|
||||
; set false to stop
|
||||
|
@ -1,5 +1,5 @@
|
||||
; theme
|
||||
|
||||
; reads color from the theme.
|
||||
(clear)
|
||||
(def col
|
||||
(λ
|
Loading…
x
Reference in New Issue
Block a user