We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi guys, I'm new here and I have a question.My question is;
I have created a for loop which is draw images side by side and I've tried to create sliding effect by decreasing x position of the image and I need to create a loop which the first images slide to left(image is out of the canvas) I need to redraw it on right side of the screen.I'm sorry for my bad English I'm not a native speaker and thanks for your advices :)
Here is my code:
for(var plainPosX = 0; plainPosX<=width;plainPosX +=100){
image(plain,plainPosX + slide,430);
}
//slide takes negative value so it decreases plainPosX and it seems like image is sliding.
Answers
interesting
The
draw()
function is the infinite loop you want already! Here's an example: