diff options
| author | s-ol <s+removethis@s-ol.nu> | 2021-10-04 14:13:31 +0000 |
|---|---|---|
| committer | s-ol <s+removethis@s-ol.nu> | 2021-10-04 14:48:31 +0000 |
| commit | e7b84a65084e17d5da64fe1fa716d7a186ed701c (patch) | |
| tree | 61b2c6b140c644c0544b3255aae0069550d963aa /root/projects/demoloops/twisted | |
| parent | add mmmfs pdf (diff) | |
| download | mmm-e7b84a65084e17d5da64fe1fa716d7a186ed701c.tar.gz mmm-e7b84a65084e17d5da64fe1fa716d7a186ed701c.zip | |
Split root out of mmm repo
Diffstat (limited to 'root/projects/demoloops/twisted')
| -rw-r--r-- | root/projects/demoloops/twisted/text$moonscript -> mmm$component.moon | 43 | ||||
| -rw-r--r-- | root/projects/demoloops/twisted/video: video$mp4.mp4 | bin | 1717374 -> 0 bytes |
2 files changed, 0 insertions, 43 deletions
diff --git a/root/projects/demoloops/twisted/text$moonscript -> mmm$component.moon b/root/projects/demoloops/twisted/text$moonscript -> mmm$component.moon deleted file mode 100644 index 3fd11b0..0000000 --- a/root/projects/demoloops/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! diff --git a/root/projects/demoloops/twisted/video: video$mp4.mp4 b/root/projects/demoloops/twisted/video: video$mp4.mp4 Binary files differdeleted file mode 100644 index c77e1ee..0000000 --- a/root/projects/demoloops/twisted/video: video$mp4.mp4 +++ /dev/null |
