aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-10-22 13:36:24 +0000
committers-ol <s-ol@users.noreply.github.com>2018-10-22 13:43:09 +0000
commit72829c68ec50c432b38fefcb28613c75657fb2bb (patch)
tree40e2c827d76bfea70d1df0e0dee678016d3b1702 /app
parentwebm encoding for canvasapps (diff)
downloadmmm-72829c68ec50c432b38fefcb28613c75657fb2bb.tar.gz
mmm-72829c68ec50c432b38fefcb28613c75657fb2bb.zip
CanvasApp whammy.js webm exporting
Diffstat (limited to 'app')
-rw-r--r--app/init.moon4
-rw-r--r--app/koch.moon (renamed from app/quasihilbert.moon)13
-rw-r--r--app/twisted.moon6
3 files changed, 7 insertions, 16 deletions
diff --git a/app/init.moon b/app/init.moon
index e97d6cc..0cf846a 100644
--- a/app/init.moon
+++ b/app/init.moon
@@ -33,9 +33,9 @@ experiments =
desc: 'Playground for Functional Tags'
render: -> require '.tags'
},
- quasihilbert: {
+ koch: {
desc: "lil' fractal thing",
- render: -> require '.quasihilbert'
+ render: -> require '.koch'
},
destify = (name, route) ->
diff --git a/app/quasihilbert.moon b/app/koch.moon
index 92b7c2e..3a0ef29 100644
--- a/app/quasihilbert.moon
+++ b/app/koch.moon
@@ -4,13 +4,13 @@ on_client ->
import CanvasApp from require 'lib.canvasapp'
import hsl from require 'lib.color'
- class TwistedDemo extends CanvasApp
+ class KochDemo extends CanvasApp
width: 600
height: 600
length: math.pi * 2
new: (@iterations=3, @scale=.5) =>
- super!
+ super true
hue = Math.random!
@background = {1 - hue, .3, .3}
@@ -61,11 +61,4 @@ on_client ->
@ctx\rotate a_sixth/2
draw @iterations, 3
- twisted = TwistedDemo!
- document.body\appendChild twisted.canvas
- -- window\setTimeout twisted\start, 500
-
- { :location } = window
- if location.search and location.search\find 'render'
- twisted\render!
-
+ append KochDemo!.node
diff --git a/app/twisted.moon b/app/twisted.moon
index 325d408..0ab30b1 100644
--- a/app/twisted.moon
+++ b/app/twisted.moon
@@ -9,7 +9,7 @@ on_client ->
height: 400
length: math.pi * 4
new: =>
- super!
+ super true
@background = {Math.random!, Math.random!/3+.2, Math.random!/4}
hue = Math.random!
@shades = setmetatable {}, __index: (key) =>
@@ -35,6 +35,4 @@ on_client ->
draw i
draw 1
- twisted = TwistedDemo!
- document.body\appendChild twisted.canvas
- twisted\start!
+ document.body\appendChild TwistedDemo!.node