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.

32 lines
1014 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Transform Testing</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 circlePath = new Path.Circle(new Point(280, 100), 25);
  10. circlePath.strokeColor = 'black';
  11. circlePath.fillColor = 'white';
  12. var clones = 30;
  13. var angle = 360 / clones;
  14. for (var i = 0; i < clones; i++) {
  15. var clonedPath = circlePath.clone();
  16. clonedPath.rotate(angle * i, circlePath.bounds.topLeft);
  17. };
  18. window._json = project.exportJSON();
  19. console.log(window._json);
  20. </script>
  21. <script type="text/paperscript" canvas="canvas2">
  22. project.importJSON(window._json);
  23. </script>
  24. </head>
  25. <body>
  26. <canvas id="canvas1" width="500" height="500"></canvas>
  27. <canvas id="canvas2" width="500" height="500"></canvas>
  28. </body>
  29. </html>