Script Physics is a Java scripting app that has a built-in physics engine with an easy-to-use geometrical intersection interface. The entire API is fully documented and provides high level functionality such as touch modes that enable zooming and panning, shape to accelerometer attachment, and textures to shape attachment. JavaDocs and three simple tutorials are available that show examples of these features, and how they be completed with one or two lines of code each.
Script Physics is also deeply integrated with the Android graphics API to take advantage of paints, shaders, bitmaps, menus, and dialog. The user's program immediately ends if an Error or Exception is thrown, and the user is presented with the offending code highlighted in the editor. Script Physics comes bundled with the full source code for five demos that show off the capabilities of its API, the Android API and even a bit of the Java API:
- Marble mover: Shows off linear shaders, accelerometer attachment, background painting, and bitmap shading.
- Physics draw: Shows off menus, physics engine, shape creation, and gravitational swiping.
- Shape sketch: Shows off static layer screen painting, zoom and pan mode, and geometrical intersection use.
- Air Hockey: Shows off multi-touch capabilities, on/off screen visibility detection, and touch modes.
- Alphabet soup: Shows off dialogs, shape collision detection, and bitmap shaders.