# cocos.scenes.transitions module

Transitions between Scenes

class `TransitionScene`(dst, duration=1.25, src=None)

  Bases: `cocos.scene.Scene`

  A Scene that takes two scenes and makes a transition between them.

  The input scenes are put into envelopes (Scenes) that are made childs to the transition scene. Proper transitions are allowed to modify any parameter for the envelopes, but must not modify directly the input scenes; that would corrupt the input scenes in the general case.

  `finish`()

    Called when the time is over. Envelopes are discarded and the dst scene will be the one runned by director.

  `hide_all`()

    Hides both the incoming and outgoing scenes

  `hide_out_show_in`()

    Hides the outgoing scene and shows the incoming scene

  `start`()

    Adds the incoming scene with z=1 and the outgoing scene with z=0

  `visit`()

    This function visits its children in a recursive way.

    It will first visit the children that that have a z-order value less than 0.

    Then it will call the `draw()` method to draw itself.

    And finally it will visit the rest of the children (the ones with a z-value bigger or equal than 0)

    Before visiting any children it will call the `transform()` method to apply any possible transformations.

  `duration` = None

    duration in seconds of the transition

  `in_scene` = None

    envelope with scene that will replace the old one

  `out_scene` = None

    envelope with scene that will be replaced

class `RotoZoomTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming

class `JumpZoomTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Zoom out and jump the outgoing scene, and then jump and zoom in the incoming

class `MoveInLTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Move in from to the left the incoming scene.

  `get_action`()
  `init`()

class `MoveInRTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.MoveInLTransition`

  Move in from to the right the incoming scene.

  `get_action`()
  `init`()

class `MoveInBTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.MoveInLTransition`

  Move in from to the bottom the incoming scene.

  `get_action`()
  `init`()

class `MoveInTTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.MoveInLTransition`

  Move in from to the top the incoming scene.

  `get_action`()
  `init`()

class `SlideInLTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Slide in the incoming scene from the left border.

  `get_action`()
  `init`()

class `SlideInRTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.SlideInLTransition`

  Slide in the incoming scene from the right border.

  `get_action`()
  `init`()

class `SlideInBTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.SlideInLTransition`

  Slide in the incoming scene from the bottom border.

  `get_action`()
  `init`()

class `SlideInTTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.SlideInLTransition`

  Slide in the incoming scene from the top border.

  `get_action`()
  `init`()

class `FlipX3DTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Flips the screen horizontally. The front face is the outgoing scene and the back face is the incoming scene.

class `FlipY3DTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Flips the screen vertically. The front face is the outgoing scene and the back face is the incoming scene.

class `FlipAngular3DTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Flips the screen half horizontally and half vertically. The front face is the outgoing scene and the back face is the incoming scene.

class `ShuffleTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Shuffle the outgoing scene, and then reorder the tiles with the incoming scene.

class `TurnOffTilesTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Turn off the tiles of the outgoing scene in random order

  `start`()

    Adds the incoming scene with z=1 and the outgoing scene with z=0

class `FadeTRTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner.

  `get_action`(x, y)
  `start`()

    Adds the incoming scene with z=1 and the outgoing scene with z=0

class `FadeBLTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.FadeTRTransition`

  Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner.

  `get_action`(x, y)

class `FadeUpTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.FadeTRTransition`

  Fade the tiles of the outgoing scene from the bottom to the top.

  `get_action`(x, y)

class `FadeDownTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.FadeTRTransition`

  Fade the tiles of the outgoing scene from the top to the bottom.

  `get_action`(x, y)

class `ShrinkGrowTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Shrink the outgoing scene while grow the incoming scene

class `CornerMoveTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Moves the bottom-right corner of the incoming scene to the top-left corner

  `start`()

    Adds the incoming scene with z=1 and the outgoing scene with z=0

class `EnvelopeTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  From the outgoing scene:

    - moves the top-right corner to the center

    - moves the bottom-left corner to the center

  From the incoming scene:

    - performs the reverse action of the outgoing scene

class `SplitRowsTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.SplitColsTransition`

  Splits the screen in rows. The odd rows goes to the left while the even rows goes to the right.

  `get_action`()

class `SplitColsTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Splits the screen in columns. The odd columns goes upwards while the even columns goes downwards.

  `get_action`()

class `FadeTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Fade out the outgoing scene and then fade in the incoming scene.

  Optionally supply the color to fade to in-between as an RGB color tuple.

  `on_enter`()

    Called every time the Scene enters the stage.

  `on_exit`()

    Called every time the `Scene` exits the stage.

class `ZoomTransition`(*args, **kwargs)

  Bases: `cocos.scenes.transitions.TransitionScene`

  Zoom and FadeOut the outgoing scene.

  `finish`()

    Called when the time is over. Envelopes are discarded and the dst scene will be the one runned by director.

  `start`()

    Adds the incoming scene with z=1 and the outgoing scene with z=0