Cocos3d is a fantastic sdk that can be used to develop 3d applications for Apple's iOS devices. It isn't only a 3d engine, it also provides a lot of features and fuctionalities, already coded, to boost the development of your works.

Cocos3d works on the Cocos2d system, so you can use all the functionalities provided by the cocos2d API's.

So in this case we are going to use the Cocos2d functionalities to implement the FadeIN/FadeOUT/FadeTO transitions.


The collaboration diagram for the CCFadeOut Class is shown in the following picture:

The collaboration diagrams for CCFadeIn and CCFadeTo are similar to the above pictures, so no need to show them.

Let's write two lines of code:

CCActionInterval* fadeOut = [CCFadeOut actionWithDuration: 1.0];

[nodeName runAction: [CCSequence actionOne: fadeOut two: cleanUp]]

In the first line we are loading the node from a pod file, with the second line we are running the effects. With the same procedures we can apply the others two effects:

 

CCActionInterval* fadeOut = [CCFadeOut actionWithDuration: 1.0];

[nodeName runAction: [CCSequence actionOne: fadeOut two: cleanUp]]

And:

 

CCActionInterval* fadeOut = [CCFadeOut actionWithDuration: 1.0];

 

[nodeName runAction: [CCSequence actionOne: fadeOut two: cleanUp]]

If you look at CCIntervalAction Class Reference you can find a lot of transition you can apply this way:

CCAccelAmplitude, CCAccelDeccelAmplitude, CCAnimate, CCBezierBy, CCBlink, CCCameraAction, CCDeccelAmplitude, CCDelayTime, CCEaseAction, CCFadeIn, CCFadeOut, CCFadeTo, CCGridAction, CCJumpBy, CCMoveTo, CCRepeat, CCReverseTime, CCRotateBy, CCRotateTo, CCScaleTo, CCSequence, CCSpawn, CCTintBy, and CCTintTo.

Nothing more.

GG1