← Back

ofxScreenCurtain

github.com/armadillu/ofxScreenCurtain · @armadillu
OF 0.8 Graphics

Use it to handle "fade to black" situations... Think of it as a theater curtain on your screen.

9 5 Last commit 11y ago Created 14y ago

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.

schwittlick/ofxScreenCurtain by @schwittlick · ★ 0 · pushed 10y ago
smallfly/ofxScreenCurtain by @smallfly · ★ 0 · pushed 11y ago

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/ ); } }

Get this addon

HTTPS
SSH