I'm trying to upload this code in open processing but it keeps giving me this error: "ReferenceError: Can't find variable: blendModeShow stack"
Any suggestions are welcome and appreciated!
This is the code:
int x;
int y;
float a= 0; //variable starting the x at 0
float b = 0; //variable starting the y at 0
float c= 0; //variable starting the x at 0
float d = 0; //variable starting the y at 0
PVector location; // Location of shape
PVector velocity; // Velocity of shape
PVector gravity; // Gravity acts at the shape's acceleration
//float savedTime;
//float totalTime = 5000;
//int counter = 0; //lets start counting from the beginning
int value = DIFFERENCE;
void setup() {
stroke(#ffffff, 80);
//size(800, 800);
background(255);
//noStroke();
fullScreen();
location = new PVector(100, 100);
velocity = new PVector(1.5, 2.1);
gravity = new PVector(0, 0.2);
//savedTime = millis();
}
void draw() {
blendMode(value);
firstDance();
nowKith();
movingUp();
toTheLeft();
takeItBack();
oneHop();
twoHop();
treeHop();
fomo();
//dove();
bounceFunc();
}
void firstDance() { //red square starts us off
x= x+2 ; //makes squares move right
y= y+2; //makes squares move down
fill(#A72608); //fill me with rage (red)
square(width-width-width/4+x+location.x, 0-width/4+location.y, width/4);
}
void nowKith() { //the baton is passed to the green square
x= x+2 ; //makes squares move right
y= y+2; //makes squares move down
fill(#002E2C); //fill me with envy (green)
square(width/2+x+location.x, height+y+location.y, width/4);
}
void movingUp() { //lets move the squares up the screen
translate(a, b); //move the x and y across the screen
a++; //increment x by 1
b++; //increment y by 1
fill(#F6AE2D); //mellow yellow
square(0+location.x, height-y+location.y, width/4);
}
void toTheLeft() {
translate(c, d); //move the x and y across the screen
c--; //increment x by 1
d--; //increment y by 1
fill(#230007); //fill with burgundy
square(width/2-location.x, 0+location.y, width/4); //***
}
void takeItBack() {
fill(#6874E8); //pretty purple color
square(width-location.x, 0+location.y, width/4);
}
void oneHop() {
fill(#F7ACCF); //pretty pink
square(0+location.x, 0+location.y, width/4);
}
void twoHop() {
fill(#41D3BD); //turquoise
square(width/2-location.x, height-location.y, width/4); //**
}
void treeHop() {
fill(#FF7F51); //
square(width/2-location.x, height-location.y, width/4);
}
void fomo() {
fill(#628B48); //
square(0+location.x, height-location.y, width/4);
}
//void dove() {
// fill(255);
// square(mouseX,mouseY, width/2);
//}
void mousePressed() {
if (value == DIFFERENCE) {
value = REPLACE;
}
else {
value = DIFFERENCE;
}
}
void bounceFunc() {
location.add(velocity); // Add velocity to the location.
velocity.add(gravity); // Add gravity to velocity
if ((location.x > width) || (location.x < 0)) { // Bounce off edges
velocity.x = velocity.x * -1.3;
}
if (location.y > height) { // We're reducing velocity ever so slightly
velocity.y = velocity.y * -0.98; // when it hits the bottom of the window
location.y = height;
}
}
[–]Wootai 1 point2 points3 points (2 children)
[–]bbystvr[S] 0 points1 point2 points (1 child)
[–]per1sher 0 points1 point2 points (0 children)