Use it to handle "fade to black" situations... Think of it as a theater curtain on your screen.
Forks
Forks pushed to more recently than armadillu/ofxScreenCurtain itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.
README
Use it to handle "fade to black" situations... Think of it as a theater curtain.
It draws a rectangle as big as u specify in the color u specify, and fades its alpha in and out.
Requires ofxAnimatable addon.
Let's see how to make a screen fade to black and back, triggering an action when the curtain is fully down.
ofxScreenCurtain curtain;
update(){ curtain.update( 0.016666f );
//once curtain hits the bottom, change the contents if ( curtain.hasReachedBottom() ){ doYourThingie(); } }
draw(){ curtain.draw(); }
mousePressed(){ if (curtain.isReady()){ curtain.dropAndRaiseCurtain( 0.25 /go down duration/, 0.1 /stay down duration/, 0.25 /go up duration/ ); } }
It draws a rectangle as big as u specify in the color u specify, and fades its alpha in and out.
Requires ofxAnimatable addon.
Let's see how to make a screen fade to black and back, triggering an action when the curtain is fully down.
ofxScreenCurtain curtain;
update(){ curtain.update( 0.016666f );
//once curtain hits the bottom, change the contents if ( curtain.hasReachedBottom() ){ doYourThingie(); } }
draw(){ curtain.draw(); }
mousePressed(){ if (curtain.isReady()){ curtain.dropAndRaiseCurtain( 0.25 /go down duration/, 0.1 /stay down duration/, 0.25 /go up duration/ ); } }
ofxAddons