Hi all!
I'm trying to create a crayon brushing using paperjs, but it's not working. Analogous to factory brushing:
github . I completely converted the code into paperjs code, but the code slowed down a lot when creating X number of new rect forms in the loop while dragging. Even if you create a form in advance, create it in advance in onMouseDown action. To summarize, I tried to implement it in two ways:
1. Create a new element and immediately transfer it to the symbol in onMouseDown.
2. When onMouseDrag, multiply and change the location of the symbol.
or
1. Create the required number of rect shapes with the required coordinates immediately in onMouseDrag.
Everything is implemented perfectly, but there is one BUT: the code is very slow. What should I do?