safari workaround for workers. disable decals in dark mode. add client listener before starting client
This commit is contained in:
parent
210855bcf9
commit
08d76c8b2f
4 changed files with 10 additions and 7 deletions
|
|
@ -191,7 +191,8 @@
|
|||
});
|
||||
UC.setHoverPop(false);
|
||||
updateFPS();
|
||||
if (control.decals) {
|
||||
if (control.decals && !control.dark) {
|
||||
// disable decals in dark mode
|
||||
loadDeviceTexture(currentDevice, deviceTexture);
|
||||
} else {
|
||||
clearDeviceTexture();
|
||||
|
|
@ -909,7 +910,9 @@
|
|||
function loadDeviceTexture(dev, texture) {
|
||||
clearDeviceTexture();
|
||||
deviceTexture = texture;
|
||||
if (!(texture && API.conf.get().controller.decals)) {
|
||||
let { decals, dark } = API.conf.get().controller;
|
||||
// disable decals in dark mode
|
||||
if (!(texture && decals && !dark)) {
|
||||
return;
|
||||
}
|
||||
let { width, height } = texture.image;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ function init() {
|
|||
}, 100);
|
||||
space.view.setZoom(zoomrev, zoomspd);
|
||||
|
||||
// reload stored space when worker is ready
|
||||
moto.client.on('ready', restore_space);
|
||||
|
||||
// start worker
|
||||
moto.client.start(`/code/mesh_work?${gapp.version}`);
|
||||
|
||||
|
|
@ -67,9 +70,6 @@ function init() {
|
|||
|
||||
// trigger ui building
|
||||
call.ui_build();
|
||||
|
||||
// reload stored space
|
||||
moto.client.on('ready', restore_space);
|
||||
}
|
||||
|
||||
// restore space layout and view from previous session
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ let tool = {
|
|||
}
|
||||
},
|
||||
|
||||
analyze(models, opt = { compound: false }) {
|
||||
analyze(models, opt = { compound: true }) {
|
||||
models = fallback(models);
|
||||
api.log.emit('analyzing mesh(es)...').pin();
|
||||
let promises = [];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
let moto = self.moto = self.moto || {},
|
||||
ccvalue = self.navigator ? navigator.hardwareConcurrency || 1 : 1,
|
||||
ccmax = ccvalue > 3 ? ccvalue - 1 : 0,
|
||||
ccmax = ccvalue > 3 ? ccvalue - 1 : 1,
|
||||
workcc = false, // concurrent or not
|
||||
workurl = null, // url to load worker
|
||||
worknum = 1, // number of workers to start
|
||||
|
|
|
|||
Loading…
Reference in a new issue