mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-06-14 06:00:53 -04:00
Path# rename #pointsToCurves to #simplify and #curvesToPoints to #flatten.
This commit is contained in:
parent
322a427208
commit
a2a8939d5d
5 changed files with 24 additions and 19 deletions
examples/Scripts
|
@ -22,12 +22,12 @@
|
|||
var length = curve.length;
|
||||
var step = 10;
|
||||
var iteratively = false;
|
||||
var curvesToPoints = true;
|
||||
var flatten = true;
|
||||
var num = Math.floor(length / step);
|
||||
var prev = 0;
|
||||
if (curvesToPoints) {
|
||||
if (flatten) {
|
||||
var clone = path.clone();
|
||||
clone.curvesToPoints(step);
|
||||
clone.flatten(step);
|
||||
for (var i = 0; i < clone.segments.length; i++) {
|
||||
var point = clone.segments[i].point;
|
||||
var circle = new Path.Circle(point, step / 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue