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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.