hunkim98 / dotting

Dotting is a pixel art editor component library for react
https://hunkim98.github.io/dotting/
MIT License
43 stars 12 forks source link

Allow users to control the dot size or style of BrushTool.Dot and BrushTool.Erase #39

Closed hunkim98 closed 1 year ago

hunkim98 commented 1 year ago

It seems that there is a demand for custom brush such as bigger brush size, spray, or pattern. Since Dotting is a pixel editor. I believe providing users the ability to create their own brush size is necessary. One could allow users to style the brushes by accepting a 2d-array such as below

const patternBrush = [
  [ 0, 1, 0,
    1, 1, 1,
    0, 1, 0]
]

The above brush will allow users to draw on the pixel grid with a +. We should also consider making the interaction canvas to show the brush pattern as an indicator when the user hovers her mouse on top of the pixel grid.

hunkim98 commented 1 year ago

Closing this issue since the PR is merged