aboutsummaryrefslogtreecommitdiffstats
path: root/root/animations/twisted
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-11-22 07:44:13 +0000
committers-ol <s-ol@users.noreply.github.com>2018-11-22 07:46:03 +0000
commit9bb005e8084c00c18af77e5795dc62d74b793b47 (patch)
treed2ae687ca6da00733fd5ce726d7258210ac121f4 /root/animations/twisted
parentfix $order error logs (diff)
downloadmmm-9bb005e8084c00c18af77e5795dc62d74b793b47.tar.gz
mmm-9bb005e8084c00c18af77e5795dc62d74b793b47.zip
start adding content from s-ol.nu
Diffstat (limited to 'root/animations/twisted')
-rw-r--r--root/animations/twisted/description: text$plain1
-rw-r--r--root/animations/twisted/text$moonscript -> mmm$component.moon43
2 files changed, 0 insertions, 44 deletions
diff --git a/root/animations/twisted/description: text$plain b/root/animations/twisted/description: text$plain
deleted file mode 100644
index bbd63be..0000000
--- a/root/animations/twisted/description: text$plain
+++ /dev/null
@@ -1 +0,0 @@
-pseudo-3d twisting pyramid
diff --git a/root/animations/twisted/text$moonscript -> mmm$component.moon b/root/animations/twisted/text$moonscript -> mmm$component.moon
deleted file mode 100644
index 3fd11b0..0000000
--- a/root/animations/twisted/text$moonscript -> mmm$component.moon
+++ /dev/null
@@ -1,43 +0,0 @@
-assert MODE == 'CLIENT', '[nossr]'
-import CanvasApp from require 'mmm.canvasapp'
-import hsl from require 'mmm.color'
-
-Math = window.Math
-
-class TwistedDemo extends CanvasApp
- width: 500
- height: 400
- length: math.pi * 4
- new: (preview) =>
- if preview
- @width, @height = 120, 120
- super false, true
- else
- super true
- @background = {Math.random!, Math.random!/3+.2, Math.random!/4}
- hue = Math.random!
- @shades = setmetatable {}, __index: (key) =>
- with val = { hue, .7, key * .3 + .1} do rawset @, key, val
-
- draw: =>
- @ctx.fillStyle = hsl @background
- @ctx\fillRect 0, 0, @width, @height
- @ctx\translate @width/2, @height/2 + 70
-
- draw = (i) ->
- @ctx\save!
- @ctx\translate 0, -120*i
- s = 1 - 0.1 * math.sin @time + i*2
- s *= 0.8 - i * .4 * math.cos @time
- @ctx\scale s, s/2
- @ctx\rotate @time/4 + i * .6 * math.cos @time
- @ctx.fillStyle = hsl table.unpack @shades[i]
- @ctx\fillRect -80, -80, 160, 160
- @ctx\restore!
-
- for i=0,1,1/(20 + 19 * math.sin(@time / 2))
- draw i
- draw 1
-
--- .props['preview: fn -> mmm/component'] = => TwistedDemo true
-TwistedDemo!