Hi,
i have a animation thats starts with scrolling.
camera-orbit="calc(-300rad + env(window-scroll-y) * -6rad) calc(80deg + env(window-scroll-y) * 0deg) calc(3m - env(window-scroll-y) * 1.5m)"
How can i set a limit for rotating the animation with scrolling?
i mean i want to rotate the animation with scroll just for 20deg and after that the animation stops.
Have you tried setting minCameraOrbit and maxCameraOrbit?
yes, i tried
min-camera-orbit='auto ..deg 20m'
max-camera-orbit='auto ..deg 1000m'
but i think when we want to play animation with scroll, this function doesn't work !
The following page has an example of how to interpolate between the two rotations you desire
@mesmaili151 If you are animating theta, phi and radius and you want the animation to stop before the scroll gets to 1, then you'll need to limit all three to the values your calc statements give when page scroll is at the value you want the animation to stop at. It'll be something along the lines of max-camera-orbit="20deg 10deg 30m". You'll also want to evaluate your calc statements at scroll=0 and use those for min-camera-orbit, or vice-versa if the values decrease during animation.