diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/init.moon | 4 | ||||
| -rw-r--r-- | app/koch.moon (renamed from app/quasihilbert.moon) | 13 | ||||
| -rw-r--r-- | app/twisted.moon | 6 |
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 |
