+ 5
Solid Lines (p5)
How can I draw a solid line between my previous mouseClick and the next mouseClick. I have tried using pmouse but it still draws blobs. How can I achieve lines like Emma's Paint Project. https://code.sololearn.com/Wfy2pEgAdY91/?ref=app
13 Respostas
+ 11
why do you use mouseDragged and not mousePressed for instance?
+ 13
Perhaps could you add more color and different size of line...
+ 12
â__JavaScripter__đ glad that works. đ You can also include a mouseReleased with the same code as the mousePressed. When i draw a line now and try a second line nothing appears on screen. The third line works again etcetera. You can avoid that with an added mouseReleased...
+ 11
â__JavaScripter__đ iâm not sure. I have the feeling that painting in the Y direction does not react as well as in the X direction. You can see that best when you draw a horizontal line (perfect) and a vertical line (thereâs a delay). No idea why that is, but it could be a nice puzzle to solve... đ§
+ 10
â__JavaScripter__đ also, i would put a position:fixed in your CSS for the canvas, so the screen doesnât move when you drag your finger over the screen đ
+ 9
okay, but see what happens if you use mousePressed and mouseReleased instead. Does that give the result you want?
+ 7
â__JavaScripter__đ okay, another ios issue probably đ€Łđ€Łđ€Łđ€Ł
+ 5
What else could you recommend for this app. I made this bored (again) and I'm wondering how I can improve it.
+ 5
đ€ I don't notice a difference on my end
+ 4
Because I thought mouseDragged drags the mouse across the screen, I thought mousePressed is stationary
+ 4
It works!
+ 4
I'm surprised that's all it took! Thanks!
+ 4
Thank you for the help! I already have the result I want. I thought mousePressed was a stationery event while mouseDragged was not that's why I used it