I am trying to recreate the Monocle ereader. As best I understand, it works by columnating the page and then scrolling horizontally across the columns.
I have the following HTML and Javascript:
body {
column-width: 100vw;
max-height: calc(100vh - 30px);
box-sizing: border-box;
}
window.addEventListener(
'wheel',
(evt) => {
const delta = evt.deltaX + evt.deltaY
const pages = Math.round(Math.abs(delta) / delta)
const curr = Math.round(window.scrollX / window.innerWidth)
window.scroll((curr + pages) * window.innerWidth, 0)
}
)
As this pen shows when you scroll, as the pages progress, the text drifts to the left.