docs: add 3D enhancement documentation to README

Added comprehensive 3D enhancement section covering:
- Subtle mode (CSS perspective + shadows)
- Realistic mode (materials, lighting, wood grain)
- Delightful mode (physics + parallax)

Includes code examples and explanations of all options.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-11-03 15:22:39 -06:00
parent 5d97673406
commit cc96802df8
1 changed files with 77 additions and 0 deletions

View File

@ -13,6 +13,7 @@ A comprehensive React component for rendering interactive Soroban (Japanese abac
- 🔧 **Developer-friendly** - Comprehensive hooks and callback system
- 🎓 **Tutorial system** - Built-in overlay and guidance capabilities
- 🧩 **Framework-free SVG** - Complete control over rendering
- ✨ **3D Enhancement** - Three levels of progressive 3D effects for immersive visuals
## Installation
@ -113,6 +114,82 @@ Educational guidance with tooltips
/>
```
## 3D Enhancement
Make the abacus feel tangible and satisfying with three progressive levels of 3D effects.
### Subtle Mode
Light depth shadows and perspective for subtle dimensionality.
```tsx
<AbacusReact
value={12345}
columns={5}
enhanced3d="subtle"
interactive
animated
/>
```
### Realistic Mode
Material-based rendering with lighting effects and textures.
```tsx
<AbacusReact
value={7890}
columns={4}
enhanced3d="realistic"
material3d={{
heavenBeads: 'glossy', // 'glossy' | 'satin' | 'matte'
earthBeads: 'satin',
lighting: 'top-down', // 'top-down' | 'ambient' | 'dramatic'
woodGrain: true // Add wood texture to frame
}}
interactive
animated
/>
```
**Materials:**
- `glossy` - High shine with strong highlights
- `satin` - Balanced shine (default)
- `matte` - Subtle shading, no shine
**Lighting:**
- `top-down` - Balanced directional light from above
- `ambient` - Soft light from all directions
- `dramatic` - Strong directional light for high contrast
### Delightful Mode
Maximum satisfaction with enhanced physics and interactive effects.
```tsx
<AbacusReact
value={8642}
columns={4}
enhanced3d="delightful"
material3d={{
heavenBeads: 'glossy',
earthBeads: 'satin',
lighting: 'dramatic',
woodGrain: true
}}
physics3d={{
hoverParallax: true // Beads lift on hover with Z-depth
}}
interactive
animated
soundEnabled
/>
```
**Physics Options:**
- `hoverParallax` - Beads near mouse cursor lift up with depth perception
All 3D modes work with existing configurations and preserve exact geometry.
## Core API