# Transition3D Demo

## What Is It

The `Transition3D` class helps support transitions modeled with simple 3D transformations. For now (and the foreseeable future) there are only three subclasses:

- CubeTransition3D rotates images as if they are on a cube.
- FlipTransition3D flips images as if they are on opposite sides of a sign.
- FoldTransition3D this unfolds new incoming images and folds outgoing images.

## How To Use It

Like the `Transition2D` classes the usage is very simple:

    CubeTransition3D t = new CubeTransition3D(Transition.DOWN, false);
    float progress = ...;
    t.paint(graphics2D, imgA, imgB, progress);

## How It Works

These use the `ImageContext` class to render an image using four transform points. Java's built-in `AffineTransform` class only lets you use three transform points (not four), so it is more limiting.

## Examples

Cube Up | Cube Down | Cube Left | Cube Right
Cube Up Flush | Cube Down Flush | Cube Left Flush | Cube Right Flush
Flip Up | Flip Down | Flip Left | Flip Right
Flip Up Flush | Flip Down Flush | Flip Left Flush | Flip Right Flush
Fold Up | Fold Down | Fold Left | Fold Right
Fold Up Twice | Fold Down Twice | Fold Left Twice | Fold Right Twice