是否可以每帧只执行一次 draw() ?

Is it possible to execute draw() only once a frame?

我正在尝试在 Processing.js 中进行物理模拟,我只想每帧执行一次绘制函数。这可能吗?还是有其他功能可以做到这一点?

在处理中,每个 draw 调用 一个(新)帧,您可以在战术中使用 frameRate() function, or you can turn off interval-based redraws by calling noLoop() in your setup function, and then instead using redraw() 调节帧速率点手动触发重绘