diff --git a/.travis.yml b/.travis.yml index d6743a3..66189f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ jobs: os: linux script: - sudo apt-get install rpm + - npm install electron@13.5.2 - electron-builder --publish=onTagOrDraft cache: diff --git a/js/interface/panels.js b/js/interface/panels.js index ddf3906..778dee7 100644 --- a/js/interface/panels.js +++ b/js/interface/panels.js @@ -192,7 +192,9 @@ class Panel { let show = BARS.condition(this.condition) if (show) { $(this.node).show() - if (Interface.data.left_bar.includes(this.id)) { + if (Blockbench.isMobile) { + this.width = this.node.clientWidth; + } else if (Interface.data.left_bar.includes(this.id)) { this.width = Interface.data.left_bar_width } else if (Interface.data.right_bar.includes(this.id)) { this.width = Interface.data.right_bar_width diff --git a/js/io/format.js b/js/io/format.js index d50892e..c6ce912 100644 --- a/js/io/format.js +++ b/js/io/format.js @@ -24,7 +24,7 @@ class ModelFormat { ModelFormat.properties[id].merge(this, data); } } - select(converting) { + select() { if (Format && typeof Format.onDeactivation == 'function') { Format.onDeactivation() } @@ -32,9 +32,6 @@ class ModelFormat { if (typeof this.onActivation == 'function') { Format.onActivation() } - if (!converting || !this.optional_box_uv) { - Project.box_uv = Format.box_uv; - } buildGrid() if (Format.centered_grid) { scene.position.set(0, 0, 0); @@ -47,12 +44,6 @@ class ModelFormat { } }) Interface.Panels.animations.inside_vue._data.animation_files_enabled = this.animation_files; - // Todo: toggle animated textures in UV editor - for (var key in ModelProject.properties) { - if (Project[key] == undefined) { - ModelProject.properties[key].reset(Project); - } - } Interface.status_bar.vue.Format = this; Modes.vue.$forceUpdate() updateInterfacePanels() @@ -73,9 +64,12 @@ class ModelFormat { Project.export_path = ''; var old_format = Format - this.select(true) + this.select(); Modes.options.edit.select() + // Box UV + if (!this.optional_box_uv) Project.box_uv = this.box_uv; + //Bone Rig if (!Format.bone_rig && old_format.bone_rig) { Group.all.forEach(group => { diff --git a/js/io/project.js b/js/io/project.js index e58e2f2..8020a7e 100644 --- a/js/io/project.js +++ b/js/io/project.js @@ -8,7 +8,7 @@ class ModelProject { this.locked = false; this.thumbnail = ''; - this._box_uv = false; + this._box_uv = options.format ? options.format.box_uv : false; this._texture_width = 16; this._texture_height = 16; @@ -336,7 +336,7 @@ new Property(ModelProject, 'number', 'shadow_size', { ModelProject.all = []; -let Project = 0;// = new ModelProject(); +let Project = 0; let ProjectData = {}; diff --git a/js/web.js b/js/web.js index 65ffa2c..4a4bf89 100644 --- a/js/web.js +++ b/js/web.js @@ -85,8 +85,7 @@ function setupMobilePanelSelector() { if (panel instanceof Panel) { overlay.append(panel.node); overlay.show(); - $(panel.node).show(); - if (panel.onResize) panel.onResize(); + panel.update(); } else { overlay.hide(); } diff --git a/package-lock.json b/package-lock.json index 83ea102..71009c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "Blockbench", - "version": "4.0.0-beta.5", + "version": "4.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2602,9 +2602,9 @@ } }, "core-js": { - "version": "3.18.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.2.tgz", - "integrity": "sha512-zNhPOUoSgoizoSQFdX1MeZO16ORRb9FFQLts8gSYbZU5FcgXhp24iMWMxnOQo5uIaIG7/6FA/IqJPwev1o9ZXQ==", + "version": "3.18.3", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.18.3.tgz", + "integrity": "sha512-tReEhtMReZaPFVw7dajMx0vlsz3oOb8ajgPoHVYGxr8ErnZ6PcYEvvmjGmXlfpnxpkYSdOQttjB+MvVbCGfvLw==", "dev": true, "optional": true }, @@ -2864,9 +2864,9 @@ }, "dependencies": { "@types/node": { - "version": "14.17.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.21.tgz", - "integrity": "sha512-zv8ukKci1mrILYiQOwGSV4FpkZhyxQtuFWGya2GujWg+zVAeRQ4qbaMmWp9vb9889CFA8JECH7lkwCL6Ygg8kA==", + "version": "14.17.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.27.tgz", + "integrity": "sha512-94+Ahf9IcaDuJTle/2b+wzvjmutxXAEXU6O81JHblYXUg2BDG+dnBy7VxIPHKAyEEDHzCMQydTJuWvrE+Aanzw==", "dev": true } } diff --git a/package.json b/package.json index b2874d6..67a9b64 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Blockbench", "description": "Low-poly modeling and animation software", - "version": "4.0.0", + "version": "4.0.1", "license": "GPL-3.0-or-later", "author": { "name": "JannisX11",