]> git.cworth.org Git - zombocom-ai/blobdiff - index.js
Set bus timer to 30 seconds
[zombocom-ai] / index.js
index 606fba79adbd99c68135ced4f9efa854c601980e..4ed609917e9d53d7c749a8b9faf0dde00c2d8a53 100644 (file)
--- a/index.js
+++ b/index.js
@@ -175,7 +175,7 @@ function emit_bus_timer() {
 
 function start_bus_timer() {
     const bus = state.bus;
-    bus.timer = 3; // XXX: 30 in production
+    bus.timer = 30;
     emit_bus_timer();
     bus_interval = setInterval(emit_bus_timer, 1000);
 }
@@ -191,7 +191,10 @@ bus_code = [
 for i in range(400):
   set_color('midnight blue' if i % 2 == 0 else 'navy blue')
   set_opacity(0.5)
-  random_dot()`,
+  random_dot()
+
+# The only limit is your fingers!
+fingers()`,
 
     `def random_line():
   x = random_within(512) - 60
@@ -204,7 +207,10 @@ for i in range(400):
 
 for i in range(200):
   set_color('black')
-  random_line()`,
+  random_line()
+
+# This is Zombo.com. Welcome!
+mouths()`,
 
     `def random_blob():
   move_to(random_within(512), random_within(512))
@@ -214,7 +220,10 @@ for i in range(200):
 
 for i in range(100):
   set_random_color()
-  random_blob()`,
+  random_blob()
+
+# The infinite eyes is possible!
+eyes()`,
 
     `def random_curve():
   move_to(random_within(512), random_within(512))
@@ -223,7 +232,11 @@ for i in range(100):
 
 for i in range(200):
   set_color('pink' if i % 2 == 0 else 'lime green')
-  random_curve()`
+  random_curve()
+
+# You can do anything!
+fingers()
+`
 ];
 
 io_bus.on("connection", (socket) => {
@@ -287,7 +300,8 @@ io_bus.on("connection", (socket) => {
            // Give all clients the new image
            io_bus.emit('output', filename);
        } catch (e) {
-           console.log("Error executing turtle script: " + e);
+           // Send any error out to the users
+           io_bus.emit('error', e.toString())
        }
     });