Web UI for ARGUS server
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.

30 lines
942 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Symbols</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 ellipse = new Path.Ellipse({
  10. from: [0, 0],
  11. to: [200, 100],
  12. fillColor: 'red'
  13. });
  14. var symbol = new SymbolDefinition(ellipse);
  15. var p1 = symbol.place([100, 100]);
  16. p1.rotate(45);
  17. var p2 = symbol.place([300, 200]);
  18. p2.rotate(-30);
  19. window._json = project.exportJSON();
  20. console.log(window._json);
  21. </script>
  22. <script type="text/paperscript" canvas="canvas2">
  23. project.importJSON(window._json);
  24. </script>
  25. </head>
  26. <body>
  27. <canvas id="canvas1" width="500" height="500"></canvas>
  28. <canvas id="canvas2" width="500" height="500"></canvas>
  29. </body>
  30. </html>