Bump version to 3.8.1

Fix dialog texture import
Fix piglin skin model
This commit is contained in:
JannisX11 2021-03-08 22:42:06 +01:00
parent 7be6eca989
commit ce6ba0e178
6 changed files with 14 additions and 8 deletions

View File

@ -25,7 +25,7 @@
<script> <script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined'; const isApp = typeof require !== 'undefined';
const appVersion = '3.8.0'; const appVersion = '3.8.1';
</script> </script>
<div id="loading_error_message" style="display: none;"> <div id="loading_error_message" style="display: none;">
<div>An error occurred while loading Blockbench</div> <div>An error occurred while loading Blockbench</div>

View File

@ -205,6 +205,7 @@ function buildForm(dialog) {
bar.on('click', e => { bar.on('click', e => {
function fileCB(files) { function fileCB(files) {
data.value = files[0].path; data.value = files[0].path;
data.content = files[0].content;
input.val(data.value); input.val(data.value);
dialog.updateFormValues() dialog.updateFormValues()
} }
@ -214,7 +215,8 @@ function buildForm(dialog) {
resource_id: data.resource_id, resource_id: data.resource_id,
extensions: data.extensions, extensions: data.extensions,
type: data.filetype, type: data.filetype,
startpath: data.value startpath: data.value,
readtype: data.readtype
}, fileCB); }, fileCB);
break; break;
case 'folder': case 'folder':
@ -369,6 +371,9 @@ window.Dialog = class Dialog {
case 'checkbox': case 'checkbox':
result[form_id] = data.bar.find('input#'+form_id).is(':checked') result[form_id] = data.bar.find('input#'+form_id).is(':checked')
break; break;
case 'file':
result[form_id] = isApp ? data.value : data.content;
break;
} }
} }
} }

View File

@ -372,7 +372,7 @@ function resizeWindow(event) {
} }
Blockbench.dispatchEvent('resize_window', event); Blockbench.dispatchEvent('resize_window', event);
} }
$(window).on('resize orientationchange', resizeWindow)
window.addEventListener('resize', resizeWindow); window.addEventListener('resize', resizeWindow);
window.addEventListener('orientationchange', () => { window.addEventListener('orientationchange', () => {
setTimeout(resizeWindow, 100) setTimeout(resizeWindow, 100)

View File

@ -315,6 +315,7 @@ const skin_dialog = new Dialog({
label: 'dialog.skin.texture', label: 'dialog.skin.texture',
type: 'file', type: 'file',
extensions: ['png'], extensions: ['png'],
readtype: 'image',
filetype: 'PNG', filetype: 'PNG',
}, },
pose: {type: 'checkbox', label: 'dialog.skin.pose', value: true}, pose: {type: 'checkbox', label: 'dialog.skin.pose', value: true},
@ -3358,7 +3359,7 @@ skin_presets.pig = `{
}`; }`;
skin_presets.piglin = `{ skin_presets.piglin = `{
"name": "piglin", "name": "piglin",
"texturewidth": 128, "texturewidth": 64,
"textureheight": 64, "textureheight": 64,
"eyes": [ "eyes": [
[10, 11, 1, 1], [10, 11, 1, 1],
@ -3382,7 +3383,7 @@ skin_presets.piglin = `{
"pivot": [4.5, 30, 0], "pivot": [4.5, 30, 0],
"rotation": [0, 0, -25], "rotation": [0, 0, -25],
"cubes": [ "cubes": [
{"name": "Head", "origin": [4.5, 25, -2], "size": [1, 5, 4], "uv": [57, 38]} {"name": "Head", "origin": [4.5, 25, -2], "size": [1, 5, 4], "uv": [51, 6]}
] ]
}, },
{ {
@ -3391,7 +3392,7 @@ skin_presets.piglin = `{
"pivot": [-4.5, 30, 0], "pivot": [-4.5, 30, 0],
"rotation": [0, 0, 25], "rotation": [0, 0, 25],
"cubes": [ "cubes": [
{"name": "Head", "origin": [-5.5, 25, -2], "size": [1, 5, 4], "uv": [57, 22]} {"name": "Head", "origin": [-5.5, 25, -2], "size": [1, 5, 4], "uv": [39, 6]}
] ]
}, },
{ {

View File

@ -1,7 +1,7 @@
{ {
"name": "Blockbench", "name": "Blockbench",
"description": "Model editing and animation software", "description": "Model editing and animation software",
"version": "3.8.0", "version": "3.8.1",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"author": { "author": {
"name": "JannisX11", "name": "JannisX11",

File diff suppressed because one or more lines are too long