Closed lerrybe closed 1 year ago
Thank you for your contribution🚀! @lerrybe
Your job looks amazing!!!
Your point on changing the brush mode using strategy pattern is worth discussion
I believe we could later change the whole drawing method using such pattern.
For your information, I give you an example of an editor that seems to use strategy pattern for changing its editing method.
[Yorkie Toonie set tool(worker)] https://github.com/yorkie-team/toonie/blob/79f9a7c6033fceb5d23bb335d35bf8e66ec8361f/src/components/Editor/DrawingBoard/Canvas/Board.ts#L275-L305
[Yorke Toonie list of workers] https://github.com/yorkie-team/toonie/tree/79f9a7c6033fceb5d23bb335d35bf8e66ec8361f/src/components/Editor/DrawingBoard/Canvas/Worker
The above examples are what I wrote last year in Naver (By the way, the code is quite similar to dotting)
If I find other better example, I will update you.
I modified reflecting reviews. Thank you for your helpful references and reviews! 🤩 @hunkim98
🚀 [Issue #3]
Changes
🪣 Paint Bucket (BrushMode)
drawPixel
method)utils/queue.ts
.)🍓 Modify DOCS (useBrush story)
useBrush
has been modified to reflect the relevant information.Notes
[mode name]: Function
to make it easier to manage? (I thought the idea of a strategy pattern, I'm going to look for related content more..!)ScreenShot