├── img.jpg ├── src ├── Node.js ├── Stack.js ├── Mapping.js ├── Generator.js ├── Language.js ├── Parser.js ├── SeedRandom.js └── MapGenerator.js ├── .gitignore ├── package.json ├── wordtables ├── custom_demo.js ├── britney_1.js ├── britney_4.js ├── britney_2.js ├── aesop_1.js ├── britney_3.js ├── aesop_3.js ├── morrison_1.js ├── morrison_3.js ├── trump_1.js ├── aesop_4.js ├── morrison_4.js ├── watts_1.js ├── morrison_2.js ├── trump_3.js ├── aesop_2.js ├── watts_3.js ├── watts_4.js ├── trump_2.js ├── trump_4.js └── watts_2.js ├── web ├── maps.js ├── webgl.js ├── style.scss └── main.js ├── tests └── stack.test.js ├── README.md ├── dist ├── index.html ├── style.2a7dcb83.css └── style.2a7dcb83.css.map ├── texts ├── watts.txt ├── morrison.txt ├── aesop.txt ├── britney.txt └── trump.txt ├── guide.md └── index.html /img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noisyneuron/inverse/HEAD/img.jpg -------------------------------------------------------------------------------- /src/Node.js: -------------------------------------------------------------------------------- 1 | function Node(type, val, vsize, entropy) { 2 | // DO SOME TYPE CHECKING HERE??? 3 | this.type = type; 4 | this.val = val; 5 | this.vsize = vsize; 6 | this.entropy = entropy; 7 | } 8 | 9 | 10 | module.exports = Node; 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | yarn.lock* 2 | package-lock.json 3 | package-old.json 4 | 5 | # Dependency directories 6 | node_modules/ 7 | 8 | # Parcel related files 9 | .cache/ 10 | 11 | .DS_Store 12 | 13 | wordtables/custom_thesis.js 14 | wordtables/august_1.js 15 | 16 | post-receive.sample 17 | 18 | twittertokens 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inverse", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.html", 6 | "scripts": { 7 | "test": "jest" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "cssnano": "^4.1.10", 13 | "jest": "^25.2.7", 14 | "sass": "^1.26.3" 15 | }, 16 | "dependencies": {} 17 | } 18 | -------------------------------------------------------------------------------- /wordtables/custom_demo.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x": "have", 3 | "y": "ever", 4 | "t": "if", 5 | "+": "wondered", 6 | "*": "kinda", 7 | "/": "tried", 8 | "-": "wished", 9 | "radians": "when", 10 | "degrees": "tail", 11 | "sin": "apparently", 12 | "cos": "code", 13 | "tan": "drive", 14 | "asin": "life", 15 | "acos": "into", 16 | "atan": "turning", 17 | "abs": "death", 18 | "sqrt": "cry", 19 | "sign": "breathe", 20 | "floor": "danger", 21 | "ceil": "ocean", 22 | "fract": "fun", 23 | "pow": "fragments", 24 | "mod": "like", 25 | "min": "brittle", 26 | "max": "subdue", 27 | "step": "calm", 28 | "smoothstep": "joy", 29 | "mix": "poetry", 30 | "clamp": "spirit", 31 | "length": "soul", 32 | "distance": "money", 33 | "noise": "could", 34 | "fbm": "you", 35 | "swap": "its", 36 | "rotate": "look", 37 | "dup": "fame", 38 | "drop": "glory" 39 | } 40 | -------------------------------------------------------------------------------- /wordtables/britney_1.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"hips", 3 | "y":"deep", 4 | "t":"day", 5 | "+":"give", 6 | "*":"realize", 7 | "/":"battle", 8 | "-":"just", 9 | "radians":"spinning", 10 | "degrees":"cool", 11 | "sin":"cha", 12 | "cos":"mmm", 13 | "tan":"spin", 14 | "asin":"right", 15 | "acos":"space", 16 | "atan":"wantin", 17 | "abs":"always", 18 | "sqrt":"cause", 19 | "sign":"stop", 20 | "floor":"ground", 21 | "ceil":"door", 22 | "fract":"almost", 23 | "pow":"control", 24 | "mod":"end", 25 | "min":"level", 26 | "max":"high", 27 | "step":"move", 28 | "smoothstep":"slow", 29 | "mix":"sometimes", 30 | "clamp":"shut", 31 | "length":"long", 32 | "distance":"away", 33 | "noise":"sounds", 34 | "fbm":"logical", 35 | "log":"learn", 36 | "exp":"god", 37 | "dot":"blue", 38 | "normalize":"explain", 39 | "texture2D":"taste", 40 | "swap":"grab", 41 | "rotate":"turn", 42 | "dup":"find", 43 | "drop":"slipping" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/britney_4.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"learn", 3 | "y":"sight", 4 | "t":"name", 5 | "+":"feels", 6 | "*":"great", 7 | "/":"not", 8 | "-":"hang", 9 | "radians":"crowd", 10 | "degrees":"sexy", 11 | "sin":"popped", 12 | "cos":"bout", 13 | "tan":"level", 14 | "asin":"action", 15 | "acos":"keeps", 16 | "atan":"watch", 17 | "abs":"logical", 18 | "sqrt":"tables", 19 | "sign":"right", 20 | "floor":"shouldn", 21 | "ceil":"getting", 22 | "fract":"blue", 23 | "pow":"day", 24 | "mod":"late", 25 | "min":"sometimes", 26 | "max":"soda", 27 | "step":"fizz", 28 | "smoothstep":"boy", 29 | "mix":"say", 30 | "clamp":"paradise", 31 | "length":"dance", 32 | "distance":"high", 33 | "noise":"spin", 34 | "fbm":"hear", 35 | "log":"bass", 36 | "exp":"doing", 37 | "dot":"happy", 38 | "normalize":"leaving", 39 | "texture2D":"follow", 40 | "swap":"somethin", 41 | "rotate":"lets", 42 | "dup":"top", 43 | "drop":"show" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/britney_2.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"poison", 3 | "y":"night", 4 | "t":"bass", 5 | "+":"dawn", 6 | "*":"felt", 7 | "/":"round", 8 | "-":"women", 9 | "radians":"partner", 10 | "degrees":"minute", 11 | "sin":"fire", 12 | "cos":"run", 13 | "tan":"seen", 14 | "asin":"breathe", 15 | "acos":"wastin", 16 | "atan":"told", 17 | "abs":"boy", 18 | "sqrt":"riding", 19 | "sign":"superlative", 20 | "floor":"overprotected", 21 | "ceil":"taste", 22 | "fract":"bop", 23 | "pow":"jumpin", 24 | "mod":"cha", 25 | "min":"vibes", 26 | "max":"popped", 27 | "step":"wantin", 28 | "smoothstep":"calling", 29 | "mix":"again", 30 | "clamp":"alone", 31 | "length":"trust", 32 | "distance":"flowin", 33 | "noise":"hold", 34 | "fbm":"tonight", 35 | "log":"young", 36 | "exp":"help", 37 | "dot":"late", 38 | "normalize":"blue", 39 | "texture2D":"drive", 40 | "swap":"warning", 41 | "rotate":"woman", 42 | "dup":"wee", 43 | "drop":"soul" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/aesop_1.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"tail", 3 | "y":"belly", 4 | "t":"day", 5 | "+":"bring", 6 | "*":"count", 7 | "/":"divided", 8 | "-":"calculating", 9 | "radians":"jupiter", 10 | "degrees":"heat", 11 | "sin":"shaw", 12 | "cos":"athens", 13 | "tan":"thinking", 14 | "asin":"front", 15 | "acos":"land", 16 | "atan":"supposing", 17 | "abs":"greatest", 18 | "sqrt":"fix", 19 | "sign":"signal", 20 | "floor":"room", 21 | "ceil":"pedestal", 22 | "fract":"small", 23 | "pow":"capacity", 24 | "mod":"rest", 25 | "min":"low", 26 | "max":"full", 27 | "step":"move", 28 | "smoothstep":"quiet", 29 | "mix":"bundle", 30 | "clamp":"punish", 31 | "length":"long", 32 | "distance":"away", 33 | "noise":"growl", 34 | "fbm":"pebbles", 35 | "log":"tree", 36 | "exp":"master", 37 | "dot":"pebble", 38 | "normalize":"change", 39 | "texture2D":"brown", 40 | "swap":"sell", 41 | "rotate":"turn", 42 | "dup":"find", 43 | "drop":"dropped" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/britney_3.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"learn", 3 | "y":"killing", 4 | "t":"nowhere", 5 | "+":"taste", 6 | "*":"partner", 7 | "/":"supposed", 8 | "-":"hell", 9 | "radians":"told", 10 | "degrees":"tonight", 11 | "sin":"baby", 12 | "cos":"addicted", 13 | "tan":"scared", 14 | "asin":"bop", 15 | "acos":"high", 16 | "atan":"alright", 17 | "abs":"stop", 18 | "sqrt":"yet", 19 | "sign":"bad", 20 | "floor":"friendly", 21 | "ceil":"beat", 22 | "fract":"away", 23 | "pow":"excited", 24 | "mod":"answers", 25 | "min":"flex", 26 | "max":"work", 27 | "step":"else", 28 | "smoothstep":"better", 29 | "mix":"losing", 30 | "clamp":"women", 31 | "length":"hang", 32 | "distance":"okay", 33 | "noise":"follow", 34 | "fbm":"toes", 35 | "log":"wasn", 36 | "exp":"hot", 37 | "dot":"perspective", 38 | "normalize":"taking", 39 | "texture2D":"need", 40 | "swap":"clever", 41 | "rotate":"talking", 42 | "dup":"superlative", 43 | "drop":"don" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/aesop_3.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"water", 3 | "y":"stick", 4 | "t":"abused", 5 | "+":"youth", 6 | "*":"loose", 7 | "/":"hold", 8 | "-":"commiserated", 9 | "radians":"neck", 10 | "degrees":"opened", 11 | "sin":"thinking", 12 | "cos":"far", 13 | "tan":"roaming", 14 | "asin":"beast", 15 | "acos":"body", 16 | "atan":"afternoon", 17 | "abs":"blow", 18 | "sqrt":"death", 19 | "sign":"snap", 20 | "floor":"low", 21 | "ceil":"dish", 22 | "fract":"idol", 23 | "pow":"gold", 24 | "mod":"wandering", 25 | "min":"found", 26 | "max":"happen", 27 | "step":"buzzing", 28 | "smoothstep":"granted", 29 | "mix":"son", 30 | "clamp":"belly", 31 | "length":"pitcher", 32 | "distance":"watched", 33 | "noise":"bleeding", 34 | "fbm":"mice", 35 | "log":"often", 36 | "exp":"jay", 37 | "dot":"cat", 38 | "normalize":"moulting", 39 | "texture2D":"better", 40 | "swap":"means", 41 | "rotate":"patty", 42 | "dup":"avarice", 43 | "drop":"remain" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/morrison_1.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"pillowed", 3 | "y":"gigantic", 4 | "t":"day", 5 | "+":"create", 6 | "*":"cells", 7 | "/":"stir", 8 | "-":"tell", 9 | "radians":"divinity", 10 | "degrees":"cold", 11 | "sin":"texas", 12 | "cos":"divine", 13 | "tan":"something", 14 | "asin":"side", 15 | "acos":"south", 16 | "atan":"meaning", 17 | "abs":"eternal", 18 | "sqrt":"dig", 19 | "sign":"enter", 20 | "floor":"perimeter", 21 | "ceil":"walls", 22 | "fract":"small", 23 | "pow":"plant", 24 | "mod":"rest", 25 | "min":"five", 26 | "max":"sentence", 27 | "step":"thing", 28 | "smoothstep":"silky", 29 | "mix":"breed", 30 | "clamp":"stiffen", 31 | "length":"hour", 32 | "distance":"away", 33 | "noise":"scream", 34 | "fbm":"mandala", 35 | "log":"please", 36 | "exp":"ode", 37 | "dot":"blue", 38 | "normalize":"change", 39 | "texture2D":"color", 40 | "swap":"acquire", 41 | "rotate":"choose", 42 | "dup":"certain", 43 | "drop":"rise" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/morrison_3.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"angels", 3 | "y":"guest", 4 | "t":"divinity", 5 | "+":"great", 6 | "*":"mutants", 7 | "/":"glory", 8 | "-":"gave", 9 | "radians":"entry", 10 | "degrees":"girls", 11 | "sin":"unannounced", 12 | "cos":"gives", 13 | "tan":"hotel", 14 | "asin":"player", 15 | "acos":"call", 16 | "atan":"haired", 17 | "abs":"best", 18 | "sqrt":"meaning", 19 | "sign":"texas", 20 | "floor":"join", 21 | "ceil":"plant", 22 | "fract":"hungry", 23 | "pow":"wet", 24 | "mod":"messenger", 25 | "min":"hour", 26 | "max":"two", 27 | "step":"beat", 28 | "smoothstep":"radio", 29 | "mix":"lean", 30 | "clamp":"dreams", 31 | "length":"stable", 32 | "distance":"place", 33 | "noise":"perceive", 34 | "fbm":"eternal", 35 | "log":"broken", 36 | "exp":"died", 37 | "dot":"staring", 38 | "normalize":"used", 39 | "texture2D":"announce", 40 | "swap":"taught", 41 | "rotate":"dawn", 42 | "dup":"insane", 43 | "drop":"race", 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/trump_1.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"downward", 3 | "y":"curve", 4 | "t":"day", 5 | "+":"bring", 6 | "*":"decreasing", 7 | "/":"gulf", 8 | "-":"just", 9 | "radians":"christ", 10 | "degrees":"warm", 11 | "sin":"france", 12 | "cos":"modi", 13 | "tan":"topic", 14 | "asin":"side", 15 | "acos":"north", 16 | "atan":"rudy", 17 | "abs":"absolutely", 18 | "sqrt":"problem", 19 | "sign":"accept", 20 | "floor":"building", 21 | "ceil":"wall", 22 | "fract":"amount", 23 | "pow":"energy", 24 | "mod":"continue", 25 | "min":"least", 26 | "max":"total", 27 | "step":"move", 28 | "smoothstep":"slow", 29 | "mix":"lot", 30 | "clamp":"cut", 31 | "length":"short", 32 | "distance":"miles", 33 | "noise":"sound", 34 | "fbm":"chart", 35 | "log":"check", 36 | "exp":"gentleman", 37 | "dot":"dakota", 38 | "normalize":"stabilized", 39 | "texture2D":"clarity", 40 | "swap":"sell", 41 | "rotate":"turn", 42 | "dup":"find", 43 | "drop":"increase" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/aesop_4.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"gladly", 3 | "y":"together", 4 | "t":"envious", 5 | "+":"took", 6 | "*":"last", 7 | "/":"pecked", 8 | "-":"bitter", 9 | "radians":"stick", 10 | "degrees":"wooden", 11 | "sin":"chief", 12 | "cos":"equally", 13 | "tan":"tell", 14 | "asin":"mortal", 15 | "acos":"think", 16 | "atan":"latter", 17 | "abs":"feathers", 18 | "sqrt":"low", 19 | "sign":"thus", 20 | "floor":"peacocks", 21 | "ceil":"dipped", 22 | "fract":"court", 23 | "pow":"notice", 24 | "mod":"saying", 25 | "min":"king", 26 | "max":"fortunate", 27 | "step":"rest", 28 | "smoothstep":"set", 29 | "mix":"room", 30 | "clamp":"milk", 31 | "length":"friendly", 32 | "distance":"befriend", 33 | "noise":"hat", 34 | "fbm":"consider", 35 | "log":"enrage", 36 | "exp":"porridge", 37 | "dot":"divided", 38 | "normalize":"exposed", 39 | "texture2D":"hard", 40 | "swap":"calculating", 41 | "rotate":"cat", 42 | "dup":"swim", 43 | "drop":"tormented" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/morrison_4.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"grinding", 3 | "y":"maelstrom", 4 | "t":"mutants", 5 | "+":"voices", 6 | "*":"texas", 7 | "/":"enterprise", 8 | "-":"feast", 9 | "radians":"pretty", 10 | "degrees":"troubled", 11 | "sin":"summon", 12 | "cos":"wooly", 13 | "tan":"announced", 14 | "asin":"stoned", 15 | "acos":"dress", 16 | "atan":"believe", 17 | "abs":"world", 18 | "sqrt":"sore", 19 | "sign":"reward", 20 | "floor":"first", 21 | "ceil":"play", 22 | "fract":"severed", 23 | "pow":"wings", 24 | "mod":"stars", 25 | "min":"injuries", 26 | "max":"moments", 27 | "step":"beast", 28 | "smoothstep":"shake", 29 | "mix":"beach", 30 | "clamp":"thigh", 31 | "length":"scaring", 32 | "distance":"morning", 33 | "noise":"name", 34 | "fbm":"romance", 35 | "log":"wish", 36 | "exp":"dream", 37 | "dot":"friendly", 38 | "normalize":"pleasure", 39 | "texture2D":"gave", 40 | "swap":"cock", 41 | "rotate":"unannounced", 42 | "dup":"big", 43 | "drop":"day" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/watts_1.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"curved", 3 | "y":"tubes", 4 | "t":"moment", 5 | "+":"put", 6 | "*":"grow", 7 | "/":"separating", 8 | "-":"just", 9 | "radians":"universe", 10 | "degrees":"snow", 11 | "sin":"aeons", 12 | "cos":"pulses", 13 | "tan":"continuum", 14 | "asin":"apart", 15 | "acos":"properties", 16 | "atan":"boundary", 17 | "abs":"infinite", 18 | "sqrt":"destroy", 19 | "sign":"reads", 20 | "floor":"breathing", 21 | "ceil":"wall", 22 | "fract":"staggering", 23 | "pow":"energy", 24 | "mod":"entire", 25 | "min":"level", 26 | "max":"total", 27 | "step":"look", 28 | "smoothstep":"elegant", 29 | "mix":"variety", 30 | "clamp":"rule", 31 | "length":"long", 32 | "distance":"separated", 33 | "noise":"noises", 34 | "fbm":"diatom", 35 | "log":"information", 36 | "exp":"marvelously", 37 | "dot":"blue", 38 | "normalize":"develop", 39 | "texture2D":"skin", 40 | "swap":"new", 41 | "rotate":"keep", 42 | "dup":"find", 43 | "drop":"drops" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/morrison_2.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"minds", 3 | "y":"resident", 4 | "t":"protestant", 5 | "+":"crucified", 6 | "*":"glove", 7 | "/":"satyr", 8 | "-":"velvet", 9 | "radians":"ravaged", 10 | "degrees":"unannounced", 11 | "sin":"young", 12 | "cos":"meet", 13 | "tan":"found", 14 | "asin":"program", 15 | "acos":"stuttering", 16 | "atan":"wake", 17 | "abs":"connects", 18 | "sqrt":"morning", 19 | "sign":"silvery", 20 | "floor":"driven", 21 | "ceil":"breed", 22 | "fract":"croon", 23 | "pow":"brow", 24 | "mod":"oooooh", 25 | "min":"ode", 26 | "max":"anoint", 27 | "step":"stoned", 28 | "smoothstep":"burned", 29 | "mix":"hours", 30 | "clamp":"hundred", 31 | "length":"become", 32 | "distance":"tounge", 33 | "noise":"frozen", 34 | "fbm":"announce", 35 | "log":"funeral", 36 | "exp":"small", 37 | "dot":"decree", 38 | "normalize":"perimeter", 39 | "texture2D":"join", 40 | "swap":"continued", 41 | "rotate":"gaol", 42 | "dup":"gripped", 43 | "drop":"radiant" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/trump_3.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"york", 3 | "y":"air", 4 | "t":"couple", 5 | "+":"safe", 6 | "*":"jesus", 7 | "/":"decreasing", 8 | "-":"ahead", 9 | "radians":"built", 10 | "degrees":"gulf", 11 | "sin":"witch", 12 | "cos":"hydroxychloroquine", 13 | "tan":"smaller", 14 | "asin":"even", 15 | "acos":"true", 16 | "atan":"farmers", 17 | "abs":"immunity", 18 | "sqrt":"situation", 19 | "sign":"personal", 20 | "floor":"dollars", 21 | "ceil":"works", 22 | "fract":"doctors", 23 | "pow":"biggest", 24 | "mod":"happy", 25 | "min":"date", 26 | "max":"kept", 27 | "step":"ventilators", 28 | "smoothstep":"stiff", 29 | "mix":"absolutely", 30 | "clamp":"helping", 31 | "length":"understand", 32 | "distance":"know", 33 | "noise":"somehow", 34 | "fbm":"validated", 35 | "log":"corps", 36 | "exp":"headed", 37 | "dot":"tools", 38 | "normalize":"scale", 39 | "texture2D":"targeted", 40 | "swap":"prepared", 41 | "rotate":"shape", 42 | "dup":"especially", 43 | "drop":"elective" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/aesop_2.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"begged", 3 | "y":"arrived", 4 | "t":"strutted", 5 | "+":"hunted", 6 | "*":"praised", 7 | "/":"induced", 8 | "-":"treacherous", 9 | "radians":"efforts", 10 | "degrees":"agonies", 11 | "sin":"young", 12 | "cos":"afternoon", 13 | "tan":"remained", 14 | "asin":"thirst", 15 | "acos":"greece", 16 | "atan":"safety", 17 | "abs":"several", 18 | "sqrt":"judgment", 19 | "sign":"calculating", 20 | "floor":"pronounced", 21 | "ceil":"spoil", 22 | "fract":"smoking", 23 | "pow":"licked", 24 | "mod":"humph", 25 | "min":"bade", 26 | "max":"thorn", 27 | "step":"moaning", 28 | "smoothstep":"lives", 29 | "mix":"consented", 30 | "clamp":"jays", 31 | "length":"manger", 32 | "distance":"avaricious", 33 | "noise":"branch", 34 | "fbm":"grumbled", 35 | "log":"eldest", 36 | "exp":"small", 37 | "dot":"members", 38 | "normalize":"pecked", 39 | "texture2D":"morning", 40 | "swap":"infirmities", 41 | "rotate":"arena", 42 | "dup":"ass", 43 | "drop":"cosily" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/watts_3.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"crystal", 3 | "y":"keeps", 4 | "t":"farce", 5 | "+":"completely", 6 | "*":"true", 7 | "/":"wiggling", 8 | "-":"impossible", 9 | "radians":"curved", 10 | "degrees":"going", 11 | "sin":"abundance", 12 | "cos":"considered", 13 | "tan":"serious", 14 | "asin":"theory", 15 | "acos":"variety", 16 | "atan":"sole", 17 | "abs":"interdependent", 18 | "sqrt":"bondage", 19 | "sign":"barrier", 20 | "floor":"attention", 21 | "ceil":"awareness", 22 | "fract":"death", 23 | "pow":"skin", 24 | "mod":"shows", 25 | "min":"people", 26 | "max":"putting", 27 | "step":"sparkling", 28 | "smoothstep":"unnecessary", 29 | "mix":"wears", 30 | "clamp":"fields", 31 | "length":"cognizance", 32 | "distance":"biological", 33 | "noise":"run", 34 | "fbm":"remains", 35 | "log":"infinite", 36 | "exp":"futile", 37 | "dot":"reside", 38 | "normalize":"together", 39 | "texture2D":"multicolored", 40 | "swap":"tubes", 41 | "rotate":"quite", 42 | "dup":"thus", 43 | "drop":"earth" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/watts_4.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"growing", 3 | "y":"just", 4 | "t":"hole", 5 | "+":"old", 6 | "*":"galaxies", 7 | "/":"not", 8 | "-":"staggering", 9 | "radians":"wondering", 10 | "degrees":"odd", 11 | "sin":"vague", 12 | "cos":"rhinoceros", 13 | "tan":"rests", 14 | "asin":"recognizable", 15 | "acos":"multicolored", 16 | "atan":"patterns", 17 | "abs":"apparently", 18 | "sqrt":"peacock", 19 | "sign":"includes", 20 | "floor":"waves", 21 | "ceil":"futile", 22 | "fract":"bags", 23 | "pow":"personal", 24 | "mod":"oddity", 25 | "min":"run", 26 | "max":"hoping", 27 | "step":"energy", 28 | "smoothstep":"ever", 29 | "mix":"nerves", 30 | "clamp":"magnificence", 31 | "length":"tree", 32 | "distance":"remains", 33 | "noise":"information", 34 | "fbm":"interdependent", 35 | "log":"colossal", 36 | "exp":"theory", 37 | "dot":"filmy", 38 | "normalize":"goings", 39 | "texture2D":"general", 40 | "swap":"giraffe", 41 | "rotate":"individuals", 42 | "dup":"marvelous", 43 | "drop":"flowing" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/trump_2.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"told", 3 | "y":"disposing", 4 | "t":"cdc", 5 | "+":"businessman", 6 | "*":"congratulatory", 7 | "/":"ventilator", 8 | "-":"efforts", 9 | "radians":"grateful", 10 | "degrees":"ongoing", 11 | "sin":"spend", 12 | "cos":"afternoon", 13 | "tan":"largest", 14 | "asin":"supplies", 15 | "acos":"biden", 16 | "atan":"equipment", 17 | "abs":"problems", 18 | "sqrt":"additions", 19 | "sign":"producer", 20 | "floor":"agencies", 21 | "ceil":"develop", 22 | "fract":"anthony", 23 | "pow":"sniffles", 24 | "mod":"deborah", 25 | "min":"heartbroken", 26 | "max":"coronavirus", 27 | "step":"jerry", 28 | "smoothstep":"antibody", 29 | "mix":"yesterday", 30 | "clamp":"project", 31 | "length":"become", 32 | "distance":"update", 33 | "noise":"medicines", 34 | "fbm":"leaders", 35 | "log":"vice", 36 | "exp":"small", 37 | "dot":"statement", 38 | "normalize":"red", 39 | "texture2D":"headed", 40 | "swap":"directed", 41 | "rotate":"whistleblower", 42 | "dup":"iran", 43 | "drop":"nih" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/trump_4.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"fired", 3 | "y":"return", 4 | "t":"ready", 5 | "+":"speaks", 6 | "*":"billions", 7 | "/":"floods", 8 | "-":"dark", 9 | "radians":"potential", 10 | "degrees":"currently", 11 | "sin":"talking", 12 | "cos":"disposing", 13 | "tan":"weeks", 14 | "asin":"history", 15 | "acos":"midst", 16 | "atan":"companies", 17 | "abs":"busy", 18 | "sqrt":"tireless", 19 | "sign":"aggressive", 20 | "floor":"pretty", 21 | "ceil":"admissions", 22 | "fract":"access", 23 | "pow":"troublesome", 24 | "mod":"expression", 25 | "min":"monitoring", 26 | "max":"president", 27 | "step":"supply", 28 | "smoothstep":"veterans", 29 | "mix":"horrible", 30 | "clamp":"friendly", 31 | "length":"recorded", 32 | "distance":"subvert", 33 | "noise":"sterilization", 34 | "fbm":"happy", 35 | "log":"mention", 36 | "exp":"anywhere", 37 | "dot":"resource", 38 | "normalize":"relationship", 39 | "texture2D":"market", 40 | "swap":"tremendous", 41 | "rotate":"stores", 42 | "dup":"topics", 43 | "drop":"head" 44 | } 45 | -------------------------------------------------------------------------------- /wordtables/watts_2.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "x":"nightmare", 3 | "y":"living", 4 | "t":"rhinoceros", 5 | "+":"aeons", 6 | "*":"apparently", 7 | "/":"experienced", 8 | "-":"awareness", 9 | "radians":"immeasurably", 10 | "degrees":"comings", 11 | "sin":"grow", 12 | "cos":"run", 13 | "tan":"remains", 14 | "asin":"information", 15 | "acos":"clutch", 16 | "atan":"environment", 17 | "abs":"giraffe", 18 | "sqrt":"frantic", 19 | "sign":"ranges", 20 | "floor":"exist", 21 | "ceil":"develop", 22 | "fract":"apprehension", 23 | "pow":"covered", 24 | "mod":"astrology", 25 | "min":"gathering", 26 | "max":"mysteriously", 27 | "step":"diaphanous", 28 | "smoothstep":"believing", 29 | "mix":"futile", 30 | "clamp":"brief", 31 | "length":"presences", 32 | "distance":"organ", 33 | "noise":"rests", 34 | "fbm":"swallow", 35 | "log":"expression", 36 | "exp":"scrounge", 37 | "dot":"saying", 38 | "normalize":"blue", 39 | "texture2D":"surge", 40 | "swap":"cognizance", 41 | "rotate":"egoism", 42 | "dup":"ears", 43 | "drop":"relationships" 44 | } 45 | -------------------------------------------------------------------------------- /src/Stack.js: -------------------------------------------------------------------------------- 1 | function Stack() { 2 | this.store = [] 3 | } 4 | 5 | 6 | Stack.prototype.size = function() { 7 | return this.store.length; 8 | } 9 | 10 | Stack.prototype.clear = function() { 11 | this.store = []; 12 | } 13 | 14 | Stack.prototype.push = function(v) { 15 | if(Array.isArray(v)) { 16 | this.store.push(...v); 17 | } else { 18 | this.store.push(v); 19 | } 20 | }; 21 | 22 | Stack.prototype.pop = function(count=1, size=1) { 23 | let res = []; 24 | for(let i=0; i this.push(t) ); 38 | top.forEach( t => this.push(t) ); 39 | } 40 | 41 | Stack.prototype.swap = function(size=1) { 42 | let top = this.pop(2, size); 43 | this.push(top[1]); 44 | this.push(top[0]); 45 | } 46 | 47 | Stack.prototype.rotate = function(size=1) { 48 | let end = this.store.splice(size); 49 | let start = this.store; 50 | this.store = end; 51 | this.push(start); 52 | } 53 | 54 | Stack.prototype.drop = function(size=1) { 55 | this.pop(1,size); 56 | } 57 | 58 | Stack.prototype.toString = function() { 59 | return this.store.join(' | '); 60 | } 61 | 62 | 63 | module.exports = Stack; 64 | -------------------------------------------------------------------------------- /web/maps.js: -------------------------------------------------------------------------------- 1 | let Mapping = require('../src/Mapping'); 2 | 3 | 4 | module.exports = [ 5 | 6 | (new Mapping('custom_demo', require('../wordtables/custom_demo.js'))), 7 | 8 | (new Mapping('aesop_1', require('../wordtables/aesop_1.js'))), 9 | (new Mapping('aesop_2', require('../wordtables/aesop_2.js'))), 10 | (new Mapping('aesop_3', require('../wordtables/aesop_3.js'))), 11 | (new Mapping('aesop_4', require('../wordtables/aesop_4.js'))), 12 | 13 | (new Mapping('britney_1', require('../wordtables/britney_1.js'))), 14 | (new Mapping('britney_2', require('../wordtables/britney_2.js'))), 15 | (new Mapping('britney_3', require('../wordtables/britney_3.js'))), 16 | (new Mapping('britney_4', require('../wordtables/britney_4.js'))), 17 | 18 | (new Mapping('morrison_1', require('../wordtables/morrison_1.js'))), 19 | (new Mapping('morrison_2', require('../wordtables/morrison_2.js'))), 20 | (new Mapping('morrison_3', require('../wordtables/morrison_3.js'))), 21 | (new Mapping('morrison_4', require('../wordtables/morrison_4.js'))), 22 | 23 | (new Mapping('trump_1', require('../wordtables/trump_1.js'))), 24 | (new Mapping('trump_2', require('../wordtables/trump_2.js'))), 25 | (new Mapping('trump_3', require('../wordtables/trump_3.js'))), 26 | (new Mapping('trump_4', require('../wordtables/trump_4.js'))), 27 | 28 | (new Mapping('watts_1', require('../wordtables/watts_1.js'))), 29 | (new Mapping('watts_2', require('../wordtables/watts_2.js'))), 30 | (new Mapping('watts_3', require('../wordtables/watts_3.js'))), 31 | (new Mapping('watts_4', require('../wordtables/watts_4.js'))) 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /src/Mapping.js: -------------------------------------------------------------------------------- 1 | let Language = require('./Language'); 2 | 3 | function Mapping(name, wordtable) { 4 | 5 | this.name = name; 6 | this.baseWordtable = {}; 7 | this.wordtable = {}; 8 | 9 | Object.keys(wordtable).forEach( k => { 10 | if(Language.words[k] !== undefined) { 11 | this.baseWordtable[k] = wordtable[k]; 12 | this.wordtable[k] = wordtable[k]; 13 | } 14 | }) 15 | this.modified = false; 16 | } 17 | 18 | Mapping.prototype.getRegex = function() { 19 | return new RegExp(`\\b(${Object.values(this.wordtable).join('|')})\\b`, "gi"); 20 | } 21 | 22 | Mapping.prototype.shuffle = function() { 23 | Language.opBuckets.forEach( bucket => { 24 | let vals = []; 25 | bucket.forEach( b => { 26 | let w = this.getWord(b); 27 | if(w !== undefined) vals.push(w); 28 | }); 29 | vals.sort((a,b)=>Math.random()*2-1); 30 | bucket.forEach( (b) => { 31 | if(this.getWord(b) !== undefined) this.wordtable[b] = vals.pop(); 32 | }); 33 | }) 34 | this.modified = true; 35 | } 36 | 37 | Mapping.prototype.getOp = function(word) { 38 | for(const k in this.wordtable) { 39 | if(this.wordtable[k] == word) return k; 40 | } 41 | } 42 | 43 | Mapping.prototype.getWord = function(op) { 44 | return this.wordtable[op]; 45 | } 46 | 47 | Mapping.prototype.getMapping = function() { 48 | return this.wordtable; 49 | } 50 | 51 | Mapping.prototype.restore = function() { 52 | this.wordtable = Object.assign(this.wordtable, this.baseWordtable); 53 | this.modified = false; 54 | } 55 | 56 | Mapping.getAllOperators = function() { 57 | return Object.keys(Language.words); 58 | } 59 | 60 | module.exports = Mapping; 61 | -------------------------------------------------------------------------------- /tests/stack.test.js: -------------------------------------------------------------------------------- 1 | const Stack = require('../src/Stack'); 2 | 3 | 4 | test('pops values', () => { 5 | let stack = new Stack(); 6 | for(let i=1;i<=12;i++) { stack.push(i); } 7 | 8 | expect( stack.pop() ).toEqual( [ [12] ] ); 9 | expect( stack.pop(1,1) ).toEqual( [ [11] ] ); 10 | expect( stack.pop(2,2) ).toEqual( [ [7,8], [9,10] ] ); 11 | expect( stack.pop(2,3) ).toEqual( [ [1,2,3], [4,5,6] ] ); 12 | }); 13 | 14 | test('returns null instead of underflow', () => { 15 | let stack = new Stack(); 16 | expect( stack.pop() ).toEqual( null ); 17 | }); 18 | 19 | test('dups values', () => { 20 | let stack = new Stack(); 21 | for(let i=1;i<=3;i++) { stack.push(i); } 22 | 23 | stack.dup(3); 24 | stack.dup(2); 25 | stack.dup(1); 26 | stack.dup(); 27 | expect( stack.store ).toEqual( [1,2,3,1,2,3,2,3,3,3] ); 28 | }); 29 | 30 | test('swaps values', () => { 31 | let stack = new Stack(); 32 | for(let i=1;i<=6;i++) { stack.push(i); } 33 | 34 | stack.swap(3); 35 | stack.swap(2); 36 | stack.swap(1); 37 | stack.swap(); 38 | 39 | expect( stack.store ).toEqual( [4,5,2,3,6,1] ); 40 | }); 41 | 42 | test('rotates values', () => { 43 | let stack = new Stack(); 44 | for(let i=1;i<=6;i++) { stack.push(i); } 45 | 46 | stack.rotate(3); 47 | stack.rotate(2); 48 | stack.rotate(1); 49 | stack.rotate(); 50 | 51 | expect( stack.store ).toEqual( [2,3,4,5,6,1] ); 52 | }); 53 | 54 | test('drops values', () => { 55 | let stack = new Stack(); 56 | for(let i=1;i<=10;i++) { stack.push(i); } 57 | 58 | stack.drop(3); 59 | stack.drop(2); 60 | stack.drop(1); 61 | stack.drop(); 62 | 63 | expect( stack.store ).toEqual( [1,2,3] ); 64 | }); 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # in:verse 2 | 3 | *in:verse* is an esoteric programming language and live-coding development environment. The language uses a stack based paradigm (inspired by Forth) and compiles to GLSL, or more specifically, a fragment shader on a plane. The language does not have a pre-determined vocabulary — rather, this is up to you. 4 | 5 | A very rough and incomplete guide lives [here](guide.md). This will soon be updated with more details, and a few tutorials will follow too. A gallery of work created with *in:verse* lives [here](https://gallery.inverse.website). 6 | 7 | ![](img.jpg) 8 | 9 | ### todos 10 | * add functionality for: 11 | - [x] publish to gallery 12 | - [x] publish to twitter 13 | - [x] forking 14 | - [ ] redo front-end / un-sphagetti the code 15 | - [ ] supporting different languages / scripts 16 | - [ ] additional stack manipulation functions 17 | - [ ] additional GLSL functions (dot, normal etc) 18 | - [ ] higher level functions (voronoi, tiling etc) 19 | - [ ] images / videos / camera feed as textures 20 | * think about: 21 | - [ ] uploading text to extract wordtables 22 | - [ ] persisting user contributions to wordtables 23 | - [ ] persisting user contributions to stacks 24 | - [ ] collaborative live-coding 25 | 26 | 27 | ### inspiration 28 | * [Chef](https://esolangs.org/wiki/Chef) - an esoteric language by David Morgan-Mar 29 | * [Shakespeare](https://esolangs.org/wiki/Shakespeare) - an esoteric language by Karl Hasselström and Jon Åslund 30 | * [Shaderforth](https://github.com/daeken/Shaderforth) - A shader language inspired by Forth, by Cody Brocious 31 | * [Forth Haiku](https://forthsalon.appspot.com/) - Forth to GLSL, by [Brad Nelson](http://bradn123.github.io/) 32 | * [Hydra](https://github.com/ojack/hydra) - livecoding networked visuals in the browser, by Olivia Jack 33 | * [esotoric.codes](https://esoteric.codes/) - a blog/website dedicated to esolangs, created by Daniel Temkin 34 | -------------------------------------------------------------------------------- /src/Generator.js: -------------------------------------------------------------------------------- 1 | let Language = require('./Language'); 2 | let Stack = require('./Stack'); 3 | let seedrandom = require('./SeedRandom.js'); 4 | 5 | let prng; 6 | 7 | let transpose = (a) => { 8 | return a[0].map( (_,i) => a.map( x=> x[i])) 9 | } 10 | 11 | let replaceNull = (a) => { 12 | for(let i=0; i `vec${node.vsize}(${v.join(',')})` ); 51 | } else { 52 | args = operands.map( v => `${v.join(',')}` ); 53 | } 54 | stack.push( `${node.val}(${args})` ); 55 | } 56 | 57 | else if(sig.type === "BOP") { 58 | operands = transpose(operands); 59 | stack.push( operands.map( a => `(${a[0]} ${node.val} ${a[1]})`) ); 60 | } 61 | 62 | else if(sig.type === "FN") { 63 | operands = transpose(operands); 64 | stack.push( operands.map( a => `${node.val}(${a.join(',')})` ) ); 65 | } 66 | } 67 | 68 | break; 69 | } 70 | } 71 | 72 | let r = stack.pop(3,1); 73 | replaceNull(r); 74 | return `vec3(${r.join(',')})`; 75 | } 76 | 77 | module.exports = Generator; 78 | -------------------------------------------------------------------------------- /src/Language.js: -------------------------------------------------------------------------------- 1 | const Language = { 2 | 3 | puncmap : { 4 | NUM_BLOCK: ";" , 5 | DEC_LEFT: "..." , 6 | DEC_RIGHT: "," , 7 | VEC2: "." , 8 | VEC3: "-" , 9 | COMMENT: "!" , 10 | }, 11 | 12 | types : { 13 | OP: "OP", 14 | NUM: "NUM", 15 | LOOP: "LOOP", 16 | }, 17 | 18 | words: { 19 | "x" : {type: "VAR", operands: 0}, 20 | "y" : {type: "VAR", operands: 0}, 21 | "t" : {type: "VAR", operands: 0}, 22 | 23 | "+" : {type: "BOP", operands: 2}, 24 | "*" : {type: "BOP", operands: 2}, 25 | "/" : {type: "BOP", operands: 2}, 26 | "-" : {type: "BOP", operands: 2}, 27 | 28 | "radians" : {type: "FN", operands: 1}, 29 | "degrees" : {type: "FN", operands: 1}, 30 | "sin" : {type: "FN", operands: 1}, 31 | "cos" : {type: "FN", operands: 1}, 32 | "tan" : {type: "FN", operands: 1}, 33 | "asin" : {type: "FN", operands: 1}, 34 | "acos" : {type: "FN", operands: 1}, 35 | "atan" : {type: "FN", operands: 1}, 36 | "abs" : {type: "FN", operands: 1}, 37 | "sqrt" : {type: "FN", operands: 1}, 38 | "sign" : {type: "FN", operands: 1}, 39 | "floor" : {type: "FN", operands: 1}, 40 | "ceil" : {type: "FN", operands: 1}, 41 | "fract" : {type: "FN", operands: 1}, 42 | 43 | "pow" : {type: "FN", operands: 2}, 44 | "mod" : {type: "FN", operands: 2}, 45 | "min" : {type: "FN", operands: 2}, 46 | "max" : {type: "FN", operands: 2}, 47 | "step" : {type: "FN", operands: 2}, 48 | 49 | "smoothstep" : {type: "FN", operands: 3}, 50 | "mix" : {type: "FN", operands: 3}, 51 | "clamp" : {type: "FN", operands: 3}, 52 | 53 | "length" : {type: "RDC", operands: 1}, 54 | "distance" : {type: "RDC", operands: 2}, 55 | "noise" : {type: "RDC", operands: 1}, 56 | "fbm" : {type: "RDC", operands: 1}, 57 | 58 | "swap" : {type: "STK", operands: 2}, 59 | "rotate" : {type: "STK", operands: 1}, 60 | "dup" : {type: "STK", operands: 1}, 61 | "drop" : {type: "STK", operands: 1}, 62 | }, 63 | 64 | opBuckets: [ ] 65 | } 66 | 67 | for(const k in Language.words) { 68 | let i = Language.words[k].operands; 69 | if(!Language.opBuckets[i]) { Language.opBuckets[i] = [k] } 70 | else { Language.opBuckets[i].push(k) }; 71 | } 72 | 73 | 74 | module.exports = Language; 75 | -------------------------------------------------------------------------------- /src/Parser.js: -------------------------------------------------------------------------------- 1 | let Node = require('./Node'); 2 | let Language = require('./Language'); 3 | 4 | let getWordCount = (str) => { 5 | return str.split(' ').filter(x=>x.length>0).length; 6 | } 7 | 8 | let parseNumber = (str) => { 9 | if(str.includes(Language.puncmap.DEC_LEFT)) { 10 | let parts = str.split(Language.puncmap.DEC_LEFT); 11 | return getWordCount(parts[0]) / 10**(getWordCount(parts[1])); 12 | } 13 | else if(str.includes(Language.puncmap.DEC_RIGHT)) { 14 | let parts = str.split(Language.puncmap.DEC_RIGHT); 15 | return getWordCount(parts[0]) * 10**(getWordCount(parts[1])); 16 | } 17 | else { 18 | return getWordCount(str); 19 | } 20 | } 21 | 22 | 23 | let Parser = function(program, mapping) { 24 | let numStack = []; 25 | let stack = []; 26 | let lines = program.trim().toLowerCase().split('\n'); 27 | 28 | for(let i=0; i1) { // if its a closing block 36 | let num = numStack.reduce( (a,e) => a+e ); 37 | let n = new Node(Language.types.NUM, num, null, numStack.length); 38 | stack.push(n); 39 | numStack = []; 40 | } 41 | } 42 | 43 | // NORMAL NUMBER 44 | else if(line.includes(Language.puncmap.DEC_LEFT) || line.includes(Language.puncmap.DEC_RIGHT)) { 45 | if(numStack.length>0) { 46 | numStack.push(parseNumber(line)); 47 | } else { 48 | stack.push(new Node(Language.types.NUM, parseNumber(line), null, 1)); 49 | } 50 | } 51 | 52 | // OPERATOR, OR FLUFF 53 | else { 54 | let words = line.match(mapping.getRegex()) || []; 55 | let rand = getWordCount(line); 56 | for(const word of words) { 57 | let op = mapping.getOp(word); 58 | let cnt = 1; 59 | if(Language.words[op].type !== 'VAR') { 60 | if(line.includes(Language.puncmap.VEC2)) { cnt = 2; } 61 | else if(line.includes(Language.puncmap.VEC3)) { cnt = 3; } 62 | } 63 | let node = new Node(Language.types.OP, op, cnt, rand); 64 | stack.push(node); 65 | } 66 | } 67 | } 68 | } 69 | return stack; 70 | } 71 | 72 | module.exports = Parser; 73 | -------------------------------------------------------------------------------- /src/SeedRandom.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019 David Bau. 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | The above copyright notice and this permission notice shall be 11 | included in all copies or substantial portions of the Software. 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 16 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 17 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | !function(f,a,c){var s,l=256,p="random",d=c.pow(l,6),g=c.pow(2,52),y=2*g,h=l-1;function n(n,t,r){function e(){for(var n=u.g(6),t=d,r=0;n>>=1;return(n+r)/t}var o=[],i=j(function n(t,r){var e,o=[],i=typeof t;if(r&&"object"==i)for(e in t)try{o.push(n(t[e],r-1))}catch(n){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[n,S(a)]:null==n?function(){try{var n;return s&&(n=s.randomBytes)?n=n(l):(n=new Uint8Array(l),(f.crypto||f.msCrypto).getRandomValues(n)),S(n)}catch(n){var t=f.navigator,r=t&&t.plugins;return[+new Date,f,r,f.screen,S(a)]}}():n,3),o),u=new m(o);return e.int32=function(){return 0|u.g(4)},e.quick=function(){return u.g(4)/4294967296},e.double=e,j(S(u.S),a),(t.pass||r||function(n,t,r,e){return e&&(e.S&&v(e,u),n.state=function(){return v(u,{})}),r?(c[p]=n,t):n})(e,i,"global"in t?t.global:this==c,t.state)}function m(n){var t,r=n.length,u=this,e=0,o=u.i=u.j=0,i=u.S=[];for(r||(n=[r++]);e { 31 | let idx = list.has(word) ? list.get(word) : -1; 32 | list.set(word, idx+1); 33 | } 34 | 35 | let getMap = () => { 36 | let m = new Map(); 37 | list.forEach( (i,word) => m.set(word, similarities.get(word)[i]) ); 38 | return m; 39 | } 40 | 41 | let resolveDups = () => { 42 | let dups = new Map(); 43 | 44 | list.forEach( (idx, term) => { 45 | let entry = similarities.get(term)[idx]; 46 | if( !dups.has(entry.word) ) { 47 | dups.set(entry.word, [ {word: term, sim: entry.sim} ]) 48 | } else { 49 | dups.get(entry.word).push( {word: term, sim: entry.sim} ); 50 | } 51 | }); 52 | 53 | dups.forEach( (terms, word) => { 54 | if(terms.length > 1) { 55 | let max = Math.max( ...(terms.map(x => x.sim)) ); 56 | terms.forEach( t => { 57 | if(t.sim < max) setNext(t.word) 58 | }) 59 | } else { 60 | dups.delete(word); 61 | } 62 | }) 63 | return dups; 64 | } 65 | 66 | similarities.forEach( (words, term) => { 67 | words.sort( sortFn ); 68 | setNext(term); 69 | }); 70 | 71 | let dups = resolveDups(); 72 | let i = 0; 73 | 74 | while(dups.size > 0 && i { 97 | if( poslist.includes(t) 98 | && !terms.includes(w) 99 | && !stopwords.includes(w) 100 | && !w.includes('\'') 101 | && w.length >= 3 102 | ) 103 | { 104 | allwords.add(w.toLowerCase()); 105 | } 106 | }); 107 | 108 | terms.forEach( (w) => { 109 | let vec = w2v.getVector(w); 110 | if(vec !== null) { termvecs.set(w,vec); similarities.set(w,[]); } 111 | else { console.log(`no vector for word ${w}`) } 112 | }) 113 | 114 | allwords.forEach( (w) => { 115 | let vec = w2v.getVector(w); 116 | if(vec !== null) { wordvecs.set(w,vec); } 117 | else { console.log(`no vector for word ${w}`) } 118 | }) 119 | 120 | termvecs.forEach( (vec1, t) => { 121 | wordvecs.forEach( (vec2, w) => { 122 | let s = w2v.similarity(vec1,vec2); 123 | similarities.get(t).push( {word: w, sim: s} ); 124 | }) 125 | }); 126 | 127 | return similarities; 128 | } 129 | 130 | module.exports = { getSimilarities, getMapping }; 131 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | in:verse editor

Wordtable

Stack

Save file

Publish to the Gallery

Create wordtable

what is this?

in:verse is a programming language and environment for exploring the conflux of poetry, visuals, mathematics and code.

This is a work in progress. This text will soon be replaced with a guide.

In the meantime, read a rough guide here, and take a look at some work others have created with this.

If you're impatient, and need to know more right now, reach out at hello@playdo.io


— built by playdo

-------------------------------------------------------------------------------- /dist/style.2a7dcb83.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i|Neuton:200,300,400,400i,700,800&display=swap");*{margin:0;padding:0;box-sizing:border-box;-webkit-font-smoothing:antialiased;transform:translateZ(0)}html{font-size:16px;font-family:Lato;--sidebar-width:100px}.container{width:100vw;height:100vh;position:relative}.main{display:grid;grid-template-columns:repeat(16,1fr) repeat(3,90px) 100px;grid-template-rows:repeat(20,1fr);align-items:stretch;justify-items:stretch;background-color:#f5ecec;width:100%;position:relative;transition:left .3s}.main,.sidebar{height:100%;left:0}.sidebar{width:0;overflow:hidden;padding:0;position:absolute;top:0;background-color:#595959;box-shadow:inset -20px 0 20px -16px rgba(0,0,0,.67);transition:all .3s}.container-split .main{width:calc(100% - var(--sidebar-width));left:var(--sidebar-width)}.container-split .sidebar{width:var(--sidebar-width);padding:1rem .5rem 1rem 1rem}.help{position:absolute;bottom:1rem;left:1rem;display:flex;flex-direction:column}.home{display:block;margin-bottom:.5rem}.home h1{font-family:linotype-sabon,sans-serif;font-size:1.2rem;line-height:1}.home a{text-decoration:none;color:#a59999}.help .buttons{display:flex;justify-content:space-between}section{box-shadow:0 0 8px 1px rgba(0,0,0,.3);background-color:#fff}h2{font-size:.9rem;font-weight:300;text-transform:uppercase;margin-bottom:1rem}p{padding:.4rem 0}input,p{color:rgba(0,0,0,.7);font-size:.8rem}input{padding:.4rem .8rem;display:block;margin:1rem 0}.button{padding:.5rem;-webkit-appearance:none;border-radius:0;background-color:#fff;border:.5px solid silver;line-height:1;text-transform:uppercase;font-family:Lato;font-size:.6rem;font-weight:400;color:rgba(0,0,0,.7);cursor:pointer}.button-inverted{border-color:hsla(0,0%,70.6%,.7);color:hsla(0,0%,70.6%,.7);background-color:rgba(40,40,40,.7)}.dropdown{-webkit-appearance:none;border-radius:0;padding:.5rem 1.6rem .5rem .5rem;background-color:#fff;border:.5px solid silver;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2%25' d='M2 2h6L5 8z'/%3E%3C/svg%3E");background-size:1.4rem .9rem;background-repeat:no-repeat;background-position:100%;line-height:1;text-transform:uppercase;font-family:Lato;font-size:.6rem;font-weight:400;color:rgba(0,0,0,.7)}.editor{grid-column-start:2;grid-column-end:7;grid-row-start:2;grid-row-end:15;z-index:1}.editor__textarea{-webkit-appearance:normal;width:100%;height:100%;padding:1rem;font-family:Neuton;font-size:1.2rem;line-height:1.3;resize:none;outline:none;border:none}.canvas{grid-column-start:3;grid-column-end:16;grid-row-start:3;grid-row-end:20}.canvas canvas{width:100%;height:100%}.wordtable{grid-column-start:17;grid-column-end:20;grid-row-start:1;grid-row-end:21;overflow:scroll;box-shadow:inset 20px 0 20px -16px rgba(0,0,0,.67);border-right:1px solid rgba(0,0,0,.2);padding:1rem}.wordtable__menu{margin-bottom:1rem}.wordtable__menu .button-createmap{display:block;margin:.2rem 0}.map{display:grid;grid-template-columns:repeat(2,1fr);grid-gap:0;border-top:1px solid rgba(0,0,0,.2)}.map p{border-bottom:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.7);display:flex;align-items:center;padding:.4rem;font-size:.8rem}.map p:nth-child(2n-1){font-style:italic}.map input{margin:0;display:flex;align-items:center;padding:.2rem .4rem;font-size:.8rem}.stack{box-shadow:none;grid-column-start:20;grid-column-end:21;grid-row-start:1;grid-row-end:21;padding:1rem;overflow:scroll}.stack__elements{width:100%;display:flex;flex-direction:column}.stack__element{border:1px solid rgba(0,0,0,.4);padding:.2rem .3rem;margin:.2rem 0;position:relative;overflow:visible;text-align:center;font-size:.7rem;color:rgba(0,0,0,.7)}.stack__element:after{content:attr(data-count);position:absolute;bottom:-.2rem;right:-.5rem;font-size:.5rem}.sidebar h2{color:hsla(0,0%,100%,.7)}.sidebar__nav{display:flex;justify-content:space-between;position:absolute;bottom:0;left:0;padding:1rem;width:100%}.sidebar__examples{position:relative;height:calc(100% - 6rem);overflow-y:scroll;overflow-x:hidden}.sidebar__examples .stack__elements{position:absolute;top:0;left:100%}.sidebar__examples .stack__elements.active{left:0}.stack__element-inverted{width:calc(100% - .5rem);border:1px solid hsla(0,0%,100%,.4);color:hsla(0,0%,100%,.7)}.overlay{position:absolute;width:100vw;height:100vh;top:0;left:0;background-color:rgba(0,0,0,.2);align-items:center;justify-content:center;display:none}.overlay.visible{display:flex}.overlay__wrapper{position:relative;width:auto;height:auto;max-width:95vw;max-height:95vh;overflow:scroll}.overlay__wrapper .button-close{position:absolute;top:0;right:0}.overlay__content{box-shadow:0 0 20px 2px rgba(0,0,0,.6);background-color:#fff;padding:2rem;display:none}.overlay__content.visible{display:block} 2 | /*# sourceMappingURL=/style.2a7dcb83.css.map */ -------------------------------------------------------------------------------- /texts/watts.txt: -------------------------------------------------------------------------------- 1 | For there is a growing apprehension 2 | that existence is a rat-race in a trap: living organisms, including people, 3 | are merely tubes which put things in at one end and let them out at the 4 | other, which both keeps them doing it and in the long run wears them 5 | out. So to keep the farce going, the tubes find ways of making new 6 | tubes, which also put things in at one end and let them out at the other. 7 | At the input end they even develop ganglia of nerves called brains, with 8 | eyes and ears, so that they can more easily scrounge around for things to 9 | swallow. As and when they get enough to eat, they use up their surplus 10 | energy by wiggling in complicated patterns, making all sorts of noises 11 | by blowing air in and out of the input hole, and gathering together in 12 | groups to fight with other groups. In time, the tubes grow such an 13 | abundance of attached appliances that they are hardly recognizable as 14 | mere tubes, and they manage to do this in a staggering variety of forms. 15 | There is a vague rule not to eat tubes of your own form, but in general 16 | there is serious competition as to who is going to be the top type of tube. 17 | All this seems marvelously futile, and yet, when you begin to think 18 | about it, it begins to be more marvelous than futile. Indeed, it seems 19 | extremely odd. 20 | 21 | but it is quite 22 | another and much higher thing to be amazed at a rhinoceros or a giraffe, 23 | creatures which do exist and look as if they don't. This feeling of 24 | universal oddity includes a basic and intense wondering about the sense 25 | of things. Why, of all possible worlds, this colossal and apparently 26 | unnecessary multitude of galaxies in a mysteriously curved space-time 27 | continuum, these myriads of differing tube-species playing frantic 28 | games of one-upmanship, these numberless ways of "doing it" from the 29 | elegant architecture of the snow crystal or the diatom to the startling 30 | magnificence of the lyrebird or the peacock? 31 | 32 | We do not "come into" this 33 | world; we come out of it, as leaves from a tree. As the ocean "waves," 34 | the universe "peoples." Every individual is an expression of the whole 35 | realm of nature, a unique action of the total universe. This fact is rarely, 36 | if ever, experienced by most individuals. Even those who know it to be 37 | true in theory do not sense or feel it, but continue to be aware of 38 | themselves as isolated "egos" inside bags of skin. 39 | 40 | I 41 | seem to be a brief light that flashes but once in all the aeons of time—a 42 | rare, complicated, and all-too-delicate organism on the fringe of 43 | biological evolution, where the wave of life bursts into individual, 44 | sparkling, and multicolored drops that gleam for a moment only to 45 | vanish forever. Under such conditioning it seems impossible and even 46 | absurd to realize that myself does not reside in the drop alone, but in the 47 | whole surge of energy which ranges from the galaxies to the nuclear 48 | fields in my body. At this level of existence "I" am immeasurably old; 49 | my forms are infinite and their comings and goings are simply the 50 | pulses or vibrations of a single and eternal flow of energy. 51 | 52 | The sole means now for the saving of the beings of the planet 53 | Earth would be to implant again into their presences a new organ 54 | ... of such properties that every one of these unfortunates during 55 | the process of existence should constantly sense and be cognizant 56 | of the inevitability of his own death as well as the death of 57 | everyone upon whom his eyes or attention rests. 58 | Only such a sensation and such a cognizance can now destroy 59 | the egoism completely crystallized in them. 60 | As we now regard death this reads like a prescription for a nightmare. 61 | But the constant awareness of death shows the world to be as flowing 62 | and diaphanous as the filmy patterns of blue smoke in the air—that 63 | there really is nothing to clutch and no one to clutch it. This is 64 | depressing only so long as there remains a notion that there might be 65 | some way of fixing it, of putting it off just once more, or hoping that 66 | one has, or is, some kind of ego-soul that will survive bodily 67 | dissolution. (I am not saying that there is no personal continuity beyond 68 | death—only that believing in it keeps us in bondage.) 69 | 70 | The skin is always considered as a wall, barrier, or boundary 71 | which definitively separates oneself from the world—despite the fact 72 | that it is covered with pores breathing air and with nerve-ends relaying 73 | information. The skin informs us just as much as it outforms; it is as 74 | much a bridge as a barrier. 75 | 76 | Thus the soul is not in the body, but the body in the 77 | soul, and the soul is the entire network of relationships and processes 78 | which make up your environment, and apart from which you are 79 | nothing. A scientific astrology, if it could ever be worked out, would 80 | have to be a thorough description of the individual's total 81 | environment—social, biological, botanical, meteorological, and 82 | astronomical—throughout every moment of his life 83 | 84 | But we can kill him just as 85 | effectively by separating him from his proper environment. This implies 86 | that the only true atom is the universe—that total system of 87 | interdependent "thing-events" which can be separated from each other 88 | only in name. 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /guide.md: -------------------------------------------------------------------------------- 1 | # A very rough and incomplete guide 2 | 3 | This documentation is a work in progress. A friendlier guide and perhaps some video tutorials are on their way. I acknowledge and apologize for the amount of text on this page. 4 | 5 | 6 | 7 | ***in:verse*** is a puzzle in 3 parts -- shaders; stacks; and words. If you're unfamiliar with shaders, this might not make much sense right now, but perhaps it's enough to try some random things and see what happens. 8 | 9 | 10 | 11 | 12 | 13 | ## a little about the interface 14 | 15 | * Code is compiled by hitting the `ENTER` key 16 | * The word-table defines the mappings for English words to GLSL functions. `x` and `y` are the coordinates of the pixel, and `t` is time 17 | * Words can be put on the same line or separate lines -- it mostly does not matter. The number of words in each line will affect the randomness in the program -- don't worry about it too much, just enjoy it. 18 | * You will see the stack update with the underlying representation of your program. The interface has some example stacks (click the "!!!" button on the bottom-left) -- you can try re-creating these to start with. 19 | * The *shuffle* button will randomly shuffle the assignment of words to GLSL functions. Sometimes fun things will happen. 20 | * You can look at the compiled shader output in the console, if that's useful. 21 | 22 | 23 | 24 | 25 | 26 | ## a little about stacks 27 | 28 | * Stack-based programming uses Reverse Polish Notation, if that means anything to you. 29 | * In other words, instead of thinking of things in this order: `4 + 5` , think of them like this: `4 5 +` 30 | * To do this, one would need to first put `4` on the stack, then put `5`, and then `+`. When the stack is evaluated, this will collapse to `9` ... ie, `4 5 +` will be replaced by `9` on the stack. 31 | * Another example: to calculate `(4 * 3) + 7`, the order of things on the stack would be `4 3 * 7 +` 32 | * The resulting shader will evaluate the stack and use the last 3 values to determine the RGB channels. If there are not enough values, it will use random values. 33 | * Sometimes you need to manipulate the stack. The `dup` function will duplicate the last value on the stack, the `swap` will swap the last two values, `drop` will discard the last value, and `rotate` will pull the bottom value out and put it on top. 34 | 35 | 36 | 37 | 38 | 39 | ## a little about numbers 40 | 41 | * To write numbers, one uses words. 42 | 43 | * If you like symbols, here is the setup, where *W* is any word you want 44 | 45 | * **evaluates to** 46 | 47 | * **evaluates to** 48 | 49 | * ;
50 | 51 |
52 | 53 | ;
54 | 55 | **evalauates to** $N1 + N2 + N3$ 56 | 57 | 58 | 59 | 60 | * If you don't like symbols, here is the setup: 61 | 62 | * To write the number `4`, use any 4 **words followed by a comma**. Ie, `word word word word,` 63 | 64 | * This is obviously very cumbersome to write big numbers. To write the number `40`, do the above, and add 1 more **word after the comma -- to signify the number of 0s** the number has. 65 | So, `word word word word, word` is `40` 66 | And `word word word word, word word` is `400` 67 | 68 | * What about numbers less than 0? Similar to the above, but use ellipses instead of a comma (ie `...` instead of `,`). The number of **words after the ellipses signify the number of decimal places** the number has. 69 | So, `word word word word ... word` is `0.4` 70 | And, `word word word word ... word word` is `0.04` 71 | 72 | 73 | * What about a number like `11.5` ? You can think of this as `10 + 1 + 0.5` . To save the hassle of repeatedly adding the numbers, you can use a **semi-colon (ie `;`) at the end of the first and last lines of the components of the number**. 74 | 75 | ``` 76 | word, word; 77 | word, 78 | word word word word word... word; 79 | ``` 80 | 81 | The first line is `10`, the second is `1`, and the last is `0.5` . The `;` at the end of the first and last lines imply that this is the start and end of one number, and the parts should be summed up. 82 | 83 | 84 | 85 | 86 | 87 | ## a little about syntax 88 | 89 | * Any line can be commented out by using an exclamation mark, ie `!` 90 | 91 | * Sometimes you will want a function to take *groups* of numbers as arguments, ie `vec2` and `vec3` in GLSL world. 92 | 93 | * This can be done by adding punctuation in a sentence, and the stack will also represent this with subscripts of `2` and `3` 94 | 95 | * To have a function operate on `vec2` or *pairs* of numbers, use a period in the line, ie `.` -- it does not matter where it is located, but it will apply to all function names in that line 96 | 97 | * To have a function operate on `vec2` or *triples*, use a dash in the line, ie `-` -- it does not matter where it is located, but it will apply to all function names in that line 98 | 99 | * An example, 100 | Say the stack has ` 4 5 6 7 8 9 ` 101 | 102 | * If a `+` is added to the stack, when it evaluates, it will collapse the last two elements, replacing them with `8 + 9`. So the stack will evaluate to: `4 5 6 7 17` 103 | 104 | * If a `+` is added when there is a **period** in the sentence, it will operate on pairs of numbers: 105 | `4 5 (6+8) (7+9)` which evaluates to `4 5 14 16` 106 | 107 | * If a `+` is added when there is a **dash** in the sentence, it will operate on *triples* : 108 | `(4+7) (5+8) (6+9)` which evaluates to `11 13 15` 109 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | in:verse editor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 |
34 | 35 | 36 |
37 | 38 | 39 | 40 | 41 | 42 |
43 | 44 |
45 | 46 |
47 | 48 |
49 |

Wordtable

50 | 51 |
52 | 53 | 54 | 55 | 56 |
57 | 58 |
59 |
60 |
61 | 62 |
63 |

Stack

64 |
65 |
66 |
67 | 68 |
69 |
70 |

71 | in:verse 72 |

73 |
74 |
75 | 76 | 77 |
78 |
79 | 80 | 81 |
82 | 83 | 91 | 92 |
93 | 94 | 95 |
96 |
97 | 98 |
99 |

Save file

100 | 101 | 102 | 103 |
104 | 105 |
106 |

Publish to the Gallery

107 |
108 | 109 | 110 | 111 | 112 | 113 |
114 |
115 | 116 | 120 | 121 |
122 |

Create wordtable

123 |
124 | 125 | 126 |
127 | 128 |
129 |

what is this?

130 |

in:verse is a programming language and environment for exploring the conflux of poetry, visuals, mathematics and code.

131 |

This is a work in progress. This text will soon be replaced with a guide.

132 |

133 | In the meantime, 134 | read a rough guide here, 135 | and take a look at some work 136 | others have created with this. 137 |

138 |

139 | If you're impatient, and need to know more right now, reach out at 140 | hello@playdo.io 141 |

142 |


— built by
playdo

143 |
144 | 145 | 146 |
147 |
148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /web/webgl.js: -------------------------------------------------------------------------------- 1 | const canvas = document.querySelector("#glCanvas"); 2 | const gl = canvas.getContext("webgl"); 3 | if(gl === null) { alert("no webgl"); } 4 | 5 | let CAPTURE = false; 6 | let IMAGE_URL = null; 7 | const fragBase = ` 8 | precision mediump float; 9 | #define NUM_OCTAVES 5 10 | uniform vec2 uResolution; 11 | uniform float time; 12 | float rand(float n){return fract(sin(n) * 43758.5453123);} 13 | float rand(vec2 n) { return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453); } 14 | float mod289(float x){return x - floor(x * (1.0 / 289.0)) * 289.0;} 15 | vec4 mod289(vec4 x){return x - floor(x * (1.0 / 289.0)) * 289.0;} 16 | vec4 perm(vec4 x){return mod289(((x * 34.0) + 1.0) * x);} 17 | float noise(float p){ 18 | float fl = floor(p); 19 | float fc = fract(p); 20 | return mix(rand(fl), rand(fl + 1.0), fc); 21 | } 22 | float noise(vec2 p){ 23 | vec2 ip = floor(p); 24 | vec2 u = fract(p); 25 | u = u*u*(3.0-2.0*u); 26 | float res = mix( 27 | mix(rand(ip),rand(ip+vec2(1.0,0.0)),u.x), 28 | mix(rand(ip+vec2(0.0,1.0)),rand(ip+vec2(1.0,1.0)),u.x),u.y); 29 | return res*res; 30 | } 31 | float noise(vec3 p){ 32 | vec3 a = floor(p); 33 | vec3 d = p - a; 34 | d = d * d * (3.0 - 2.0 * d); 35 | vec4 b = a.xxyy + vec4(0.0, 1.0, 0.0, 1.0); 36 | vec4 k1 = perm(b.xyxy); 37 | vec4 k2 = perm(k1.xyxy + b.zzww); 38 | vec4 c = k2 + a.zzzz; 39 | vec4 k3 = perm(c); 40 | vec4 k4 = perm(c + 1.0); 41 | vec4 o1 = fract(k3 * (1.0 / 41.0)); 42 | vec4 o2 = fract(k4 * (1.0 / 41.0)); 43 | vec4 o3 = o2 * d.z + o1 * (1.0 - d.z); 44 | vec2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x); 45 | return o4.y * d.y + o4.x * (1.0 - d.y); 46 | } 47 | float fbm(float x) { 48 | float v = 0.0; 49 | float a = 0.5; 50 | float shift = float(100); 51 | for (int i = 0; i < NUM_OCTAVES; ++i) { 52 | v += a * noise(x); 53 | x = x * 2.0 + shift; 54 | a *= 0.5; 55 | } 56 | return v; 57 | } 58 | float fbm(vec2 x) { 59 | float v = 0.0; 60 | float a = 0.5; 61 | vec2 shift = vec2(100); 62 | // Rotate to reduce axial bias 63 | mat2 rot = mat2(cos(0.5), sin(0.5), -sin(0.5), cos(0.50)); 64 | for (int i = 0; i < NUM_OCTAVES; ++i) { 65 | v += a * noise(x); 66 | x = rot * x * 2.0 + shift; 67 | a *= 0.5; 68 | } 69 | return v; 70 | } 71 | float fbm(vec3 x) { 72 | float v = 0.0; 73 | float a = 0.5; 74 | vec3 shift = vec3(100); 75 | for (int i = 0; i < NUM_OCTAVES; ++i) { 76 | v += a * noise(x); 77 | x = x * 2.0 + shift; 78 | a *= 0.5; 79 | } 80 | return v; 81 | } 82 | void main() { 83 | vec2 pos = 2.*(gl_FragCoord.xy - 0.5*uResolution.xy) / min(uResolution.x, uResolution.y); 84 | float x = pos.x; 85 | float y = pos.y; 86 | float t = time; 87 | gl_FragColor = 88 | `; 89 | 90 | const shaders = { 91 | vert : ` 92 | attribute vec4 aVertexPosition; 93 | void main() { 94 | gl_Position = aVertexPosition; 95 | } 96 | `, 97 | frag: ` 98 | precision mediump float; 99 | uniform vec2 uResolution; 100 | uniform float time; 101 | void main() { 102 | vec2 pos = 2.*(gl_FragCoord.xy - 0.5*uResolution.xy) / min(uResolution.x, uResolution.y); 103 | gl_FragColor = vec4(sin(time+pos.x*2.), 0.14, 0.34, 1.0); 104 | } 105 | ` 106 | }; 107 | const fragLocations = { 108 | timeLoc: null, 109 | resLoc: null, 110 | } 111 | 112 | const program = createProgram(); 113 | 114 | function init() { 115 | const vertexArray = new Float32Array([ 116 | -1., 1., 1., 1., 1., -1., 117 | -1., 1., 1., -1., -1., -1. 118 | ]); 119 | const vertexNumComponents = 2; 120 | const vertexCount = vertexArray.length/vertexNumComponents; 121 | const positionBuffer = gl.createBuffer(); 122 | gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); 123 | gl.bufferData(gl.ARRAY_BUFFER, vertexArray, gl.STATIC_DRAW); 124 | gl.useProgram(program); 125 | 126 | const aVertexPosition = gl.getAttribLocation(program, "aVertexPosition"); 127 | gl.enableVertexAttribArray(aVertexPosition); 128 | gl.vertexAttribPointer(aVertexPosition, vertexNumComponents, gl.FLOAT, false, 0, 0); 129 | 130 | bindLocations(gl, program, fragLocations); 131 | 132 | let animate = function(t) { 133 | 134 | if(canvas.clientWidth !== canvas.width) canvas.width = canvas.clientWidth; 135 | if(canvas.clientHeight !== canvas.height) canvas.height = canvas.clientHeight; 136 | gl.viewport(0,0,canvas.width, canvas.height); 137 | gl.uniform2fv(fragLocations.resLoc, [canvas.width, canvas.height]); 138 | gl.uniform1f(fragLocations.timeLoc, t/1000); 139 | gl.clearColor(1., 1., 1.0, 1.0); 140 | gl.clear(gl.COLOR_BUFFER_BIT); 141 | gl.drawArrays(gl.TRIANGLES, 0, vertexCount); 142 | if(CAPTURE) { 143 | CAPTURE = false; 144 | IMAGE_URL = canvas.toDataURL("image/png"); 145 | } 146 | window.requestAnimationFrame(animate); 147 | } 148 | animate(0); 149 | } 150 | 151 | function createProgram() { 152 | const vs = createShader(gl.VERTEX_SHADER, shaders.vert); 153 | const fs = createShader(gl.FRAGMENT_SHADER, shaders.frag); 154 | const program = gl.createProgram(); 155 | gl.attachShader(program, vs); 156 | gl.attachShader(program, fs); 157 | gl.linkProgram(program); 158 | const success = gl.getProgramParameter(program, gl.LINK_STATUS); 159 | if(success) return program; 160 | console.log(gl.getProgramInfoLog(program)); 161 | gl.deleteProgram(program); 162 | } 163 | 164 | function createShader(type, source) { 165 | const shader = gl.createShader(type); 166 | gl.shaderSource(shader, source); 167 | gl.compileShader(shader); 168 | const success = gl.getShaderParameter(shader, gl.COMPILE_STATUS); 169 | if(success) return shader; 170 | console.log(gl.getShaderInfoLog(shader)); 171 | gl.deleteShader(shader); 172 | } 173 | 174 | function bindLocations() { 175 | fragLocations.timeLoc = gl.getUniformLocation(program, "time"); 176 | fragLocations.resLoc = gl.getUniformLocation(program, "uResolution"); 177 | } 178 | 179 | function updateShader(newShader) { 180 | let f = fragBase + `vec4(${newShader}, 1.0) ; }`; 181 | let vs = createShader(gl.VERTEX_SHADER, shaders.vert); 182 | let fs = createShader(gl.FRAGMENT_SHADER, f); 183 | let sh = gl.getAttachedShaders(program); 184 | sh.map( s => gl.detachShader(program, s) ); 185 | sh.map( s => gl.deleteShader(s) ); 186 | gl.attachShader(program, vs); 187 | gl.attachShader(program, fs); 188 | gl.linkProgram(program); 189 | bindLocations(); 190 | 191 | } 192 | 193 | function captureImage() { 194 | CAPTURE = true; 195 | let p = new Promise( (resolveFn, rejectFn) => { 196 | setTimeout(()=>{ 197 | resolveFn(IMAGE_URL); 198 | },100); 199 | }) 200 | return p; 201 | } 202 | 203 | 204 | module.exports = { init, updateShader, captureImage } 205 | -------------------------------------------------------------------------------- /texts/morrison.txt: -------------------------------------------------------------------------------- 1 | I can make the earth stop in 2 | its tracks. I made the 3 | blue cars go away. 4 | I can make myself invisible or small. 5 | 6 | I can become gigantic and reach the 7 | farthest things. I can change 8 | the course of nature. 9 | I can place myself anywhere in 10 | space or time. 11 | 12 | I can summon the dead. 13 | I can perceive events on other worlds, 14 | in my deepest inner mind, 15 | and in the minds of others. 16 | 17 | I can. 18 | 19 | I am. 20 | 21 | 22 | The world on fire ... 23 | Taxi from Africa... 24 | The Grand Hotel... 25 | 26 | He was drunk 27 | a big party last night 28 | back going back 29 | in all directions 30 | sleeping these insane hours. 31 | 32 | I'll never wake up 33 | in a good mood again. 34 | I'm sick of these stinky boots. 35 | 36 | The movie will begin in five moments. 37 | The mindless voice announced 38 | all those unseated will await the next show. 39 | We filed slowly, languidly into the hall. 40 | 41 | The auditorium was vast and silent 42 | as we seated and were darkened, the voice continued. 43 | The program for this evening is not new. 44 | You've seen this entertainment through and through. 45 | You've seen your birth your life and death 46 | you might recall all of the rest. 47 | 48 | Did you have a good world when you died? 49 | Enough to base a movie on? 50 | I'm getting out of here. 51 | Where are you going? 52 | To the other side of morning. 53 | 54 | Please don't chase the clouds, pagodas. 55 | Her cunt gripped him like a warm, friendly hand. 56 | It's alright, all your friends are here. 57 | When can I meet them? 58 | After you've eaten 59 | I'm not hungry. 60 | Uh, we meant beaten. 61 | Silver stream, silvery scream. 62 | Oooooh, impossible concentration. 63 | 64 | I'll tell you this... 65 | No eternal reward will forgive us now. 66 | For wasting the dawn. 67 | Back in those days everything was simpler and more confused. 68 | 69 | One summer night, going to the pier. 70 | I ran into two young girls. 71 | The blonde one was called Freedom. 72 | The dark one, Enterprise. 73 | We talked and they told me this story. 74 | Now listen to this... 75 | 76 | I'll tell you about Texas radio and the big beat. 77 | Soft driven, slow and mad. 78 | Like some new language. 79 | Reaching your head with the cold, sudden fury of a divine messenger. 80 | Let me tell you about heartache and the loss of god. 81 | Wandering, wandering in hopeless night. 82 | 83 | Out here in the perimeter there are no stars. 84 | Out here we is stoned. 85 | Immaculate. 86 | 87 | Gently they stir, gently rise. 88 | The dead are newborn awakening. 89 | With ravaged limbs and wet souls. 90 | Gently they sigh in rapt funeral amazement. 91 | Who called these dead to dance? 92 | 93 | Was it the young woman learning to play the ghost song on her baby grand? 94 | Was it the wilderness children? 95 | Was it the ghost god himself, stuttering, cheering, chatting blindly? 96 | 97 | I called you up to anoint the earth. 98 | I called you to announce sadness falling like burned skin. 99 | I called you to wish you well. 100 | To glory in self like a new monster. 101 | And now I call you to pray. 102 | 103 | Wow, I'm sick of doubt 104 | Live in the light of certain 105 | South 106 | Cruel bindings. 107 | 108 | The servants have the power 109 | dog-men and their mean women 110 | pulling poor blankets over 111 | our sailors 112 | (And where were you in our lean hour) 113 | Milking your moustache 114 | or grinding a flower? 115 | 116 | I'm sick of dour faces 117 | Staring at me from the TV 118 | Tower, I want roses in 119 | my garden bower; dig? 120 | Royal babies, rubies 121 | must now replace aborted 122 | Strangers in the mud 123 | These mutants, blood-meal 124 | for the plant that's plowed. 125 | 126 | They are waiting to take us into 127 | the severed garden 128 | Do you know how pale and wanton thrillful 129 | comes death on a strange hour 130 | unannounced, unplanned for 131 | like a scaring over-friendly guest you've 132 | brought to bed 133 | 134 | Death makes angels of us all 135 | and gives us wings 136 | where we had shoulders 137 | smooth as raven's 138 | claws 139 | 140 | No more money, no more fancy dress 141 | This other kingdom seems by far the best 142 | until its other jaw reveals incest 143 | and loose obedience to a vegetable law. 144 | I will not go 145 | Prefer a Feast of Friends 146 | To the Giant Family. 147 | 148 | Lament for my cock 149 | Sore and crucified 150 | I seek to know you 151 | Acquiring soulful wisdom 152 | You can open walls of mystery 153 | Stripshow 154 | 155 | How to acquire death in the morning show 156 | TV death which the child absorbs 157 | Deathwell mystery which makes me write 158 | Slow train, the death of my cock gives life 159 | Forgive the poor old people who gave us entry 160 | Taught us god in the child's prayer in the night 161 | 162 | Guitar player 163 | Ancient wise satyr 164 | Sing your ode to my cock 165 | Caress it's lament 166 | Stiffen and guide us, we frozen 167 | 168 | Lost cells 169 | The knowledge of cancer 170 | To speak to the heart 171 | And give the great gift 172 | Words Power Trance 173 | This stable friend and the beast of his zoo 174 | Wild haired chicks 175 | Women flowering in their summit 176 | 177 | Monsters of skin 178 | Each color connects 179 | to create the boat 180 | which rocks the race 181 | Could any hell be more horrible 182 | than now 183 | and real? 184 | 185 | I pressed her thigh and death smiled 186 | Death, old friend 187 | Death and my cock are the world 188 | I can forgive my injuries in the name of 189 | Wisdom Luxury Romance 190 | Sentence upon sentence 191 | Words are the healing lament 192 | For the death of my cock's spirit 193 | Has no meaning in the soft fire 194 | Words got me the wound and will get me well 195 | I you believe it 196 | 197 | All join now and lament the death of my cock 198 | A tounge of knowledge in the feathered night 199 | Boys get crazy in the head and suffer 200 | I sacrifice my cock on the altar of silence 201 | 202 | Resident mockery 203 | give us an hour for magic 204 | We of the purple glove 205 | We of the starling flight 206 | and velvet hour 207 | 208 | We of Arabic pleasure's breed 209 | We of sundome and the night 210 | Give us a creed 211 | To believe 212 | 213 | A Night of lust 214 | Give us trust in 215 | The Night 216 | Give of color 217 | Hundred hues 218 | a rich mandala 219 | For me and you 220 | 221 | And for your silky 222 | pillowed house 223 | A head, wisdom 224 | And a bed 225 | Troubled decree 226 | Resident mockery 227 | has claimed thee. 228 | 229 | We used to believe. 230 | In the good old days. 231 | We still receive in 232 | little ways. 233 | 234 | The Things of Kindness 235 | An unsporting brow 236 | Forget and allow. 237 | 238 | Awake. 239 | Shake dreams from your hair 240 | My pretty child, my sweet one. 241 | Choose the day and choose the sign of your day 242 | The days divinity 243 | First thing you see. 244 | 245 | A vast radiant beach in a cool jeweled moon 246 | Couples naked race down by its quiet side 247 | And we laugh like soft, mad children 248 | Smug in the wooly cotton brains of infancy 249 | The music and voices are all around us. 250 | 251 | Choose they croon the ancient ones 252 | The time has come again 253 | Choose now, they croon 254 | Beneath the moon 255 | Beside an ancient lake 256 | Enter again the sweet forest 257 | Enter the hot dream 258 | Come with us. 259 | 260 | Everything is broken up and dance. 261 | 262 | Did you know freedom exists 263 | In school books 264 | Did you know madmen are 265 | Running our prisons 266 | 267 | Within a jail, within a gaol 268 | Within a white free protestant 269 | Maelstrom 270 | 271 | We're perched headlong 272 | On the edge of boredom 273 | We're reaching for death 274 | On the end of a candle 275 | 276 | We're trying for something 277 | That's already found us 278 | -------------------------------------------------------------------------------- /web/style.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i|Neuton:200,300,400,400i,700,800&display=swap'); 2 | 3 | * { 4 | margin: 0; 5 | padding: 0; 6 | box-sizing: border-box; 7 | -webkit-font-smoothing: antialiased; 8 | transform: translateZ(0); 9 | } 10 | 11 | html { 12 | font-size: 16px; 13 | font-family: 'Lato'; 14 | --sidebar-width: 100px; 15 | } 16 | 17 | .container { 18 | width: 100vw; 19 | height: 100vh; 20 | position: relative; 21 | 22 | } 23 | 24 | .main { 25 | display: grid; 26 | grid-template-columns: repeat(16, 1fr) repeat(3, 90px) 100px; 27 | grid-template-rows: repeat(20,1fr); 28 | align-items: stretch; 29 | justify-items: stretch; 30 | background-color: #f5ecec; 31 | width: 100%; 32 | height: 100%; 33 | position: relative; 34 | left: 0; 35 | transition: left 0.3s; 36 | } 37 | 38 | .sidebar { 39 | width: 0; 40 | overflow: hidden; 41 | height: 100%; 42 | padding: 0rem; 43 | position: absolute; 44 | left: 0; 45 | top: 0; 46 | background-color: #595959; 47 | box-shadow: inset -20px 0px 20px -16px rgba(0, 0, 0, 0.67); 48 | transition: all 0.3s; 49 | } 50 | 51 | .container-split { 52 | .main { 53 | width: calc( 100% - var(--sidebar-width) ); 54 | left: var(--sidebar-width); 55 | } 56 | .sidebar { 57 | width: var(--sidebar-width); 58 | padding: 1rem 0.5rem 1rem 1rem; 59 | } 60 | } 61 | 62 | .help { 63 | position: absolute; 64 | bottom: 1rem; 65 | left: 1rem; 66 | display: flex; 67 | flex-direction: column; 68 | } 69 | 70 | .home { 71 | display: block; 72 | margin-bottom: 0.5rem; 73 | } 74 | 75 | .home h1 { 76 | font-family: linotype-sabon, sans-serif; 77 | font-size: 1.2rem; 78 | line-height: 1; 79 | } 80 | 81 | .home a { 82 | text-decoration: none; 83 | color: #a59999; 84 | } 85 | 86 | .help .buttons { 87 | display: flex; 88 | justify-content: space-between; 89 | } 90 | 91 | 92 | section { 93 | box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.3); 94 | background-color: white; 95 | } 96 | 97 | h2 { 98 | font-size: 0.9rem; 99 | font-weight: 300; 100 | text-transform: uppercase; 101 | margin-bottom: 1rem; 102 | } 103 | 104 | p { 105 | color: rgba(0,0,0,0.7); 106 | padding: 0.4rem 0; 107 | font-size: 0.8rem; 108 | } 109 | 110 | input { 111 | padding: 0.4rem 0.8rem; 112 | font-size: 0.8rem; 113 | display: block; 114 | margin: 1rem 0; 115 | color: rgba(0,0,0,0.7); 116 | } 117 | 118 | 119 | .button { 120 | padding: 0.5rem; 121 | -webkit-appearance: none; 122 | border-radius: 0; 123 | background-color: white; 124 | border: 0.5px solid silver; 125 | line-height: 1; 126 | text-transform: uppercase; 127 | font-family: 'Lato'; 128 | font-size: 0.6rem; 129 | font-weight: 400; 130 | color: rgba(0,0,0,0.7); 131 | cursor: pointer; 132 | } 133 | 134 | .button-inverted { 135 | border-color: rgba(180,180,180,0.7); 136 | color: rgba(180,180,180,0.7); 137 | background-color: rgba(40,40,40,0.7); 138 | } 139 | 140 | .dropdown { 141 | padding: 0.5rem; 142 | -webkit-appearance: none; 143 | border-radius: 0; 144 | padding-right: 1.6rem; 145 | background-color: white; 146 | border: 0.5px solid silver; 147 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cpolygon fill='none' stroke='black' stroke-width='2%25' points='2 2 8 2 5 8' /%3E%3C/svg%3E"); 148 | background-size: 1.4rem 0.9rem; 149 | background-repeat: no-repeat; 150 | background-position: center right; 151 | line-height: 1; 152 | text-transform: uppercase; 153 | font-family: 'Lato'; 154 | font-size: 0.6rem; 155 | font-weight: 400; 156 | color: rgba(0,0,0,0.7); 157 | } 158 | 159 | 160 | 161 | /* ~~~~~~~~~~~~~~~~~ EDITOR ~~~~~~~~~~~~~~~~~ */ 162 | .editor { 163 | grid-column-start: 2; 164 | grid-column-end: 7; 165 | grid-row-start: 2; 166 | grid-row-end: 15; 167 | z-index: 1; 168 | } 169 | 170 | .editor__textarea { 171 | -webkit-appearance: normal; 172 | width: 100%; 173 | height:100%; 174 | padding: 1rem; 175 | font-family: 'Neuton'; 176 | font-size: 1.2rem; 177 | line-height: 1.3; 178 | resize: none; 179 | outline: none; 180 | border: none; 181 | } 182 | /* ~~~~~~~~~~~~~~~~~ EDITOR ~~~~~~~~~~~~~~~~~ */ 183 | 184 | 185 | 186 | 187 | /* ~~~~~~~~~~~~~~~~~ CANVAS ~~~~~~~~~~~~~~~~~ */ 188 | .canvas { 189 | grid-column-start: 3; 190 | grid-column-end: 16; 191 | grid-row-start: 3; 192 | grid-row-end: 20; 193 | } 194 | .canvas canvas { 195 | width: 100%; 196 | height: 100%; 197 | } 198 | /* ~~~~~~~~~~~~~~~~~ CANVAS ~~~~~~~~~~~~~~~~~ */ 199 | 200 | 201 | 202 | 203 | /* ~~~~~~~~~~~~~~~~~ WORDTABLE ~~~~~~~~~~~~~~~~~ */ 204 | .wordtable { 205 | grid-column-start: 17; 206 | grid-column-end: 20; 207 | grid-row-start: 1; 208 | grid-row-end: 21; 209 | overflow: scroll; 210 | box-shadow: inset 20px 0px 20px -16px rgba(0, 0, 0, 0.67); 211 | border-right: 1px solid rgba(0,0,0,0.2); 212 | padding: 1rem; 213 | } 214 | 215 | .wordtable__menu { 216 | margin-bottom: 1rem; 217 | .button-createmap { 218 | display: block; 219 | margin: 0.2rem 0; 220 | } 221 | } 222 | 223 | .map { 224 | display: grid; 225 | grid-template-columns: repeat(2, 1fr ) ; 226 | grid-gap: 0px; 227 | border-top: 1px solid rgba(0,0,0,0.2); 228 | 229 | p { 230 | border-bottom: 1px solid rgba(0,0,0,0.2); 231 | color: rgba(0,0,0,0.7); 232 | display: flex; 233 | align-items: center; 234 | padding: 0.4rem; 235 | font-size: 0.8rem; 236 | &:nth-child(2n-1) { 237 | font-style:italic; 238 | } 239 | } 240 | 241 | input { 242 | margin: 0rem; 243 | display: flex; 244 | align-items: center; 245 | padding: 0.2rem 0.4rem; 246 | font-size: 0.8rem; 247 | } 248 | } 249 | /* ~~~~~~~~~~~~~~~~~ WORDTABLE ~~~~~~~~~~~~~~~~~ */ 250 | 251 | 252 | 253 | /* ~~~~~~~~~~~~~~~~~ STACK ~~~~~~~~~~~~~~~~~ */ 254 | .stack { 255 | box-shadow: none; 256 | grid-column-start: 20; 257 | grid-column-end: 21; 258 | grid-row-start: 1; 259 | grid-row-end: 21; 260 | padding: 1rem; 261 | overflow: scroll; 262 | } 263 | 264 | .stack__elements { 265 | width: 100%; 266 | display: flex; 267 | flex-direction: column; 268 | } 269 | 270 | .stack__element { 271 | border: 1px solid rgba(0,0,0,0.4); 272 | padding: 0.2rem 0.3rem; 273 | margin: 0.2rem 0; 274 | position: relative; 275 | overflow: visible; 276 | text-align: center; 277 | font-size: 0.7rem; 278 | color: rgba(0,0,0,0.7); 279 | 280 | &::after { 281 | content: attr(data-count); 282 | position: absolute; 283 | bottom: -0.2rem; 284 | right: -0.5rem; 285 | font-size: 0.5rem; 286 | } 287 | } 288 | 289 | /* ~~~~~~~~~~~~~~~~~ STACK ~~~~~~~~~~~~~~~~~ */ 290 | 291 | 292 | 293 | /* ~~~~~~~~~~~~~~~~~ EXAMPLES ~~~~~~~~~~~~~~~~~ */ 294 | 295 | .sidebar h2 { 296 | color: rgba(255,255,255,0.7); 297 | } 298 | 299 | .sidebar__nav { 300 | display: flex; 301 | justify-content: space-between; 302 | position: absolute; 303 | bottom: 0; 304 | left: 0; 305 | padding: 1rem; 306 | width: 100%; 307 | } 308 | 309 | .sidebar__examples { 310 | position: relative; 311 | height: calc(100% - 6rem); 312 | overflow-y:scroll; 313 | overflow-x: hidden; 314 | } 315 | 316 | .sidebar__examples .stack__elements { 317 | position: absolute; 318 | top: 0; 319 | left: 100%; 320 | &.active { 321 | left: 0; 322 | } 323 | } 324 | 325 | .stack__element-inverted { 326 | width: calc(100% - 0.5rem); 327 | border: 1px solid rgba(255,255,255,0.4); 328 | color: rgba(255,255,255,0.7); 329 | } 330 | 331 | 332 | /* ~~~~~~~~~~~~~~~~~ EXAMPLES ~~~~~~~~~~~~~~~~~ */ 333 | 334 | 335 | 336 | /* ~~~~~~~~~~~~~~~~~ OVERLAY ~~~~~~~~~~~~~~~~~ */ 337 | 338 | .overlay { 339 | position: absolute; 340 | width: 100vw; 341 | height: 100vh; 342 | top: 0; left: 0; 343 | background-color: rgba(0,0,0,0.2); 344 | align-items: center; 345 | justify-content: center; 346 | display: none; 347 | &.visible { display: flex; } 348 | } 349 | 350 | .overlay__wrapper { 351 | position: relative; 352 | width: auto; 353 | height: auto; 354 | max-width: 95vw; 355 | max-height: 95vh; 356 | overflow: scroll; 357 | .button-close { 358 | position: absolute; 359 | top: 0; right: 0; 360 | } 361 | } 362 | 363 | .overlay__content { 364 | box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.6); 365 | background-color: white; 366 | padding: 2rem; 367 | display: none; 368 | &.visible { display: block; } 369 | } 370 | 371 | /* ~~~~~~~~~~~~~~~~~ OVERLAY ~~~~~~~~~~~~~~~~~ */ 372 | -------------------------------------------------------------------------------- /dist/style.2a7dcb83.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["web/style.scss"],"names":[],"mappings":"AAAQ,qJAAA,CAER,EACE,QAAA,CACA,SAAA,CACA,qBAAA,CACA,kCAAA,CACA,wBAGF,KACE,cAAA,CACA,gBAAA,CACA,sBAGF,WACE,WAAA,CACA,YAAA,CACA,kBAIF,MACE,YAAA,CACA,yDAAA,CACA,iCAAA,CACA,mBAAA,CACA,qBAAA,CACA,wBAAA,CACA,UAAA,CAEA,iBAAA,CAEA,oBAGF,eANE,WAAA,CAEA,OAIF,SACE,OAAA,CACA,eAAA,CAEA,SAAA,CACA,iBAAA,CAEA,KAAA,CACA,wBAAA,CACA,mDAAA,CACA,mBAIA,uBACE,uCAAA,CACA,0BAEF,0BACE,0BAAA,CACA,6BAIJ,MACE,iBAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,sBAGF,MACE,aAAA,CACA,oBAGF,SACE,qCAAA,CACA,gBAAA,CACA,cAGF,QACE,oBAAA,CACA,cAGF,eACE,YAAA,CACA,8BAIF,QACE,qCAAA,CACA,sBAGF,GACE,eAAA,CACA,eAAA,CACA,wBAAA,CACA,mBAGF,EAEE,gBAIF,QALE,oBAAA,CAEA,gBAGF,MACE,mBAAA,CAEA,aAAA,CACA,cAKF,QACE,aAAA,CACA,uBAAA,CACA,eAAA,CACA,qBAAA,CACA,wBAAA,CACA,aAAA,CACA,wBAAA,CACA,gBAAA,CACA,eAAA,CACA,eAAA,CACA,oBAAA,CACA,eAGF,iBACE,gCAAA,CACA,yBAAA,CACA,mCAGF,UAEE,uBAAA,CACA,eAAA,CACA,gCAAA,CACA,qBAAA,CACA,wBAAA,CACA,yOAAA,CACA,4BAAA,CACA,2BAAA,CACA,wBAAA,CACA,aAAA,CACA,wBAAA,CACA,gBAAA,CACA,eAAA,CACA,eAAA,CACA,qBAMF,QACE,mBAAA,CACA,iBAAA,CACA,gBAAA,CACA,eAAA,CACA,UAGF,kBACE,yBAAA,CACA,UAAA,CACA,WAAA,CACA,YAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,WAAA,CACA,YAAA,CACA,YAQF,QACE,mBAAA,CACA,kBAAA,CACA,gBAAA,CACA,gBAEF,eACE,UAAA,CACA,YAQF,WACE,oBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,eAAA,CACA,kDAAA,CACA,qCAAA,CACA,aAGF,iBACE,mBACA,mCACE,aAAA,CACA,eAIJ,KACE,YAAA,CACA,mCAAA,CACA,UAAA,CACA,oCAEA,OACE,sCAAA,CACA,oBAAA,CACA,YAAA,CACA,kBAAA,CACA,aAAA,CACA,gBACA,uBACE,kBAIJ,WACE,QAAA,CACA,YAAA,CACA,kBAAA,CACA,mBAAA,CACA,gBAQJ,OACE,eAAA,CACA,oBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,YAAA,CACA,gBAGF,iBACE,UAAA,CACA,YAAA,CACA,sBAGF,gBACE,+BAAA,CACA,mBAAA,CACA,cAAA,CACA,iBAAA,CACA,gBAAA,CACA,iBAAA,CACA,eAAA,CACA,qBAEA,sBACE,wBAAA,CACA,iBAAA,CACA,aAAA,CACA,YAAA,CACA,gBAUJ,YACE,yBAGF,cACE,YAAA,CACA,6BAAA,CACA,iBAAA,CACA,QAAA,CACA,MAAA,CACA,YAAA,CACA,WAGF,mBACE,iBAAA,CACA,wBAAA,CACA,iBAAA,CACA,kBAGF,oCACE,iBAAA,CACA,KAAA,CACA,UACA,2CACE,OAIJ,yBACE,wBAAA,CACA,mCAAA,CACA,yBAUF,SACE,iBAAA,CACA,WAAA,CACA,YAAA,CACA,KAAA,CAAQ,MAAA,CACR,+BAAA,CACA,kBAAA,CACA,sBAAA,CACA,aACA,iBAAY,aAGd,kBACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,eAAA,CACA,gBACA,gCACE,iBAAA,CACA,KAAA,CAAQ,QAIZ,kBACE,sCAAA,CACA,qBAAA,CACA,YAAA,CACA,aACA,0BAAY","file":"style.2a7dcb83.css","sourceRoot":"..","sourcesContent":["@import url('https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900,900i|Neuton:200,300,400,400i,700,800&display=swap');\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n transform: translateZ(0);\n}\n\nhtml {\n font-size: 16px;\n font-family: 'Lato';\n --sidebar-width: 100px;\n}\n\n.container {\n width: 100vw;\n height: 100vh;\n position: relative;\n\n}\n\n.main {\n display: grid;\n grid-template-columns: repeat(16, 1fr) repeat(3, 90px) 100px;\n grid-template-rows: repeat(20,1fr);\n align-items: stretch;\n justify-items: stretch;\n background-color: #f5ecec;\n width: 100%;\n height: 100%;\n position: relative;\n left: 0;\n transition: left 0.3s;\n}\n\n.sidebar {\n width: 0;\n overflow: hidden;\n height: 100%;\n padding: 0rem;\n position: absolute;\n left: 0;\n top: 0;\n background-color: #595959;\n box-shadow: inset -20px 0px 20px -16px rgba(0, 0, 0, 0.67);\n transition: all 0.3s;\n}\n\n.container-split {\n .main {\n width: calc( 100% - var(--sidebar-width) );\n left: var(--sidebar-width);\n }\n .sidebar {\n width: var(--sidebar-width);\n padding: 1rem 0.5rem 1rem 1rem;\n }\n}\n\n.help {\n position: absolute;\n bottom: 1rem;\n left: 1rem;\n display: flex;\n flex-direction: column;\n}\n\n.home {\n display: block;\n margin-bottom: 0.5rem;\n}\n\n.home h1 {\n font-family: linotype-sabon, sans-serif;\n font-size: 1.2rem;\n line-height: 1;\n}\n\n.home a {\n text-decoration: none;\n color: #a59999;\n}\n\n.help .buttons {\n display: flex;\n justify-content: space-between;\n}\n\n\nsection {\n box-shadow: 0 0 8px 1px rgba(0, 0, 0, 0.3);\n background-color: white;\n}\n\nh2 {\n font-size: 0.9rem;\n font-weight: 300;\n text-transform: uppercase;\n margin-bottom: 1rem;\n}\n\np {\n color: rgba(0,0,0,0.7);\n padding: 0.4rem 0;\n font-size: 0.8rem;\n}\n\ninput {\n padding: 0.4rem 0.8rem;\n font-size: 0.8rem;\n display: block;\n margin: 1rem 0;\n color: rgba(0,0,0,0.7);\n}\n\n\n.button {\n padding: 0.5rem;\n -webkit-appearance: none;\n border-radius: 0;\n background-color: white;\n border: 0.5px solid silver;\n line-height: 1;\n text-transform: uppercase;\n font-family: 'Lato';\n font-size: 0.6rem;\n font-weight: 400;\n color: rgba(0,0,0,0.7);\n cursor: pointer;\n}\n\n.button-inverted {\n border-color: rgba(180,180,180,0.7);\n color: rgba(180,180,180,0.7);\n background-color: rgba(40,40,40,0.7);\n}\n\n.dropdown {\n padding: 0.5rem;\n -webkit-appearance: none;\n border-radius: 0;\n padding-right: 1.6rem;\n background-color: white;\n border: 0.5px solid silver;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Cpolygon fill='none' stroke='black' stroke-width='2%25' points='2 2 8 2 5 8' /%3E%3C/svg%3E\");\n background-size: 1.4rem 0.9rem;\n background-repeat: no-repeat;\n background-position: center right;\n line-height: 1;\n text-transform: uppercase;\n font-family: 'Lato';\n font-size: 0.6rem;\n font-weight: 400;\n color: rgba(0,0,0,0.7);\n}\n\n\n\n/* ~~~~~~~~~~~~~~~~~ EDITOR ~~~~~~~~~~~~~~~~~ */\n.editor {\n grid-column-start: 2;\n grid-column-end: 7;\n grid-row-start: 2;\n grid-row-end: 15;\n z-index: 1;\n}\n\n.editor__textarea {\n -webkit-appearance: normal;\n width: 100%;\n height:100%;\n padding: 1rem;\n font-family: 'Neuton';\n font-size: 1.2rem;\n line-height: 1.3;\n resize: none;\n outline: none;\n border: none;\n}\n/* ~~~~~~~~~~~~~~~~~ EDITOR ~~~~~~~~~~~~~~~~~ */\n\n\n\n\n/* ~~~~~~~~~~~~~~~~~ CANVAS ~~~~~~~~~~~~~~~~~ */\n.canvas {\n grid-column-start: 3;\n grid-column-end: 16;\n grid-row-start: 3;\n grid-row-end: 20;\n}\n.canvas canvas {\n width: 100%;\n height: 100%;\n}\n/* ~~~~~~~~~~~~~~~~~ CANVAS ~~~~~~~~~~~~~~~~~ */\n\n\n\n\n/* ~~~~~~~~~~~~~~~~~ WORDTABLE ~~~~~~~~~~~~~~~~~ */\n.wordtable {\n grid-column-start: 17;\n grid-column-end: 20;\n grid-row-start: 1;\n grid-row-end: 21;\n overflow: scroll;\n box-shadow: inset 20px 0px 20px -16px rgba(0, 0, 0, 0.67);\n border-right: 1px solid rgba(0,0,0,0.2);\n padding: 1rem;\n}\n\n.wordtable__menu {\n margin-bottom: 1rem;\n .button-createmap {\n display: block;\n margin: 0.2rem 0;\n }\n}\n\n.map {\n display: grid;\n grid-template-columns: repeat(2, 1fr ) ;\n grid-gap: 0px;\n border-top: 1px solid rgba(0,0,0,0.2);\n\n p {\n border-bottom: 1px solid rgba(0,0,0,0.2);\n color: rgba(0,0,0,0.7);\n display: flex;\n align-items: center;\n padding: 0.4rem;\n font-size: 0.8rem;\n &:nth-child(2n-1) {\n font-style:italic;\n }\n }\n\n input {\n margin: 0rem;\n display: flex;\n align-items: center;\n padding: 0.2rem 0.4rem;\n font-size: 0.8rem;\n }\n}\n/* ~~~~~~~~~~~~~~~~~ WORDTABLE ~~~~~~~~~~~~~~~~~ */\n\n\n\n/* ~~~~~~~~~~~~~~~~~ STACK ~~~~~~~~~~~~~~~~~ */\n.stack {\n box-shadow: none;\n grid-column-start: 20;\n grid-column-end: 21;\n grid-row-start: 1;\n grid-row-end: 21;\n padding: 1rem;\n overflow: scroll;\n}\n\n.stack__elements {\n width: 100%;\n display: flex;\n flex-direction: column;\n}\n\n.stack__element {\n border: 1px solid rgba(0,0,0,0.4);\n padding: 0.2rem 0.3rem;\n margin: 0.2rem 0;\n position: relative;\n overflow: visible;\n text-align: center;\n font-size: 0.7rem;\n color: rgba(0,0,0,0.7);\n\n &::after {\n content: attr(data-count);\n position: absolute;\n bottom: -0.2rem;\n right: -0.5rem;\n font-size: 0.5rem;\n }\n}\n\n/* ~~~~~~~~~~~~~~~~~ STACK ~~~~~~~~~~~~~~~~~ */\n\n\n\n/* ~~~~~~~~~~~~~~~~~ EXAMPLES ~~~~~~~~~~~~~~~~~ */\n\n.sidebar h2 {\n color: rgba(255,255,255,0.7);\n}\n\n.sidebar__nav {\n display: flex;\n justify-content: space-between;\n position: absolute;\n bottom: 0;\n left: 0;\n padding: 1rem;\n width: 100%;\n}\n\n.sidebar__examples {\n position: relative;\n height: calc(100% - 6rem);\n overflow-y:scroll;\n overflow-x: hidden;\n}\n\n.sidebar__examples .stack__elements {\n position: absolute;\n top: 0;\n left: 100%;\n &.active {\n left: 0;\n }\n}\n\n.stack__element-inverted {\n width: calc(100% - 0.5rem);\n border: 1px solid rgba(255,255,255,0.4);\n color: rgba(255,255,255,0.7);\n}\n\n\n/* ~~~~~~~~~~~~~~~~~ EXAMPLES ~~~~~~~~~~~~~~~~~ */\n\n\n\n/* ~~~~~~~~~~~~~~~~~ OVERLAY ~~~~~~~~~~~~~~~~~ */\n\n.overlay {\n position: absolute;\n width: 100vw;\n height: 100vh;\n top: 0; left: 0;\n background-color: rgba(0,0,0,0.2);\n align-items: center;\n justify-content: center;\n display: none;\n &.visible { display: flex; }\n}\n\n.overlay__wrapper {\n position: relative;\n width: auto;\n height: auto;\n max-width: 95vw;\n max-height: 95vh;\n overflow: scroll;\n .button-close {\n position: absolute;\n top: 0; right: 0;\n }\n}\n\n.overlay__content {\n box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.6);\n background-color: white;\n padding: 2rem;\n display: none;\n &.visible { display: block; }\n}\n\n/* ~~~~~~~~~~~~~~~~~ OVERLAY ~~~~~~~~~~~~~~~~~ */\n"]} -------------------------------------------------------------------------------- /texts/aesop.txt: -------------------------------------------------------------------------------- 1 | A Crow, half-dead with thirst, came upon a Pitcher which had once been full of water; but when the Crow put its beak into the mouth of the Pitcher he found that only very little water was left in it, and that he could not reach far enough down to get at it. 2 | 3 | He tried, and he tried, but at last had to give up in despair. 4 | 5 | Then a thought came to him, and he took a pebble and dropped it into the Pitcher. 6 | 7 | Then he took another pebble and dropped it into the Pitcher. 8 | 9 | Then he took another pebble and dropped that into the Pitcher. 10 | 11 | Then he took another pebble and dropped that into the Pitcher. 12 | 13 | Then he took another pebble and dropped that into the Pitcher. 14 | 15 | Then he took another pebble and dropped that into the Pitcher. 16 | 17 | At last, at last, he saw the water mount up near him, and after casting in a few more pebbles he was able to quench his thirst and save his life. 18 | 19 | Long ago, the mice had a general council to consider what measures they could take to outwit their common enemy, the Cat. 20 | 21 | Some said this, and some said that; but at last a young mouse got up and said he had a proposal to make, which he thought would meet the case. 22 | 23 | "You will all agree," said he, "that our chief danger consists in the sly and treacherous manner in which the enemy approaches us. Now, if we could receive some signal of her approach, we could easily escape from her. I venture, therefore, to propose that a small bell be procured, and attached by a ribbon round the neck of the Cat. By this means we should always know when she was about, and could easily retire while she was in the neighbourhood." 24 | 25 | This proposal met with general applause, until an old mouse got up and said: 26 | 27 | "That is all very well, but who is to bell the Cat?" 28 | 29 | The mice looked at one another and nobody spoke. Then the old mouse said: 30 | 31 | "It is easy to propose impossible remedies." 32 | 33 | There was once a Bald Man who sat down after work on a hot summer's day. 34 | 35 | A Fly came up and kept buzzing about his bald pate, and stinging him from time to time. 36 | 37 | The Man aimed a blow at his little enemy, but his palm came on his head instead. 38 | 39 | Again the Fly tormented him, but this time the Man was wiser and said: 40 | 41 | "You will only injure yourself if you take notice of despicable enemies." 42 | A Jay venturing into a yard where Peacocks used to walk, found there a number of feathers which had fallen from the Peacocks when they were moulting. 43 | 44 | He tied them all to his tail and strutted down towards the Peacocks. 45 | 46 | When he came near them they soon discovered the cheat, and striding up to him pecked at him and plucked away his borrowed plumes. 47 | 48 | So the Jay could do no better than go back to the other Jays, who had watched his behaviour from a distance; but they were equally annoyed with him, and told him: 49 | 50 | "It is not only fine feathers that make fine birds" 51 | 52 | A Lion once fell in love with a beautiful maiden and proposed marriage to her parents. 53 | 54 | The old people did not know what to say. 55 | 56 | They did not like to give their daughter to the Lion, yet they did not wish to enrage the King of Beasts. 57 | 58 | At last the father said: 59 | 60 | "We feel highly honoured by your Majesty's proposal, but you see our daughter is a tender young thing, and we fear that in the vehemence of your affection you might possibly do her some injury. Might I venture to suggest that your Majesty should have your claws removed, and your teeth extracted, then we would gladly consider your proposal again." 61 | 62 | The Lion was so much in love that he had his claws trimmed and his big teeth taken out. 63 | 64 | But when he came again to the parents of the young girl they simply laughed in his face, and bade him do his worst. 65 | 66 | A Man had lost his way in a wood one bitter winter's night. 67 | 68 | As he was roaming about, a Satyr came up to him, and finding that he had lost his way, promised to give him a lodging for the night, and guide him out of the forest in the morning. 69 | 70 | As he went along to the Satyr's cell, the Man raised both his hands to his mouth and kept on blowing at them. 71 | 72 | "What do you do that for?" said the Satyr. 73 | 74 | "My hands are numb with the cold," said the Man, "and my breath warms them." 75 | 76 | After this they arrived at the Satyr's home, and soon the Satyr put a smoking dish of porridge before him. 77 | 78 | But when the Man raised his spoon to his mouth he began blowing upon it. 79 | 80 | "And what do you do that for?" said the Satyr. 81 | 82 | "The porridge is too hot, and my breath will cool it." 83 | 84 | "Out you go," said the Satyr. 85 | 86 | "I will have nought to do with a man who can blow hot and cold with the same breath." 87 | 88 | In the old days men used to worship stocks and stones and idols, and prayed to them to give them luck. 89 | 90 | It happened that a Man had often prayed to a wooden idol he had received from his father, but his luck never seemed to change. 91 | 92 | He prayed and he prayed, but still he remained as unlucky as ever. 93 | 94 | One day in the greatest rage he went to the Wooden God, and with one blow swept it down from its pedestal. 95 | 96 | The idol broke in two, and what did he see? 97 | 98 | An immense number of coins flying all over the place. 99 | 100 | A Hound, who in the days of his youth and strength had never yielded to any beast of the forest, encountered in his old age a boar in the chase. 101 | 102 | He seized him boldly by the ear, but could not retain his hold because of the decay of his teeth, so that the boar escaped. 103 | 104 | His master, quickly coming up, was very much disappointed, and fiercely abused the dog. 105 | 106 | The Hound looked up and said: "It was not my fault, master; my spirit was as good as ever, but I could not help mine infirmities. I rather deserve to be praised for what I have been, than to be blamed for what I am." 107 | 108 | A Sailor, bound on a long voyage, took with him a Monkey to amuse him while on shipboard. 109 | 110 | As he sailed off the coast of Greece, a violent tempest arose, in which the ship was wrecked, and he, his Monkey and all the crew were obliged to swim for their lives. 111 | 112 | A Dolphin saw the Monkey contending with the waves, and supposing him to be a man (whom he is always said to befriend), came and placed himself under him, to convey him on his back in safety to the shore. 113 | 114 | When the Dolphin arrived with his burden in sight of land not far from Athens, he demanded of the Monkey if he were an Athenian, who answered that he was, and that he was descended from one of the noblest families in that city. 115 | 116 | The Dolphin then inquired if he knew the Piræus (the famous harbor of Athens). 117 | 118 | The Monkey, supposing that a man was meant, and being obliged to support his previous lie, answered that he knew him very well, and that he was an intimate friend, who would, no doubt, be very glad to see him. 119 | 120 | The Dolphin, indignant at these falsehoods, dipped the Monkey under the water, and drowned him. 121 | A Man came into a Wood one day with an axe in his hand, and begged all the Trees to give him a small branch which he wanted for a particular purpose. 122 | 123 | The Trees were good-natured and gave him one of their branches. 124 | 125 | What did the Man do but fix it into the axe head, and soon set to work cutting down tree after tree. 126 | 127 | Then the Trees saw how foolish they had been in giving their enemy the means of destroying themselves. 128 | On a summer day, when the great heat induced a general thirst, a Lion and a Boar came at the same moment to a small well to drink. 129 | 130 | They fiercely disputed which of them should drink first, and were soon engaged in the agonies of a mortal combat. 131 | 132 | On their stopping on a sudden to take breath for the fiercer renewal of the strife, they saw some Vultures waiting in the distance to feast on the one which should fall first. 133 | 134 | They at once made up their quarrel, saying: 135 | 136 | "It is better for us to make friends, than to become the food of Crows or Vultures, as will certainly happen if we are disabled." 137 | The Lion went once a-hunting along with the Fox, the Jackal, and the Wolf. 138 | 139 | They hunted and they hunted till at last they surprised a Stag, and soon took its life. 140 | 141 | Then came the question how the spoil should be divided. 142 | 143 | "Quarter me this Stag," roared the Lion; so the other animals skinned it and cut it into four parts. 144 | 145 | Then the Lion took his stand in front of the carcass and pronounced judgment: "The first quarter is for me in my capacity as King of Beasts; the second is mine as arbiter; another share comes to me for my part in the chase; and as for the fourth quarter, well, as for that, I should like to see which of you will dare to lay a paw upon it." 146 | 147 | "Humph," grumbled the Fox as he walked away with his tail between his legs; but he spoke in a low growl: 148 | 149 | "You may share the labours of the great, but you will not share the spoil." 150 | Patty the Milkmaid was going to market carrying her milk in a Pail on her head. 151 | 152 | As she went along she began calculating what she would do with the money she would get for the milk. 153 | 154 | "I'll buy some fowls from Farmer Brown," said she, "and they will lay eggs each morning, which I will sell to the parson's wife. With the money that I get from the sale of these eggs I'll buy myself a new dimity frock and a chip hat; and when I go to market, won't all the young men come up and speak to me! Polly Shaw will be that jealous; but I don't care. I shall just look at her and toss my head like this." 155 | 156 | As she spoke she tossed her head back, the Pail fell off it, and all the milk was spilt. 157 | 158 | So she had to go home and tell her mother what had occurred. 159 | 160 | "Ah, my child," said the mother: "Do not count your chickens before they are hatched" 161 | A Dog looking out for its afternoon nap jumped into the Manger of an Ox and lay there cosily upon the straw. 162 | 163 | But soon the Ox, returning from its afternoon work, came up to the Manger and wanted to eat some of the straw. 164 | 165 | The Dog in a rage, being awakened from its slumber, stood up and barked at the Ox, and whenever it came near attempted to bite it. 166 | 167 | At last the Ox had to give up the hope of getting at the straw, and went away muttering: 168 | 169 | "Ah, people often grudge others what they cannot enjoy themselves" 170 | It happened that a Dog had got a piece of meat and was carrying it home in his mouth to eat it in peace. 171 | 172 | Now on his way home he had to cross a plank lying across a running brook. 173 | 174 | As he crossed, he looked down and saw his own shadow reflected in the water beneath. 175 | 176 | Thinking it was another dog with another piece of meat, he made up his mind to have that also. 177 | 178 | So he made a snap at the shadow in the water, but as he opened his mouth the piece of meat fell out, dropped into the water and was never seen more. 179 | An old man on the point of death summoned his sons around him to give them some parting advice. 180 | 181 | He ordered his servants to bring in a faggot of sticks, and said to his eldest son: 182 | 183 | "Break it." 184 | 185 | The son strained and strained, but with all his efforts was unable to break the Bundle. 186 | 187 | The other sons also tried, but none of them was successful. 188 | 189 | "Untie the faggots," said the father, "and each of you take a stick." 190 | 191 | When they had done so, he called out to them: 192 | 193 | "Now, break," and each stick was easily broken. 194 | 195 | "You see my meaning," said their father. 196 | 197 | One fine day it occurred to the Members of the Body that they were doing all the work and the Belly was having all the food. 198 | 199 | So they held a meeting, and after a long discussion, decided to strike work till the Belly consented to take its proper share of the work. 200 | 201 | So for a day or two, the Hands refused to take the food, the Mouth refused to receive it, and the Teeth had no work to do. 202 | 203 | But after a day or two the Members began to find that they themselves were not in a very active condition: 204 | 205 | The Hands could hardly move, and the Mouth was all parched and dry, while the Legs were unable to support the rest. 206 | 207 | So thus they found that even the Belly in its dull quiet way was doing necessary work for the Body, and that all must work together or the Body will go to pieces. 208 | An Ass congratulated a Horse on being so ungrudgingly and carefully provided for, while he himself had scarcely enough to eat, nor even that without hard work. 209 | 210 | But when war broke out, the heavy armed soldier mounted the Horse, and rushed into the very midst of the enemy, and the Horse, being wounded, fell dead on the battle-field. 211 | 212 | Then the Ass, seeing all these things, changed his mind, and commiserated the Horse, saying: "How much more fortunate am I than a charger. I can remain at home in safety while he is exposed to all the perils of war." 213 | Two neighbours came before Jupiter and prayed him to grant their hearts' desire. Now the one was full of avarice, and the other eaten up with envy. 214 | 215 | So to punish them both, Jupiter granted that each might have whatever he wished for himself, but only on condition that his neighbour had twice as much. 216 | 217 | The Avaricious man prayed to have a room full of gold. 218 | 219 | No sooner said than done; but all his joy was turned to grief when he found that his neighbour had two rooms full of the precious metal. 220 | 221 | Then came the turn of the Envious man, who could not bear to think that his neighbour had any joy at all. 222 | 223 | So he prayed that he might have one of his own eyes put out, by which means his companion would become totally blind. 224 | A slave named Androcles once escaped from his master and fled to the forest. As he was wandering about there he came upon a Lion lying down moaning and groaning. At first he turned to flee, but finding that the Lion did not pursue him, he turned back and went up to him. 225 | 226 | As he came near, the Lion put out his paw, which was all swollen and bleeding, and Androcles found that a huge thorn had got into it, and was causing all the pain. He pulled out the thorn and bound up the paw of the Lion, who was soon able to rise and lick the hand of Androcles like a dog. Then the Lion took Androcles to his cave, and every day used to bring him meat from which to live. 227 | 228 | But shortly afterwards both Androcles and the Lion were captured, and the slave was sentenced to be thrown to the Lion, after the latter had been kept without food for several days. The Emperor and all his Court came to see the spectacle, and Androcles was led out into the middle of the arena. Soon the Lion was let loose from his den, and rushed bounding and roaring towards his victim. 229 | 230 | But as soon as he came near to Androcles he recognised his friend, and fawned upon him, and licked his hands like a friendly dog. The Emperor, surprised at this, summoned Androcles to him, who told him the whole story. Whereupon the slave was pardoned and freed, and the Lion let loose to his native forest. 231 | -------------------------------------------------------------------------------- /web/main.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*********************************** 4 | * this is messy code that has been thrown together. 5 | * much clean up is due. 6 | *************************************/ 7 | 8 | 9 | let canvas = require('./webgl.js'); 10 | let Parse = require('../src/Parser'); 11 | let Generate = require('../src/Generator'); 12 | let Maps = require('./maps.js'); 13 | let Mapping = require('../src/Mapping'); 14 | 15 | 16 | let $container = document.querySelector(".container"); 17 | let $editor = document.querySelector(".editor__textarea"); 18 | let $ops = document.querySelector(".stack .stack__elements"); 19 | let $wordTable = document.querySelector(".wordtable__map"); 20 | let $sidebar = document.querySelector(".sidebar"); 21 | let $examplesHolder = document.querySelector(".sidebar__examples"); 22 | let $examples;// = document.querySelectorAll(".sidebar__example"); 23 | 24 | let $overlay = document.querySelector(".overlay"); 25 | let $overlayWrapper = document.querySelector(".overlay__wrapper"); 26 | let $mapForm = document.querySelector(".map__form"); 27 | let $mapTitle = document.querySelector("#map__title"); 28 | 29 | let $file = document.querySelector("#file"); 30 | let $saveTitle = document.querySelector("#save__title"); 31 | let $saveAuthor = document.querySelector("#save__author"); 32 | let $publishTitle = document.querySelector("#publish__title"); 33 | let $publishAuthor = document.querySelector("#publish__author"); 34 | let $publishTwitter = document.querySelector("#publish__twitter"); 35 | let $pubUrl = document.querySelector("#published__url"); 36 | let $publishForm = document.querySelector("#publish__form"); 37 | 38 | let $mapSelect = document.querySelector(".dropdown"); 39 | let $showExamples = document.querySelector(".button-examples"); 40 | let $shuffle = document.querySelector(".button-shuffle"); 41 | let $restore = document.querySelector(".button-restore"); 42 | let $save = document.querySelector(".button-save"); 43 | let $load = document.querySelector(".button-load"); 44 | let $publish = document.querySelector(".button-publish"); 45 | let $download = document.querySelector(".button-download"); 46 | let $close = document.querySelector(".button-close"); 47 | let $createmap = document.querySelector(".button-createmap"); 48 | let $makemap = document.querySelector(".button-makemap"); 49 | let $nextEg = document.querySelector(".button-next"); 50 | let $prevEg = document.querySelector(".button-prev"); 51 | let $about = document.querySelector(".button-about"); 52 | 53 | 54 | let SERVER_URL = "https://api.inverse.website/"; 55 | if(process.env.NODE_ENV !== "production") { 56 | SERVER_URL = "http://localhost:3000/"; 57 | } 58 | let currentMapIdx = 0; 59 | let customMapCount = 0; 60 | let currentEgIdx = 0; 61 | let PARENT = null; 62 | 63 | let stacks = [ 64 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"fbm","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"fbm","vsize":1,"entropy":2},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"sin","vsize":1,"entropy":2},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"cos","vsize":1,"entropy":2},{"type":"OP","val":"distance","vsize":2,"entropy":1},{"type":"NUM","val":10,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":2},{"type":"OP","val":"fract","vsize":1,"entropy":2}]}, 65 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"fbm","vsize":2,"entropy":1},{"type":"NUM","val":4,"vsize":null,"entropy":1},{"type":"NUM","val":4,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":2,"entropy":5},{"type":"OP","val":"dup","vsize":2,"entropy":5},{"type":"OP","val":"fract","vsize":2,"entropy":5},{"type":"OP","val":"swap","vsize":2,"entropy":5},{"type":"OP","val":"floor","vsize":2,"entropy":5},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"+","vsize":2,"entropy":3},{"type":"OP","val":"sin","vsize":2,"entropy":3},{"type":"OP","val":"distance","vsize":2,"entropy":3},{"type":"OP","val":"dup","vsize":1,"entropy":1}]}, 66 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":4},{"type":"OP","val":"t","vsize":1,"entropy":4},{"type":"OP","val":"+","vsize":1,"entropy":4},{"type":"OP","val":"fbm","vsize":1,"entropy":4},{"type":"NUM","val":10,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":3},{"type":"OP","val":"t","vsize":1,"entropy":3},{"type":"OP","val":"sin","vsize":1,"entropy":3},{"type":"OP","val":"+","vsize":1,"entropy":1},{"type":"OP","val":"sin","vsize":1,"entropy":3},{"type":"OP","val":"y","vsize":1,"entropy":3},{"type":"OP","val":"distance","vsize":1,"entropy":3},{"type":"NUM","val":0.2,"vsize":null,"entropy":1},{"type":"NUM","val":0.4,"vsize":null,"entropy":1},{"type":"OP","val":"smoothstep","vsize":1,"entropy":1}]}, 67 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"NUM","val":10,"vsize":null,"entropy":1},{"type":"NUM","val":10,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":2,"entropy":5},{"type":"OP","val":"dup","vsize":2,"entropy":5},{"type":"OP","val":"fract","vsize":2,"entropy":5},{"type":"OP","val":"swap","vsize":2,"entropy":5},{"type":"OP","val":"floor","vsize":2,"entropy":5},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"t","vsize":1,"entropy":2},{"type":"OP","val":"+","vsize":2,"entropy":1},{"type":"OP","val":"cos","vsize":1,"entropy":3},{"type":"OP","val":"swap","vsize":1,"entropy":3},{"type":"OP","val":"sin","vsize":1,"entropy":3},{"type":"OP","val":"distance","vsize":2,"entropy":1},{"type":"NUM","val":3,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":2},{"type":"OP","val":"fract","vsize":1,"entropy":2}]}, 68 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"NUM","val":0.001,"vsize":null,"entropy":1},{"type":"NUM","val":0.01,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":2,"entropy":1},{"type":"OP","val":"/","vsize":1,"entropy":2},{"type":"OP","val":"atan","vsize":1,"entropy":2},{"type":"OP","val":"t","vsize":1,"entropy":3},{"type":"OP","val":"+","vsize":1,"entropy":3},{"type":"OP","val":"fbm","vsize":1,"entropy":3},{"type":"OP","val":"dup","vsize":1,"entropy":1},{"type":"OP","val":"distance","vsize":2,"entropy":1},{"type":"NUM","val":3,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":2},{"type":"OP","val":"fract","vsize":1,"entropy":2}]}, 69 | {"stack":[{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"abs","vsize":2,"entropy":1},{"type":"OP","val":"max","vsize":1,"entropy":3},{"type":"OP","val":"t","vsize":1,"entropy":3},{"type":"OP","val":"sin","vsize":1,"entropy":3},{"type":"NUM","val":10,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":6},{"type":"OP","val":"*","vsize":1,"entropy":6},{"type":"OP","val":"dup","vsize":1,"entropy":6},{"type":"OP","val":"cos","vsize":1,"entropy":6},{"type":"OP","val":"swap","vsize":1,"entropy":6},{"type":"OP","val":"sin","vsize":1,"entropy":6},{"type":"OP","val":"dup","vsize":2,"entropy":1},{"type":"OP","val":"x","vsize":1,"entropy":2},{"type":"OP","val":"y","vsize":1,"entropy":2},{"type":"OP","val":"*","vsize":2,"entropy":1},{"type":"OP","val":"-","vsize":1,"entropy":5},{"type":"OP","val":"rotate","vsize":1,"entropy":5},{"type":"OP","val":"rotate","vsize":1,"entropy":5},{"type":"OP","val":"y","vsize":1,"entropy":5},{"type":"OP","val":"x","vsize":1,"entropy":5},{"type":"OP","val":"*","vsize":2,"entropy":1},{"type":"OP","val":"+","vsize":1,"entropy":1},{"type":"OP","val":"abs","vsize":2,"entropy":1},{"type":"OP","val":"max","vsize":1,"entropy":1},{"type":"NUM","val":4,"vsize":null,"entropy":1},{"type":"OP","val":"*","vsize":1,"entropy":2},{"type":"OP","val":"fract","vsize":1,"entropy":2}]} 70 | ] 71 | 72 | let displayMapOptions = () => { 73 | let str = ''; 74 | Maps.forEach( (k, i) => { 75 | str += ``; 76 | }) 77 | $mapSelect.innerHTML = str; 78 | } 79 | 80 | let displayMapping = () => { 81 | let str = ''; 82 | let m = Maps[currentMapIdx].getMapping(); 83 | for(const k in m) { 84 | str += `

