Sketch 2015-05-29
void ofApp::setupAnim() {
ofEnableSmoothing();
maskOpacity = 0;
paused = false;
maskOpacity = 30;
}
void ofApp::drawAnim() {
ofEnableAlphaBlending();
if(ofGetFrameNum() == 0) ofBackground(ofColor::black);
ofSetColor(0, 0, 0, maskOpacity);
ofRect(0, 0, width, height);
ofSetColor(ofColor::red);
for(int i = 0; i < 360; i+=10) {
for(int j = 0; j < 4; j++) {
x = ofRandom(0, width);
y = ofMap(sin(ofGetFrameNum() * 0.06), -1, 1, -20, halfWidth);
ofLine(x, y, x, y + 50);
}
rotateScreen(i);
}
ofDisableAlphaBlending();
if(ofGetFrameNum() > 96) {
maskOpacity += 40;
}
if(maskOpacity > 255) {
renderGif();
}
}
void ofApp::rotateScreen(float degrees) {
ofTranslate(halfWidth, halfHeight, 0);
ofRotate(degrees);
ofTranslate(-halfWidth, -halfHeight, 0);
}
A little patience.