disable wasm. move clip offset to slicePost

This commit is contained in:
Stewart Allen 2021-06-25 21:43:47 -04:00
commit ef9e8fb11a
8 changed files with 26 additions and 39 deletions

View file

@ -93,9 +93,10 @@ const funcs = {
}
let output = [];
for (let params of slices) {
let rec = KIRI.slicer.sliceZ(params.z, realp, options, params);
output.push({
params,
data: { tops: KIRI.slicer.sliceZ(params.z, realp, options, params).tops }
data: { tops: rec.tops, clip: rec.clip }
});
}
reply({ seq, output: CODEC.encode(output) });

View file

@ -339,11 +339,12 @@
function createSlice(params, data, options = {}) {
let { index, z, height, thick } = params;
let { lines, groups, tops } = data;
let { lines, groups, tops, clip } = data;
let slice = newSlice(z).addTops(tops);
slice.height = height;
slice.index = index;
slice.thick = thick;
slice.clips = clip;
// debugging (non-threaded mode only)
let { debug, xray, view } = options;
if (view && (debug || xray)) {