mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add comments.
This commit is contained in:
parent
fafb6d1d76
commit
263fa8cbd9
1 changed files with 8 additions and 3 deletions
|
@ -16,13 +16,18 @@
|
|||
|
||||
var PathFlattener = Base.extend({
|
||||
initialize: function(path) {
|
||||
this.parts = [];
|
||||
this.curves = [];
|
||||
this.length = 0;
|
||||
this.curves = []; // The curve values as returned by getCurveValues()
|
||||
this.parts = []; // The calculated, subdivided parts of the path
|
||||
this.length = 0; // The total length of the path
|
||||
// Keep a current index from the part where we last where in
|
||||
// getParameter(), to optimise for iterator-like usage of the flattener.
|
||||
this.index = 0;
|
||||
|
||||
// Instead of relying on path.curves, we only use segments here and
|
||||
// get the curve values from them.
|
||||
|
||||
// Now walk through all curves and compute the parts for each of them,
|
||||
// by recursively calling _computeParts().
|
||||
var segments = path._segments,
|
||||
segment1 = segments[0],
|
||||
segment2,
|
||||
|
|
Loading…
Reference in a new issue