Skip to content

Commit a442c8b

Browse files
committed
Add docs/ for CII Best Practices documentation requirements
1 parent 02ae8b2 commit a442c8b

2 files changed

Lines changed: 144 additions & 1 deletion

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
# production
1414
/build
15-
/docs
1615

1716
# deployment
1817
deploy.sh

docs/README.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Vision Condition Visualizer — Documentation
2+
3+
**Live site**: [theblind.spot](https://theblind.spot)
4+
5+
A web-based tool that simulates vision conditions in real-time, helping users understand how people with various visual impairments experience the world.
6+
7+
## Getting Started
8+
9+
### Prerequisites
10+
11+
- Node.js 18+
12+
- npm
13+
14+
### Installation
15+
16+
```bash
17+
git clone https://github.com/bloo-berries/blindness-visualizer.git
18+
cd blindness-visualizer
19+
npm install
20+
npm start
21+
```
22+
23+
The app opens at `http://localhost:3000`.
24+
25+
### Build
26+
27+
```bash
28+
npm run build # Production build
29+
npm run build:prod # Production build without sourcemaps
30+
npm test # Run tests
31+
```
32+
33+
## Usage
34+
35+
### Step 1 — Choose an Input Source
36+
37+
The simulator accepts two input types:
38+
39+
| Input | Format | Notes |
40+
|-------|--------|-------|
41+
| **Image upload** | JPEG, PNG, WebP, GIF | Any resolution; displayed at container size |
42+
| **YouTube video** | YouTube URL | Embedded via YouTube IFrame API |
43+
44+
### Step 2 — Select and Configure Conditions
45+
46+
After selecting an input, the simulator displays a control panel alongside a live preview. Users can:
47+
48+
- **Toggle conditions** from 148 available types across 6 categories
49+
- **Adjust intensity** (0–100%) per condition via sliders
50+
- **Stack multiple conditions** to see combined effects
51+
- **Save screenshots** of the current simulation
52+
53+
### Famous People Section
54+
55+
Browse 209+ individuals with vision conditions. Each profile includes:
56+
57+
- Biographical details and achievements
58+
- Medical condition information
59+
- A live embedded simulation preview
60+
- An "Experience Simulation" button that loads their exact conditions into the simulator
61+
62+
Filter by name, condition category, or country.
63+
64+
## External Interface
65+
66+
### Web Routes
67+
68+
| Route | Page | Description |
69+
|-------|------|-------------|
70+
| `/` | Home | Landing page with navigation to simulator and famous people |
71+
| `/simulator` | Vision Simulator | Core simulation tool (2-step flow: input selection, then live simulation) |
72+
| `/famous-people` | Famous People | Browse 209+ individuals; supports `?person=<id>` query parameter |
73+
| `/conditions` | Glossary | Reference list of all 148 vision conditions |
74+
| `/faq` | FAQ | Frequently asked questions |
75+
| `/about` | About | Project background and mission |
76+
| `/feedback` | Feedback | User feedback form (submitted via Formspree) |
77+
| `/resources` | Resources | External links and further reading |
78+
79+
### Simulator Input
80+
81+
| Input | Method | Accepted Values |
82+
|-------|--------|-----------------|
83+
| Image | File upload | JPEG, PNG, WebP, GIF |
84+
| Video | YouTube URL | Any public YouTube video URL |
85+
86+
### Simulator Output
87+
88+
The simulator renders the selected input with vision condition effects applied in real-time. The output is purely visual (displayed on-screen) and can be captured as a PNG screenshot.
89+
90+
### Rendering Pipeline
91+
92+
Effects are applied through four simultaneous layers:
93+
94+
| Layer | Technology | Effect Types |
95+
|-------|-----------|--------------|
96+
| WebGL Shaders | Three.js / GLSL | Color blindness matrix transformations |
97+
| CSS Filters + SVG | DOM-injected `<feColorMatrix>` | Color vision simulation, blur, contrast |
98+
| DOM Overlays | Positioned HTML elements | Visual field loss, scotomas, floaters |
99+
| Animated Overlays | JavaScript `requestAnimationFrame` | Dynamic effects (auras, hallucinations, light perception) |
100+
101+
### Vision Condition Categories
102+
103+
| Category | Count | Examples |
104+
|----------|-------|---------|
105+
| Color Vision | 12 | Protanopia, Deuteranopia, Tritanopia, Achromatopsia |
106+
| Visual Field | 18 | Hemianopia, Quadrantanopia, Scotoma, Tunnel Vision |
107+
| Visual Disturbances | 10 | Visual Snow, Auras, Floaters, Palinopsia, Starbursting |
108+
| Retinal Diseases | 8 | AMD, Diabetic Retinopathy, Retinitis Pigmentosa |
109+
| Ocular Conditions | 10 | Cataracts, Glaucoma, Keratoconus |
110+
| Refractive Errors | 6 | Myopia, Hyperopia, Astigmatism, Diplopia |
111+
112+
### Preconfigured Simulation via Navigation
113+
114+
When navigating from a famous person's profile to the simulator, conditions are passed via React Router state:
115+
116+
```
117+
/simulator
118+
state: {
119+
preconfiguredConditions: string[] // Array of condition IDs
120+
personName: string // Display name
121+
personCondition: string // Condition description
122+
}
123+
```
124+
125+
### Accessibility Settings
126+
127+
Users can configure these preferences (persisted to localStorage):
128+
129+
| Setting | Effect |
130+
|---------|--------|
131+
| Theme | Light / Dim (default) / Dark |
132+
| High Contrast | Increased contrast ratios |
133+
| Large Text | 125% font size |
134+
| Increased Spacing | More whitespace between elements |
135+
| Enhanced Focus | More visible focus indicators |
136+
| Reduced Motion | Disables animations |
137+
138+
### Internationalization
139+
140+
26 languages supported. Language is selected via the navigation bar and persisted to localStorage. Arabic uses RTL layout.
141+
142+
### PWA
143+
144+
The app is installable as a Progressive Web App with offline support for cached assets.

0 commit comments

Comments
 (0)