Version 4.0.0

@theodorejb theodorejb released this May 6, 2018

This release switches from requestAnimationFrame back to CSS keyframe animations for better performance. In order to preserve compatibility with the style-src 'self'; Content Security Policy, animations are now defined via an external CSS file rather than inserted dynamically.

Add the following to your page to use one of the preset animations:

<link rel="stylesheet" href="node_modules/spin.js/spin.css"/>

You can also define custom opacity animations in your own CSS file and select them via the animation option. The opacity and trail options are no longer necessary and have been removed.

Since IE 9 doesn't support keyframe animations, it is not compatible with spin.js v4, and the fps option (which was only used for IE 9) has been removed.

This release also sets a transparent shadow by default to resolve aliased lines in certain browsers (issue #355).