blendMode in instance mode

B/c loadImage() is also a method from class p5, you need its reference like all the other p5 members:

    DAYLIGHT = p.loadImage('../img/DL1.jpg');
    LAMPS1 = p.loadImage('../img/NL1.jpg');
    LAMPS2 = p.loadImage('../img/TL1.jpg');

BtW, DAYLIGHT, LAMPS1 & LAMPS2 aren’t constant variables.
So it’s better to use the “lowerUpperCase” style on them:

    daylight = p.loadImage('../img/DL1.jpg');
    lamps1 = p.loadImage('../img/NL1.jpg');
    lamps2 = p.loadImage('../img/TL1.jpg');

P.S.: Ru sure you need ../ in order to access those 3 images? :thinking:

3 Likes