fix improper re-use of codec state
This commit is contained in:
parent
70e0e62e3e
commit
0fb163ce10
1 changed files with 2 additions and 2 deletions
|
|
@ -100,15 +100,15 @@ kiri.minions = {
|
|||
let polyper = Math.ceil(polys.length / concurrent);
|
||||
let running = 0;
|
||||
let union = [];
|
||||
let state = { zeros: [] };
|
||||
let receiver = function(data) {
|
||||
let polys = codec.decode(data.union, state);
|
||||
let polys = codec.decode(data.union);
|
||||
union.appendAll(polys);
|
||||
if (--running === 0) {
|
||||
resolve(POLY.union(union, minarea, true));
|
||||
}
|
||||
};
|
||||
for (let i=0; i<polys.length; i += polyper) {
|
||||
let state = { zeros: [] };
|
||||
running++;
|
||||
minwork.queue({
|
||||
cmd: "union",
|
||||
|
|
|
|||
Loading…
Reference in a new issue