4.0 Beta 2 [ci-build]

Fix restrict brush to side + face fill tool, closes #1015
master
JannisX11 2021-09-16 17:54:49 +02:00
parent 2c98c43754
commit ee5fdb2be7
5 changed files with 23 additions and 11 deletions

View File

@ -25,7 +25,7 @@
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '4.0.0-beta.1';
const appVersion = '4.0.0-beta.2';
if (localStorage.getItem('theme')) {

View File

@ -61,7 +61,6 @@ var codec = new Codec('project', {
},
load(model, file, add) {
console.log(model)
newProject(Formats[model.meta.model_format] || Formats.free);
var name = pathToName(file.path, true);
if (file.path && isApp && !file.no_file ) {

View File

@ -254,12 +254,26 @@ const Painter = {
ctx.beginPath();
if (uvTag) {
let anim_offset = texture.display_height * texture.currentFrame;
var rect = Painter.editing_area = [
uvTag[0] * uvFactorX,
uvTag[1] * uvFactorY + anim_offset,
uvTag[2] * uvFactorX,
uvTag[3] * uvFactorY + anim_offset
]
if (uvTag instanceof Array) {
var rect = Painter.editing_area = [
uvTag[0] * uvFactorX,
uvTag[1] * uvFactorY + anim_offset,
uvTag[2] * uvFactorX,
uvTag[3] * uvFactorY + anim_offset
]
} else {
let min_x = Project.texture_width, min_y = Project.texture_height, max_x = 0, max_y = 0;
for (let vkey in uvTag) {
min_x = Math.min(min_x, uvTag[vkey][0]); max_x = Math.max(max_x, uvTag[vkey][0]);
min_y = Math.min(min_y, uvTag[vkey][1]); max_y = Math.max(max_y, uvTag[vkey][1]);
}
var rect = Painter.editing_area = [
Math.floor(min_x * uvFactorX),
Math.floor(min_y * uvFactorY) + anim_offset,
Math.ceil(max_x * uvFactorX),
Math.ceil(max_y * uvFactorY) + anim_offset
]
}
} else {
var rect = Painter.editing_area = [0, 0, texture.img.naturalWidth, texture.img.naturalHeight]
}
@ -360,7 +374,6 @@ const Painter = {
ctx.globalAlpha = b_opacity;
ctx.fillStyle = 'white';
ctx.globalCompositeOperation = 'destination-out';
console.log(ctx.globalCompositeOperation)
} else {
ctx.fillStyle = tinycolor(ColorPanel.get()).setAlpha(b_opacity).toRgbString();
}

File diff suppressed because one or more lines are too long

View File

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