source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/JSON/Transform Test 1.html@ 28914

Last change on this file since 28914 was 28914, checked in by ak19, 10 years ago

Supporting javascript libraries and bespoke code written by Steffan to support the von-sparql user interface

File size: 899 bytes
Line 
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.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
13 var clones = 30;
14 var angle = 360 / clones;
15
16 for(var i = 0; i < clones; i++) {
17 var clonedPath = circlePath.clone();
18 clonedPath.rotate(angle * i, circlePath.bounds.topLeft);
19 };
20
21 window._json = project.exportJSON();
22 console.log(window._json);
23 </script>
24 <script type="text/paperscript" canvas="canvas2">
25 project.importJSON(window._json);
26 </script>
27</head>
28<body>
29 <canvas id="canvas1" width="500" height="500"></canvas>
30 <canvas id="canvas2" width="500" height="500"></canvas>
31</body>
32</html>
Note: See TracBrowser for help on using the repository browser.