#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ if (show.loadFont("fonts/EMSQwandry.svg")){ show.load("show.csv"); } } //-------------------------------------------------------------- void ofApp::update(){ show.update(); } //-------------------------------------------------------------- void ofApp::draw(){ ofBackground(0); if (show.isPlaying()){ vector& outlines=show.getOutlines(); ofPushMatrix(); ofTranslate(ofGetWidth()/2,ofGetHeight()/2); for (auto o:outlines){ o.draw(); } ofPopMatrix(); ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+"fps, shapes: "+ofToString(outlines.size())); } else { ofSetWindowTitle("idle"); } } //-------------------------------------------------------------- void ofApp::exit() { } //-------------------------------------------------------------- void ofApp::keyPressed(ofKeyEventArgs &args){ } //-------------------------------------------------------------- void ofApp::keyReleased(int key){ switch(key){ case OF_KEY_UP:{ break; } case OF_KEY_DOWN:{ break; } case ' ':{ if (show.isPlaying()){ show.stop(); } else show.play(); break; } default:{ break; } } } //-------------------------------------------------------------- void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mouseEntered(int x, int y){ } //-------------------------------------------------------------- void ofApp::mouseExited(int x, int y){ } //-------------------------------------------------------------- void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- void ofApp::dragEvent(ofDragInfo dragInfo){ }