Skip to content

hassaanhaider88/git-grid-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dot Grid Dev 🎨

A powerful web-based tool for creating custom shapes by connecting dots on a grid and generating corresponding CSS code. Perfect for designers and developers who want to create unique clip-path shapes and SVG patterns.

Dot Grid Dev

✨ Features

🎯 Interactive Dot Grid

  • 40x40 Grid: High-resolution dot grid for precise shape creation
  • Smart Auto-Connect: Click two dots to automatically select all dots in a straight line between them
  • Visual Feedback: Real-time visual feedback with smooth animations and hover effects
  • Responsive Design: Works seamlessly on desktop and mobile devices

🔧 Shape Creation Tools

  • Click to Select: Simple click interface to select individual dots
  • Line Drawing: Automatic line drawing using Bresenham's algorithm
  • Shape Management: Create, clear, and undo shapes with ease
  • Multi-Shape Support: Create multiple shapes in a single session

💻 Code Generation

  • CSS Clip-Path: Automatically generates CSS clip-path polygon code
  • SVG Support: Alternative SVG polygon code generation
  • Responsive CSS: Generated code uses percentages for responsive designs
  • Multiple Backgrounds: Support for gradients and image backgrounds

⌨️ Keyboard Shortcuts

  • Enter: Create shape from selected dots
  • Escape: Clear current selection
  • Ctrl + ↑/↓: Scroll the dot grid panel
  • Delete/Backspace: Remove last selected dot

🚀 Getting Started

Installation

  1. Download the index.html file
  2. Open it in any modern web browser
  3. Start creating shapes immediately!

Usage

Basic Shape Creation

  1. Select Dots: Click on dots to select them (they turn yellow)
  2. Auto-Connect: Click a second dot to automatically connect with a straight line
  3. Create Shape: Press Enter or click "Create Shape" button
  4. Copy Code: Use the generated CSS code in your projects

Advanced Features

  • Multiple Selections: Continue clicking dots to extend your selection
  • Shape Preview: View your shape in real-time in the preview panel
  • Code Copying: One-click copy functionality for CSS and HTML code

🎨 Examples

Creating a Triangle

  1. Click three dots to form a triangle
  2. Press Enter to create the shape
  3. Copy the generated CSS code:
.custom-shape {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  clip-path: polygon(25.0% 25.0%, 75.0% 25.0%, 50.0% 75.0%);
  border-radius: 8px;
}

Creating Complex Shapes

  • Use the auto-connect feature to create straight edges
  • Combine multiple line segments for complex polygons
  • Create organic shapes by selecting individual dots

🛠️ Technical Details

Technologies Used

  • HTML5: Semantic markup and structure
  • CSS3: Modern styling with Tailwind CSS
  • Vanilla JavaScript: No dependencies, pure JavaScript
  • SVG: Vector graphics for connection lines

Browser Support

  • ✅ Chrome 60+
  • ✅ Firefox 55+
  • ✅ Safari 12+
  • ✅ Edge 79+

Performance

  • Lightweight: Single HTML file under 50KB
  • Fast Rendering: Optimized dot generation and selection
  • Smooth Animations: Hardware-accelerated CSS transitions

📱 Mobile Support

The application is fully responsive and includes:

  • Touch-friendly interface
  • Optimized dot sizes for mobile
  • Gesture support for shape creation
  • Mobile-first responsive design

🎯 Use Cases

For Designers

  • Create unique clip-path shapes for web designs
  • Generate custom SVG patterns
  • Prototype geometric layouts
  • Create masking shapes for images

For Developers

  • Generate CSS clip-path code quickly
  • Create responsive shape designs
  • Prototype UI components
  • Generate SVG paths for animations

For Educators

  • Teach coordinate geometry concepts
  • Demonstrate CSS clip-path properties
  • Interactive math and design lessons
  • Visual programming concepts

🔧 Customization

Grid Settings

You can modify the grid size and spacing by changing these constants in the code:

const GRID_SIZE = 40;  // Number of dots per row/column
const DOT_SPACING = 15; // Pixels between dots

Styling

The application uses Tailwind CSS classes. You can customize:

  • Color schemes
  • Dot sizes and animations
  • Panel layouts
  • Button styles

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Bug Reports: Found a bug? Open an issue with details
  2. Feature Requests: Have an idea? We'd love to hear it
  3. Code Contributions: Fork, improve, and submit a pull request
  4. Documentation: Help improve this README or add examples

Development Setup

  1. Clone or download the project
  2. Open index.html in your browser
  3. Make changes and test locally
  4. Submit your improvements

📄 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • Bresenham's Algorithm: For smooth line drawing between dots
  • Tailwind CSS: For beautiful, responsive styling
  • Community: For feedback and feature suggestions

📞 Support

Need help or have questions?

  • 📧 Email: Open an issue on GitHub
  • 💬 Discussions: Use GitHub Discussions for questions
  • 🐛 Bug Reports: Use GitHub Issues for bugs
  • 💡 Feature Requests: Use GitHub Issues with enhancement label

🔮 Roadmap

Upcoming Features

  • Bezier curve drawing
  • Shape templates (circles, stars, hearts)
  • Export to PNG/SVG files
  • Undo/Redo for individual selections
  • Grid snapping options
  • Color picker for shapes
  • Animation code generation

Long-term Goals

  • Collaborative editing
  • Shape library and sharing
  • Advanced geometric tools
  • Integration with design tools

Made with ❤️ for the design and development community

Happy shape creating! 🎨


This comprehensive README.md file covers all aspects of the Dot Grid Dev project, including features, usage instructions, technical details, and future roadmap. It's structured to be helpful for both users and potential contributors.

About

Dot Grid Dev – Create Custom Clip-Path & SVG Shapes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published