Reputation: 9
//stroke weight
let strokeweight_driver = sin(millis()/300)
stroke_weight = map((strokeweight_driver), -1, 1, 5, 8)
stroke("black")
strokeweight(stroke_weight)
circle(20,30,20)
I want to make this strokeweight of circle in 20, when I click the screen. So I decided to use a mousePressed function and type a stroke_weight = 20 but it doesn't work. What should I do? p.s. English is not my mother language so there're might be has a wrong sentence. Please understand me.
Upvotes: 0
Views: 84
Reputation: 91
There is no strokeweight() function. It's strokeWeight(). Try this:
stroke_weight = map((strokeweight_driver), -1, 1, 5, 8)
stroke("black")
strokeWeight(stroke_weight)
circle(20,30,20)```
Upvotes: 1