我在阅读页面时遇到了问题
http://processingjs.org/articles/PomaxGuide.html
请注意“Processing.js 作为 javascript 图形库”部分:
setup方法改写如下:
pjs.setup = function() {
pjs.size(200,200);
// we want to turn off animation, because this is a demo page and it
// would use cpu while not being looked at. Only draw on mousemoves
pjs.noLoop();
}
最后,我们可以调用 setup() 来启动草图。
pjs.setup();
问题是 setup() 已经被覆盖,处理如何运行循环?在 setup() 中没有这样的代码来调用 draw() 循环。