Generates an algorithmic 3D OBJ file with ThreeJS and Node.js.
# print to stdout
node generate-mesh.js > test.obj
# write to file
node generate-mesh.js test.obj
var connectionString = 'postgres://localhost:5432/postgres'; | |
var Promise=require('bluebird'); | |
var knex = require('knex')({ | |
client: 'pg', | |
connection: { | |
user: 'postgres', | |
database: 'postgres', | |
port: 5432, |
function asyncFunction (param) { | |
// Scope local variables to this function | |
// param is also both locally scoped | |
var n = param.name | |
var e = param.extension | |
// Simulate something asynchronous happening | |
setTimeout(function(){ | |
console.log("Downloaded file: " + n + "." + e) | |
}, 500 + (Math.random() * 500)) |