Skip to content

Commit

Permalink
randomly-rotate script
Browse files Browse the repository at this point in the history
  • Loading branch information
kumo committed May 25, 2014
1 parent 7518df9 commit a9c8c00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ A couple of scripts for the Sketch app.

Duplicate the selected object(s) and distribute them across the artboard, randomly rotating them.

### Randomly Rotate

Randomly rotate the selected object(s).

## Installation

1. [Download the ZIP file with the Plugins](https://github.com/kumo/Sketch-Plugin-Scripts/archive/master.zip)
Expand Down
5 changes: 5 additions & 0 deletions randomly-rotate.sketchplugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
for (var i=0; i<selection.count(); i++) {
var layer = selection[i];

[layer setRotation:Math.random() * 360];
}

0 comments on commit a9c8c00

Please sign in to comment.