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" | |
//-------------------------------------------------------------- | |
void ofApp::setup() { | |
// first init box2d | |
box2d.init(); | |
// set the gravity | |
box2d.setGravity(0, 10); |
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 ofApp::setup() { | |
// first init box2d | |
box2d.init(); | |
// set the gravity | |
box2d.setGravity(0, 10); | |
// create bounds x,y,w,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" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
video.setDeviceID(0); | |
video.setup(320, 240); | |
} | |
//-------------------------------------------------------------- |
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" | |
int main() { | |
// here are the most commonly used iOS window settings. | |
//------------------------------------------------------ | |
ofiOSWindowSettings settings; | |
settings.enableRetina = true; // enables retina resolution if the device supports it. | |
settings.enableDepth = false; // enables depth buffer for 3d drawing. | |
settings.enableAntiAliasing = false; // enables anti-aliasing which smooths out graphics on the screen. |
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
@import url(./reset.css); | |
@import url(./fonts.css); | |
@import './colors.scss'; | |
@import './typography.scss'; | |
/* apply a natural box layout model to all elements, but allowing components to change */ | |
html { | |
box-sizing: border-box; | |
user-select: none; | |
-webkit-tap-highlight-color: transparent; |
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" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
ofBackground(246, 189, 208); | |
gui.setup(); | |
gui.add(value.set("value", 2.5, 0.00001, 3)); | |
gui.add(speed.set("speed", 0.045, 0.00001, 3)); |
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
{ | |
"total_cars": 6, | |
"spots": { | |
"spot_13": { | |
"is_open": false, | |
"color": [ | |
{ | |
"r": 78, | |
"g": 78, | |
"b": 61, |
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" | |
vector<ofVideoDevice> devices; | |
int deviceCount = 0; | |
ofVideoGrabber vidGrabber; | |
int camWidth; | |
int camHeight; | |
//-------------------------------------------------------------- | |
void ofApp::setup() { | |
camWidth = 320; |
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" | |
vector<ofVideoDevice> devices; | |
int deviceCount = 0; | |
ofVideoGrabber * vidGrabber = NULL; | |
int camWidth; | |
int camHeight; | |
//-------------------------------------------------------------- | |
void ofApp::setup() { | |
camWidth = 320; |
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" | |
// Note: | |
// You need ofxGui | |
// You can download the texture here: https://www.dropbox.com/s/15lw3lh87yp11za/tex-bigger.jpg?dl=1 | |
ofPolyline resampled; | |
ofPolyline points; | |
ofParameter<float> resampleLength; | |
ofParameter<bool> bDrawWireframe; |
NewerOlder