fabric-brush
fabric-brush copied to clipboard
Draw brush strokes on lower-canvas?
I noticed that the brush strokes are drawn on the upper canvas. Thus making it impossible to layer with other items on the lower canvas.
The default fabric.js drawing brush draws on the lower canvas too.
Also, is it possible to select and move the strokes once they are drawn? Similar to how the default fabric.js brush works
agree
Anyone figure this out?
not me. i just used the default drawing functions from fabric itself. while using textures to mimic the strokes (at least the crayon) on this addon
@fariskas Would you be willing to share your code for the crayon?
@sops21 sorry for the late reply. but here's what a gist of the code. https://gist.github.com/fariskas/8a066a4adacf093e2bbe64034b41107d
@fariskas Thanks for sharing that!
One of the devs for fabric.js also posted this possible solution. Its kinda hacky, but it works. I'm going to test performance on it later today:
https://stackoverflow.com/questions/52885498/fabric-js-and-fabric-brush-cant-add-to-lower-canvas/
@sops21 cool! let me know how that goes. might have to relook into using this if its goes well