This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Data Representation | |
function isAtom(x) { return typeof x !== 'object' || x === null; } | |
function isList(x) { return Array.isArray(x); } | |
// Parser (Converting Text to Data) | |
function parse(input) { | |
// Better tokenization that handles multi-line input | |
let tokens = input.replace(/\(/g, ' ( ') | |
.replace(/\)/g, ' ) ') | |
.replace(/\n/g, ' ') // normalize newlines |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; | |
uniform vec2 resolution; | |
#define PI 3.1415926535898 | |
#define EPS 0.01 | |
const float clipFar = 16.0; |