2011-02-21 08:31:26 -05:00
|
|
|
<!DOCTYPE html>
|
2011-02-08 07:16:43 -05:00
|
|
|
<html>
|
|
|
|
<head>
|
2014-08-16 13:24:54 -04:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<title>Clouds</title>
|
|
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
|
|
<script type="text/javascript" src="../../dist/paper-full.js"></script>
|
|
|
|
<script type="text/paperscript" canvas="canvas">
|
|
|
|
// Any newly created item will inherit the following styles:
|
|
|
|
project.currentStyle = {
|
|
|
|
strokeColor: 'black',
|
|
|
|
strokeWidth: 5,
|
|
|
|
strokeJoin: 'round',
|
|
|
|
strokeCap: 'round'
|
|
|
|
};
|
2011-05-06 10:54:36 -04:00
|
|
|
|
2014-08-16 13:24:54 -04:00
|
|
|
// The user has to drag the mouse at least 30pt before the mouse drag
|
|
|
|
// event is fired:
|
|
|
|
tool.minDistance = 30;
|
2011-05-06 10:54:36 -04:00
|
|
|
|
2014-08-16 13:24:54 -04:00
|
|
|
var path;
|
|
|
|
function onMouseDown(event) {
|
|
|
|
path = new Path();
|
|
|
|
path.add(event.point);
|
|
|
|
}
|
2011-05-06 10:54:36 -04:00
|
|
|
|
2014-08-16 13:24:54 -04:00
|
|
|
function onMouseDrag(event) {
|
|
|
|
path.arcTo(event.point, true);
|
|
|
|
}
|
|
|
|
</script>
|
2011-02-08 07:16:43 -05:00
|
|
|
</head>
|
|
|
|
<body>
|
2014-08-16 13:24:54 -04:00
|
|
|
<canvas id="canvas" resize></canvas>
|
2011-05-30 18:27:39 -04:00
|
|
|
</body>
|
2014-04-06 07:44:19 -04:00
|
|
|
</html>
|