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>
|
2011-03-07 20:07:26 -05:00
|
|
|
<script type="text/javascript">var root = '../../'</script>
|
2011-03-07 18:11:41 -05:00
|
|
|
<script type="text/javascript" src="../../src/load.js"></script>
|
2011-03-04 06:38:38 -05:00
|
|
|
<script type="text/paperscript" canvas="canvas">
|
2011-02-12 10:20:10 -05:00
|
|
|
var path;
|
2011-03-04 06:38:38 -05:00
|
|
|
function onMouseDrag(event) {
|
|
|
|
if (path) path.remove();
|
|
|
|
var distance = (event.downPoint - event.point).length;
|
|
|
|
path = new Path.Circle(event.downPoint, distance);
|
|
|
|
path.strokeColor = 'black';
|
|
|
|
path.fillColor = 'white';
|
|
|
|
};
|
|
|
|
|
|
|
|
function onMouseUp(event) {
|
|
|
|
path = null;
|
|
|
|
}
|
2011-02-08 07:16:43 -05:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<canvas id='canvas' width=1024 height=768></canvas>
|
|
|
|
</body>
|