A beginner-friendly React Three Fiber template for hackathons. Build immersive 3D web experiences with modern React patterns + Thirdweb Auth.
- Basic Scene — Load GLB models with OrbitControls
- Playground — WASD movement with camera follow
- Login Demo — 3D background with ThirdWeb wallet auth
- Documentation — Essential R3F patterns and code examples
pnpm install
pnpm devThe Login Demo page requires a ThirdWeb client ID:
- Create a free account at thirdweb.com/dashboard
- Create a new project to get your Client ID
- Create
.env.local:
NEXT_PUBLIC_THIRDWEB_CLIENT_ID=your_client_id_here
- Restart the dev server
The Scene and Playground pages work without ThirdWeb.
src/
├── app/
│ ├── page.tsx # Home
│ ├── scene/ # Basic 3D scene
│ ├── playground/ # WASD movement
│ ├── login/ # 3D + Auth demo
│ └── docs/ # Documentation
├── components/
│ ├── scene/ # Canvas, Model, Ground
│ ├── player/ # PlayerController
│ └── ui/ # BackButton, ControlsHelp
├── providers/ # ThirdWeb
├── lib/ # Utils, ThirdWeb config
├── hooks/ # useUser
├── constants/ # Keyboard controls
└── stores/ # Zustand example
// next.config.ts
const nextConfig = {
reactStrictMode: false, // Required for WebGL
};<div className="absolute z-[10000]">
{/* UI content */}
</div>import { useGLTF } from "@react-three/drei";
import { SkeletonUtils } from "three-stdlib";
function Model({ url }) {
const { scene } = useGLTF(url);
const clone = useMemo(() => SkeletonUtils.clone(scene), [scene]);
return <primitive object={clone} />;
}Available chains:
appchain(ID: 466) — Defaultapechain(ID: 33139) — ApeChain mainnetapechainTestnet(ID: 33111) — Curtis testnet
- React Three Fiber — React renderer for Three.js
- Drei — Useful R3F helpers
- Three.js — 3D graphics
- ThirdWeb — Wallet authentication
- Zustand — State management