mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: scrub hero logo from page top to canvas bottom
Amp-Thread-ID: https://ampcode.com/threads/T-019d9220-9fe3-7190-b7ff-df138f73be60 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -14,9 +14,12 @@ useFrameScrub(canvasRef, {
|
||||
frameSrc: (i) =>
|
||||
`/videos/hero-logo-seq/Logo${String(i).padStart(2, '0')}.webp`,
|
||||
scrollTrigger: (canvas) => ({
|
||||
trigger: canvas,
|
||||
start: 'top 80%',
|
||||
end: 'bottom 20%',
|
||||
trigger: document.documentElement,
|
||||
start: 'top top',
|
||||
end: () => {
|
||||
const rect = canvas.getBoundingClientRect()
|
||||
return `+=${rect.bottom + window.scrollY}`
|
||||
},
|
||||
scrub: 0.3
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user