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 "ofURLFileLoader.h" | |
#include "ofFileUtils.h" | |
#include "ofUtils.h" | |
namespace ofxUnsplash { | |
string AccessKey; | |
inline void setupAccessKey(const string& accessKey) { | |
AccessKey = accessKey; |
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 "ofLog.h" | |
#include "ofVectorMath.h" | |
#include "GLFW/glfw3.h" | |
namespace ofxMonitorUtils { | |
struct MonitorInfo { | |
int index; | |
std::string name; |
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
/* | |
ofxNotion | |
by shugohirao | |
simply use to send Notion for e.g. log | |
doc : https://shiyuugo.notion.site/ofxNotion-91b51c9d9fee458e94c1e9261dc7b294?pvs=4 | |
*/ | |
#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
#pragma once | |
#include "ofAppRunner.h" | |
/* [Note] | |
if you use ImGui, add bellow after .begin() not to control mouse by ImGui. | |
`ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange;` | |
*/ | |
inline void updateMouse(int mouseX, int mouseY, float hideTimef = 1.0) { | |
glm::vec2 cursorPos(mouseX, mouseY); |
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 "ofMain.h" | |
inline void setupIcon(string iconPath) { | |
// set window icon | |
HICON hWindowIcon = NULL; | |
HICON hWindowIconBig = NULL; | |
HWND hwnd = ofGetWin32Window(); | |
if (hWindowIcon != NULL) DestroyIcon(hWindowIcon); | |
if (hWindowIconBig != NULL) DestroyIcon(hWindowIconBig); |
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
/*-------------------------------------------------- | |
# glslUtils | |
- https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83 | |
- https://github.com/ashima/webgl-noise | |
- https://thebookofshaders.com/ | |
- https://github.com/jamieowen/glsl-blend | |
--------------------------------------------------*/ | |
/*============================== Color ==============================*/ | |
vec3 rgb2hsb( in vec3 c ){ |
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
// wstringUtils.h | |
// https://gist.github.com/shiyuugohirao/5fb074dd346f96945136537bc6e2e7b9 | |
#pragma once | |
#include <stringapiset.h> | |
#include <WinBase.h> | |
#include <system_error> | |
#include <vector> | |
static std::wstring to_wstring(std::string const& src) | |
{ |
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
class ofxTsumami { | |
private: | |
float *target; | |
float radius;pp | |
float minVal, maxVal, initVal, pressedPct; | |
string name; | |
int res; | |
glm::vec2 pos, pressedPos; | |
bool bVertical; |
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 <sys/ioctl.h> | |
#include <netinet/in.h> | |
#include <net/if.h> | |
#include <arpa/inet.h> | |
static string getIP(){ | |
int fd; | |
struct ifreq ifr; | |
fd = socket(AF_INET, SOCK_DGRAM, 0); | |
ifr.ifr_addr.sa_family = AF_INET; |
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
void play(string soundPath, bool bOneShotLife=false){ | |
if(ofFile::doesFileExist(soundPath)){ | |
thread soundThread([=]{ | |
ofSoundPlayer sp; | |
sp.load(soundPath); | |
sp.setLoop(false); | |
cout<< "play talk"; | |
int t = ofGetElapsedTimeMicros(); | |
sp.play(); | |
while(sp.isLoaded() && sp.isPlaying()){} |
NewerOlder