Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var path = new Path.Rectangle(50, 50, 300, 300);
- var secondPath = path.clone();
- function onFrame(event) {
- project.clear();
- secondPath.rotate(1);
- var r = new Path.Rectangle(25, 25, 350, 350);
- r.strokeColor = '#ffb142';
- r.strokeWidth = 3;
- var intersections = path.getIntersections(secondPath);
- var p1 = new Path({
- fillColor: '#cd6133',
- closed: true
- });
- for (var i=0; i < intersections.length; i++) {
- p1.add(intersections[i].point);
- }
- p1.add(intersections[0].point);
- var insidePoly = new Path.RegularPolygon(
- new Point(200, 200), ((Math.floor(event.count/120)+4) % 50) , 100);
- insidePoly.fillColor = '#ffda79';
- insidePoly.rotate(event.count)
- }
Add Comment
Please, Sign In to add comment