'how to do a link on the first frame to some other frame?
3d scroll split all by frames, but how to navigate in there i don't know(((
let zSpacing = -1000,
lastPos = zSpacing / 5,
$frames = document.getElementsByClassName('frame'),
frames = Array.from($frames),
zVals = []
window.onscroll = function() {
let top = document.documentElement.scrollTop,
delta = lastPos - top
lastPos = top
frames.forEach(function(n, i) {
zVals.push((i * zSpacing) + zSpacing)
zVals[i] += delta * -6
let frame = frames[i],
transform = `translateZ(${zVals[i]}px)`
opacity = zVals[i] < Math.abs(zSpacing) / 1.9 ? 1 : 0
frame.setAttribute('style', `transform: ${transform}; opacity: ${opacity}`)
})
}
window.scrollTo(0, 1);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
