This commit is contained in:
JannisX11 2020-03-14 21:32:24 +01:00
parent 7941f20437
commit a0e56fb25b
12 changed files with 46 additions and 41 deletions

View File

@ -17,6 +17,8 @@ matrix:
script:
- electron-builder -w --x64 --publish=always
- electron-builder -w --ia32 --publish=always -c.productName='Blockbench_32bit'
provider: releases
file: dist/win-unpacked/resources/app.asar
- name: "Linux"
os: linux
@ -33,8 +35,5 @@ install:
- nvm install 10
- npm install electron-builder
script:
- electron-builder --publish=always
notifications:
email: false

View File

@ -27,7 +27,7 @@
dialog {
width: 540px;
min-width: 370px;
min-width: min(370px, 100%);
height: auto;
background-color: var(--color-ui);
color: inherit;
@ -57,7 +57,7 @@
margin-left: auto;
}
.dialog:not(.ui-resizable) {
min-width: 400px;
min-width: min(400px, 100%);
max-width: 660px;
}
.dialog.paddinged {
@ -173,11 +173,6 @@
}
/*Settings Dialog*/
dialog#settings {
min-width: 400px;
max-width: 640px;
width: 100%;
}
#settings_tab_bar {
margin: -24px;
margin-bottom: 0;
@ -212,6 +207,7 @@
width: 100%;
max-height: 600px;
overflow-y: scroll;
clear: both;
}
#settingslist li > ul {
margin-left: 24px;
@ -279,6 +275,12 @@
}
/*Keybinds*/
#keybindlist {
max-height: 600px;
padding-bottom: 25px;
overflow-y: scroll;
clear: both;
}
#keybindlist .tool {
height: 30px;
width: 25px;
@ -315,11 +317,6 @@
#keybindlist > li > ul > li {
position: relative;
}
#keybindlist {
max-height: 600px;
padding-bottom: 25px;
overflow-y: scroll;
}
#keybindlist > li {
width: 100%;
min-height: 34px;

View File

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

View File

