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
// Ask for an ObjectID | |
let objectID = await input.textAsync("Input an Object ID") | |
// get result from objectID | |
let apiURL = "https://collectionapi.metmuseum.org/public/collection/v1/objects/" + objectID | |
let results = await fetch(apiURL) | |
let json = await results.json() | |
if (json.hasOwnProperty("message")){ |
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
# exports each selected object into its own file | |
import bpy | |
import os | |
# export to blend file location | |
basedir = os.path.dirname(bpy.data.filepath) | |
if not basedir: | |
raise Exception("Blend file is not saved") |
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
// change this to a recognizeable piece of your audio output | |
// e.g. setAudioOutput("AirPlay"); or setAudioOutput("VoilaDevice"); | |
// returns true on success / false on beef | |
// as always, all thanks to StackOverflow for the amazing | |
// enumerate devices script: | |
// http://stackoverflow.com/questions/1983984/how-to-get-audio-device-uid-to-pass-into-nssounds-setplaybackdeviceidentifier | |
// Note: if you change "kAudioDevicePropertyScopeOutput" to "kAudioObjectPropertyScopeGlobal" in line 62, | |
// you can set the output for your whole system... |
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); | |
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
// | |
// 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
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
// 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
// | |
// 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" |
NewerOlder