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
// BIND FIX FOR OLDER BROWSERS | |
if( Function.prototype.bind ) { | |
} else { | |
/** safari, why you no bind!? */ | |
Function.prototype.bind = function (bind) { | |
var self = this; | |
return function () { | |
var args = Array.prototype.slice.call(arguments); | |
return self.apply(bind || null, args); | |
}; |
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
ofSerial s; | |
vector <ofSerialDeviceInfo> deviceList = s.getDeviceList(); | |
for(int k = 0; k < (int)deviceList.size(); k++){ | |
port = deviceList[k].getDeviceName(); | |
if ( port.find( "usbmodem" ) != string::npos ) break; | |
} | |
cout << "connecting to serial device "<< port<<endl; |
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
// | |
// SysCommand.h | |
// | |
// Created by Brett Renfer on 2/22/12. | |
// | |
#pragma once | |
#include "ofThread.h" | |
class SysCommand : private ofThread |
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
// | |
// ofNoWindowRunner.cpp | |
// touchForwarder | |
// | |
// Created by Brett Renfer on 6/7/12. | |
// Copyright (c) 2012 Rockwell Group. All rights reserved. | |
// | |
#include "ofNoWindowRunner.h" | |
#include "ofAppRunner.cpp" |
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
// override THREE Ray | |
THREE.Ray.prototype.intersectObject = function ( object, recursive ) { | |
var intersect, intersects = []; | |
if ( recursive === true ) { | |
for ( var i = 0, l = object.children.length; i < l; i ++ ) { |
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
static vector<string> loadStrings( string file ){ | |
static vector<string> ret; | |
ret.clear(); | |
ofBuffer temp = ofFile( file ).readToBuffer(); | |
while ( !temp.isLastLine() ){ | |
ret.push_back( temp.getNextLine() ); | |
cout<<ret.back()<<endl; | |
} | |
return ret; |
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
// | |
// ofxiOSImageSaver.h | |
// Colorizer | |
// | |
// Created by Brett Renfer on 9/9/14. | |
// | |
#pragma once | |
#include "ofMain.h" |
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
#include "ofApp.h" | |
string sid = ""; | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofSetLogLevel(OF_LOG_VERBOSE); | |
ofxLibwebsockets::ClientOptions opts = ofxLibwebsockets::defaultClientOptions(); | |
opts.channel = "/socket.io/1/websocket?EIO=2&transport=websocket&sid="; | |
opts.port = 3000; |
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
#pragma once | |
#include "ofxSvg.h" | |
class SvgSampler { | |
public: | |
void load( string svgFile ){ | |
svg.load(svgFile); | |
OlderNewer