Current collected state Current
Observed since 20 Oct, 19:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
3dscroll
A scroll-based 3D animation component for React.
📹 Watch the tutorial → x.com/DieselSharma/status/1949003509309080062
A plug-and-play React + Three.js scroll animation component for 3D .glb models.
phases arraythree, @react-three/fiber, @react-three/drei, and gsapnpm install 3dscroll
"use client";
import { ThreeScene } from "3dscroll";
export default function App() {
const phases = [
{ position: [0, 0, -15], rotation: [0, 0, 0], scale: 1, opacity: 1 },
{ position: [0, 5, -15], rotation: [0, 0, 0], scale: 1.5, opacity: 0.5 },
{ position: [0, 0, -15], rotation: [0, 0, 0], scale: 2, opacity: 0.2 },
{ position: [0, 5, -15], rotation: [0, 0, 0], scale: 1, opacity: 1 },
];
return (
<div style={{ background: "black", minHeight: "100vh" }}>
<ThreeScene
modelPath="/model.glb"
phases={phases}
phaseSize={2} // optional, default is 2
/>
</div>
);
}
| Prop | Type | Description |
|---|---|---|
modelPath | string | Path to your .glb model (must be placed in public/) |
phases | array | Animation steps for position, rotation, scale, opacity |
phaseSize | number | Scroll height multiplier per phase (default = 2) |
three@react-three/fiber@react-three/dreigsapreact, typescript, and rollup for bundlingMade with ❤️ by @3diesel
Follow on Twitter/X
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"shasum": "869ad0956ac7e819d78e7c3521b294b1bad9947d",
"tarball": "https://registry.npmjs.org/3dscroll/-/3dscroll-1.0.6.tgz",
"fileCount": 6,
"integrity": "sha512-8figjBG1jWjMsj19s3HOOWJAA6kp/CsMlA+IDM3JWSRbV/ROujYVVzDUIaefzer20xwVsvH0iQsPUR3H/5N1UQ==",
"signatures": [
{
"sig": "MEQCIED9aC5GnXoWzt87i0S7liEb9oeXG+M363UXyIrZcGfHAiAz2Lc2ZMOQVw7UEewPvgkd2KE6qvJ+AFFHfNB/9SJH9w==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"unpackedSize": 14742
}Observed since 20 Oct, 19:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:c65bc7a950a5ffd0313aaf5c4eafd4d8ea143bea01cbbbc00d105dcf02b96578