Skip to content

Instantly share code, notes, and snippets.

View forresto's full-sized avatar

Forrest O. forresto

View GitHub Profile
noflo = require 'noflo'
class Measure extends noflo.AsyncComponent
description: 'Load image from URL and get dimensions'
icon: 'picture-o'
constructor: ->
@inPorts =
url: new noflo.Port 'string'
@outPorts =
dimensions: new noflo.Port 'array'
@forresto
forresto / bounds.js
Created April 18, 2014 15:25
noflo-ccv to cropping bounds
var noflo = require('noflo');
exports.getComponent = function () {
var c = new noflo.Component();
c.icon = "circle-o"
c.inPorts.add('faces');
c.outPorts.add('circles');
c.outPorts.add('dimensions');
@forresto
forresto / noflo.json
Created June 17, 2014 09:55
noflo-canvas demo: bezier curves follow mouse
{
"properties": {
"name": "mousebez",
"id": "af975fd9fd7408002676",
"environment": {
"type": "noflo-browser",
"content": ""
}
},
"inports": {},
{
"properties": {
"name": "makepath",
"id": "gd8s5",
"environment": {
"type": "noflo-browser",
"content": "<canvas id=\"canvas\" width=\"200\" height=\"200\"></canvas>"
}
},
"inports": {},
# Canvas stuff
canvas = document.getElementById 'fireworks'
context = canvas.getContext '2d'
width = canvas.width = window.innerWidth
w2 = Math.floor width/2
height = canvas.height = window.innerHeight
h2 = Math.floor height/2
TAU = Math.PI*2
@forresto
forresto / noflo.json
Last active August 29, 2015 14:03
noflo-geometry test
{
"properties": {
"name": "geo",
"environment": {
"type": "noflo-browser"
}
},
"inports": {},
"outports": {},
"groups": [],
@forresto
forresto / noflo.json
Last active August 29, 2015 14:06
noflo-canvas demo: yin-yang
{
"properties": {
"name": "yin-yang",
"environment": {
"type": "noflo-browser",
"content": "<style>body{background-color:grey;}</style>\nradius <input id=\"radius\" type=\"range\" min=\"1\" max=\"150\" value=\"150\"></input><br>\nhole <input id=\"hole\" type=\"range\" min=\"0\" max=\"1\" step=\"0.001\" value=\"0.6\"></input><br>"
},
"id": "a1096a406131e109f836"
},
"inports": {},
@forresto
forresto / mlab20.json
Last active August 29, 2015 14:06
meemoo: mlab20 animation station
{
"info": {
"title": "cam to gif station",
"author": "forresto",
"description": "webcam to animated gif",
"url": "kiosk",
"parents": [
"https://gist.github.com/ea32c33a741119e82c35"
]
},
@forresto
forresto / noflo.json
Created October 1, 2014 20:33
noflo-ccv test
{
"properties": {
"name": "ccv-test",
"environment": {
"type": "noflo-browser",
"content": ""
}
},
"inports": {},
"outports": {},
@forresto
forresto / index.js
Created December 18, 2014 16:21
requirebin sketch
b = require('browserify');
console.log(b);