Thank you for your interest in contributing! This guide will help you get started.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/third-person-shooter-controls cd third-person-shooter-controls - Install dependencies:
pnpm install
- Start development:
pnpm run dev:watch # Recommended: Auto-rebuilds package + starts demo # or pnpm run dev # Just starts demo app
package/- NPM package source codedemo/- Live demo applicationdocs/- Documentationexamples/- Usage examples
This project uses pnpm as the preferred package manager due to its efficiency with monorepos and workspace management.
DO NOT commit these files:
package-lock.json(npm)yarn.lock(Yarn).yarn.lock(Yarn)
ONLY commit:
pnpm-lock.yaml(pnpm)
# Clean up conflicting lock files
pnpm run clean:lockfiles
# Reinstall with pnpm
pnpm install- Faster installations with efficient disk space usage
- Better monorepo support with workspaces
- Stricter dependency resolution preventing phantom dependencies
- Symlink-based node_modules structure
# Verify lock file configuration
pnpm run check:lockfilesTo automatically check lock files before each commit:
# Copy the example hook
cp scripts/pre-commit-hook-example.sh .git/hooks/pre-commit
# Make it executable
chmod +x .git/hooks/pre-commit- Create a feature branch:
git checkout -b feature/amazing-feature - Make changes in
package/src/ - Test in real-time:
pnpm run dev:watch(automatically rebuilds package when you edit source files) - Build package:
pnpm run build(for final testing) - Commit changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Create Pull Request
- Movement mechanics improvements
- Shooting system enhancements
- Camera collision detection
- Physics integration
- Muzzle flash improvements
- Bullet trails
- Hit spark effects
- Particle systems
- Gamepad/controller support
- Mobile touch controls
- Input customization
- API documentation
- Usage examples
- Tutorials and guides
- Code comments
- Unit tests
- Integration tests
- Browser compatibility
- Performance testing
- Clear Description: Explain what your PR does and why
- Small Changes: Keep PRs focused and atomic
- Test Your Changes: Ensure everything works in the demo
- Update Documentation: Add docs for new features
- Follow Code Style: Use existing patterns and conventions
- Use TypeScript for all new code
- Follow existing naming conventions
- Add JSDoc comments for public APIs
- Keep functions small and focused
- Use meaningful variable names
pnpm run dev:watch # 🚀 Recommended: Auto-rebuilds package + starts demo
pnpm run dev # Just starts demo app (requires manual rebuilds)pnpm run build # Build package
pnpm run build:demo # Build demopnpm run lint # Lint code
pnpm test # Run tests (when available)Use pnpm run dev:watch for the best development experience! It automatically:
- Watches for changes in
package/src/ - Rebuilds the package when files change
- Hot reloads the demo application
- Shows both package and demo logs in one terminal
When reporting bugs, please include:
- Steps to reproduce
- Expected vs actual behavior
- Browser/OS information
- Screenshots if applicable
For new features, please describe:
- The problem it solves
- Proposed solution
- Alternative approaches considered
- Examples of usage
- Be respectful and inclusive
- Help others learn and grow
- Provide constructive feedback
- Focus on what's best for the community
Contributors will be:
- Added to the README contributors list
- Mentioned in release notes
- Given credit in documentation
- Open a GitHub issue for technical questions
- Start a discussion for general questions
- Check existing issues before creating new ones
If you encounter ERR_PNPM_NO_LOCKFILE or incompatible lockfile errors:
# Quick fix - regenerate lock file
pnpm run reset
# Or manually
rm pnpm-lock.yaml
pnpm installWhen the package name changes, the lock file may become incompatible:
# Clean everything and start fresh
rm -rf node_modules demo/node_modules package/node_modules pnpm-lock.yaml
pnpm install
git add pnpm-lock.yaml
git commit -m "fix: regenerate lock file after package changes"Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent
- This happens when the lock file is missing or incompatible
- Solution: Regenerate the lock file locally and commit it
Ignoring not compatible lockfile
- The lock file was generated with a different package configuration
- Solution: Use
pnpm run resetto clean and regenerate
# First time setup
pnpm run setup
# Reset everything (useful for troubleshooting)
pnpm run reset
# Check lock file status
pnpm run check:lockfiles
# Clean conflicting lock files
pnpm run clean:lockfilesThank you for contributing! Every contribution, no matter how small, helps make this project better. 🚀