Przeglądaj źródła

Fix entities with extra height getting cut off when fitting the world

tags/v0.1.0
Fen Dweller 5 lat temu
rodzic
commit
31e6fc3caf
1 zmienionych plików z 6 dodań i 1 usunięć
  1. +6
    -1
      macrovision.js

+ 6
- 1
macrovision.js Wyświetl plik

@@ -1343,7 +1343,12 @@ function fitWorld() {
Object.entries(entities).forEach(([key, entity]) => {
const view = entity.view;

max = fitMode.binop(max, entity.views[view].height.toNumber("meter"));
let extra = entity.views[view].image.extra;
extra = extra === undefined ? 1 : extra;
let bottom = entity.views[view].image.bottom;
bottom = bottom === undefined ? 0 : bottom;

max = fitMode.binop(max, math.multiply(extra * (1 - bottom), entity.views[view].height.toNumber("meter")));
count += 1;
});



Ładowanie…
Anuluj
Zapisz