本参考资料用于Processing 3.0+。 如果你使用的是前一版本，请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.
|描述|| The setup() function is run once, when the program starts. It’s used to define initial enviroment properties such as screen size and to load media such as images and fonts as the program starts. There can only be one setup() function for each program and it shouldn’t be called again after its initial execution.
If the sketch is a different dimension than the default, the size() function or fullScreen() function must be the first line in setup().
Note: Variables declared within setup() are not accessible within other functions, including draw().
Updated on October 2, 2018 05:02:04pm EDT