${k}

${m[k]}

`; 85 | } 86 | $wordTable.innerHTML = str; 87 | } 88 | 89 | let displayOps = (ops) => { 90 | let str = ''; 91 | ops.forEach( o => { 92 | str += `
${o.val}
`; 93 | }) 94 | $ops.innerHTML = str; 95 | } 96 | 97 | let compile = () => { 98 | let program = $editor.value; 99 | let nodes = Parse(program, Maps[currentMapIdx]); 100 | let glsl = Generate(nodes); 101 | canvas.updateShader(glsl); 102 | displayOps(nodes); 103 | console.log(glsl); 104 | return { nodes, glsl } 105 | } 106 | 107 | let loadNewMapping = (name, table, modified) => { 108 | let newMap = new Mapping(name, table); 109 | newMap.modified = modified; 110 | Maps.push(newMap); 111 | currentMapIdx = Maps.length - 1; 112 | displayMapOptions(); 113 | displayMapping(); 114 | } 115 | 116 | let loadProgram = (data) => { 117 | $editor.value = unescape(data.program); 118 | let m = Maps.findIndex( x => x.name==data.map.name); 119 | if(data.map.modified || m === -1) { 120 | console.log('loading mpa?'); 121 | loadNewMapping("*" + data.map.name, data.map.table, true); 122 | } else { 123 | $mapSelect.value = m; 124 | } 125 | $mapSelect.dispatchEvent(new Event('change')); 126 | } 127 | 128 | let getSaveData = () => { 129 | let p = $editor.value; 130 | let m = Maps[currentMapIdx]; 131 | let res = compile(); 132 | let data = { 133 | program: p, 134 | output: res.glsl, 135 | map: { 136 | name: m.name[0] === "*" ? m.name.substr(1) : m.name, 137 | table: m.getMapping(), 138 | modified: m.modified 139 | }, 140 | parent: PARENT 141 | }; 142 | return data; 143 | } 144 | 145 | let saveFile = () => { 146 | let data = getSaveData(); 147 | data.title= $saveTitle.value || 'Untitled'; 148 | data.author= $saveAuthor.value || 'Anonymous'; 149 | let blob = new Blob([JSON.stringify(data)], {type: 'application/json'}); 150 | let url = URL.createObjectURL(blob); 151 | let a = document.createElement("a"); 152 | a.href = url; 153 | a.download = `${data.title}-${data.author}-${Date.now()}.json`; 154 | document.body.appendChild(a); 155 | a.click(); 156 | setTimeout(function() { 157 | document.body.removeChild(a); 158 | window.URL.revokeObjectURL(url); 159 | }, 1000); 160 | } 161 | 162 | let publish = () => { 163 | let data = getSaveData(); 164 | data.title= $publishTitle.value || 'Untitled'; 165 | data.author= $publishAuthor.value || 'Anonymous'; 166 | data.twitter= $publishTwitter.value; 167 | 168 | canvas.captureImage() 169 | .then( isrc => { 170 | data.img = isrc; 171 | // console.log(data.img); 172 | return fetch(`${SERVER_URL}publish`, { 173 | method: 'POST', 174 | mode: 'cors', 175 | headers: { 176 | "Content-Type": "application/json; charset=utf-8" 177 | }, 178 | body: JSON.stringify(data), 179 | }) 180 | }) 181 | .then(response => response.json()) 182 | .then(data => { 183 | $pubUrl.innerText = data.url; 184 | $pubUrl.href = data.url; 185 | openOverlay('published'); 186 | }) 187 | .catch((error) => { 188 | alert(`Error: ${error}`) 189 | }); 190 | } 191 | 192 | let openOverlay = (name) => { 193 | $overlay.classList.add('visible'); 194 | if(document.querySelector(`.overlay__content.visible`)) { 195 | document.querySelector(`.overlay__content.visible`).classList.remove("visible"); 196 | } 197 | document.querySelector(`.overlay__content-${name}`).classList.add("visible"); 198 | } 199 | 200 | let closeOverlay = () => { 201 | $overlay.classList.remove('visible'); 202 | document.querySelector(`.overlay__content.visible`).classList.remove("visible"); 203 | } 204 | 205 | let populateMapForm = () => { 206 | let ops = Mapping.getAllOperators(); 207 | let str = ''; 208 | ops.forEach( o => { 209 | str += ` 210 |

