/* css for changing the style of the text */
@font-face {
font-family:Louize;
}
text {
font-size: 150px;
fill:white;
font-family:Canopee;
}
svg {
overflow: inherit;
}
Now showing: A Glorious Curation
document.addEventListener(“scroll”, e => { // registering the scrolling
var view = jQuery(window).scrollTop(); // get the viewport position in form ofa number
var move = (view * 2) ;
var screen = jQuery(window).height();
var position = jQuery(“#text-1”).offset();
var pos = parseInt((position.top).toFixed(0));
var start = (pos – move);
const textPath1 = document.querySelector(“#text-1”); // this part you need to duplicate for adding more text and change the “textPath1”
textPath1.setAttribute(“startOffset”, start ) // this one also duplicate and change “textPath1”
// console.log(“we are here =”,view, “the height of the screen =” ,screen, “position of the text =” ,pos, “what we animate =” ,start)
});