source: main/trunk/model-sites-dev/von-sparql/js/paper/examples/Scripts/RoundRectangle.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: 611 bytes
Line 
1<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="UTF-8">
5 <title>Rounded Rectangle</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="canvas">
9 var path;
10
11 function onFrame(event) {
12 if (path)
13 path.remove();
14 path = new Path.Rectangle({
15 radius: Math.abs(Math.sin(event.count / 40)) * 150 + 10,
16 rectangle: {
17 size: [300, 300]
18 },
19 fillColor: 'black'
20 });
21 path.position = view.center;
22 }
23 </script>
24</head>
25<body>
26 <canvas id="canvas" resize></canvas>
27</body>
28</html>
Note: See TracBrowser for help on using the repository browser.