PImage singe; float ratio = .25; int singeVisible = 0; void setup () { fullScreen(); singe = loadImage("singe.png"); } void draw() { background(0); singeVisible = 0; if (keyPressed) { if (key == ' ') { singeVisible = 1; } } if (singeVisible == 1) { image (singe, 0, 0, singe.width * ratio, singe.height * ratio); } }
Processing : Image cachée ou affichée
par
Étiquettes :
Laisser un commentaire