${o}

211 | 212 | `; 213 | }) 214 | $mapForm.innerHTML = str; 215 | } 216 | 217 | let saveMap = () => { 218 | let vals = $mapForm.querySelectorAll('input'); 219 | let blanks = [...vals].filter( v => v.value.trim().length === 0); 220 | if(blanks.length > 0) { 221 | alert('Please fill out all the entire table.'); // ADD CASE TO PREVENT SPECIAL CHARS 222 | } else { 223 | let words = {}; 224 | vals.forEach( v => { 225 | let w = v.value.trim().toLowerCase(); 226 | if( words[w] === undefined) { words[w] = [ v.dataset.op ];} 227 | else { words[w].push(v.dataset.op); } 228 | }); 229 | 230 | let str = ``; 231 | for(const k in words) { 232 | if(words[k].length > 1) { 233 | str += `The word "${k}" has been assigned to ${words[k].join(', ')}.\n`; 234 | } 235 | } 236 | if(str.length > 0) { 237 | alert("FOUND DUPLICATES:\n" + str); 238 | } else { 239 | let wt = {}; 240 | vals.forEach( v => wt[v.dataset.op] = v.value.trim().toLowerCase() ); 241 | let n = $mapTitle.value.trim(); 242 | if(n.length === 0) { 243 | customMapCount++; 244 | n = `custom_${customMapCount}`; 245 | } 246 | loadNewMapping(n, wt, false); 247 | closeOverlay(); 248 | } 249 | } 250 | } 251 | 252 | let changeExample = (dir) => { 253 | $examples[currentEgIdx].classList.remove('active'); 254 | currentEgIdx = currentEgIdx+dir > $examples.length-1 ? 0 : currentEgIdx+dir; 255 | currentEgIdx = currentEgIdx < 0 ? $examples.length-1 : currentEgIdx; 256 | $examples[currentEgIdx].classList.add('active'); 257 | } 258 | 259 | let loadExamples = () => { 260 | let str = ``; 261 | stacks.forEach( (obj, i) => { 262 | str += ``; 267 | }) 268 | $examplesHolder.innerHTML = str; 269 | $examples = document.querySelectorAll(".sidebar__example"); 270 | } 271 | 272 | 273 | 274 | $shuffle.addEventListener('click', () => { 275 | Maps[currentMapIdx].shuffle(); 276 | displayMapping(); 277 | compile(); 278 | }); 279 | 280 | $restore.addEventListener('click', () => { 281 | Maps[currentMapIdx].restore(); 282 | displayMapping(); 283 | compile(); 284 | }); 285 | 286 | $mapSelect.addEventListener('change', () => { 287 | currentMapIdx = parseInt($mapSelect.value); 288 | displayMapping(); 289 | compile(); 290 | }); 291 | 292 | $editor.addEventListener('keydown', (e) => { 293 | if(e.code === "Enter") { 294 | compile(); 295 | } 296 | }); 297 | 298 | $save.addEventListener('click', (e) => { 299 | openOverlay('save'); 300 | }); 301 | 302 | $download.addEventListener('click', saveFile); 303 | 304 | $publish.addEventListener('click', () => { 305 | openOverlay('publish'); 306 | }); 307 | 308 | // $post.addEventListener('click', publish); 309 | $publishForm.addEventListener("submit", (e) => { 310 | e.preventDefault(); 311 | publish(); 312 | }) 313 | 314 | $load.addEventListener('click', (e) => { 315 | $file.click(); 316 | }); 317 | 318 | $file.addEventListener('change', (e) => { 319 | if(e.target.files.length > 0) { 320 | let reader = new FileReader(); 321 | reader.onload = (e) => { 322 | let content = e.target.result; 323 | try { 324 | loadProgram(JSON.parse(content)); 325 | } 326 | catch(e) { 327 | alert('This does not seem to be a valid JSON file'); 328 | } 329 | } 330 | reader.readAsText(event.target.files[0]); 331 | } 332 | }) 333 | 334 | $close.addEventListener('click', closeOverlay); 335 | 336 | $makemap.addEventListener('click', saveMap); 337 | 338 | $createmap.addEventListener('click', (e) => { 339 | openOverlay('makemap'); 340 | }); 341 | 342 | $about.addEventListener('click', (e) => { 343 | openOverlay('about'); 344 | }); 345 | 346 | $showExamples.addEventListener('click', () => { 347 | $container.classList.toggle('container-split'); 348 | }); 349 | 350 | $nextEg.addEventListener('click', () => { 351 | changeExample(1); 352 | }); 353 | 354 | $prevEg.addEventListener('click', () => { 355 | changeExample(-1); 356 | }); 357 | 358 | $overlayWrapper.addEventListener('click', (e) => { 359 | e.stopPropagation(); 360 | }); 361 | 362 | $overlay.addEventListener('click', closeOverlay); 363 | 364 | let init = () => { 365 | canvas.init(); 366 | displayMapOptions(); 367 | displayMapping(); 368 | populateMapForm(); 369 | loadExamples(); 370 | } 371 | 372 | let loadSketch = () => { 373 | let params = (new URL(document.location)).searchParams; 374 | let s = params.get('sketch'); 375 | if(s) { 376 | let url = `${SERVER_URL}sketch/${s}`; 377 | fetch(url) 378 | .then( r => r.json() ) 379 | .then( data => { 380 | init(); 381 | if(data.sketch) { 382 | PARENT = s; 383 | loadProgram(data.sketch); 384 | } 385 | }) 386 | .catch( e => { 387 | init(); 388 | }); 389 | } else { 390 | init(); 391 | } 392 | } 393 | 394 | loadSketch(); 395 | -------------------------------------------------------------------------------- /texts/britney.txt: -------------------------------------------------------------------------------- 1 | Oh, baby, baby 2 | Oh, baby, baby 3 | 4 | Oh, baby, baby 5 | How was I supposed to know 6 | That something wasn't right here? 7 | Oh, baby, baby 8 | I shouldn't have let you go 9 | And now you're out of sight, yeah 10 | 11 | Show me how you want it to be 12 | Tell me, baby 13 | 'Cause I need to know now, oh, because 14 | 15 | My loneliness 16 | Is killing me and I 17 | I must confess 18 | I still believe, still believe 19 | When I'm not with you I lose my mind 20 | Give me a sign 21 | Hit me, baby, one more time 22 | 23 | Oh, baby, baby 24 | The reason I breathe is you 25 | Boy, you got me blinded 26 | Oh, pretty baby 27 | There's nothing that I wouldn't do 28 | It's not the way I planned it 29 | 30 | Show me how you want it to be 31 | Tell me, baby 32 | 'Cause I need to know now, oh, because 33 | 34 | My loneliness 35 | Is killing me and I 36 | I must confess 37 | I still believe, still believe 38 | When I'm not with you I lose my mind 39 | Give me a sign 40 | Hit me, baby, one more time 41 | 42 | Oh, baby, baby 43 | Oh, baby, baby 44 | Ah, yeah, yeah 45 | 46 | Oh, baby, baby 47 | How was I supposed to know? 48 | Oh, pretty baby 49 | I shouldn't have let you go 50 | 51 | I must confess 52 | That my loneliness 53 | Is killing me now 54 | Don't you know I still believe 55 | That you will be here 56 | And give me a sign? 57 | Hit me, baby, one more time 58 | 59 | My loneliness 60 | Is killing me and I 61 | I must confess 62 | I still believe, still believe 63 | When I'm not with you I lose my mind 64 | Give me a sign 65 | Hit me, baby, one more time 66 | 67 | I must confess 68 | That my loneliness 69 | Is killing me now 70 | Don't you know I still believe 71 | That you will be here 72 | And give me a sign? 73 | Hit me, baby, one more time 74 | 75 | Baby, I'm so into you 76 | You got that somethin'. What can I do? 77 | Baby, you spin me around 78 | The earth is movin' but I can't feel the ground 79 | 80 | Every time you look at me 81 | My heart is jumpin', it's easy to see 82 | 83 | Lovin' you means so much more 84 | More than anything I ever felt before 85 | 86 | [Chorus:] 87 | You drive me crazy 88 | I just can't sleep 89 | I'm so excited, I'm in too deep 90 | Oh... crazy, 91 | But it feels alright 92 | Baby, thinkin' of you keeps me up all night 93 | 94 | Tell me, you're so into me 95 | That I'm the only one you will see 96 | Tell me, I'm not in the blue, 97 | That I'm not wastin' my feelings on you 98 | 99 | Lovin' you means so much more. 100 | More than anything I ever felt before 101 | 102 | [Chorus] 103 | 104 | Crazy, 105 | I just can't sleep 106 | I'm so excited, I'm in too deep 107 | Crazy, 108 | But it feels alright 109 | Every day and every night 110 | 111 | You drive me crazy (you drive me crazy, baby) 112 | I'm so excited, I'm in too deep 113 | Oh... crazy, 114 | (you make me feel alright) 115 | Baby, thinkin' of you keeps me up all night 116 | 117 | You drive me crazy (you drive me crazy, baby) 118 | Oh... crazy (you make me feel alright) 119 | But it feels alright 120 | Baby, thinkin' of you keeps me up all night 121 | Baby, thinkin' of you keeps me up all night 122 | 123 | You tell me you're in love with me 124 | Like you can't take your pretty eyes away from me 125 | It's not that I don't want to stay 126 | But every time you come too close I move away 127 | 128 | I wanna believe in everything that you say 129 | 'Cause it sounds so good 130 | But if you really want me move slow 131 | There's things about me you just have to know 132 | 133 | Sometimes I run 134 | Sometimes I hide 135 | Sometimes I'm scared of you 136 | But all I really want is to hold you tight 137 | Treat you right, be with you day and night 138 | Baby, all I need is time 139 | 140 | I don't wanna be so shy 141 | Every time that I'm alone I wonder why 142 | Hope that you will wait for me 143 | You'll see that you're the only one for me 144 | 145 | I wanna believe in everything that you say 146 | 'Cause it sounds so good 147 | But if you really want me move slow 148 | There's things about me you just have to know 149 | 150 | Sometimes I run (sometimes) 151 | Sometimes I hide 152 | Sometimes I'm scared of you 153 | But all I really want is to hold you tight 154 | Treat you right, be with you day and night 155 | All I really want is to hold you tight 156 | Treat you right, be with you day and night 157 | Baby all I need is time 158 | 159 | Just hang around and you'll see 160 | There's nowhere I'd rather be 161 | If you love me, trust in me 162 | The way that I trust in you 163 | 164 | Sometimes I run (sometimes) 165 | Sometimes I hide, 166 | Sometimes I'm scared of you (oh) 167 | But all I really want is to hold you tight (hold you tight) 168 | Treat you right, be with you day and night (day and night) 169 | 170 | Sometimes I run (sometimes) 171 | Sometimes I hide 172 | Sometimes I'm scared of you 173 | But all I really want is to hold you tight 174 | Treat you right, be with you day and night (day and night) 175 | 176 | All I really want is to hold you tight 177 | Be with you day and night 178 | 179 | Sometimes I run (sometimes) 180 | Sometimes I hide 181 | Sometimes I'm scared of you 182 | But all I really want is to hold you tight 183 | [Fading] 184 | 185 | Ooh-Ooh 186 | Ah, here we go now 187 | Oh 188 | [male rapper] Like a great boy, all my other women are insoles 189 | We're thinkin 'bout the great exphidition as popped we chose 190 | [Britney & rapper] So here we come, throwing here 191 | [rapper] Throwing here all on the scene 192 | Though we go 193 | [Britney & rapper] On and on 194 | [rapper] come, come follow me Britney 195 | [Britney] yeah 196 | Mm-hmm, soda pop, watch it fizz and pop 197 | The clock is tickin' and we can't stop (can't stop now) 198 | Mm-hmm soda pop, bop, shu-bop 199 | The clock is tickin and we can't stop 200 | We might start riding to the music tonight 201 | A clever way to get by, oh 202 | The pops keep flowin' like its fire and ice 203 | So give it a little blind, ooh 204 | Mm-hmm soda pop, watch it fizz and pop (mm-hmm) 205 | The clock is tickin and we can't stop (now) 206 | Mm-hmm soda bop, bop shu-bop shu-bop 207 | The clock is tickinand we can't stop 208 | Ooh-Ooh 209 | We have a plan, we have a definite plan 210 | To level the vibes (vibes) 211 | To level vibes agian (ooh-yeah) 212 | See 213 | Where ya ba-do for a superlative self, oh yeah 214 | A wicked time to the end, oh yaeh, so 215 | Mm-hmm soda pop, watch it fizz and pop (ooh) 216 | The clock is tickin and we can't stop (can't stop) 217 | Mm-hmm soda pop, bop, shu-bop shu-bop 218 | The clock is tickin and we can't stop 219 | So much pop we're losing, sittin watchin the clock 220 | So turn the tables baby, let's go over top (take it to the top now) 221 | No one else will do 222 | I'm waiting for you 223 | So me what'cha got, just take a pop shot 224 | And we will never stop shu-bop, shu-bop 225 | yeah, mm-hmm 226 | The clock is tickin and we can't stop 227 | Mm-hmm soda pop, bop, shu-bop shu-bop 228 | The clockis tickin and we can't stop (can't stop) 229 | Do it like we never have before (before, before, before) 230 | And lovin it til we drop (we drop, ah, we drop yeah) 231 | We'll flex tonight until they break down the door (oh yeah) 232 | The party won't ever stop 233 | so 234 | Mm-hmm soda pop, watch it fizz and pop (no, uh yeah) 235 | The clock is tickinand we can't stop (stop no) 236 | Mm-hmm soda pop, bop, shu-bop shu-bop 237 | Mm-hmm soda pop (no) watch it fizz and pop (oh) 238 | The clock is tickin and we can't stop (can't stop) 239 | [rapper] I bet you we can pop like we've never popped it before 240 | Why we keep commin back fdor more and more for sure (sure) 241 | It's cool Britney when wee get down on the floor yeah 242 | And we go 243 | [Britney & rapper] On and On until the break of dawn 244 | Mm-hmm soda pop, watch it fizz and pop 245 | The clock is tickin and we can't stop (ah, can't stop, no) 246 | Mm-hmm soda pop, bop, shu-bop shu-bop (ooh yeah) 247 | The clock is tickinand we can't stop 248 | [rapper] All we gotta do is just 249 | Mm-hmm soda pop, watch it fizz and pop (oh yeah) 250 | The clock is tickin and we can't stop 251 | [rapper] Oh, we're on the bend 252 | [Britney] Mmm, uh-oh 253 | 254 | I know I may be young, but I've got feelings too. 255 | And I need to do what I feel like doing. 256 | So let me go and just listen. 257 | 258 | All you people look at me like I'm a little girl. 259 | Well did you ever think it be okay for me to step into this world. 260 | 261 | Always saying little girl don't step into the club. 262 | Well I'm just tryin' to find out why cause dancing's what I love. 263 | 264 | Get it get it, get it get it (WHOOOA) 265 | Get it get it, get it get it (WHOOOOOA) (Do you like it) 266 | Get it get it, get it get it (OOOHHHH) (This feels good) 267 | 268 | I know I may come off quiet, I may come off shy. 269 | But I feel like talking, feel like dancing when I see this guy. 270 | 271 | What's practical is logical. What the hell, who cares? 272 | All I know is I'm so happy when you're dancing there. 273 | 274 | I'm a slave for you. I cannot hold it; I cannot control it. 275 | I'm a slave for you. I won't deny it; I'm not trying to hide it. 276 | 277 | Baby, don't you wanna, dance upon me, 278 | (I just wanna dance next to you) 279 | To another time and place. 280 | Baby, don't you wanna, dance upon me, 281 | (Are you ready) 282 | Leaving behind my name, my age. 283 | (Lets go) 284 | 285 | (Like that) 286 | (You like it) 287 | (Now watch me) 288 | 289 | Get it get it, get it get it (WHOOOA) 290 | Get it get it, get it get it (WHOOOOOA) 291 | Get it get it, get it get it (OOOHHHH) 292 | (Panting) 293 | 294 | I really wanna dance, tonight with you. 295 | (I just can't help myself) 296 | I really wanna do what you want me to. 297 | (I just feel I let myself go) 298 | 299 | I really wanna dance, tonight with you. 300 | (Wanna see you move) 301 | I really wanna do what you want me to. 302 | (Uh Uh Uh) 303 | 304 | Baby, don't you wanna, dance upon me, 305 | (I just wanna dance next to you) 306 | To another time and place. 307 | Baby, don't you wanna, dance upon me, 308 | (Are you ready) 309 | Leaving behind my name, my age. 310 | 311 | I'm a slave for you. (Take that) I cannot hold it; I cannot control it. 312 | I'm a slave (It just feels right) for you. (It just feels good) 313 | I won't deny it; I'm not trying to hide it. (Baby) 314 | 315 | Get it get it, get it get it (WHOOOA) 316 | Get it get it, get it get it (WHOOOOOA) 317 | Get it get it, get it get it (OOOHHHH) 318 | (Panting) 319 | 320 | Get it get it, get it get it (WHOOOA) 321 | Get it get it, get it get it (WHOOOOOA) 322 | Get it get it, get it get it (OOOHHHH) 323 | (Panting) 324 | 325 | I'm a slave for you. (Here we go now) 326 | I cannot hold it; I cannot control it. 327 | I'm a slave for you. (Here we go) I won't deny it, (Yeah) 328 | I'm not trying to hide it. 329 | 330 | (Like that) 331 | 332 | [Spoken:] 333 | I need time (time) 334 | Love (love) 335 | Joy (joy) 336 | I need space 337 | I need me 338 | (Action!) 339 | 340 | Say hello to the girl that I am! 341 | You're gonna have to see through my perspective 342 | I need to make mistakes just to learn who I am 343 | And I don't wanna be so damn protected 344 | There must be another way 345 | Cause I believe in taking chances 346 | But who am I to say 347 | What a girl is to do 348 | God, I need some answers 349 | 350 | What am I to do with my life 351 | (You will find it out don't worry) 352 | How Am I supposed to know what's right? 353 | (You just got to do it your way) 354 | I can't help the way I feel 355 | But my life has been so overprotected 356 | 357 | I tell 'em what I like 358 | What I want 359 | What I don't 360 | But every time I do I stand corrected 361 | Things that I've been told 362 | I can't believe what I hear about the world, I realize 363 | I'm Overprotected 364 | 365 | There must be another way 366 | Cause I believe in taking chances 367 | But who am I to say 368 | What a girl is to do 369 | God I need some answers 370 | 371 | What am I to do with my life 372 | (You will find it out don't worry) 373 | How Am I supposed to know what's right? 374 | (You just got to do it your way) 375 | I can't help the way I feel 376 | But my life has been so overprotected 377 | 378 | I need… time (love) 379 | I need… space 380 | (This is it, this is it) 381 | 382 | I don't need nobody telling me just what I wanna 383 | What I what what what I'm gonna 384 | Do about my destiny 385 | I Say No, No 386 | Nobody's telling me just what what what I wanna do, do 387 | I'm so fed up with people telling me to be 388 | Someone else but me 389 | 390 | (Action!) 391 | 392 | What am I to do with my life 393 | (You will find it out don't worry) 394 | How Am I supposed to know what's right? 395 | (You just got to do it your way) 396 | I can't help the way I feel 397 | But my life has been so overprotected 398 | 399 | I don't need nobody telling me just what I wanna 400 | What I what what what I'm gonna 401 | Do about my destiny 402 | I Say No, No 403 | Nobody's telling me just what I wanna do, do 404 | I'm so fed up with people telling me to be 405 | Someone else but me 406 | 407 | What am I to do with my life 408 | (You will find it out don't worry) 409 | How Am I supposed to know what's right? 410 | (You just got to do it your way) 411 | I can't help the way I feel 412 | But my life has been so overprotected. 413 | 414 | I used to think 415 | I had the answers to everything, 416 | But now I know 417 | Life doesn't always go my way, yeah... 418 | Feels like I'm caught in the middle 419 | That's when I realize... 420 | 421 | [Chorus:] 422 | I'm not a girl, 423 | Not yet a woman. 424 | All I need is time, 425 | A moment that is mine, 426 | While I'm in between. 427 | 428 | [Verse 2] 429 | I'm not a girl, 430 | There is no need to protect me. 431 | It's time that I 432 | Learn to face up to this on my own. 433 | I've seen so much more than you know now, 434 | So don't tell me to shut my eyes. 435 | 436 | [Chorus] 437 | 438 | I'm not a girl, 439 | But if you look at me closely, 440 | You will see it in my eyes. 441 | This girl will always find 442 | Her way. 443 | 444 | I'm not a girl 445 | (I'm not a girl don't tell me what to believe). 446 | Not Yet a woman 447 | (I'm just trying to find the woman in me, yeah). 448 | All I need is time (All I need), 449 | A moment that is mine (That is mine), 450 | While I'm in between. 451 | 452 | I'm not a girl 453 | Not yet a woman (not now) 454 | All I need is time (All I need), 455 | A moment that is mine, 456 | While I'm in between. 457 | 458 | I'm not a girl, 459 | Not yet a woman. 460 | 461 | Baby, can’t you see 462 | I’m calling 463 | A guy like you 464 | Should wear a warning 465 | It’s dangerous 466 | I’m fallin’ 467 | 468 | There’s no escape 469 | I can’t wait 470 | I need a hit 471 | Baby, give me it 472 | You’re dangerous 473 | I’m lovin’ it 474 | 475 | Too high 476 | Can’t come down 477 | Losing my head 478 | Spinning ‘round and ‘round 479 | Do you feel me now? 480 | 481 | With a taste of your lips I’m on a ride 482 | You're toxic I'm slipping under 483 | With a taste of a poison paradise 484 | I’m addicted to you 485 | Don’t you know that you’re toxic 486 | And I love what you do 487 | Don’t you know that you’re toxic 488 | 489 | It’s getting late 490 | To give you up 491 | I took a sip 492 | From my devil's cup 493 | Slowly 494 | It’s taking over me 495 | 496 | Too high 497 | Can’t come down 498 | It’s in the air 499 | And it’s all around 500 | Can you feel me now 501 | 502 | With a taste of your lips I’m on a ride 503 | You're toxic I'm slipping under 504 | With a taste of a poison paradise 505 | I’m addicted to you 506 | Don’t you know that you’re toxic 507 | And I love what you do 508 | Don’t you know that you’re toxic 509 | 510 | Don't you know that you're toxic 511 | 512 | [x2] 513 | With a taste of your lips I'm on a ride 514 | You're toxic I'm slipping under 515 | With a taste of a poison paradise 516 | I'm addicted to you 517 | Don't you know that you're toxic 518 | 519 | Intoxicate me now 520 | With your lovin' now 521 | I think I'm ready now 522 | I think I'm ready now 523 | Intoxicate me now 524 | With your lovin' now 525 | I think I'm ready now 526 | 527 | All my people in the crowd 528 | Grab a partner take it down! 529 | 530 | [B:] It's me against the music 531 | [B:] It's just me 532 | [M:] And me 533 | [M:] C'mon 534 | [M:] Hey Britney? 535 | [B:] Are you ready? 536 | [M:] Uh huh, are you? 537 | 538 | [B&M:] No one cares 539 | [B:] It's whippin' my hair, it's pullin' my waist 540 | [B&M:] To hell with stares 541 | [B:] The sweat is drippin' all over my face 542 | [B&M:] and no one's there 543 | [B:] I'm the only one dancin' up in this place 544 | It's just me 545 | [B&M:] Tonight I'm here 546 | [B:] Feel the beat of the drum, gotta keep it that bass 547 | 548 | [B:] 549 | I'm up against the speaker, tryin' to take on the music 550 | It's like a competition, me against the beat 551 | I wanna get in the zone, I wanna get in the zone 552 | If you really wanna battle, saddle up and get your rhythm 553 | Tryin' to hit it chic-a-tah 554 | In a minute I'm a take a you on, I'm a take a you on 555 | 556 | [B&M:] All my people on the floor 557 | [B:] Let me see you dance 558 | [M:] Let me see ya 559 | [B&M:] All my people wantin' more 560 | [B:] Let me see you dance 561 | [M:] I wanna see ya 562 | [B&M:] All my people round and round 563 | [B:] Let me see you dance 564 | [M:] Let me see ya 565 | [B&M:] All my people in the crowd 566 | [B:] Let me see you dance 567 | [M:] I wanna see ya 568 | 569 | [B&M:] 570 | So how would you like a friendly competition 571 | Let's take on the song 572 | It's you and me baby, we're the music 573 | Time to party all night long 574 | 575 | Let's go 576 | 577 | [B&M:] We're almost there 578 | [B:] I'm feelin' it bad and I can't explain 579 | [B&M:] My soul is bare 580 | [B:] My hips are movin' at a rapid pace 581 | I'm going crazy 582 | [B&M:] Can you feel it burn 583 | [B:] From the tip of my toes, runnin' through my veins 584 | [B&M:] And now it's your turn 585 | [B:] Let me see what you got, don't hesitate 586 | 587 | [B:] 588 | I'm up against the speaker, tryin' to take on the music 589 | It's like a competition, me against the beat 590 | I wanna get in the zone, I wanna get in the zone 591 | If you really wanna battle, saddle up and get your rhythm 592 | Tryin' to hit it chic-a-tah 593 | In a minute I'm a take a you on, I'm a take a you on 594 | 595 | [B&M:] All my people on the floor 596 | [B:] Let me see you dance 597 | [M:] Let me see ya 598 | [B&M:] All my people wantin' more 599 | [B:] Let me see you dance 600 | [M:] I wanna see ya 601 | [B&M:] All my people round and round 602 | [B:] Let me see you dance 603 | [M:] Let me see ya 604 | [B&M:] All my people in the crowd 605 | [B:] Let me see you dance 606 | [M:] I wanna see ya 607 | 608 | [B&M:] Get on the floor, baby lose control 609 | [B&M:] Just work your body and let it go 610 | [B&M:] If you wanna party, just grab somebody 611 | [M:] Hey Britney 612 | [B&M:] We can dance all night long 613 | 614 | [M:] 615 | Hey Britney, you say you wanna lose control 616 | Come over here I got somethin' to show ya 617 | Sexy lady, I'd rather see you bare your soul 618 | If you think you're so hot 619 | Better show me what you got 620 | All my people in the crowd, let me see you dance 621 | C'mon Britney lose control, watch you take it down 622 | 623 | [B&M:] Get on the floor, baby lose control 624 | [B&M:] Just work your body and let it go 625 | [B&M:] If you wanna party, just grab somebody 626 | [M:] Hey Britney 627 | [B&M:] We can dance all night long 628 | 629 | [B&M:] All my people on the floor 630 | [B:] Let me see you dance 631 | [M:] Let me see ya 632 | [B&M:] All my people wantin' more 633 | [B:] Let me see you dance 634 | [M:] I wanna see ya 635 | [B&M:] All my people round and round 636 | [B:] Let me see you dance 637 | [M:] Let me see ya 638 | [B&M:] All my people in the crowd 639 | [B:] Let me see you dance 640 | [M:] I wanna see ya 641 | 642 | [M:] 643 | All my people in the crowd, let me see you dance 644 | C'mon Britney take it down, make the music last 645 | All my people round and round, party all night long 646 | C'mon Britney lose control, watch you take it down 647 | -------------------------------------------------------------------------------- /texts/trump.txt: -------------------------------------------------------------------------------- 1 | 2 | We thought we’d give you an update on the hurricane. We got lucky in Florida. Very, very lucky indeed. We had actually, our original chart, was that it was going to be hitting Florida directly. Maybe I could just see that, Kevin. 3 | 4 | It was going to be hitting directly and that would have affected a lot of other states, but that was the original chart, and you see it was going to hit not only Florida, but Georgia, could have… 5 | 6 | Was going toward the Gulf. That was what was originally projected, and it took a right turn. And ultimately, hopefully we’re going to be lucky. 7 | 8 | It depends on what happens with South Carolina, North Carolina. 9 | 10 | Good morning. We have a busy day planned. We’re leaving now for Ellington Air Force Base in Texas. We’re going to spend some time on the floods. We’re going to be briefed on the floods. We’re going to make a big investment so we can try and help Texas with this terrible flooding that they’ve been having. So we’ll be talking to a lot of people and meeting a lot of people. That’s got to be at Ellington Air Force Base. Then we’re going to Houston. Some of you are coming with me, I guess. We’ll be going to Houston, and we’ll be at a very nice big stadium, packed full of people, with Prime Minister Modi of India. 11 | 12 | He asked if I’d go with him, and I’ve accepted. And we’re going to have a good time with Prime Minister Modi. We have a… I hear it’s a tremendous crowd. So that’ll be in Houston. And then after that, I’m going to Ohio. Pratt Industries is opening a $1 billion plant. And I told Mr. Pratt, who is a great… Anthony. I told him if he does something really spectacular, I’ll go and cut the ribbon. And he did. He invested $1 billion in Ohio. 13 | 14 | So that’s Pratt Industries. They’re great people. It’s a great company, headed by a very great businessman from Australia. So they’re bringing $1 billion into Ohio. And I said I’d go and cut the ribbon, and here it is. We’re ready to cut a ribbon. It’s a great plan. So we look forward to that. Then we’re coming home, and then we have a lot of work at the United Nations during the next week. 15 | Nothing’s ever off the table completely, but I have no intention of meeting with Iran. That doesn’t mean it doesn’t happen. I’m a very flexible person, but we have no intention. It’s not set up. We’re meeting with a lot of leaders. We have about 15 meetings set up, but Iran is not one of them. 16 | 17 | We had a great conversation. The conversation I had was largely congratulatory, was largely corruption, all of the corruption taking place, was largely to the fact that we don’t want our people like Vice President Biden and his son creating to the corruption already in Ukraine, and Ukraine’s got a lot of problems. The new president is saying that he’s going to be able to rid the country of corruption, and I said that would be a great thing. We had a great conversation. We had a conversation on many things. In fact, I believe Ukraine put out a statement yesterday saying that we covered many different topics. It was a warm and friendly conversation. 18 | 19 | I’ve backed Ukraine from the beginning, but I’m very upset that other countries aren’t doing the same. Germany should be spending much more. France, all of the European Union, should be spending money. Why are we spending money and they’re not? Or at least they spending very little by comparison, so I’m not happy about that. 20 | Oh, I would have no problem with it. Rudy’s a very straight shooter, and Rudy wants to see the same thing as a lot of other people with respect to Ukraine. Ukraine has had a tremendous corruption problem. Somehow they were involved in a lot of different things that took place in our country, and hopefully it can be straightened out. And I will say, the new president… We had a very good talk. The new president got elected based on the fact that he would end corruption. That was probably his number one thing. 21 | 22 | Well, this whistleblower, or whoever it was, because it sounds like it’s not a whistleblower, you can’t have that happen to a president of the United States. The conversation by the way, was absolutely perfect. It was a beautiful, warm, nice conversation, and it was put out last night also by Ukraine. But you can’t have people doing this, and you can’t have people doing false alarms like this. And you know, when the president speaks to the head of another country, he has to be able to speak to those people, and those people don’t want to know that they’re being recorded or that you have a stenographer working. 23 | 24 | You don’t want to have to hear that. You can’t do that to a president, and you can’t do that to other countries. But with all of that being said, we had a very great conversation, very straight, very honest conversation. I hope they can put it out. 25 | 26 | Well, I don’t say anything, but whenever I speak to a foreign leader, I assume there are many people on the line. I don’t assume I’m talking to the leader. Anytime I’m on the phone with a foreign leader, many many people are on the line. Sometimes they’re taping calls, sometimes they’re doing a stenographer, but I also assume many people are on the line from the other side. So if I’m speaking to a country, they also have people on the line. So who would say a thing like what you’re saying? Now I will say this. I said absolutely nothing wrong. It was perfect. Listen to me. Listen. Listen to me. 27 | 28 | Listen to me. 29 | 30 | Listen to me. I assume many people are on the line. I know that before I make the call, and that’s what you have… Intelligence agencies, everybody listening. That call was a great call. It was a perfect call. A perfect call. What wasn’t perfect is the horrible thing that Joe Biden said. And now we made a lie when he said he never spoke to his son. I mean, give me a break. He’s already said he spoke to his son, and now he said yesterday very firmly, “Who wouldn’t speak to your son? Of course you spoke to your son.” 31 | 32 | So he made the mistake of saying he never spoke to his son. He spoke to his son, but more importantly, what he said about the billions of dollars that he wouldn’t give them unless they fired the prosecutor, and then he bragged about how they fired the prosecutor, and then they got the money. 33 | 34 | [inaudible 00:06:27] I’m going on the floods today. The floods are very important to me, and climate change. Everything is very important. But today, I’m going to Texas on the flood. Then I’m going to Houston on the big rally. It’s a rally for Prime Minister Modi, and he asked me to do it, of India. And I look forward to doing that. 35 | Well, not only Ukraine. Take a look at China. They took a tremendous amount of money out of China. Now, if they ever took over a China negotiation, he would sell us out. Look at all the money he made in China. The son, he knew nothing. The son is a stiff. He knew nothing, and he’s making hundreds of thousands and millions of dollars, and he did the same thing in Ukraine. He knows nothing. This is a very dishonest thing that Joe Biden did, and then he said he never spoke to his son. Does anybody believe that one? 36 | 37 | But then he also said long before that he did speak to his son. So he lied again. But what he said is that he wouldn’t give, I think it was billions of dollars to Ukraine, unless they fired the prosecutor who was looking at his son and his son’s company, the company that his son works with. And that’s a very dishonest thing. And I’m not looking to hurt Biden. I’m not even looking to hold him to it, to be honest, but he said a very bad thing. He said a very foolish thing. Now me, on the other hand, my conversation with the president, the new president of Ukraine, was perfect. 38 | 39 | They put out a statement last night. They said the same thing. It was a warm, friendly conversation. There was no quid pro quo. There was nothing. It was a perfect conversation. 40 | 41 | Go ahead. 42 | Because I want Germany, and I want France, and I want the European Union to put up money, and I didn’t delay anything. We paid the military aid to the best of my knowledge. 43 | 44 | Listen to me. I gave so much more to Ukraine than Obama did. Go back and check your records. 45 | We’re looking at it right now. We’re studying it very hard. It’s an issue that frankly, Congress is wasting all their time on nonsense. We’re studying it very hard. If Congress would ever get back to work, we could work something, but Congress is doing all of this nonsense, this garbage that they’re doing, and I’ll tell you what. They don’t have any time. The Democrats in Congress are doing nothing. I’ll tell you what. They’re going to lose the election. You know why? Because they’re not doing anything very hard with it. 46 | Well, we’re working very hard with some Democrats. The problem I have is that Jerry Nablar, and all these people, they keep wasting time in Congress over nothing. They’re studying nothing. The Mueller Report was perfect. Corey Lewandowski was magnificent. Everybody is perfect. They’re wasting time. They couldn’t accept the Mueller Report. They couldn’t accept that defeat. They can’t now accept the fact that we have the best economy we’ve ever had, and we may be hitting another all time highs in the stock market. 47 | 48 | We’re looking at a lot of different things. The problem we find is the Democrats have very little time to talk, because they’re wasting their time. You take a look at what they’re doing. It’s a total waste of time, and they know it. They know it. 49 | 50 | Say it? 51 | 52 | Well, we’re working with Joe Manchin, the Senator, and we’re working with Pat Toomey, and we have a lot of people working on this, and we’ll be seeing it I say over a period of time. The problem that I have is the Democrats in the House especially, they’re totally unavailable to talk because they’re at hearings all day over something that’s already been won by us. They made up a story. It was a false story. It was a hoax. 53 | 54 | And frankly, we have to get to the bottom of how it started, but they are wasting all of their time on a hoax. 55 | Well, we’re working very hard with some Democrats. The problem I have is that Jerry Nablar, and all these people, they keep wasting time in Congress over nothing. They’re studying nothing. The Mueller Report was perfect. Corey Lewandowski was magnificent. Everybody is perfect. They’re wasting time. They couldn’t accept the Mueller Report. They couldn’t accept that defeat. They can’t now accept the fact that we have the best economy we’ve ever had, and we may be hitting another all time highs in the stock market. 56 | 57 | We’re looking at a lot of different things. The problem we find is the Democrats have very little time to talk, because they’re wasting their time. You take a look at what they’re doing. It’s a total waste of time, and they know it. They know it. 58 | 59 | Say it? 60 | 61 | Well, we’re working with Joe Manchin, the Senator, and we’re working with Pat Toomey, and we have a lot of people working on this, and we’ll be seeing it I say over a period of time. The problem that I have is the Democrats in the House especially, they’re totally unavailable to talk because they’re at hearings all day over something that’s already been won by us. They made up a story. It was a false story. It was a hoax. 62 | 63 | And frankly, we have to get to the bottom of how it started, but they are wasting all of their time on a hoax. 64 | Well, he’s got a job, and I could do things if I wanted, but I don’t want to do that. We’re so strong despite Jay Powell, but Jay Powell is not helping us. Other countries have lower interest rates. We’re the primest of them all. But he has the rate… Look, it’s very simple. He lifted the rates far too quickly, and he lowered them far too slowly, and it’s a shame. And it’s a shame. 65 | Not too many. Not too many boneheads. We have a great… I’ll tell you what. We really now have a greatest administration, but what we have is a great cabinet. Our cabinet has done a great job. 66 | No. He is a great gentleman, Joe. He’s doing a fantastic job, and I know one thing. He’s only going to do what’s right, but he is doing a fantastic job, and he was only going to do what’s right. But just so you understand, the conversation I had with the president of Ukraine, was absolutely perfect, and people better find out who these people are that are trying to subvert our country, because here we go again. These are bad people. 67 | But the conversation I had with the president of Ukraine was absolutely a 10. It was perfect. Now, what you have to do is look at the corruption on the Democrats’ side. Take a look at how the whole witch hunt started. Now they want to try and start another witch hunt, but unfortunately this one is reverting now to Joe Biden, because he’s done some very bad things. And I’m not even looking to hurt him, to be honest. He needs all the help he can get. I’m not looking to hurt him. I’m not looking to hurt his family. But the corruption and what he said is a terrible thing. 68 | 69 | 70 | Thank you very much everybody, and good afternoon. Today’s Good Friday and this Sunday, millions of Christians celebrate Easter and the resurrection of Jesus Christ. At this holy time, we pray that God will heal the sick and comfort the heartbroken and bless our heroes. As American families look forward to Easter, we’re reminded that our story ends not in despair, but in triumph and renewal. 71 | 72 | Very appropriate, isn’t it? I’d like to provide Americans an update on our ongoing efforts in the war against the invisible enemy. Before I do that, I’ll have a couple of notes. The United States in discussions last night with Mexico, Saudi Arabia, Russia, and in dealing with OPEC nations, we are trying to get Mexico, as the expression goes, over the barrel, and Mexico is committing to do a hundred thousand fewer barrels. President and I spoke last night, we have a great relationship, great friendship. They’re helping us very much at the border. 73 | 74 | They have 27,000 soldiers, Mexican soldiers on our border right now, stopping people from coming into our country as our wall goes up. We’re up to about 168 miles of wall. And in speaking with the president, they have a limit. The OPEC nations have agreed to a different limit reduction of about 23%. So what I thought I would do, and I don’t know that it’s going to be accepted, we’ll find out, the United States will help Mexico along and they’ll reimburse us sometime at a later date when they’re prepared to do so. 75 | 76 | And we had a great conversation, but we’ll find out how that all works out. As you know, they’re trying to get rid of the glut of oil. There’s a tremendous glut of oil and we don’t want anything to hurt our incredible industry, actually the largest producer in the world now. So we don’t want anything to hurt those jobs, those great jobs in Texas and North Dakota and Oklahoma and everywhere. 77 | 78 | We have a tremendous energy, New Mexico, tremendous energy business, and we want to keep those jobs. So we’re working on it. I think eventually it’s going to work out, may work out quicker than what most people thought possible and maybe it won’t, but it’ll work out eventually. Our experts are monitoring the data from every part of our country having to do with the topic that we’re here to discuss. 79 | 80 | In the midst of grief and pain, we’re seeing clear signs that our aggressive strategy is saving countless lives. A tremendous progress is being made. Although when you look at some of the numbers, I just spoke with Governor Cuomo, we had a good talk. When you look at those numbers, the numbers of death, people that have died, it’s so horrible. Now, on the other side, you have the numbers of beds being used. We’re just saying are substantially reduced. 81 | 82 | That’s usually the sign that it’s heading in the downward curve. So New York, we know where that is, but in the midst of all this grief and this pain, we’re seeing these signs and we’re seeing them very strongly, and a lot of that has to do with the aggressive strategy in saving so many lives. We’re saving so many lives compared to what it could have been. So nobody knows what the number is, but we had a number of 100,000 lives, as many as that is, it’s impossible to even think of it. And that was the low end with a tremendous amount of work and a tremendous amount of… you can call it many different things. Our people had to be extremely strong and brave to be able to put up with what they’ve put up with. But the minimum, if you did this social distancing and every other aspect, and I think I can say 90% maybe even more than that were able to do it. 83 | 84 | The minimum number was 100,000 lives and I think we’ll be substantially under that number. Hard to believe that if you had 60,000, you can never be happy, but that’s a lot fewer than we were originally told and thinking. So they said between 100,000 and 220,000 lives on the minimum side and then up to 2.2 million lives if we didn’t do anything. 85 | 86 | But it showed just tremendous resolve by the people of this country. So we’ll see what it ends up being, but it looks like we’re headed to a number of substantially below the 100,000 that would be the low mark and I hope that bears out. The situation in Detroit and New Orleans appears to be stabilizing. Detroit is really started to go up and now it is stabilizing and New Orleans is a great place. I have so many friends there. They can’t believe what’s happening, but it’s really stabilized. 87 | 88 | I spoke with the governor of Louisiana and as you know, we’re building them additional beds right now, the Army Corps of Engineers and FEMA. And that is going to be done and I hope they’re not going to be very well used because I think they’ve really… I don’t think they’re going to need them or certainly not very many of them. We built them a big hospital of a thousand beds and now we’re in the midst of doing another thousand. I don’t think they’re going to be using very many of them and that’s a good thing. 89 | 90 | There was a time, two weeks ago when we said, that’s not going to be nearly enough. We’re going to have to build more, but we wanted to wait to see, and I’m glad we waited. It just looks like they’re doing really well. Louisiana and state of Michigan is doing really much better than we thought. In Washington State, we’ve made enough progress that the governor’s now able to return an army field hospital, so we’re going to take that hospital. We don’t think we need any more hospitals. We built thousands of beds all over the country and we think we’re probably not going to need that hospital anywhere. 91 | 92 | If we do, we’re ready to move it to a different location. In New York, we’re seeing hospital admissions declining very substantially. As I said in nationwide, the number of new cases per day is flattening, substantially suggesting that we’re near the peak and our comprehensive strategy is working. Over time, our guidelines to slow the spread are decreasing the rate of new cases very substantially and will result in fewer hospital admissions and we’re seeing that. It’s incredible. 93 | 94 | I think with no exceptions, it’s looking like it’s lower. And again that’s because of the people doing what they had to do. Great people and working with elected representatives and the doctors, the nurses and everybody. I mean just everybody has been so amazing. 95 | 96 | I was told this morning again, please mention all of those people working in the grocery stores and it’s true, the checkouts and the clerks and the people that are really… and a number of those people have become infected. So we want to thank them and a shout out to them. With the tireless devotion of American doctors and nurses and all of the medical people, we’ve kept our fatality rate very, very low compared to other countries. 97 | 98 | My administration’s closely monitoring the data on the viruses impact on our cherished African American communities because they’ve been hit hard and the surgeon general will be sharing more of that information right after we’re finished here. He’ll be coming up and saying exactly what’s happening because it’s really, it’s very troublesome I will tell you that. I’d also like to provide clarity on the important point for many Americans on elective surgeries. Well, we’ve asked hospitals to cancel surgeries and procedures that do not take place at this time, just not to do them now. 99 | 100 | The choice to delay any treatment still remains between the patient and their doctor. We’re not advising Americans to postpone medical treatment that their doctor believes should occur now, so it’s different kinds of surgery obviously, but we’re really getting to the point where you can start to think about doing that surgery if necessary, pretty soon, I think pretty soon. 101 | 102 | Yesterday I directed Secretary of Agriculture, Sonny Perdue to expedite aid to American farmers and Secretary Perdue will be using all of the tools at his disposal to develop a program and very quickly of at least $16 billion to provide relief for farmers, ranchers, and producers impacted by the coronavirus. In this time of crisis, we must keep our supply chains moving from the beginning, right from beginning to end and we’re committed to supporting the amazing men and women who produce supply. I did last night a statement on social media and I said, “I have directed Secretary Sonny Perdue to expedite, help to our farmers, especially to the smaller farmers who are very, very badly hurting right now. 103 | 104 | I expect Secretary Perdue to use all of the funds and authorities at his disposal to make sure that our food supply is stable and safe and our great farmers are prosperous and continue to be prosperous. We’re working very hard to make sure our food supply chain is sound and plentiful, but we all know that that begins with our farmers, cattlemen, ranchers and producers.” 105 | 106 | So we’re going to be working with these small farmers, the big farmers, the cattlemen, the ranchers, all of the producers. We’re going to take care of them. We’re working with them right now. We have a lot of money that was put there through our use of tariffs and other means and we’re going to help out our farmers. And I don’t think… I’ll tell you, I’ve been helping our farmers for a couple of years because they were targeted as you know, by China and others and I think they’re very grateful for what we’ve done. On the medical front, the FDA has issued 47 emergency use authorizations for advancements and testing, new ventilator designs, innovations and personal protective equipment and experimental medicines. And Dr. Hahn’s going to be talking about that. We’ve cut through the red tape to give doctors and patients unprecedented freedom to make their own healthcare decisions, granting access to potential therapies and drugs. Since Monday, we’ve deployed two major shipments of Hydroxychloroquine from our national stockpile and it’s going to various cities. And we are also disposing and getting as quickly as we can, portions of it to the Department of Veterans Affairs and the Department of Defense. And speaking of the Department of Defense, they’re going to be sending us 10,000,095 masks that they had and we’re in great shape in every way. We’re in great shape with ventilators. We’re in great shape with protective clothing. We have additional plane loads coming in, but we’re not getting any calls from governors at this moment. I can speak, I think for Vice President Pence will be talking in a little while. 107 | 108 | We’re getting very few calls from governors or anybody else needing anything. They’re in great shape for this surge that’s coming in, certain areas in particular and that’s a good job. You’ve done a great job on that, Mike, really a great job. I appreciate it. The whole country appreciates it. 109 | 110 | More than 2 million coronavirus tests have now been completed and we’re conducting approximately 100,000 more every day. We’re also working to bring blood-based Serology tests to the market as quickly as possible so that Americans can determine whether or not they have already had the virus and potentially have immunity. They have immunity if they’ve had the virus. A lot of them don’t even know if they’ve added. Sometimes it’s brutal. You see the Prime Minister seems to be doing well now I hope, he had a rough go of it and still is, but he’s doing better. 111 | 112 | And then some people don’t even know they had it. It could be sniffles, it could be they don’t feel perfect, but they’ve had it and they’re the lucky ones. The NIH, CDC and FDA are currently validating these antibody tests to ensure that they’re accurate and they’re doing that at breakneck speed. I think we can say that doctor, and we’re going to get them approved very quickly, Dr. Hahns. 113 | 114 | When validated, we’re confident that the production will scale up to tens of millions of tests very quickly. We are leading the world now in testing by far and we’re going to keep it that way. Other countries are coming to us and they’re wanting to know about our tests and can they buy the tests and can they do whatever they have to do to get the test. And we’re going to make that very soon. We’ll be in a position to make that possible because it’s important for them to have it. 115 | 116 | And we’re going to have an announcement on the World Health Organization sometime next week. As you know, we given them approximately $500 million a year and we’re going to be talking about that subject next week. We’ll have a lot to say about it. We’ll hold it. Every American should be proud of what our country is achieved in just a short period of time. The US Military has deployed thousands of personnel to build 23 temporary hospitals with more than 16,000 beds. And we have the potential to build many more if we needed them. We’re all ready to go, but I don’t think we’re going to need them, which is great. Great news. And we built those hospitals in 12 states and the District of Columbia using the Defense Production Act and we used it like a hammer. A lot of the media said, “Oh, we weren’t using it.” 117 | 118 | We used it like a hammer to a point where all we had to do is say the words and everybody gave us max and they’ve done a good job. They really have done a good job with few exceptions. And we’ve harnessed the full power of American industry to produce ventilators and other essential supplies. Right now we’re making thousands of ventilators, many of which we won’t need, but we’ll use them in our stockpile and we’ll build that up. We’ll also help build up the stockpiles, which they should have had in the states. 119 | 120 | And so we’re working with governors on that and we’ll also help other countries or countries that are calling us for help. They need ventilators and there are no position to build ventilators. We are, we have Ford and General Motors and many, many companies are building ventilators. So we’re going to be helping at a not too distant point, we’re going to be helping quite a few of the countries. 121 | 122 | Now we’ve launched Project Airbridge to deliver nearly 300 million pieces of personal protective equipment from and around the globe. We’re also shipping out 60 sterilization systems to 10 different cities that can each sterilize up to 80,000 masks each day and I’m even hearing it can go up to 120,000 masks a day, certain equipment with certain additions. It’s a company in Ohio that makes it, it’s a great company. Great, I hear it’s a great product. Works very well. I asked that question. I said, “How come we have to buy so many masks? Why can’t we sterilize the masks that are being used?” And the answer was, you can. In this case, they say up to 20 times, so we can take a mask, certain types of masks, the N95s in particular, we can sterilize them, make them very clean up to 20 times. That’s a great thing. 123 | 124 | In addition, we passed the largest Emergency Economic Relief Package in American history to save the US economy and protect the American worker. As you know, this past week, which was four active days on the stock market, Good Friday today is not included, the markets are closed. In four days, we had the biggest market increase, stock market increase that we’ve had in 50 years. That tells you that there’s a pent up demand, that tells you they want to get back. There’s something good going to happen. I really believe that, there’s something very good going to happen. We have to get back. 125 | 126 | So think of it in this horrible period, this horrible, dark period where this monster came in and worked it’s horrible, horrible spell over the world. 184 countries as of this morning, 184 countries. We’ve done well and I guess the market thinks we’ve done well because we had the biggest stock market increase without one day. 127 | 128 | We’re talking four days instead of five that we’ve had in 50 years, 50 years. Think of that, more than 50 years actually. In short, the American people have launched the greatest mobilization of our society since World War II, deploying every scientific, governmental, medical, and military resource to defeat the virus. So I want to just start then with, we’re going to answer questions later. We’ll have time, if we have a lot of time today. A lot of people are off as they should be, Good Friday, but so I’ll stick around. We’ll answer questions later. I want to start with Deborah Birx, please. Dr. Birx and you can go over some of the numbers we just looked at and that’d be great. Thank you very much, Deborah. 129 | --------------------------------------------------------------------------------