From 29f1d212898a7a712b3f52dc74b2f0ddc75acc85 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 29 May 2021 13:46:55 -0500 Subject: [PATCH] Add an option to disable smoothing This can improve performance on less-powerful computers. --- macrovision.css | 5 ++++- macrovision.js | 14 +++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/macrovision.css b/macrovision.css index 4440b685..2b7fd9ea 100644 --- a/macrovision.css +++ b/macrovision.css @@ -33,6 +33,9 @@ body { -moz-user-drag: none; -o-user-drag: none; pointer-events: none; +} + +body.smoothing .entity-box { transition: left 0.2s cubic-bezier(.1,.41,.18,.99), top 0.2s cubic-bezier(.1,.41,.18,.99), height 0.2s cubic-bezier(.1,.41,.18,.99), max-height 0.2s cubic-bezier(.1,.41,.18,.99); } @@ -1107,4 +1110,4 @@ body.screenshot-mode #menubar, body.screenshot-mode #options, body.screenshot-mode .scroll-button { display: none; -} \ No newline at end of file +} diff --git a/macrovision.js b/macrovision.js index ea4a0648..61091bbb 100644 --- a/macrovision.js +++ b/macrovision.js @@ -2342,6 +2342,18 @@ const settingsData = { toggleBodyClass("toggle-entity-glow", param); } }, + "smoothing": { + name: "Smoothing", + desc: "Smooth out movements and size changes. Disable for better performance.", + type: "toggle", + default: true, + get value() { + return checkBodyClass("smoothing"); + }, + set value(param) { + toggleBodyClass("smoothing", param); + } + }, "solid-ground": { name: "Solid Ground", desc: "Draw solid ground at the y=0 line", @@ -4430,4 +4442,4 @@ function panTo(x, y, height, xSpeed, ySpeed, heightSpeed, timestamp, remaining) config.y = newY; config.height = math.unit(newHeight, "meters"); updateSizes(); -} \ No newline at end of file +}