An error occurs when a variable with global scope is initialized to PI or TWO_PI.
It appears that PI does not work as a constant until after setup is called.
The error is: Uncaught ReferenceError: PI is not defined
Here's a working program that produces the error:
var halfCircle = PI;
function setup() {
createCanvas (100,100);
}
Interestingly, this error will allow the app to run when launched from a local file, but NOT when it is run from a server (e.g. when embedded in Wordpress).
An error occurs when a variable with global scope is initialized to PI or TWO_PI.
It appears that
PIdoes not work as a constant until after setup is called.The error is:
Uncaught ReferenceError: PI is not definedHere's a working program that produces the error:
Interestingly, this error will allow the app to run when launched from a local file, but NOT when it is run from a server (e.g. when embedded in Wordpress).