JS Mode is still from the time when Java Mode was @ version 1.5.1! @-)
So many new Processing 2+ features like constant TAU doesn't exist there! 8-X
So if your code can run under Processing v1.5.1, it's half the way to reach JS Mode conversion success! >-)
In your case there, just replace TAU for TWO_PI and you're done! (*)
Anyways, I've made a clean-up version from yours as well: :bz
Answers
JS Mode is still from the time when Java Mode was @ version 1.5.1! @-)
So many new Processing 2+ features like constant TAU doesn't exist there! 8-X
So if your code can run under Processing v1.5.1, it's half the way to reach JS Mode conversion success! >-)
In your case there, just replace TAU for TWO_PI and you're done! (*)
Anyways, I've made a clean-up version from yours as well: :bz
Thanks! I change all
TAU
toTWO_PI
, and it works.