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! π
react.threejs.easeljs.drawing-app.demo.mp4
https://react-threejs-easeljs.web.app/
- π¨ 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.
This project is built using modern technologies:
- React βοΈ
- Three.js π
- EaselJS π¨
- Vite β‘
- Lodash π οΈ
- TypeScript π§
- Firebase π₯
- SonarCloud π§ͺ
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.
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.
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
totseslint.configs.recommendedTypeChecked
ortseslint.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,
},
})
- β Star the repository
- π οΈ Submit pull requests, report bugs, or suggest features
Feel free to reach out if you have any questions or need help:
- GitHub: https://github.com/mustafacagri
- Linkedin: @MustafaCagri
Made with β€οΈ in π Istanbul, using React βοΈ, Three.js π, EaselJS π¨, TypeScript π§, Vite β‘, and Lodash π οΈ!