我的蜜蜂不会出现。在绘图循环中加载和显示图像的正确方法是什么?
/* @pjs preload="/static/uploaded_resources/p.8706/Flower-Ice-icon.png"; */
/* @pjs preload="/static/uploaded_resources/p.8706/bee.png"; */
void setup() { // this is run once.
PImage img;
PImage bee;
// set the background color
background(255);
// canvas size (Variable aren't evaluated. Integers only, please.)
size(256, 256);
img = loadImage("/static/uploaded_resources/p.8706/Flower-Ice-icon.png");
bee = loadImage("/static/uploaded_resources/p.8706/bee.png");
image(img, 0, 0);
}
void draw() { // this is run repeatedly.
image(bee, mouseX, mouseY);
}
这是草图的链接: http: //studio.sketchpad.cc/sp/pad/view/VfC92Mrf5o/rev.119