James Halliday substack

View suspense.js
1 2 3 4 5 6 7 8 9 10
var waves = [], last = 0, lastw = 0;
var rates = [ 2, 4, 8, 2, 256 ];
 
return function (t) {
var rate = rates[Math.floor(t / 8) % rates.length];
if (t - lastw > 8) {
waves = waves.slice(-2);
lastw = t;
}
if (t - last > 1/rate) {
View drome.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 1, 1, 2, 2, 3/2, 3/2, 3/2, 3/2, 4, 1, 5, 5, 5, 5, 2, 2 ];
var rhythm = [ 2, 4, 2, 4, 30, 2, 20, 10, 2, 4 ];
var xrhythm = [ 8, 16, 1 ];
var phase = [ 0, 1, 0, 4, 0, 3, 1 ];
var d = snare(), e = snare();
 
return function (t) {
var m = melody[Math.floor(t * 2) % melody.length];
var r = rhythm[Math.floor(t * 2) % rhythm.length];
var q = xrhythm[Math.floor(t * 2) % xrhythm.length];
View grime.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 0, -2, 7, 7, 3, 1, 4, -1 ];
var snares = [ 4, 2, 1, 16, 4, 30, 25, 8 ];
var speeds = [ 2, 2, 2, 2, 1/8, 1/16, 4, 4, 1, 1/4, 2, 2 ];
var d = snare();
 
return function (t) {
var speed = speeds[Math.floor(t / 4) % speeds.length];
var m = Math.pow(2,melody[Math.floor(t*speed)%melody.length]/12);
var sn = snares[Math.floor(t*speed)%snares.length];
View hotdub.js
1 2 3 4 5 6 7 8 9 10
var melody = [ -2, -2, -1, -1, 0, 0, 3, 0, 3, 0 ];
var base = [ 12, 11 ];
 
var times = [ 16, 16, 16, 16 ];
var duration = times.reduce(function (sum, t) { return sum + t });
var offsets = times.reduce(function (acc, t) {
return acc.concat((acc[acc.length-1] || 0) + t);
}, []);
 
return function (t) {
View index.js
1 2 3 4 5 6 7 8 9
//Load shell
var shell = require("gl-now")({ clearColor: [0,0,0,0] });
var camera = require("game-shell-orbit-camera")(shell);
var xtend = require('xtend');
 
//Mesh creation tools
var createMesh = require("gl-simplicial-complex");
var polygonize = require("isosurface").surfaceNets;
var createAxes = require("gl-axes");
View test.html
1 2 3
$ node tr.js
<html>
<meta id="id" content="TESTING123"></html>
View data.json
1 2 3 4 5
[{ "size": 3000000 },
{ "size": 4000000 },
{ "size": 5000000 },
{ "size": 1500000 },
{ "size": 520000 }]
View made-for-tv-drama.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 1, -1, 3, -2, 5 ];
var alt = [ 9, 4, -1, 2, -3 ];
var sn = snare();
 
return function (t) {
if (t % 32 < 8) return intro(t)
else if (t % 32 < 9) {
var d = (t % 32 - 8) / (9 - 8);
return intro(t) * (1 - d) + main(t) * d;
}
View workpocalypse.js
1 2 3 4 5 6 7 8 9 10
var work = [ 100, 400, 200, 300 ];
var melody = [ 1, 2, 5, 1, 0, -2, 6 ];
var plucks = [ 1, 5/2, -2, 1/9, 1/3 ];
var times = [ 1, 1024, 64, 1, 1, 8064, 16, 256, 1, 32, 1024 ];
 
return function (t) {
var w = work[Math.floor(t*4)%work.length];
var tm = times[Math.floor(t/8)%times.length];
var m = melody[Math.floor(t*tm)%melody.length];
var x = Math.pow(2,m/12);
View actionwave.js
1 2 3 4 5 6 7 8 9 10
var melody = [ 5, 7, 3, 5, 1, 7, 2 ];
var side = [ 90.125, 180.25 ];
var pace = [ 4, 12, 8, 4 ];
var sn = snare();
 
return function (t) {
var m = melody[Math.floor(t*2) % melody.length];
var p = pace[Math.floor(t/8) % pace.length];
var s = side[Math.floor(t*p) % side.length];
var x = Math.pow(2, Math.floor(t%2)*m/12);
Something went wrong with that request. Please try again.