@ -1428,6 +1428,7 @@ enterDisplaySettings = function() { //Enterung Display Setting Mode, changes th
selected.empty()
updateSelection()
display_base.add(scene)
if (!display_preview) {
display_preview = new Preview({id: 'display'})
}

View File

@ -214,6 +214,7 @@ class Menu {
if (offset_left > $(window).width() - el_width) {
offset_left -= el_width
if (position && position.clientWidth) offset_left += position.clientWidth;
}
if (offset_top > $(window).height() - el_height ) {
offset_top -= el_height
@ -565,7 +566,8 @@ const MenuBar = {
icon: 'label',
name: p.name,
click: function() {
display_presets.splice(display_presets.indexOf(p),1)
display_presets.splice(display_presets.indexOf(p), 1);
localStorage.setItem('display_presets', JSON.stringify(display_presets))
}
})
}

View File

@ -731,11 +731,12 @@ class Cube extends NonGroup {
resize(val, axis, negative, allow_negative) {
var before = this.oldScale != undefined ? this.oldScale : this.size(axis);
var modify = val instanceof Function ? val : n => (n+val)
if (Format.integer_size && Project.box_uv) {
val = Math.ceil(val);
}
if (!negative) {
var pos = limitToBox(this.from[axis] + modify(before), this.inflate);
if (Format.integer_size && Project.box_uv) {
pos = Math.round(pos);
}
if (pos >= this.from[axis] || settings.negative_size.value || allow_negative) {
this.to[axis] = pos;
} else {

View File

@ -659,6 +659,10 @@ function loadOutlinerDraggable() {
$('li.outliner_node:not(.ui-droppable) > div.outliner_object').draggable({
delay: 120,
revertDuration: 50,
revert: 'invalid',
appendTo: 'body',
zIndex: 19,
cursorAt: {left: 5},
helper: function() {
var item = Outliner.root.findRecursive('uuid', $(this).attr('id'))
var helper = $(this).clone()
@ -672,10 +676,6 @@ function loadOutlinerDraggable() {
})
return helper;
},
revert: 'invalid',
appendTo: 'body',
zIndex: 19,
cursorAt: {left: 5},
drag: function(event, ui) {
$('.outliner_node[order]').attr('order', null)
if ($('#cubes_list.drag_hover').length === 0) {

View File

@ -1243,7 +1243,6 @@ function initCanvas() {
display_scene.add(display_area)
display_area.add(display_base)
display_base.add(scene)
scene.name = 'scene'
display_base.name = 'display_base'
@ -1593,6 +1592,7 @@ function buildGrid() {
Canvas.side_grids.x.visible = !Modes.display;
Canvas.side_grids.x.rotation.z = Math.PI/2;
Canvas.side_grids.x.position.y = Format.centered_grid ? 8 : 0;
Canvas.side_grids.z.position.y = -512
Canvas.side_grids.x.children.forEach(el => {
el.layers.set(1)
});
@ -1603,6 +1603,7 @@ function buildGrid() {
Canvas.side_grids.z.rotation.z = Math.PI/2;
Canvas.side_grids.z.rotation.y = Math.PI/2
Canvas.side_grids.z.position.y = Format.centered_grid ? 8 : 0;
Canvas.side_grids.z.position.z = -512
Canvas.side_grids.z.children.forEach(el => {
el.layers.set(3)
});

View File

@ -799,6 +799,11 @@ BARS.defineActions(function() {
},
onSelect: function() {
Painter.updateNslideValues()
},
onUnselect: function() {
uv_dialog.all_editors.forEach(editor => {
editor.brush_outline.detach()
})
}
})
new Tool('fill_tool', {

View File

@ -439,6 +439,7 @@ class Texture {
}
this.source = this.source.replace(/\?\d+$/, '?' + tex_version)
this.load();
this.updateMaterial()
TickUpdates.main_uv = true;
TickUpdates.texture_list = true;
}
@ -995,17 +996,18 @@ function loadTextureDraggable() {
setTimeout(function() {
$('li.texture:not(.ui-draggable)').draggable({
revertDuration: 0,
cursorAt: { left: 2, top: -5 },
revert: 'invalid',
appendTo: 'body',
zIndex: 19,
distance: 12,
delay: 120,
helper: function(e) {
var t = $(e.target)
if (!t.hasClass('texture')) t = t.parent()
if (!t.hasClass('texture')) t = t.parent()
return t.find('.texture_icon_wrapper').clone().addClass('texture_drag_helper').attr('texid', t.attr('texid'))
},
cursorAt: { left: 2, top: -5 },
revert: 'invalid',
appendTo: 'body',
zIndex: 19,
distance: 4,
drag: function(event, ui) {
$('.outliner_node[order]').attr('order', null)
var tar = $('#cubes_list li .drag_hover.outliner_node').deepest()

View File

@ -304,23 +304,23 @@ class UVEditor {
}
})
//Paint brush outline
var brush_outline = $('<div id="uv_brush_outline"></div>');
this.brush_outline = $('<div id="uv_brush_outline"></div>');
scope.jquery.frame.on('mouseenter mousemove', e => {
if (Modes.paint && Toolbox.selected.brushTool) {
scope.jquery.frame.append(brush_outline);
scope.jquery.frame.append(this.brush_outline);
var pixel_size = scope.inner_width / (scope.texture ? scope.texture.width : Project.texture_width);
//pos
let offset = BarItems.slider_brush_size.get()%2 == 0 && Toolbox.selected.brushTool ? 0.5 : 0;
let left = (0.5 - offset + Math.floor(e.offsetX / pixel_size + offset)) * pixel_size;
let top = (0.5 - offset + Math.floor(e.offsetY / pixel_size + offset)) * pixel_size;
brush_outline.css('left', left+'px').css('top', top+'px');
this.brush_outline.css('left', left+'px').css('top', top+'px');
//size
var radius = (BarItems.slider_brush_size.get()/2) * pixel_size;
brush_outline.css('padding', radius+'px').css('margin', (-radius)+'px');
this.brush_outline.css('padding', radius+'px').css('margin', (-radius)+'px');
}
})
scope.jquery.frame.on('mouseleave', e => {
brush_outline.detach();
this.brush_outline.detach();
})
this.setSize(this.size)
return this;
@ -330,11 +330,8 @@ class UVEditor {
var box = $('<div class="uv_message_box">' + msg + '</div>')
this.jquery.main.append(box)
setTimeout(function() {
box.fadeOut(200)
setTimeout(function() {
box.remove()
}, 300)
}, 1000)
box.remove()
}, 1200)
}
//Brush
getBrushCoordinates(event, tex) {

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Model editing and animation software",
"version": "3.4.1",
"version": "3.4.2",
"license": "MIT",
"author": {
"name": "JannisX11",