paper.js/examples/Tools/Clouds.html

27 lines
No EOL
707 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Example</title>
<base href="../../">
<script type="text/javascript" src="lib/load.js"></script>
<script type="text/javascript" src="src/load.js"></script>
<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);
}
function onMouseDrag(event) {
path.arcTo(event.point, true);
}
tool.minDistance = 30;
</script>
</head>
<body>
<canvas id='canvas' width=1024 height=768></canvas>
</body>