clean up codec transferrable object allocation and encoding
This commit is contained in:
parent
f5941befaf
commit
4ce39c75b5
3 changed files with 39 additions and 31 deletions
|
|
@ -475,9 +475,9 @@ kiri.worker = {
|
|||
const state = { zeros: [] };
|
||||
const emit = { progress, message };
|
||||
if (layer) {
|
||||
emit.layer = codec.encode(layer, state)
|
||||
emit.layer = codec.encode(layer, state);
|
||||
}
|
||||
send.data(emit);
|
||||
send.data(emit, state.zeros);
|
||||
});
|
||||
|
||||
const unitScale = settings.controller.units === 'in' ? (1 / 25.4) : 1;
|
||||
|
|
@ -656,7 +656,7 @@ dispatch.onmessage = self.onmessage = function(e) {
|
|||
// if (direct && direct.length) {
|
||||
// console.log({
|
||||
// zeros: direct.length,
|
||||
// sz:direct.map(z => z.byteLength).reduce((a,v) => a+v)
|
||||
// sz:direct.map(z => z.byteLength)
|
||||
// });
|
||||
// }
|
||||
dispatch.send({
|
||||
|
|
|
|||
Loading…
Reference in a new issue