1. A method performed by an electronic device having a display, a touch-sensitive surface, one or more processors and memory storing one or more programs for execution by the one or more processors, the method comprising: detecting a first triggering event in a first application, wherein the first triggering event corresponds to gestural input of a first contact on the touch-sensitive surface while a user interface of the first application is displayed on the display; in response to detecting the first triggering event: generating a first set of one or more initialization values corresponding to the gestural input of the first contact; generating a first animation in the first application based on the first set of one or more initialization values corresponding to the gestural input of the first contact and a predefined animation function, wherein the predefined animation function is defined independently of the first application and generating the animation includes, at each of a series of successive times, updating a state of one or more user interface objects in the user interface of the first application in accordance with the first set of one or more initialization values and the predefined animation function that is defined independently of the first application; and after generating the first animation, detecting a second triggering event in a second application that is different from the first application, wherein the second triggering event corresponds to gestural input of a second contact on the touch-sensitive surface while a user interface of the second application is displayed on the display; and in response to detecting the second triggering event: generating a second set of one or more initialization values corresponding to the gestural input of the second contact; and generating a second animation in the second application based on the second set of one or more initialization values corresponding to the gestural input of the second contact and the predefined animation function, wherein the predefined animation function is defined independently of the second application and generating the animation includes, at each of a series of successive times, updating a state of one or more user interface objects in the user interface of the second application in accordance with the second set of one or more initialization values and the predefined animation function that is defined independently of the second application.