SpikeGraph::SpikeGraph() { x = 0; y = 0; w = 240; h = 105; spikeWidth = 10; scounter = 0; speed = 1 / 4.0; for (int i = 0; i < 12; i++) { newSpike(0, 1, w - (i + 1)*spikeWidth * 2); newSpike(0, -1, w - (i + 1)*spikeWidth * 2); } maskShader.load("shadersGL3/null.vert", "shadersGL3/spike.frag"); tline1 = newTickLine(0, 0, w, 40, 0, COLOR_LINE); tline2 = newTickLine(0, h + 30, w, 40, 0, COLOR_LINE); // Animation settings events.clear(); newEvent(0, 300, 0, 1); // intro newEvent(0, -1, 1, 1); // main currentEvent = events[0]; updateDependencyEvents(); updateDependencyDelays(getDelay()); }
// // KEYBOARD // Keyboard::Keyboard() { setPos(0,0); w = 780; h = 240; kr1.setPos(0, 0); kr1.setKeys("ESC|1|2|3|4|5|6|7|8|9|0|-|BACK|"); kr2.setPos(25, 45); kr2.xpadding_small = 20; kr2.setKeys("TAB|Q|W|E|R|T|Y|U|I|O|P|( )|"); kr3.setPos(40, 90); kr3.xpadding_small = 20; kr3.setKeys("CAPS|A|S|D|F|G|H|J|K|L|;|ENTER|"); kr4.setPos(25, 135); kr4.xpadding_small = 20; kr4.setKeys("SHIFT|Z|X|C|V|B|N|M|,|.|/|SHIFT|"); space.setPos(175, 190); // Animation settings events.clear(); newEvent(0, 200, 0, 1); // intro newEvent(0, -1, 1, 1); // main currentEvent = events[0]; updateDependencyDelays(getDelay()); }
// // KeyRow // KeyRow::KeyRow() { setPos(0,0); setKeys("x|x|x"); xpadding_small = 30; xpadding_large = 30; // Animation settings events.clear(); newEvent(0, 300, 0, 1); // intro newEvent(0, -1, 1, 1); // main currentEvent = events[0]; updateDependencyDelays(getDelay()); }
void KeyRow::keysFromString(string s) { size_t pos = 0; string token; string delimiter = "|"; float xoff = 0; int i = 0; while ((pos = s.find(delimiter)) != std::string::npos) { token = s.substr(0, pos); addKey(token, xoff, 0, i); xoff += getKeyPadding(keys[keys.size()-1]); s.erase(0, pos + delimiter.length()); i++; } updateDependencyDelays(getDelay()); }
BoxVisualization::BoxVisualization() { x = 0; y = 0; w = 240; h = 11*GRID_SIZE; setDelay(0); waves = Waves(); waves.setPos(ofPoint(285,375)); tline1.w = w; tline1.duration = 40; tline1.setDelay(0); tline2.y = h; tline2.w = w; tline2.duration = 40; tline2.setDelay(0); texts.clear(); int textDelay = -55; // Top Left texts.push_back(newText("SYSTEM SUMMARY", 5, 5, 7, 10, delay+textDelay, COLOR_135, false)); // Top Right texts.push_back(newText("WAVES VISUALIZATION", 5, w-5, 7, 10, delay+textDelay-5, COLOR_55, true)); // Bottom Right texts.push_back(newText("HIGH LOAD", 5, w-5, h-18, 10, delay+textDelay-10, COLOR_55, true)); texts.push_back(newText("ALL ACTIVITY", 5, w-4, h-11, 10, delay+textDelay-10, COLOR_55, true)); // Bottom Left texts.push_back(newText("ANALYSIS OF", 5, 5,h-18, 10, delay+textDelay-15, COLOR_55, false)); texts.push_back(newText("SYSTEM UTILIZATION", 5, 5,h-11, 10, delay+textDelay-15, COLOR_55, false)); // Animation settings events.clear(); newEvent(0, 300, 0, 1); // intro newEvent(0, -1, 1, 1); // main currentEvent = events[0]; updateDependencyEvents(); updateDependencyDelays(getDelay()); }