memory optimization: defer wasm load, reduce point/poly default fields
This commit is contained in:
parent
32acfe376d
commit
069a599ead
5 changed files with 32 additions and 32 deletions
|
|
@ -42,13 +42,13 @@
|
|||
this.key = key || [x, y, z].toString();
|
||||
}
|
||||
this.poly = null; // parent polygon
|
||||
this.dist = 0.0; // for group intersection sorting and tests
|
||||
this.p1 = null; // used in sliceIntersect(), connectLines() and intersect()
|
||||
this.p2 = null; // used in sliceIntersect(), connectLines() and intersect()
|
||||
// this.dist = 0.0; // for group intersection sorting and tests
|
||||
// this.p1 = null; // used in sliceIntersect(), connectLines() and intersect()
|
||||
// this.p2 = null; // used in sliceIntersect(), connectLines() and intersect()
|
||||
this.pos = 0; // position in group
|
||||
this.mod = 0; // group length (for modulus of pos)
|
||||
this.del = false; // for culling
|
||||
this.group = null; // for grouping in slice intersect, offset lines in trace
|
||||
// this.mod = 0; // group length (for modulus of pos)
|
||||
// this.del = false; // for culling
|
||||
// this.group = null; // for grouping in slice intersect, offset lines in trace
|
||||
}
|
||||
|
||||
/** ******************************************************************
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@
|
|||
this.area2 = 0.0; // computed as 2x area (sign = direction)
|
||||
this.perim = 0.0; // for caching the result
|
||||
this.bounds = new Bounds();
|
||||
this.inner = null; // array of enclosed polygons (if any)
|
||||
// this.inner = null; // array of enclosed polygons (if any)
|
||||
this.parent = null; // enclosing parent polygon
|
||||
this.depth = 0; // depth nested from top parent (density for support fill)
|
||||
this.delete = false; // for culling during tracing
|
||||
this.fillang = null; // hinted fill angle
|
||||
this.fill = null; // fill lines (only used by supports currently)
|
||||
// this.fillang = null; // hinted fill angle
|
||||
// this.fill = null; // fill lines (only used by supports currently)
|
||||
if (points) this.addPoints(points);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue