Ver código fonte

Make the view zoom to keep up when using the grow/shrink buttons

tags/v0.1.0
Fen Dweller 5 anos atrás
pai
commit
3ef2c1f325
1 arquivos alterados com 10 adições e 0 exclusões
  1. +10
    -0
      macrovision.js

+ 10
- 0
macrovision.js Ver arquivo

@@ -1322,6 +1322,16 @@ function doSize() {
updateViewOptions(entity, entity.view);
updateSizes(true);
sizeDirection *= 1.05;

const ownHeight = entity.views[entity.view].height.toNumber("meters");
const worldHeight = config.height.toNumber("meters");

console.log(ownHeight, worldHeight)
if (ownHeight > worldHeight) {
setWorldHeight(config.height, entity.views[entity.view].height)
} else if (ownHeight * 10 < worldHeight) {
setWorldHeight(config.height, math.multiply(entity.views[entity.view].height, 10));
}
}
}



Carregando…
Cancelar
Salvar