Building a scroll-driven homepage with WebP frames and Canvas
How the ALISAZA homepage maps native scroll to an exact frame, keeps desktop and portrait footage separate, and falls back to readable HTML.

On the ALISAZA homepage, scrolling forward advances a cinematic scene. Scrolling back reverses it. Pause halfway and the scene holds at that point. The interaction starts with a simple rule: a scroll position should always select the same frame, regardless of how the visitor arrived there.
Map the scroll position to a frame
The page measures where each section starts and ends in the document. The scene manifest defines which frames belong to that section. The following calculation shows the mapping for a section without pauses. The actual timeline also reserves a portion of some sections to hold the opening or closing frame.
const distance = Math.max(1, sectionBottom - sectionTop);
const progress = Math.min(1, Math.max(0, (scrollY - sectionTop) / distance));
const frame = startFrame + Math.round(progress * (endFrameExclusive - startFrame - 1));
With a range of [72, 190), the last drawable frame is 189. Treating the end as exclusive keeps one section from requesting a frame owned by the next. The browser handles native scrolling and the Canvas stays pinned while the visitor moves through the section.
Compare the cost of random access
The prototype compared short H.264 segments with frequent keyframes against individually addressable WebP frames. In that experiment, the complete MP4 asset set was smaller. WebP worked better for the tested scroll patterns because the page could fetch the frame it needed and paint it as soon as it decoded. That was a useful trade for a page where visitors can jump between sections or reverse direction quickly.
The renderer requests frames on demand and keeps a bounded cache of decoded images. It cancels stale work and leaves the previous frame visible while the next one decodes. Desktop and mobile share that renderer but use separate manifests and footage. A portrait composition can keep the subject visible on a phone where cropping the wide original would remove details.
Design the static experience first
The headings, descriptions and links are present in the HTML. The Canvas supplies the visual layer. With JavaScript unavailable, reduced motion enabled, or a media request failing, the static version presents the same story with posters and ordinary document flow. Reduced-motion media feature
A practical review starts with three actions: scroll to a scene, reverse across a boundary, and block a frame request. Check that the selected frame stays consistent in both directions and that the text and links still work when playback stops. Smooth motion earns its place when the underlying page is already usable.