Merge pull request #155 from ubershmekel/patch-1

Fixed memory leak
This commit is contained in:
Jürg Lehni 2013-02-14 12:47:56 -08:00
commit 779d076f02

View file

@ -26,8 +26,8 @@
for (var i = 0; i < size - 1; i++) {
var nextSegment = segments[i + 1];
var position = path.segments[i].point;
var angle = (position - nextSegment.point).angle;
var vector = new Point({ angle: angle, length: 35 });
var vector = position - nextSegment.point;
vector.length = 35;
nextSegment.point = position - vector;
}
path.smooth();
@ -47,4 +47,4 @@
<body>
<canvas id="canvas" resize></canvas>
</body>
</html>
</html>