build-threejs-scroll-worlds
Skill này làm gì
Skill này hướng dẫn agent xây dựng một trải nghiệm 3D điều khiển bằng cuộn, luôn ở trong một thế giới liên tục. Nó dành cho các đội làm câu chuyện sản phẩm, giới thiệu, portfolio hoặc triển lãm với 3D thật.
Khi nào nên dùng
- ✓Khi bạn muốn một câu chuyện 3D nơi máy quay di chuyển qua một thế giới khi người xem cuộn.
- ✓Khi một sản phẩm hoặc portfolio cần các vật thể tương tác nằm trong một cảnh 3D liên tục.
- ✓Khi một video hay các phần xếp chồng sẽ không thể hiện được chiều sâu bạn cần.
Liên kết skill
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/build-threejs-scroll-worlds/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Xây dựng một câu chuyện sản phẩm 3D điều khiển bằng cuộn, trong đó máy quay di chuyển quanh một mẫu khi khách cuộn.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent dựng một cảnh 3D thời gian thực và ánh xạ vị trí cuộn của trang vào các chương. Máy quay, ánh sáng, vật liệu và chữ thay đổi theo cuộn, trong khi bản thân cảnh vẫn sống.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Build Three.js Scroll Worlds
Build one detailed real-time world and use native document scroll as its deterministic conductor. Keep the renderer, scene graph, and spatial continuity alive while camera composition, light, fog, animation, copy, and interaction focus move through authored chapters.
The mechanism is one persistent Three.js world + one normalized reversible scroll state. If removing either makes the experience collapse into stacked sections, this skill applies.
The exact Kage demo proves the quality bar; it is staging, not a mandatory subject or layout. Use its detailed anatomy only when the requested direction benefits from it: references/kage-anatomy.md.
Route the request correctly
- Use
threejsfor a single interactive scene with no scroll-authored journey. - Use
scroll-world-storytellingwhen deciding between real-time 3D, pre-rendered video, and DOM-first storytelling. - Use
scroll-scrubbed-visual-sequencefor a video or image sequence whose time is scrubbed by scroll. - Use
cinematic-scroll-storytellingfor DOM-first GSAP/Lenis choreography. - Use this skill when objects must remain truly spatial and interactive while scroll moves through several compositions in one live WebGL world.
Do not disguise a video as Three.js. The public oso95/scroll-world project, reviewed at commit 71cc36d, is a strong reference for intake, scene ledgers, budget gates, mobile-specific composition, config-driven playback, and seam QA, but its renderer is a pre-generated video chain. This skill adopts those structural strengths while retaining real geometry, materials, lighting, raycasting, and camera control.
Read the build references
Before implementing a new world, read:
- references/world-bible.md for intake, art direction, scene, material, texture, and interaction ledgers;
- references/realtime-architecture.md for the scene graph, conductor, camera, loading, interaction, and lifecycle patterns;
- references/quality-and-qa.md before optimization and final verification.
Copy references/scroll-conductor.js when a project needs a portable native-scroll conductor rather than a framework-specific implementation.
Start with the output, not the template
Determine what the world is for: a landing page, portfolio, museum chapter, product explanation, game teaser, editorial essay, data story, or another spatial experience. Do not force every request into a hero-plus-CTA layout.
Discover only what is unknown:
- the subject, audience, and ordered story beats;
- the art direction and emotional arc;
- whether the world is continuous, portal-connected, or composed as adjacent sets;
- the target devices and minimum acceptable hardware;
- how interactive the world should be beyond scrolling;
- available models, textures, brand assets, audio, and copy;
- the initial-load and total-download budget.
If the user supplied an approved reference or working scene, inspect it first and carry its real geometry, materials, textures, light ratios, camera values, and motion constants into the ledger. Do not replace measured details with adjectives.
Write the world bible before code
Define one reusable visual grammar:
- scale system and unit convention;
- silhouette language and level of stylization;
- palette and per-chapter accent progression;
- material families and wear logic;
- key, fill, rim, practical, and emissive light roles;
- fog, haze, particles, weather, and post-processing;
- typography, DOM composition, and near-plane foreground rules;
- motion grammar for camera, ambient objects, and interactions.
Every visible detail must support the same world. Random noise, unrelated texture packs, arbitrary particle effects, and one-off materials create complexity without cohesion.
Author a scene ledger
Use 4–8 chapters for most experiences. Store the full contract as data rather than scattering thresholds through CSS and the render loop:
const chapters = [
{
id: "threshold",
scrollWeight: 1.25,
copy: {
eyebrow: "Chapter 01",
title: "Enter the archive",
body: "A spatial collection revealed through motion."
},
camera: {
position: [0, 3.8, 13.5],
target: [0, 2.4, -8],
fov: 38,
mobile: { position: [0, 4.8, 18
Câu hỏi thường gặp
Đây có phải chỉ là video trên trang không?
Không. Skill nói video không nên bị coi là 3D. Cảnh là trực tiếp và có thể tương tác.
Khi nào nên dùng cách đơn giản hơn?
Với một cảnh 3D duy nhất không có câu chuyện cuộn, skill chỉ đến cách Three.js đơn giản hơn.
Nó có dùng cuộn trang thông thường không?
Có. Cuộn trang gốc điều khiển câu chuyện, nên trải nghiệm vẫn dễ đoán.
Chi tiết
Mô tả gốc của tác giả
Build rich, scroll-controlled real-time Three.js experiences as one persistent 3D world whose camera, lighting, atmosphere, materials, objects, DOM story, and interactions evolve across authored chapters. Use for 3D scrollytelling, scroll-driven WebGL worlds, camera journeys, interactive portfolios, product stories, exhibitions, explainers, game or film microsites, spatial narratives, and multi-scene websites where native scroll should travel through one continuous place. Not limited to landing pages.
repo: MengTo/Skills
Độ phổ biến
- Sao GitHub
- 7.2k
- Vị trí xếp hạng
- #13408
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
3d-cloth-material
7.2kGiúp agent của bạn tạo vải dệt 3D trông thật trong Three.js, với sợi dệt, ánh bóng nhẹ, nếp gấp tự nhiên, viền gấu và đường may.
3d-falling-leaves
7.2kGiúp agent của bạn thêm lá rơi chân thực vào cảnh 3D, với lá xoay tròn, trôi theo gió và được tái sử dụng khi máy quay di chuyển.
3d-four-seasons
7.2kGiúp agent của bạn thêm diện mạo xuân, hạ, thu, đông vào cảnh 3D, thay đổi cây cối, ánh sáng, bầu trời và tuyết mà không cần dựng lại cảnh.
3d-high-poly-models
7.2kGiúp agent của bạn dựng mô hình 3D chi tiết với hình dạng mượt và cạnh trông thật, rồi tạo các phiên bản nhẹ hơn chạy tốt trên web.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.