CHAPTER 6

Effect: Physics

A physics engine is a software library that simulates how objects move in the real world. Adding physics to an application provides a way to create animations that appeal to the user's sense of realism. While it is possible to create animations that have a life-like quality without implementing physics, cracking open that high school physics book will provide consistency throughout your application. However, if the thought of implementing “real life” in your application feels a little out of scope, you can make use of a third-party library. This chapter will explore what a physics engine can do, and how to use an excellent open-source library to add physics-based effects to a JavaFX application.

The most obvious use ...

Get JavaFX™ Special Effects: Taking Java™ RIA to the Extreme with Animation, Multimedia, and Game Elements now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.