Fix texture meshes not importing from some files

Fix texture mesh shading direction
Bump version
This commit is contained in:
JannisX11 2022-02-10 21:20:24 +01:00
parent c6c596bed9
commit cd4b366e7a
5 changed files with 6 additions and 5 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.1.4';
const appVersion = '4.1.5';
if (localStorage.getItem('theme')) {

View File

@ -21,6 +21,7 @@ const Blockbench = {
reload() {
localStorage.removeItem('backup_model')
if (isApp) {
Blockbench.setProgress(0)
Blockbench.addFlag('allow_closing')
Blockbench.addFlag('allow_reload')
currentwindow.reload()

View File

@ -492,7 +492,7 @@ function calculateVisibleBox() {
texture_mesh.local_pivot[2] *= -1;
texture_mesh.origin[1] *= -1;
texture_mesh.origin[1] += b.pivot[1];
if (b.pivot) texture_mesh.origin[1] += b.pivot[1];
texture_mesh.origin[0] *= -1;
texture_mesh.rotation[0] *= -1;

View File

@ -216,14 +216,14 @@ new NodePreviewController(TextureMesh, {
ex += 0.4 * -dir;
sy += 0.1;
ey -= 0.1;
addNormal(dir, 0, 0);
addNormal(-dir, 0, 0);
}
if (sy == ey) {
sy += 0.1 * dir;
ey += 0.4 * dir;
sx += 0.1;
ex -= 0.1;
addNormal(0, 0, dir);
addNormal(0, 0, -dir);
}
uvs.push(
ex / canvas.width, 1 - (sy / canvas.height),

View File

@ -1,7 +1,7 @@
{
"name": "Blockbench",
"description": "Low-poly modeling and animation software",
"version": "4.1.4",
"version": "4.1.5",
"license": "GPL-3.0-or-later",
"author": {
"name": "JannisX11",