Uploading P5.js sketch from P3 IDE

hi,
i posted long question in that other section:

but i hope that i can ask here too, as i am really having trouble transfering
p3 to p5js. example is here: old threads - OpenProcessing
i am lost with it, not sure if only bezier is not behaving or did i made other mistakes.
thank you,
maja