├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .vscode
├── launch.json
└── tasks.json
├── LICENSE
├── README.md
├── browserslist
├── dist
├── bundle.js
├── bundle.prod.js
├── index.html
├── index.prod.html
└── out.png.html
├── package.json
├── pnginator.rb
├── src
├── audio.js
├── automaton.fuckyou.js
├── automaton.json
├── config.json
├── geoms
│ ├── circle.js
│ ├── cube.js
│ └── octahedron.js
├── html
│ └── index.html
├── images
│ └── char5x5.png
├── libs
│ ├── glcat-path-gui.js
│ ├── glcat-path.js
│ ├── glcat.js
│ ├── mathcat.js
│ ├── ultracat.js
│ └── xorshift.js
├── main.js
├── paths
│ ├── bloom.js
│ ├── box.js
│ ├── circle.js
│ ├── distance.js
│ ├── dof.js
│ ├── log.js
│ ├── particles.js
│ ├── patterns.js
│ ├── postfx.js
│ ├── racer.js
│ ├── raymarch.js
│ ├── render.js
│ ├── trails.js
│ ├── ui.js
│ └── very-plane.js
├── shaders
│ ├── -common.glsl
│ ├── audio.frag
│ ├── bg.frag
│ ├── bloom-post.frag
│ ├── bloom-pre.frag
│ ├── box.frag
│ ├── box.vert
│ ├── circle.frag
│ ├── circle.vert
│ ├── distance.frag
│ ├── dof.frag
│ ├── fxaa.frag
│ ├── g-buffer.frag
│ ├── gauss.frag
│ ├── glitch.frag
│ ├── inspector.frag
│ ├── log-compute.frag
│ ├── log-render.frag
│ ├── log-render.vert
│ ├── object-with-uv.vert
│ ├── object.vert
│ ├── particles-compute.frag
│ ├── particles-render.frag
│ ├── particles-render.vert
│ ├── patterns-compute.frag
│ ├── patterns-render.frag
│ ├── patterns-render.vert
│ ├── post.frag
│ ├── quad.vert
│ ├── racer-compute.frag
│ ├── racer-render.frag
│ ├── racer-render.vert
│ ├── raymarch.frag
│ ├── render.frag
│ ├── return.frag
│ ├── shift.glsl
│ ├── tone.frag
│ ├── trails-compute.frag
│ ├── trails-render.frag
│ ├── trails-render.vert
│ ├── ui.frag
│ ├── ui.vert
│ ├── uv.frag
│ ├── very-plane.frag
│ └── very-plane.vert
└── styles
│ └── main.scss
├── webpack.config.js
└── yarn.lock
/.eslintignore:
--------------------------------------------------------------------------------
1 | /dist
2 | /node_modules
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | "env": {
3 | "es6": true,
4 | "browser": true,
5 | "commonjs": true
6 | },
7 |
8 | "parserOptions": {
9 | "sourceType": "module",
10 | "ecmaVersion": 2017
11 | },
12 |
13 | "extends": [
14 | "eslint:recommended"
15 | ],
16 |
17 | "rules": {
18 | // basics
19 | "indent": [ "error", 2, { // indentation should be 2 spaces
20 | "flatTernaryExpressions": true, // ternary should be performed in flat
21 | "MemberExpression": 0 // member chain should be performed in flat
22 | } ], // it forces 2 spaces indentation
23 | "linebreak-style": [ "error", "unix" ], // fuck you, CRLF
24 | "quotes": [ "error", "single" ], // quotes must be single
25 | "eqeqeq": [ "error", "always" ], // fuck you, `==`
26 |
27 | // variables
28 | "no-unused-vars": [ "off" ], // unused vars are okay
29 | "no-undef": [ "warn" ], // draws yellow line below undefined vars
30 |
31 | // omittables
32 | "semi": [ "error", "always" ], // semicolon is required
33 | "curly": [ "error" ], // it kills `if (foo) bar++;`
34 | "arrow-parens": [ "error", "always" ], // it kills `arg => { func(); }`
35 |
36 | // force spacing (I prefer super sparse code!)
37 | "array-bracket-spacing": [ "error", "always" ], // it kills `[val1, val2]`
38 | "arrow-spacing": [ "error", { "before": true, "after": true } ], // it kills `( arg )=>{ func(); }`
39 | "block-spacing": [ "error", "always" ], // it kills `if ( cond ) {func();}`
40 | "comma-spacing": [ "error", { "before": false, "after": true } ], // it kills `func( arg1,arg2 )`
41 | "computed-property-spacing": [ "error", "always" ], // it kills `arr[i]`
42 | "key-spacing": [ "error", { "beforeColon": false, "afterColon": true } ], // it kills `{ key:val }`
43 | "keyword-spacing": [ "error", { "before": true, "after": true } ], // it kills `}else{`
44 | "object-curly-spacing": [ "error", "always" ], // it kills `{key: val}`
45 | "semi-spacing": [ "error", { "before": false, "after": true } ], // it kills `func1();func2();`
46 | "space-before-blocks": [ "error", "always" ], // it kills `if (cond){`
47 | "space-in-parens": [ "error", "always" ], // it kills `func (arg)`
48 | "space-infix-ops": [ "error" ], // it kills val1+val2
49 | "space-unary-ops": [ "error", { "words": true, "nonwords": false, "overrides": { "++": true, "--": true } } ], // it kills `val++`
50 | "spaced-comment": [ "error", "always" ], // it kills `//this is comment`
51 |
52 | // ban spacing
53 | "func-call-spacing": [ "error", "never" ], // no-trailing-spaces. yea.
54 | "no-trailing-spaces": [ "error", { "ignoreComments": true } ], // no-trailing-spaces. yea.
55 | "no-whitespace-before-property": [ "error" ], // it kills `obj .key`
56 | "space-before-function-paren": [ "error", { "anonymous": "never", "named": "never", "asyncArrow": "always" } ], // it kills `func()`
57 |
58 | // others
59 | "no-eval": [ "warn" ], // wow, are you really going to use `eval()`? are you mad lol
60 | "no-implied-eval": [ "warn" ], // ok don't
61 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', // here is nodejs, console.log is innocent
62 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' // debuggerとか使う?
63 | }
64 | };
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /node_modules
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "chrome",
9 | "request": "launch",
10 | "name": "Launch Chrome against localhost",
11 | "url": "http://localhost:8080",
12 | "webRoot": "${workspaceFolder}"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=733558
3 | // for the documentation about the tasks.json format
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "go",
9 | "problemMatcher": []
10 | },
11 | {
12 | "type": "npm",
13 | "script": "build",
14 | "problemMatcher": []
15 | },
16 | {
17 | "type": "npm",
18 | "script": "h",
19 | "problemMatcher": []
20 | }
21 | ]
22 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018 FMS_Cat
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Until
2 |
3 | "Until" by FMS_Cat
4 | 64KB WebGL Intro
5 | 2nd Place @ [Tokyo Demo Fest 2018](http://tokyodemofest.jp/2018/), Combined Demo Compo
6 | Heavily relied on [Automaton](https://github.com/FMS-Cat/automaton), my own animation engine
7 |
8 | 
9 |
10 | ## Run
11 |
12 | - Production build (It's 64K HTML!)
13 | - [1920x1080](https://fms-cat.github.io/until/dist/out.png.html#1920x1080)
14 | - [1280x720](https://fms-cat.github.io/until/dist/out.png.html#1280x720)
15 | - [640x360](https://fms-cat.github.io/until/dist/out.png.html#640x360)
16 |
17 | - Development build (feat. Automaton GUI and Pass inspector!!)
18 | - [1920x1080](https://fms-cat.github.io/until/dist/index.html#1920x1080)
19 | - [1280x720](https://fms-cat.github.io/until/dist/index.html#1280x720)
20 | - [640x360](https://fms-cat.github.io/until/dist/index.html#640x360)
21 |
22 | ## Links
23 |
24 | - [🔦 Pouet, Prod page](https://www.pouet.net/prod.php?which=79365)
25 | - [🎥 YouTube, Captured stream](https://www.youtube.com/watch?v=XYFGjFPrLIk)
26 | - [💻 Source code (GitHub)](https://github.com/FMS-Cat/until)
27 | - [🐔 Twitter (@FMS_Cat), follow me!](https://twitter.com/FMS_Cat)
28 |
29 | ## License
30 |
31 | MIT
--------------------------------------------------------------------------------
/browserslist:
--------------------------------------------------------------------------------
1 | > 0.25%
2 | not dead
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Webpack App
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/dist/index.prod.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Webpack App
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/dist/out.png.html:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fms-cat/until/769ef1b6a1e952800c9a3ad041c8704419337dab/dist/out.png.html
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wenis",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "scripts": {
7 | "go": "webpack-dev-server --hot --mode development",
8 | "fuck": "webpack --mode development && webpack --mode production && ruby pnginator.rb ./dist/bundle.prod.js ./dist/out.png.html",
9 | "h": "http-server dist"
10 | },
11 | "devDependencies": {
12 | "@fms-cat/automaton": "^2.0.4",
13 | "eslint": "^5.3.0",
14 | "html-webpack-plugin": "^3.2.0",
15 | "jszip": "^3.1.5",
16 | "raw-loader": "^0.5.1",
17 | "url-loader": "^1.0.1",
18 | "webpack": "^4.16.5",
19 | "webpack-cli": "^3.1.0",
20 | "webpack-dev-server": "^3.1.9"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/pnginator.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby -w
2 |
3 | # pnginator.rb: pack a .js file into a PNG image with an HTML payload;
4 | # when saved with an .html extension and opened in a browser, the HTML extracts and executes
5 | # the javascript.
6 |
7 | # Usage: ruby pnginator.rb input.js output.png.html
8 |
9 | # By Gasman
10 | # from an original idea by Daeken: http://daeken.com/superpacking-js-demos
11 |
12 |
13 | MAX_WIDTH = 4096
14 | USE_PNGOUT = true
15 |
16 | require 'zlib'
17 | require 'tempfile'
18 |
19 | input_filename, output_filename = ARGV
20 |
21 | f = File.open(input_filename, 'rb')
22 | js = f.read
23 | f.close
24 |
25 | if js.length < MAX_WIDTH
26 | # js fits onto one pixel line
27 | js += "\x00"
28 | scanlines = [js]
29 | width = js.length
30 | height = 1
31 |
32 | # Daeken's single-pixel-row bootstrap (requires js string to be reversed)
33 | # (edit by Gasman: change eval to (1,eval) to force global evaluation and avoid massive slowdown)
34 | # html = "