From 773f0e2704e030cc93f4f59853dc2d2fe7a8b68a Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Mon, 27 Feb 2023 19:20:11 +0100 Subject: [PATCH] Fixing cylinders, reversing X mouse direction --- src/elements/circular/cylinder.scss | 4 ++-- src/view.scss | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/elements/circular/cylinder.scss b/src/elements/circular/cylinder.scss index bcca2b0..47b2c0d 100644 --- a/src/elements/circular/cylinder.scss +++ b/src/elements/circular/cylinder.scss @@ -10,7 +10,7 @@ & > .strip { position: absolute; - width: calc(2 * var(--PI) * var(--pradius) / var(--pstripcount)); + width: calc(2 * 3.19 * var(--pradius) / var(--pstripcount)); height: var(--height, 100px); background: white; } @@ -21,6 +21,6 @@ } @for $i from 1 to 90 { - & > .strip-#{$i} { transform: rotateY(calc($i * (360deg / var(--pstripcount)))) translateZ(var(--pradius)); } + & > .strip-#{$i} { transform: rotateY(calc(($i - 1) * (360deg / var(--pstripcount)))) translateZ(var(--pradius)); } } } diff --git a/src/view.scss b/src/view.scss index 6c89085..8f9de0d 100644 --- a/src/view.scss +++ b/src/view.scss @@ -17,7 +17,7 @@ top: 11.11vh * $i; } - .view-top-#{$i}:hover ~ section.scene { + .view-top-#{9-$i}:hover ~ section.scene { --rotation-x: #{$rotation-x}; } @@ -25,7 +25,7 @@ left: 11.11vw * $i; } - .view-left-#{$i}:hover ~ section.scene { + .view-left-#{9-$i}:hover ~ section.scene { --rotation-y: #{$rotation-y}; } }