Advertisement
JoshuaDavis

HYPE using getNextPoint()

Feb 10th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.35 KB | None | 0 0
  1. int numAssets = 100;
  2. HGridLayout layout;
  3.  
  4. void setup() {
  5.     size(640,640);
  6.     H.init(this).background(#202020);
  7.     smooth();
  8.  
  9.     layout = new HGridLayout();
  10.     layout.startX(25).startY(25).spacing(25,25).cols(10);
  11.  
  12.     for (int i = 0; i < numAssets; ++i) {
  13.         PVector pt = new PVector();
  14.         pt = layout.getNextPoint();
  15.  
  16.         rect(pt.x, pt.y, 24, 24);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement