This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://c1d845f400c1bafcc5710faf56e3da64e2a15ea1.htmlb.in/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.querySelector('canvas') | |
var width = canvas.width | |
var height= canvas.height | |
var center = [width / 2, height / 2] | |
var maxd = 100//distance([0,0], center) | |
return function (r, w) { | |
for (var y = 0; y < height; ++y) { | |
for (var x = 0; x < width; ++x) { | |
var index = (y * width + x) * 4; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var args = require('minimist')(process.argv.slice(2)) | |
var parse = require('mynosql-query') | |
var pull = require('pull-stream') | |
var level = require('level') | |
var sublevel = require('level-sublevel') | |
var _db = sublevel(level('./data', {encoding: 'json'})) | |
var db = require('mynosql')(_db) | |
db.createIndex([['first']], function(){}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var canvas = document.querySelector('canvas') | |
var width = canvas.width | |
var height= canvas.height | |
var center = [width / 2, height / 2] | |
var maxd = 100//distance([0,0], center) | |
return function (r, w) { | |
var date = Date.now() | |
for (var y = 0; y < height; ++y) { | |
for (var x = 0; x < width; ++x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avconv -framerate 16 -f image2 -i frame%03d.png -c:v h264 -crf 1 mov.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instructions | |
// drag n drop an image onto the pink canvas ---> | |
// | |
// @johnnyscript | |
var surfaceNets = require("surface-nets") | |
var ndarray = require("ndarray") | |
var fill = require("ndarray-fill") | |
var drop = require('drag-drop') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('cheatcode') | |
_sync = require('jsynth-sync') | |
synth.connect(master.destination) | |
notes = teoria.note('db4').scale('dorian').notes() | |
bpm = 36 | |
timer = _sync(bpm, master.sampleRate) | |
//synth.disconnect(master.destination) | |
//t0.emit('stop') | |
t0 = timer.on(1/12, function(ti, b, off, swing){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('cheatcode') | |
_sync = require('jsynth-sync') | |
synth.connect(master.destination) | |
notes = teoria.note('db4').scale('dorian').notes() | |
bpm = 36 | |
timer = _sync(bpm, master.sampleRate) | |
//synth.disconnect(master.destination) | |
//t0.emit('stop') | |
t0 = timer.on(1/12, function(ti, b, off, swing){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instructions | |
// drag n drop an image onto the pink canvas ---> | |
// | |
// @johnnyscript | |
var surfaceNets = require("surface-nets") | |
var ndarray = require("ndarray") | |
var fill = require("ndarray-fill") | |
var drop = require('drag-drop') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var baboon = require("baboon-image") | |
var savePixels = require("save-pixels") | |
var translate = require('ndarray-translate-fft') | |
baboon = translate.wrap(baboon, [100, 100]) | |
var pix = savePixels(baboon, 'canvas') | |
document.body.appendChild(pix) | |