A beautiful Next.js project boilerplate with a hero page WebGL demo featuring a 3D GLTF model rendered with React Three Fiber and post-processed into an animated ASCII art effect using custom shaders.
# Clone the repository
git clone https://github.com/egorshest/webgl-ascii-hero.git
cd webgl-ascii-hero
# Install dependencies
npm install
# Run the development server
npm run dev
Open http://localhost:3000 to see the effect.
webgl-ascii-hero/
├── app/
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Home page
│ └── globals.css # Global styles
├── components/
│ ├── hero.tsx # Hero component (main page)
│ ├── effect-scene.tsx # 3D scene setup
│ └── ascii-effect.tsx # ASCII post-processing shader
└── public/
└── models/
└── user-model.glb # 3D model (GLTF format) - DEMO ONLY, replace with your own
⚠️ Important: The included user-model.glb model is for demonstration purposes only. Please remove it and use your own model.
Steps to add your own model:
Or create your own using Blender, Maya, etc.
Replace the demo model with your own GLB file:
bash
# Simply replace the demo file with your own model
# Make sure your file is named "user-model.glb" and placed in public/models/
# The code already references "/models/user-model.glb", so no code changes needed!
Adjust the scale if needed in components/effect-scene.tsx (line 124):
tsx
<UserModel scale={8} /> // Change the number to adjust size
Update the component name from UserModel to match your model (optional, for clarity).
Modify the AsciiEffect props in components/effect-scene.tsx:
<AsciiEffect
cellSize={9} // Size of ASCII cells
invert={true} // Invert brightness
color={true} // Enable color
characterSet="terminal" // Character set
volumeShading={true} // 3D depth effect
tintColor="#917AFF" // Tint color
postfx={{
contrastAdjust: 1.8, // Contrast
brightnessAdjust: 0, // Brightness
}}
/>
Edit lighting in components/effect-scene.tsx:
<ambientLight intensity={0.08} />
<directionalLight position={[2, 3.5, 6]} intensity={6} />
<directionalLight position={[-2, 1.5, 4]} intensity={0.35} />
npm run build
npm start
MIT License - feel free to use this project for your own purposes.
$ claude mcp add webgl-ascii-hero \
-- python -m otcore.mcp_server <graph>