Versions and Example Format
Every example in this site is meant to be stable and inspectable. The docs pages do not duplicate the code manually. They read example metadata and raw source from the examples/ directory.
Pinned example stack
react@19.1.1react-dom@19.1.1@react-three/fiber@9.3.0three@0.180.0
Folder Shape
Section titled “Folder Shape”examples/ scene-camera-renderer/ meta.json three/ main.js r3f/ App.jsxWhy This Structure Works
Section titled “Why This Structure Works”meta.jsonstores the example title, slug, summary, pinned package versions, and optional playground links.three/main.jsis the baseline imperative version.r3f/App.jsxis the matching declarative translation.- The docs import those files directly, so what you read on the page stays aligned with the source of truth.
Notes About Playgrounds
Section titled “Notes About Playgrounds”- A page does not need a hosted playground to teach the code.
- The data model already has
threeSandboxUrlandr3fSandboxUrlfields for future runnable examples. - If you later publish a playground, you only need to add the URL to the example’s
meta.json.
Authoring Rule
Section titled “Authoring Rule”Keep examples small and concept-specific. If a page is teaching lights, avoid also sneaking in controls, physics, post-processing, or helper abstractions unless the page is explicitly about those topics.