npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scroll-cinema

v2.0.0

Published

Apple-style frame-by-frame scroll animator. Zero dependencies, single HTML file. Export to Vanilla JS, React, Vue 3, or plain HTML.

Readme

scroll-cinema

Apple-style frame-by-frame scroll animator — zero dependencies, single file, works offline.

npm MIT License

→ Live Tool — open index.html in any browser.


What it does

Turn any video or PNG/JPG frame sequence into the cinematic scroll animation seen on Apple product pages — where a video plays frame-by-frame as the user scrolls. Export production-ready code in 4 formats.

Video / frames  →  Configure  →  Text layers  →  Export code

Quick start

# Open the GUI tool instantly
npx scroll-cinema open

# Or serve it properly (full canvas support, recommended)
npx scroll-cinema serve

This opens http://localhost:4242 with the full ScrollCinema v2 GUI.


Features

| | | |---|---| | 🎬 | Video → Frames — drop MP4/WebM, extracts frames in browser (no FFmpeg needed) | | ✦ | Keyframe text layers — headlines, subtitles, counters at exact frame positions | | 〜 | 9 easing curves — Spring, Elastic, Bounce, Expo with visual previews | | 🔢 | Count-up numbers — 0→N as user scrolls (Apple's battery life trick) | | 🎭 | Blend modes — screen, multiply, overlay, color-dodge | | ⚡ | Progressive loading — animation starts immediately | | ♿ | Reduced motion — all exports respect prefers-reduced-motion | | 📦 | 4 export formats — HTML · Vanilla JS · React/Next.js · Vue 3 |


Install as a Node module

npm install scroll-cinema
const { applyEasing, scrollToFrame, totalScrollHeight } = require('scroll-cinema')

// Map scroll position to frame index
const frame = scrollToFrame(window.scrollY, 120, 24, 'spring')

// Get total wrapper height for CSS
const height = totalScrollHeight(120, 24) // → 3080px

// Apply easing manually
const progress = applyEasing(0.5, 'spring') // → 0.938...

Exported code examples

HTML snippet

<div class="sc-wrap">
  <div class="sc-sticky"><canvas id="sc"></canvas></div>
</div>

React / Next.js

import ScrollCinema from './ScrollCinema'

<ScrollCinema
  frameCount={120}
  basePath="/frames/"
  scrollPerFrame={24}
  easing="spring"
  onProgress={({ progress }) => console.log(progress)}
/>

Vue 3 / Nuxt

<ScrollCinema :frame-count="120" base-path="/frames/" easing="spring" />

Apple does this

Visit apple.com/iphone in Chrome DevTools — you'll find a sticky canvas, ~140 PNG frames, and a scroll event mapping position to frame index. ScrollCinema generates that exact pattern in minutes.


Extracting frames with FFmpeg

# 24fps, 1280px wide, JPEG
ffmpeg -i input.mp4 -vf fps=24,scale=1280:-1 -q:v 3 frames/frame%03d.jpg

# Limit to 120 frames
ffmpeg -i input.mp4 -vf fps=24,scale=1280:-1 -frames:v 120 frames/frame%03d.jpg

No FFmpeg? Drop your video directly into ScrollCinema — it extracts in the browser.


API Reference

applyEasing(t, type)

| Param | Type | Description | |---|---|---| | t | number | Progress value 0–1 | | type | string | Easing name: linear, ease-in, ease-out, ease-in-out, expo, spring, elastic, bounce, stepped |

scrollToFrame(scrollY, frameCount, scrollPerFrame, easing)

Returns the frame index (0-based) for a given scroll position.

totalScrollHeight(frameCount, scrollPerFrame)

Returns the CSS height in pixels for the scroll wrapper div.


License

MIT — Copyright (c) 2026 vvlars-cmd
Validity: 2026-03-27 to 2026-09-27