Scroll End calculation with multiple section alternating direction

Hello everyone,

I am building a page for a client that consists of 10 animated sections with ScrollTrigger.

Here is some info about the structure:

All sections are 100vh under the same ScrollTrigger and some alternate between scrolling horizontally (using pin & scrub too) or filling the screen from the bottom up.

It works but I can’t find what is the best value for calculating “Scroll End”. Setting it to “bottom -600%” works at a normal speed. However, I got this via trial and error. In several tutorials I found about ScrollTrigger they set this value through a function such as:

end: () => +=${elem.offsetHeight}

or even

end: () => ‘+=${document. querySelector(“.your-selector”).offsetHeight}’

or even more advanced with a function that calculates all the “widths” and “heights” of the total scroll travel of all the sections combined (those scrolling vertically – height only – and those scrolling horizontally – total width of all the horizontally scrolled screens.)

Is there a way to use custom code like that in Bricksforge?

What is the best way to set scroll end for a timeline with multiple sections (tweens) and alternating scroll directions.

Any help would be appreciated.

Side note: Is there a way to permanently set the Timeline Seconds to anything more than 25? I need to set it every time I open the page for editing as it defaults back to 25.