Hello,
My students are making interactive collages and importing a lot of .pngs. We noticed that Processing 3 is really laggy for simple image animations that run fine of Processing 2. Does anyone know why this is and how we can get the same smoothness in Process 3.
//variables
PImage boat;
PImage coral1;
PImage coral2;
PImage oil;
PImage sea;
PImage sky1;
PImage sky2;
PImage skyline;
PImage slum1;
PImage slum2;
PImage text;
PImage trashisle;
//more variables
float fadeIn = 0;
int fadeOut = 255;
int moveBoat = 800;
int fadeTrash = 0;
int skyFade = 255;
void setup() {
size(900,750);
//variables
boat = loadImage("boat.png");
coral1 = loadImage("coral1.png");
coral2 = loadImage("coral2.png");
oil = loadImage("oil.png");
sea = loadImage("sea.png");
sky1 = loadImage("sky1.png");
sky2 = loadImage("sky22.png");
skyline = loadImage("skyline.png");
slum1 = loadImage("slum1.png");
slum2 = loadImage("slum2.png");
text = loadImage("text.png");
trashisle = loadImage("trashisle.png");
}
void draw(){
//background(255);
imageMode(CENTER);
noTint();
image(sea,400,350,1000,800);
image(sky2,500,250,1000,800);
tint(255,255,255,skyFade);
image(sky1,500,400,1000,800);
tint(255,255,255,fadeIn);
image(oil,mouseY,400,3000,800);
noTint();
image(skyline,500,350,1000,800);
image(slum2,415,395,1000,800);
image(slum1,400,400,1000,800);
image(boat,moveBoat,430,1400,1200);
tint(255,255,255,fadeOut);
image(coral1,400,450,1000,700);
image(coral2,500,300,1200,1000);
tint(255,255,255,fadeTrash);
image(trashisle,500,350,1000,900);
noTint();
image(text,mouseX,400,1000,800);
//assign operators
fadeIn = fadeIn + 15;
fadeOut = fadeOut - 15;
moveBoat = moveBoat - 5;
moveBoat = constrain(moveBoat,450,800);
fadeTrash = fadeTrash + 5;
skyFade = skyFade - 3;
}
Links to photos for this student project:
https://drive.google.com/file/d/16X7dCwp8p7OAIgjR7GeLWLq-_bGLYtUO/view?usp=sharing
https://drive.google.com/file/d/1PYUOjUGWoBcTXNLqA2rD6V7VUPoSVx3X/view?usp=sharing
https://drive.google.com/file/d/1rpY433HLLHrq1zk6IWmwmSdTddLZu_ym/view?usp=sharing
https://drive.google.com/file/d/1hm8EWIbjTQakLmdNPUCtH-NUq0jqIBOd/view?usp=sharing
https://drive.google.com/file/d/1GUbTEDrTLFangDWWtf9f2npTnrdTV6Qw/view?usp=sharing
https://drive.google.com/file/d/1-y1IqBNuup-W7hntAQGsGzupLw00TvJD/view?usp=sharing
https://drive.google.com/file/d/1ZyUkkWkCnSlFa7d-vjY9LqbusYYBbm7-/view?usp=sharing
https://drive.google.com/file/d/12OMxxLwGRJ4tXmy9qpBQb23eoI7sZFBj/view?usp=sharing
https://drive.google.com/file/d/1HZ0v4Z742BUzcLV5z5aePh68z8OyPv_9/view?usp=sharing
https://drive.google.com/file/d/1mdshK42Ts2TTSrhwzY0cUBev_5E7k7p2/view?usp=sharing
https://drive.google.com/file/d/1W7tpxs934AT-xgXpx6ppmJzCo0m2Z5XE/view?usp=sharing
https://drive.google.com/file/d/1o2yg8NgtLrx6qT8uo4s9PwDMFRWr15ap/view?usp=sharing