Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
966 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Group Transform</title>
  6. <link rel="stylesheet" href="../css/style.css">
  7. <script type="text/javascript" src="../../dist/paper-full.js"></script>
  8. <script type="text/paperscript" canvas="canvas1">
  9. var circle1 = new Path.Circle(new Point(100, 100), 50);
  10. circle1.fillColor = 'red';
  11. var circle2 = new Path.Circle(new Point(200, 100), 50);
  12. circle2.fillColor = 'blue';
  13. var group = new Group(circle1, circle2);
  14. group.translate([100, 100]);
  15. group.scale(0.5);
  16. group.rotate(10);
  17. window._json = project.exportJSON();
  18. console.log(window._json);
  19. </script>
  20. <script type="text/paperscript" canvas="canvas2">
  21. project.importJSON(window._json);
  22. </script>
  23. </head>
  24. <body>
  25. <canvas id="canvas1" width="500" height="500"></canvas>
  26. <canvas id="canvas2" width="500" height="500"></canvas>
  27. </body>
  28. </html>