paper.js/examples/Tools/Clouds.html

27 lines
726 B
HTML
Raw Normal View History

2011-02-21 08:31:26 -05:00
<!DOCTYPE html>
2011-02-08 07:16:43 -05:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Example</title>
<link rel="stylesheet" href="../css/style.css">
2011-03-07 20:07:26 -05:00
<script type="text/javascript">var root = '../../'</script>
<script type="text/javascript" src="../../src/load.js"></script>
2011-03-04 06:38:38 -05:00
<script type="text/paperscript" canvas="canvas">
var path;
function onMouseDown(event) {
path = new Path();
path.strokeColor = 'black';
path.strokeWidth = 5;
path.strokeJoin = 'round';
path.strokeCap = 'round';
path.add(event.point);
2011-02-08 07:16:43 -05:00
}
2011-03-04 06:38:38 -05:00
function onMouseDrag(event) {
path.arcTo(event.point, true);
}
tool.minDistance = 30;
2011-02-08 07:16:43 -05:00
</script>
</head>
<body>
2011-05-05 15:08:13 -04:00
<canvas id='canvas' resize></canvas>
2011-02-08 07:16:43 -05:00
</body>