mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
commit
779d076f02
1 changed files with 3 additions and 3 deletions
|
@ -26,8 +26,8 @@
|
||||||
for (var i = 0; i < size - 1; i++) {
|
for (var i = 0; i < size - 1; i++) {
|
||||||
var nextSegment = segments[i + 1];
|
var nextSegment = segments[i + 1];
|
||||||
var position = path.segments[i].point;
|
var position = path.segments[i].point;
|
||||||
var angle = (position - nextSegment.point).angle;
|
var vector = position - nextSegment.point;
|
||||||
var vector = new Point({ angle: angle, length: 35 });
|
vector.length = 35;
|
||||||
nextSegment.point = position - vector;
|
nextSegment.point = position - vector;
|
||||||
}
|
}
|
||||||
path.smooth();
|
path.smooth();
|
||||||
|
@ -47,4 +47,4 @@
|
||||||
<body>
|
<body>
|
||||||
<canvas id="canvas" resize></canvas>
|
<canvas id="canvas" resize></canvas>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue