# Examples
Tetra has a fairly large suite of examples - to try them out, clone the repository and run:
```bash
cargo run --example example_name
```
You can also click on the name of the example below to view the source code.
| [`hello_world`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/hello_world.rs) | Basic | Opens a window and clears it with a solid color. |
| [`texture`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/texture.rs) | Graphics | Loads and displays a texture. |
| [`animation`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/animation.rs) | Graphics | Displays an animation, made up of regions from a texture. |
| [`text`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/text.rs) | Graphics | Displays text using a TTF font. |
| [`nineslice`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/nineslice.rs) | Graphics | Slices a texture into nine segments to display a dialog box. |
| [`scaling`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/scaling.rs) | Graphics | Demonstrates the different screen scaling algorithms. |
| [`shaders`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/shaders.rs) | Graphics | Uses a custom shader to render a texture. |
| [`canvas`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/canvas.rs) | Graphics | Uses a custom render target to apply post-processing effects. |
| [`interpolation`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/interpolation.rs) | Graphics | Demonstrates how to interpolate between ticks. |
| [`audio`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/audio.rs) | Audio | Plays back an audio file. |
| [`keyboard`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/keyboard.rs) | Input | Moves a texture around based on keyboard input. |
| [`animation_controller`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/animation_controller.rs) | Input | Moves a sprite around, with the animation changing based on keyboard input. |
| [`mouse`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/mouse.rs) | Input | Moves a texture around based on mouse input. |
| [`gamepad`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/gamepad.rs) | Input | Displays the input from a connected gamepad. |
| [`text_input`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/text_input.rs) | Input | Displays text as it is typed in by the player. |
| [`bunnymark`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/bunnymark.rs) | Benchmark | Benchmarks rendering performance by rendering lots of bunnies. |
| [`tetras`](https://github.com/17cupsofcoffee/tetra/blob/master/examples/tetras.rs) | Game | A full example game (which is entirely legally distinct from a certain other block-based puzzle game *cough*). |