Thanks for your interest in contributing! This guide covers everything you need to get started.
git clone https://github.com/nirholas/three.ws.git
cd three.ws
npm install
npm run setup
npm run devOpen http://localhost:3000 and verify the default model loads.
npm run setup finishes what npm install can't: it builds the local
solana-agent-sdk (linked as a file: dependency, ships no prebuilt dist/)
and generates the gitignored data/_generated/* artifacts that the app,
sitemap, and test suite read. It also activates the repo's pre-push hook
(.githooks/pre-push), which runs npm run typecheck before every push.
It is idempotent — re-running it skips anything already up to date.
- Check existing issues to avoid duplicates
- Open a new issue with:
- Browser and OS
- Steps to reproduce
- Expected vs. actual behavior
- Console errors (if any)
- The model file (if possible) or a link to a public glTF sample that triggers the issue
Open an issue with the Feature Request label. Describe:
- The use case (what problem does it solve?)
- Proposed behavior
- Any UI mockups or examples from other tools
- Fork the repository
- Create a feature branch from
main:git checkout -b feat/my-feature
- Make your changes
- Format your code:
npx prettier --write . - Test locally with
npm run dev - Commit with a clear message:
git commit -m "feat: add opacity slider to display controls" - Push and open a PR against
main
Use clear, descriptive commit messages. Conventional format is preferred:
| Prefix | Use |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation only |
style: |
Formatting, no logic change |
refactor: |
Code restructuring |
perf: |
Performance improvement |
chore: |
Build, tooling, dependency updates |
- Formatting: Run
npx prettier --write .before committing - No new dependencies without discussion — keep the bundle small
- Browser compatibility: Must work in Chrome, Firefox, and Edge. Safari support is best-effort
- Keep viewer/UI code client-side — the frontend viewer must run entirely in the browser; server logic belongs in the
api/handlers (served in production by the Cloud Run container inserver/), never bundled into the browser app - Dispose resources — any new Three.js objects (geometries, materials, textures) must be disposed in
Viewer.clear() - Blob URL cleanup — any
URL.createObjectURL()must have a correspondingURL.revokeObjectURL()
src/
├── app.js # App controller (touch this for new URL params or dropzone changes)
├── viewer.js # 3D renderer (touch this for scene, GUI, or display changes)
├── validator.js # glTF validation (touch this for validation pipeline changes)
├── environments.js # Environment map list (touch this to add HDR maps)
└── components/ # vhtml JSX components (string-based, no virtual DOM)
See docs/architecture.md for a deep dive.
npm run typecheck # tsc over the @ts-check'd files — also gates every deploy
npm run test:core # vitest unit suite
npm test # vitest + playwright e2eIf unit tests fail on a fresh clone with module-resolution or missing-file
errors, run npm run setup first.
Before submitting a PR, verify:
- Default model (
cz.glb) loads on page open - Drag-and-drop works with a
.glbfile - Drag-and-drop works with a multi-file
.gltf(separate.bin+ textures) - URL loading works:
http://localhost:3000/#model=<url> - All GUI controls respond (display, lighting, animation if applicable)
- Validation toggle appears and clicking it opens a report
- Responsive layout works on a narrow viewport (≤ 700 px)
- No console errors after loading a model
-
window.VIEWERdebugging API still works
Use the Khronos glTF Sample Assets:
| Model | Tests |
|---|---|
| Damaged Helmet | PBR materials, environment mapping |
| Fox | Skinned mesh, animation |
| Flight Helmet | Multi-texture, display controls |
| Box | Minimal model, basic rendering |
| Animated Cube | Animation playback |
Looking for something to work on? Here are areas that welcome contributions:
- Bug fixes — check the issues page
- New environment maps — add more HDR options
- Accessibility — improve keyboard navigation and screen reader support
- Performance — reduce re-renders, optimize disposal, add lazy loading
- Safari fixes — improve drag-and-drop compatibility
- Documentation — improve guides, add tutorials, fix typos
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.