diff --git a/desktop/icon.png b/desktop/icon.png index e7f6c55..3bd7dbb 100644 Binary files a/desktop/icon.png and b/desktop/icon.png differ diff --git a/desktop/sources/index.html b/desktop/sources/index.html index 9474f27..6a57f64 100644 --- a/desktop/sources/index.html +++ b/desktop/sources/index.html @@ -46,7 +46,7 @@ ronin.controller.add("default","View","Toggle Commander",() => { ronin.commander.toggle(); },"CmdOrCtrl+K"); ronin.controller.add("default","Project","Run",() => { ronin.commander.run(); },"CmdOrCtrl+R"); ronin.controller.add("default","Project","Reload Run",() => { ronin.source.revert(); ronin.commander.run(); },"CmdOrCtrl+Shift+R"); - ronin.controller.add("default","Project", "Toggle Animation (experimental)",() => { ronin.animate(!ronin.always); },"CmdOrCtrl+Shift+T"); + ronin.controller.add("default","Project", "Animate",() => { ronin.animate(!ronin.always); },"CmdOrCtrl+Shift+T"); ronin.controller.add("default","Theme","Open Theme",() => { ronin.theme.open() },"CmdOrCtrl+Shift+O") ronin.controller.add("default","Theme","Reset Theme",() => { ronin.theme.reset() },"CmdOrCtrl+Shift+Backspace") ronin.controller.addSpacer('default', 'Theme', 'Download') diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index 4db3261..3bcb7e9 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -61,6 +61,7 @@ function Ronin () { } this.animate = (b = true) => { + if(this.always === b){ return } this.always = b this.commander.run() } diff --git a/examples/animate.lisp b/examples/animate.lisp index b3b4690..fa12b3c 100644 --- a/examples/animate.lisp +++ b/examples/animate.lisp @@ -1,10 +1,13 @@ ; animate ( -(ronin animate) -(def t (sin (div (time) 100))) + (def start (get ronin "animate")) + + (def t (sin (div (time) 100))) -(def pos (add 200 (mul 30 t))) -(defn square (a) (rect a a a a)) -(stroke (square pos) 1 "red") + (def pos (add 200 (mul 30 t))) + (defn square (a) (rect a a a a)) + (stroke (square pos) 1 "red") + + (start) ) \ No newline at end of file