fix this/self in sla setup
This commit is contained in:
parent
9ab310d2a3
commit
77a5da7645
3 changed files with 5 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ let BASE = self.base,
|
|||
POLY = BASE.polygons,
|
||||
time = UTIL.time,
|
||||
qtpi = Math.cos(Math.PI/4),
|
||||
ccvalue = navigator ? navigator.hardwareConcurrency || 0 : 0,
|
||||
ccvalue = this.navigator ? navigator.hardwareConcurrency || 0 : 0,
|
||||
concurrent = self.Worker && ccvalue > 3 ? ccvalue - 1 : 0,
|
||||
current = self.worker = {
|
||||
print: null,
|
||||
|
|
|
|||
|
|
@ -411,9 +411,8 @@
|
|||
// return { image, lines };
|
||||
}
|
||||
|
||||
if (!this.navigator && this.process && this.process.env) {
|
||||
if (!self.navigator && self.process && self.process.env) {
|
||||
let fs = require('fs');
|
||||
let self = this;
|
||||
eval(fs.readFileSync("src/add/class.js").toString());
|
||||
let args = process.argv.slice(2);
|
||||
let file = args.shift();
|
||||
|
|
@ -426,7 +425,7 @@
|
|||
layers5: cxdlp.layers.slice(0,5),
|
||||
lines1: cxdlp.get_layer_lines(1)
|
||||
});
|
||||
} else if (this.navigator) {
|
||||
this.CXDLP = CXDLP;
|
||||
} else if (self.navigator) {
|
||||
self.CXDLP = CXDLP;
|
||||
}
|
||||
}());
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@
|
|||
ctx.closePath();
|
||||
}
|
||||
|
||||
this.photon = {
|
||||
self.photon = {
|
||||
generatePhoton,
|
||||
generatePhotons,
|
||||
renderLayer,
|
||||
|
|
|
|||
Loading…
Reference in a new issue