This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the base module | |
module.exports = function(canvas){ | |
if('string' == typeof canvas) canvas = dcoument.getElementById(canvas) | |
touchdown.start(canvas) | |
var ctx = window.ctx = canvas.getContext('2d') | |
var pen = basic(ctx) | |
ctx.translate(0.5, 0.5) | |
ctx.lineWidth = 10 | |
ctx.globalCompositeOperation = 'destination-over'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GITBAREDIR e.g. "/home/web/present-company.git" | |
GITBAREDIR=`pwd`; | |
# GITPROJECTDIR e.g. "present-company" | |
GITPROJECTDIR=`basename $PWD | sed 's/.git//g'`; | |
# Stop the application, move up on directory | |
npm stop; | |
cd ..; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var shuffleAndValidateFiles = function(files) { | |
var F = new Array(); | |
while (files.length > 0) { | |
var N = Math.floor(Math.random()*files.length); | |
if ((files[N] instanceof File) && !files[N].hidden) { | |
F.push(files[N]); | |
} | |
files.splice(N,1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'> html, body { margin: 0; padding: 0; border: 0; } </style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const unindex = require('unindex-mesh') | |
const normals = require('face-normals') | |
const glsl = require('glslify') | |
const regl = require('regl')({ extensions: ['ANGLE_instanced_arrays'] }) | |
const cube = unindex(require('primitive-cube')()) | |
const camera = require('regl-camera')(regl) | |
const { translations, scales } = generateSplitGrid() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This version is unminified | |
var observer = require('continuous-observer') | |
var cave = require('cave-automata-2d') | |
var fill = require('ndarray-fill') | |
var zero = require('zeros') | |
var raf = require('raf') | |
var canvas = document.createElement('canvas') | |
var ctx = canvas.getContext('2d') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var render = require('ndarray-text') | |
var zeros = require('zeros') | |
var cave = require('cave-automata-2d') | |
var pre = document.createElement('pre') | |
// Create an empty ndarray, | |
// 60 units wide and | |
// 18 units high | |
var array = zeros([60, 18]) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var render = require('ndarray-canvas') | |
var zeros = require('zeros') | |
var cave = require('cave-automata-2d') | |
var fill = require('ndarray-fill') | |
var canvas = document.createElement('canvas') | |
// Create an empty ndarray, | |
// 60 units wide and | |
// 18 units high | |
var array = zeros([500, 300]) |
NewerOlder