Skip to content

Parth-12pm/2D-interactive-Playground-using-React-Konva

Repository files navigation

2D Interactive Playground

MIT License Contributions Welcome React Konva

Overview

2D Interactive Playground is a React-based application leveraging the Konva library to create and manipulate interactive 2D elements within a playground environment. This project serves as a dynamic tool for developers and designers who require custom 2D layout editing, with capabilities to drag, resize, rotate, and modify shapes with ease.

Live Demo on Vercel

Features

  • Dynamic Element Manipulation: Drag, resize, rotate, and color elements on the canvas.
  • Flexible Shape Library: Easily add and manage rectangles, circles, and lines.
  • User-Friendly UI: Intuitive controls for a smooth experience.
  • React + Konva Integration: Combines the strengths of React's component-based architecture with Konva’s 2D graphics rendering.

Built With

Installation

To run this project locally:

  1. Clone the repository:
    git clone https://github.com/Parth-12pm/2D-interactive-Playground-using-React-Konva.git
    cd 2D-interactive-Playground-using-React-Konva
    
  2. Install dependencies:
    npm install
    
  3. Start the development server:
    npm run dev 
    
  4. Open http://localhost:3000 to view it in your browser.

Usage

  • Adding Shapes: Select shapes from the sidebar to add them to the playground.
  • Modifying Elements: Drag shapes to move them around, resize using anchor points, and rotate by adjusting rotation handles.
  • Custom Styling: Customize colors and properties directly through the interface.

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to fork the repository and submit a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/FeatureName)
  3. Commit your Changes (git commit -m 'Add some FeatureName')
  4. Push to the Branch (git push origin feature/FeatureName)
  5. Open a Pull Request

License

MIT License

Copyright (c) Meta Platforms, Inc. and affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.