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
// creates a white (!!) line from 0,0,0 to 300,0,0 | |
// make sure background is other color than white ;) | |
var geometry = new THREE.Geometry(); | |
geometry.vertices.push(new THREE.Vector3(0, 0, 0)); | |
geometry.vertices.push(new THREE.Vector3(300, 0, 0)); | |
var line = new THREE.Line( | |
geometry, | |
new THREE.LineBasicMaterial( { color: 0xffffff, linewidth: 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
param = typeof param !== 'undefined' ? param : default_value; |
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
'use strict'; | |
function Application() { | |
this.camera = null; | |
this.scene = null; | |
this.renderer = null; | |
this.mesh = null; | |
this.init(); | |
} |
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
$(function() { | |
// Handler for .ready() called. | |
}); |
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
'use strict'; | |
var ClassName = Class.extend({ | |
init: function() { | |
// catch arguments here | |
// init class | |
} | |
}); |
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
// jquery fastclick integration | |
$(function() { | |
FastClick.attach(document.body); | |
}); |
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.$button.click(function(event){ | |
event.preventDefault(); | |
var $target = $(event.currentTarget); | |
// do stuff with target | |
}.bind(this)); |
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
{ | |
// http://eslint.org/docs/rules/ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, // browser global variables. | |
"node": true, // Node.js global variables and Node.js-specific rules. | |
"worker": false, // web workers global variables. | |
"amd": false, // defines require() and define() as global variables as per the amd spec. |
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
background-image: url('data:image/svg+xml;utf8,<svg></svg>'); |
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
float timeDiff = ofGetElapsedTimef() - lastPitchChangeTime; | |
if(roundedCurrPitch != roundedPrevPitch && pitchConfidence > minimumConf && timeDiff > pitchRelease) { | |
// first, send [off note] for previous note | |
midiOut.sendNoteOff(channel, roundedPrevPitch); | |
// send current note value over midi | |
// scale the ascii values to midi velocity range 0-127 | |
// see an ascii table: http://www.asciitable.com/ |
OlderNewer