Explorar el Código

Make shift-scrolling movement proportional to world height

master
Fen Dweller hace 5 años
padre
commit
7e47fb2dd3
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. +3
    -3
      macrovision.js

+ 3
- 3
macrovision.js Ver fichero

@@ -1930,9 +1930,9 @@ document.addEventListener("DOMContentLoaded", () => {
updateViewOptions(entity, entity.view);
updateSizes(true);
} else {
document.querySelectorAll(".entity-box").forEach(element => {
element.dataset.x = parseFloat(element.dataset.x) + (e.deltaY < 0 ? 0.1 : -0.1);
});
const worldWidth = config.height.toNumber("meters") / canvasHeight * canvasWidth;
config.x += (e.deltaY > 0 ? 1 : -1) * worldWidth / 20 ;
updateSizes();
updateSizes();
}



Cargando…
Cancelar
Guardar