Convert Processing to p5.js

I did formate my code… could you help me with the part that doesnt work please?