Skip to content

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

Notifications You must be signed in to change notification settings

morethanlogic/ofxScreenCurtain

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%