score:2

Accepted answer

The part which defines the rotation to apply on words is:

.rotate(function() { return ~~(Math.random() * 2) * 60; })

Here you randomly define a rotation of either 0 or 60.

In the example you want to reproduce, words can get these rotations: [-60, -30, 0, 30, 60], which you can obtain using:

.rotate(function() { return ~~(Math.random() * 5) * 30 - 60; })

Related Query