Is there a way to prevent scrolling but get the direction and value of the scroll?

Is there any way we can prevent scrolling but also get the direction and the distance scrolled?

I'm aware that we can do that with the mousewheel event but I want it to work also in the case of scrolling with the scrollbar (and if it's possible with the touch event). Also I do not want to put overflow: hidden in body.

I'm pretty sure that it might not be possible at all. Thanks for any input.

So let's say we have this and we want to change the slides based on the scroll direction and the distance scrolled but without actually scrolling:

jQuery(document).ready(function ($) {
    window.addEventListener("wheel", scrollEvent, {
        passive: false
    });

    function scrollEvent(e) {
        e.preventDefault();

        if (e.wheelDelta) {
            // up
        } else {
            // down
        }

        // I need to know the value of the scroll and for all scroll events
        // also for the scrollbar event and if possible the touch event for mobile
    }
});
.wrapper {
  
}

.another_component {
  margin: 20px 0;
}

.tha-component {
  
}

.tha-component > * {
  display: none;
  width: 200px;
  height: 150px;
  background: #323232;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  color: white;
}

.tha-component > .active {
  display: flex;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="wrapper">
        <div class="another_component">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur id ligula in sem maximus dapibus id ullamcorper libero. Nulla bibendum magna ut ligula bibendum, eu ornare quam malesuada. Vivamus congue, tortor eu euismod finibus, massa ante finibus urna, at maximus erat tellus quis nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum bibendum congue neque, non vehicula orci. Maecenas eget sollicitudin tortor. Vestibulum ut luctus est. Phasellus nec consequat turpis, vel lobortis tortor. Suspendisse potenti. Curabitur tempor viverra lacus et tempus. Nam quis mi eu eros convallis placerat.
        </div>

        <div class="tha-component">
            <div class="active">Slide 1</div>
            <div>Slide 2</div>
            <div>Slide 3</div>
        </div>

        <div class="another_component">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur id ligula in sem maximus dapibus id ullamcorper libero. Nulla bibendum magna ut ligula bibendum, eu ornare quam malesuada. Vivamus congue, tortor eu euismod finibus, massa ante finibus urna, at maximus erat tellus quis nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum bibendum congue neque, non vehicula orci. Maecenas eget sollicitudin tortor. Vestibulum ut luctus est. Phasellus nec consequat turpis, vel lobortis tortor. Suspendisse potenti. Curabitur tempor viverra lacus et tempus. Nam quis mi eu eros convallis placerat.
        </div>
        
        <div class="another_component">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur id ligula in sem maximus dapibus id ullamcorper libero. Nulla bibendum magna ut ligula bibendum, eu ornare quam malesuada. Vivamus congue, tortor eu euismod finibus, massa ante finibus urna, at maximus erat tellus quis nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum bibendum congue neque, non vehicula orci. Maecenas eget sollicitudin tortor. Vestibulum ut luctus est. Phasellus nec consequat turpis, vel lobortis tortor. Suspendisse potenti. Curabitur tempor viverra lacus et tempus. Nam quis mi eu eros convallis placerat.
        </div>
    </div>

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum