/react-threejs-easeljs-drawing-app

๐Ÿš€ Create cool graphics with our React โš›๏ธ drawing app! Use Three.js ๐ŸŒ, EaselJS ๐ŸŽจ, Vite โšก, TypeScript ๐Ÿ”ง. Easily draw shapes, move them around, and see them in 3D! Great for developers who want to explore their creativity! โœจ

Primary LanguageTypeScript

๐ŸŒŸ React - ThreeJS - EaselJS Drawing App ๐ŸŽจ

Welcome to the React-ThreeJS EaselJS Drawing App โ€“ a powerful tool for creating 2D and 3D visualizations! This app covers you whether you're looking to draw, manipulate shapes, or view objects in a 3D scene. Let's unleash your creativity! ๐ŸŒโœจ This is the perfect boilerplate to kickstart your drawing projects with React, ThreeJS, and EaselJS! ๐Ÿš€

๐ŸŽฅ Demo Video

react.threejs.easeljs.drawing-app.demo.mp4

๐ŸŒ Live Demo

https://react-threejs-easeljs.web.app/

๐ŸŽฏ Key Features

  • ๐ŸŽจ Draw Shapes: Draw rectangles, circles, lines, and custom paths effortlessly with a click-and-drag interface.
  • โœ‹ Shape Manipulation: Move, drag, and delete shapes as needed. Shapes adjust in real time for a smooth experience!
  • ๐ŸŒ 3D Viewer: Toggle between 2D and view-only 3D mode to see your drawings come to life in a new dimension.
  • ๐ŸŽจ Random Colors: Each shape you create is assigned a random stroke and fill color.
  • โšก Real-Time Updates: Watch your canvas update instantly as you interact with shapes.
  • โŒจ๏ธ Keyboard Support: Delete selected shapes using the Delete or Backspace keys for quick editing.

๐Ÿ› ๏ธ Tech Stack

This project is built using modern technologies:

  • React โš›๏ธ
  • Three.js ๐ŸŒ
  • EaselJS ๐ŸŽจ
  • Vite โšก
  • Lodash ๐Ÿ› ๏ธ
  • TypeScript ๐Ÿ”ง
  • Firebase ๐Ÿ”ฅ
  • SonarCloud ๐Ÿงช

๐Ÿ“ฆ Dependencies

The project relies on several key libraries:

React: A library for building user interfaces. Three.js: A powerful 3D engine for rendering the 3D view mode. EaselJS: A library for drawing and manipulating 2D shapes. Vite: A fast build tool for modern web development. Lodash: A utility library for working with arrays, objects, and more.

๐Ÿš€ Getting Started

To start the project locally, fork the repo and follow these steps:

1. ๐Ÿด Fork the repository
2. ๐Ÿ“ฅ Clone your forked repository
3. ๐Ÿ› ๏ธ Run `yarn install` to install dependencies
4. ๐Ÿš€ Run `yarn dev` to start the local development server

The app will run on http://localhost:5173.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

๐Ÿ‘พ How can I contribute?

  • โญ Star the repository
  • ๐Ÿ› ๏ธ Submit pull requests, report bugs, or suggest features

๐Ÿ“ฌ Get in Touch

Feel free to reach out if you have any questions or need help:

Made with โค๏ธ in ๐Ÿ“ Istanbul, using React โš›๏ธ, Three.js ๐ŸŒ, EaselJS ๐ŸŽจ, TypeScript ๐Ÿ”ง, Vite โšก, and Lodash ๐Ÿ› ๏ธ!