libgdx/libgdx — pull request #2044 by JesseTG (2014-06-28 18:01:41+00:00)
Title: Added code for the new path editor

I really need to develop better Git habits.

Anyway, I needed a path editor for my game. I found another one, but it's a pain to use. So I made my own, and decided "why not let others benefit?"

So here's what Pathological can do.

- Create paths for `Bezier`, `BSpline`, and `CatmullRomSpline` curves (2D only)
- Save to a project and open it later
- Use an image for a background (for overlaying the path over levels, etc.)
- Overlay a grid on the background
- Snap to grid (in theory--in practice, it kind of sucks)
- Store multiple Paths per project
- Export the currently-selected path to a JSON file
- Select and delete multiple nodes simultaneously (though this could be a bit more intuitive)

I've also included a `PathSerializer` and a `PathLoader` (though you may not need the former because of the latter). The `PathLoader`'s `PathParameter` allows you to specify a `Matrix3` to transform a `Path` by when you load it. Good for if you use different coordinate systems.

Here's a screenshot.

![screenshot from 2014-06-28 13 54 57](https://cloud.githubusercontent.com/assets/1175189/3421438/6e5a6d2a-feed-11e3-9959-ff4b13bd9c21.png)

Any thoughts?