#include "ofApp.h" #include "glew.h" /* what do we want to store/control per letter? */ int MAX_POINTS=40000; int LASER_INTENSITY=128; //-------------------------------------------------------------- void ofApp::setup(){ fonts.open("fonts/"); fonts.allowExt("svg"); fonts.listDir(); ofLogNotice()<<"found "< shapes = banner.getOutlines(0.06f+(0.02f*sin(ofGetElapsedTimef()*.1f))); int num = laser.draw(shapes); //banner.draw(); ofPushMatrix(); ofTranslate(ofGetWidth()/2,ofGetHeight()/2); //ofScale(0.05,-0.05,0.05); for (auto& s: shapes) s.draw(); ofPopMatrix(); if (num>0){ ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser points: "+ofToString(num)); } else { ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser error "); } } //-------------------------------------------------------------- void ofApp::exit() { } //-------------------------------------------------------------- void ofApp::keyPressed(ofKeyEventArgs &args){ } //-------------------------------------------------------------- void ofApp::keyReleased(int key){ if (key>=' '&&key<='~'){ banner.addGlyph(key,ofColor::fromHsb(ofRandom(255.0),225,255)); } else if (key==OF_KEY_BACKSPACE||key==OF_KEY_DEL) { //DEL banner.removeGlyph(); } ofLog()<