Chapter 6. Animation

In this chapter we’ll talk about how to write a program which continually updates itself onscreen. There are four tasks in an animation program.

  • Place an animation update call in the app where you loop back indefinitely often.

  • Calculate an appropriate timestep dt for each update.

  • Cascade update calls from the app down to the individual data elements of the documents, passing them the current dt.

  • Update the views after the data is updated.

In this chapter, we’ll have one section on each of these four tasks.

Get Software Engineering and Computer Games 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.