📄 animation.pde
字号:
// Class for animating a sequence of GIFsclass Animation { PImage[] images; int imageCount; int frame; Animation(String imagePrefix, int count) { imageCount = count; images = new PImage[imageCount]; for (int i = 0; i < imageCount; i++) { // Use nf() to number format 'i' into four digits String filename = imagePrefix + nf(i, 4) + ".gif"; images[i] = loadImage(filename); } } void display(float xpos, float ypos) { frame = (frame+1) % imageCount; image(images[frame], xpos, ypos); } int getWidth() { return images[0].width; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -