Skip to content

Commit

Permalink
v3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Aug 1, 2019
1 parent d5426e9 commit 32dab97
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 32 deletions.
4 changes: 4 additions & 0 deletions css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@
pointer-events: none;
}

#no_css_message {
display: none !important;
}

.spinning {
-webkit-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
Expand Down
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '3.0.5';
const appVersion = '3.0.6';
</script>
<script src="lib/vue.min.js"></script>
<script src="lib/vue_sortable.js"></script>
Expand Down Expand Up @@ -767,6 +767,11 @@ <h2 class="tl i_b">dialog.settings.about</h2>
<div id="blackout" onclick="$('.dialog#'+open_dialog).find('.cancel_btn:not([disabled])').click()"></div>

<div id="main_toolbar">
<div style="color: #fff; text-align: center; font-family: segoe ui, sans-serif;" id="no_css_message">
<br><h1>Oops...</h1>
<p>It looks like your internet connection was too unstable to automatically update Blockbench.</p>
<p>Download and run <a style="color: #75b1ff" href="https://blockbench.net/downloads/">the installer</a> to update manually. Your custom settings will remain untouched.</p>
</div>
<div class="toolbar_wrapper narrow tools"></div>
<div class="toolbar_wrapper narrow mobile_side"></div>

Expand Down
15 changes: 9 additions & 6 deletions js/blockbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,21 +194,24 @@ function updateNslideValues() {
}
}
function setProjectResolution(width, height, modify_uv) {
if (Project.texture_width / width != Project.texture_width / height) {
modify_uv = false;
}

Undo.initEdit({uv_mode: true, elements: Cube.all, uv_only: true})

let old_res = {
x: Project.texture_width,
y: Project.texture_height
}
Project.texture_width = width;
Project.texture_height = height;

if (Project.texture_width / old_res.x != Project.texture_width / old_res.y) {
modify_uv = false;
}

if (modify_uv) {
var multiplier = [
Project.texture_width/entityMode.old_res.x,
Project.texture_height/entityMode.old_res.y
Project.texture_width/old_res.x,
Project.texture_height/old_res.y
]
function shiftCube(cube, axis) {
if (Project.box_uv) {
Expand All @@ -228,7 +231,7 @@ function setProjectResolution(width, height, modify_uv) {
Cube.all.forEach(cube => shiftCube(cube, 1));
}
}

Undo.finishEdit('Changed project resolution')
Canvas.updateAllUVs()
if (selected.length) {
main_uv.loadData()
Expand Down
31 changes: 8 additions & 23 deletions js/io/bedrock_old.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,9 @@ function parseGeometry(data) {
data = pe_list_data[0]
}
}
Project.geometry_name = data.name.replace(/^geometry\./, '')
Project.texture_width = 64
Project.texture_height = 64

if (data.object.texturewidth !== undefined) {
Project.texture_width = data.object.texturewidth
}
if (data.object.textureheight !== undefined) {
Project.texture_height = data.object.textureheight
}
entityMode.old_res.x = Project.texture_width
entityMode.old_res.y = Project.texture_height
Project.geometry_name = data.name.replace(/^geometry\./, '');
Project.texture_width = data.object.texturewidth || 64;
Project.texture_height = data.object.textureheight || 64;

var bones = {}

Expand Down Expand Up @@ -164,19 +155,13 @@ var codec = new Codec('bedrock_old', {
bone.rotation[ri] *= -1
})
}
if (g.reset) {
bone.reset = true
}
if (g.mirror_uv) {
bone.mirror = true
}
if (g.material) {
bone.material = g.material
}
//Cubes
if (g.reset) bone.reset = true;
if (g.mirror_uv) bone.mirror = true;
if (g.material) bone.material = g.material;

//Elements
var cubes = []
var locators = {};

for (var obj of g.children) {
if (obj.export) {
if (obj instanceof Cube) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Model editing and animation software",
"version": "3.0.5",
"version": "3.0.6",
"license": "MIT",
"author": {
"name": "JannisX11",
Expand Down Expand Up @@ -80,6 +80,6 @@
"devDependencies": {
"async": "^2.4.1",
"electron": "5.0.6",
"electron-builder": "^21.1.1"
"electron-builder": "^21.2.0"
}
}

0 comments on commit 32dab97

Please sign in to comment.