JavaScript Library to Create Physics Based Animations

JavaScript library to create physics-based animations

Dynamics.js will be presented. This is a JavaScript library to create physics based animations.

CSS properties of any DOM element can be animated by including dynamics.js into your page. SVG properties and any JavaScript object can also be animated. Dynamics.js has its own setTimeout just because requestAnimationFrame and setTimeout have different actions. In most browsers, requestAnimationFrame won’t run in a background tab while setTimeout will. This can become reason of problems while using setTimeout beside your animations. Dynamics’s setTimeout and clearTimeout are recommended to handle these scenarios.

You can toggle a debug mode to slow down every animations and timeouts. This is beneficial for development mode to tweak animation. You can activate this using Shift-Control-D in the browser.

JavaScript library to create physics-based animations

Source: Github

3D Animated Mockup with CSS and jQuery