Hey there! We welcome community contributions to Flock XR. This could be code, documentation, reporting bugs, suggesting accessibility features, adding translations, or something else!
Flock XR is a creative coding platform for 3D development using Blockly and Babylon.js. It's designed as a bridge between Scratch and professional 3D tools, making 3D programming accessible to young people and beginners.
- 🐛 Report bugs - Found something broken? Let us know!
- 📝 Improve documentation - Help make our docs clearer
- ✨ Add features - Implement new blocks, effects, or tools
- 🧪 Write tests - Help us improve stability
- ♿ Accessibility improvements - Make Flock more inclusive
- 🌍 Translations - Help us reach more users worldwide
- 🎨 UI/UX improvements - Make the interface better
- Node.js (version 18 or higher)
- Git
- A modern web browser
- Fork the repo on GitHub
- Clone your fork to your local machine:
git clone git@github.com:YOUR_USERNAME/flockupdate.git
- Navigate to the project:
cd flockupdate - Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser to http://localhost:5173/
- Create a feature branch:
git checkout -b your-feature-name
- Make your changes (see project structure below)
- Test your changes by visiting http://localhost:5173/tests/tests.html
- Commit your changes:
git add . git commit -m "Add your descriptive commit message"
- Push to your fork:
git push origin your-feature-name
- Create a Pull Request on GitHub
Understanding the codebase:
index.html- Main HTML file that defines the application structure, UI layout (menu, canvas, code panel), and loads all necessary scripts and stylesheetsmain.js- Main application entry point that initializes Blockly workspace, handles code execution, manages UI views (canvas/blocks/split), and controls file operationsui/designview.js- Visual design interface enabling direct 3D object manipulation with gizmos, synchronizing 3D changes with Blockly blocksflock.js- Main Flock engineapi/- Core Flock XR API functions (scene, animation, physics, etc.)blocks.js- Block definitionsblocks/- Additional Blockly block definitionsgenerators.js- Blockly JavaSode generators for blockstoolbox.js- Blockly toolbox configurationexamples/- Sample projects and demosmodels/- 3D models (.glb files)images/- Images used in UItextures/- Texture files for materialssounds/- Audio filesfonts/- Fonts used in UI and 3D text generationexamples/- Example project JSON files including those featured in the Demo dropdowntests/- Test files (please add tests for new features!)
We use Mocha and Chai for testing, plus Playwright for end-to-end testing. Always test your changes:
- Run the development server:
npm run dev - Visit the test page: http://localhost:5173/tests/tests.html
- Select tests from the dropdown and click "Run Tests"
- Add new tests for any features you create
- Run all Playwright tests:
npx playwright test - Run specific test file:
npx playwright test tests/playwright/flock.spec.js - Run visual regression tests:
npx playwright test tests/playwright/visual.spec.js - View test report:
npx playwright show-report
Playwright tests verify that the UI loads correctly, blocks function properly, and the overall user experience works as expected.
Several files and directories are generated during testing and should not be checked into git:
test-results/- Playwright test resultsplaywright-report/- Generated test reports.last-run.json- Runtime state from last test execution
These are already included in .gitignore. If you create new test artifacts, make sure to add them to .gitignore as well.
- Stability - Bug fixes and reliability improvements
- Testing - More comprehensive test coverage
- Accessibility - Making Flock usable for everyone
- UX improvements - Better user experience
- Documentation - Clearer guides and API docs
When reporting bugs, please include:
- Steps to reproduce the issue
- Expected vs actual behavior
- Browser and operating system
- Screenshots or screen recordings if helpful
- Any console errors
Before suggesting new features:
- Check existing issues to avoid duplicates
- Think about how beginners would use it
- Consider performance
- Provide use cases and examples
Help us improve documentation by:
- Fixing typos or unclear explanations
- Adding examples to the API documentation
- Creating tutorials for new features
- Improving code comments
When contributing UI/UX improvements:
- Keep accessibility in mind
- Maintain consistency with existing design
- Consider the target audience (young people and beginners)
- Test on different screen sizes
We're committed to making Flock accessible. We'll be working on:
- WCAG guidelines
- Color contrast
- Language translations
- Clear, simple language
- Keyboard navigation
- Screen reader compatibility
- Discord: Contact us via Get in touch for Discord invite
- Issues: Use GitHub issues for bugs and feature requests
- Discussions: Use GitHub discussions for questions
We follow the p5.js Web Editor Code of Conduct. Please be respectful and inclusive.
- JavaScript (considering TypeScript migration)
- Babylon.js - 3D rendering engine
- Google Blockly - Visual programming blocks
- Vite - Build tool
- Node.js - Development environment
- Progressive Web App features
- Mocha & Chai - Unit testing framework
- Playwright - End-to-end testing framework
Flock XR is licensed under the MIT License. By contributing, you agree that your contributions will be licensed under the same license.
Every contribution helps make 3D programming more accessible to young people worldwide. Thank you for being part of the Flock XR community!
New to open source? Check out these guides: