Skip to content

Commit

Permalink
video updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jmwohl committed May 10, 2014
1 parent 1036e56 commit 8ffd7f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Binary file not shown.
7 changes: 3 additions & 4 deletions osc_video_example/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,15 @@ void ofApp::update(){
// example of handling a /mouse/moved message
if(m.getAddress() == "/mouse/moved"){
cout << m.getRemoteIp() << " mouse moved to " << m.getArgAsInt32(0) << ", " << m.getArgAsInt32(1) << endl;
// REACT to the /mouse/moved message!

mouseClickEffect = ofMap(m.getArgAsFloat(1), 0, ofGetScreenHeight(), 0, 255);
}

// example of handling a /mouse/pressed message
if(m.getAddress() == "/mouse/pressed"){
cout << m.getRemoteIp() << " mouse pressed at " << m.getArgAsInt32(0) << ", " << m.getArgAsInt32(1) << endl;

// Use the y position of the mouse click message, map it to the mouseClickEffect value.
mouseClickEffect = ofMap(m.getArgAsFloat(1), 0, ofGetScreenHeight(), 0, 255);
// REACT to the /mouse/pressed message!
}

// example of handling a /key/pressed message
Expand Down

0 comments on commit 8ffd7f5

Please sign in to comment.