Clean up Curve Time Parametrization example.

This commit is contained in:
Jürg Lehni 2011-04-26 12:31:35 +01:00
parent e8a2a786e0
commit 7c51369426

View file

@ -14,13 +14,14 @@
var curve = path.curves[0]; var curve = path.curves[0];
function onMouseMove(event) { function onMouseMove(event) {
modifyCurve(event.point, false, true); modifyCurve(event.point, true);
} }
function modifyCurve(point, iteratively, remove) { function modifyCurve(point, remove) {
curve.segment2.point = point; curve.segment2.point = point;
var length = curve.length; var length = curve.length;
var step = 10; var step = 10;
var iteratively = false;
var num = Math.floor(length / step); var num = Math.floor(length / step);
var prev = 0; var prev = 0;
for (var i = 0, pos = 0; i <= num; i++, pos += step) { for (var i = 0, pos = 0; i <= num; i++, pos += step) {
@ -36,7 +37,7 @@
} }
} }
// modifyCurve(new Point(400, 377), false, false); // modifyCurve(new Point(400, 377), false);
</script> </script>
</head> </head>