Guest User

Untitled

a guest
Feb 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. var path = new Path.Rectangle(50, 50, 300, 300);
  2. var secondPath = path.clone();
  3.  
  4.  
  5. function onFrame(event) {
  6.  
  7. project.clear();
  8. secondPath.rotate(1);
  9.  
  10. var r = new Path.Rectangle(25, 25, 350, 350);
  11. r.strokeColor = '#ffb142';
  12. r.strokeWidth = 3;
  13.  
  14. var intersections = path.getIntersections(secondPath);
  15.  
  16. var p1 = new Path({
  17. fillColor: '#cd6133',
  18. closed: true
  19. });
  20.  
  21.  
  22. for (var i=0; i < intersections.length; i++) {
  23. p1.add(intersections[i].point);
  24. }
  25. p1.add(intersections[0].point);
  26.  
  27. var insidePoly = new Path.RegularPolygon(
  28. new Point(200, 200), ((Math.floor(event.count/120)+4) % 50) , 100);
  29. insidePoly.fillColor = '#ffda79';
  30. insidePoly.rotate(event.count)
  31.  
  32.  
  33.  
  34. }
Add Comment
Please, Sign In to add comment