Tumgik
#nostroke
aerlevvsedi · 3 months
Text
PImage backgroundImg; PImage bottomLeftImage; PImage bottomRightImage; int[] colors = { color(255, 0, 0), // Red color(255, 127, 0), // Orange color(255, 255, 0), // Yellow color(0, 255, 0), // Green color(0, 0, 255), // Blue color(139, 0, 255) // Purple }; int currentColorIndex = 0; String line1 = "HYDRATE"; String line2 = "YOURSELF"; float textSizeBase = 100; // Base size of the text float textSizeMultiplier = 1.0; // Multiplier to scale text size with canvas size float textY1, textY2; // Y-coordinates of the text lines
int numDroplets = 100; // Number of droplets Droplet[] droplets = new Droplet[numDroplets]; // Array to hold droplets float poolThreshold; // Y-coordinate threshold where droplets start pooling
void setup() { size(720, 600); // Set canvas size backgroundImg = loadImage("Background.jpg"); // Load background image bottomLeftImage = loadImage("Vaso.png"); // Load bottom left image bottomRightImage = loadImage("Garrafon.png"); // Load bottom right image
// Resize images to half their original height float scale = 0.5; bottomLeftImage.resize(int(bottomLeftImage.width * scale), int(bottomLeftImage.height * scale)); bottomRightImage.resize(int(bottomRightImage.width * scale), int(bottomRightImage.height * scale));
// Calculate text size based on canvas size textSize(textSizeBase * textSizeMultiplier);
// Calculate Y-coordinates for text lines textY1 = height / 2 - textSizeBase * textSizeMultiplier / 2; // Above the center textY2 = height / 2 + textSizeBase * textSizeMultiplier / 2; // Below the center
// Set text to bold PFont myFont = createFont("Arial", 48, true); // Create a bold Arial font with size 48 textFont(myFont);
// Initialize droplets for (int i = 0; i < numDroplets; i++) { droplets[i] = new Droplet(); }
// Set the pooling threshold to the bottom of the canvas poolThreshold = height; }
void draw() { // Display background image image(backgroundImg, 0, 0, width, height);
// Add gray-tinted overlay fill(50,100); // Semi-transparent gray fill rect(0, 0, width, height); // Draw a gray-tinted overlay
// Update and display droplets for (int i = 0; i < numDroplets; i++) { droplets[i].fall(); droplets[i].display(); }
// Display bottom left image image(bottomLeftImage, 20, height - bottomLeftImage.height - 20); // Adjust position as needed
// Display bottom right image image(bottomRightImage, width - bottomRightImage.width - 20, height - bottomRightImage.height - 20); // Adjust position as needed
// Blinking and cycling text color if (frameCount % 30 == 0) { // Change color every 30 frames (approximately every half second) currentColorIndex = (currentColorIndex + 1) % colors.length; }
// Display text with thick black outline and cycling colors textAlign(CENTER, CENTER); textSize(textSizeBase * textSizeMultiplier);
// Draw black outline stroke(0); strokeWeight(5); fill(colors[currentColorIndex]); text(line1, width / 2, textY1); text(line2, width / 2, textY2);
// Reset stroke for droplets noStroke(); }
// Class to represent a droplet class Droplet { float x, y; // Position of the droplet float speed; // Speed of the droplet boolean pooling; // Flag to indicate if droplet is pooling
Droplet() { reset(); // Initialize droplet position and speed }
// Method to update position void fall() { if (!pooling) { y += speed; if (y > poolThreshold) { // Start pooling at the threshold y = poolThreshold; // Set y to the threshold pooling = true; // Set pooling flag } } else { // If pooling, reset droplet above canvas after reaching the bottom y = random(-height, 0); pooling = false; // Reset pooling flag to restart falling } }
// Method to display the droplet void display() { fill(150, 200, 255); // Light blue color for water droplets ellipse(x, y, 5, 5); // Draw a small ellipse as the droplet }
// Method to reset droplet position and speed void reset() { x = random(width); // Random horizontal position y = random(-height, 0); // Start above the canvas speed = random(2, 6); // Random falling speed (double the previous speed range) pooling = false; // Initially not pooling } }
0 notes
Text
/**
* Mouse 2D.
*
* Moving the mouse changes the position and size of each box.
*/
void setup() {
size(640, 360);
noStroke();
rectMode(CENTER);
}
void draw() {
background(51);
fill(255, 204);
rect(mouseX, height/2, mouseY/2+10, mouseY/2+10);
fill(255, 204);
int inverseX = width-mouseX;
int inverseY = height-mouseY;
rect(inverseX, height/2, (inverseY/2)+10, (inverseY/2)+10);
}
(Este código no es mío, pertenece a alguien más)
1 note · View note
the7thsenseneoct · 7 months
Text
SISTEMA SOLAR
background black noStroke fill yellow scale 1 rotate ball move 0.5 scale 0.2 fill brown ball fill pink move 2,-8, -4 scale 2 ball move 2 fill blue ball scale 5 move -4 fill red ball move 5 fill 40, 90, 89 ball move 9 scale 7 fill 90, 59, 29 ball move 8 fill 45, 38, 19 ball fill 36,9, 67 ball move -8 fill12, 67,39 ball
0 notes
sirluxninstars · 7 months
Text
Codigo livecodelab:
background black noStroke fill yellow ambientLight ballDetail 100 scale .2 rotate 0, time, 1 rotate 0, 0.3, 0.6 ball 5
fill gray move -1, 0.1,-5 ball 0.6
fill brown move 4, 3, -2 ball .8
fill green move 3, -2, 2 ball 1
fill red move 5,-6, -9 ball 2
fill lightsalmon move 1,-10, -8 ball 3
fill saddlebrown move -9, 3, 2 ball 2
fill mediumslateblue move -5, 5, -6 ball 2
fill dodgerblue move -2,8, -2 ball 2
1 note · View note
is-tom · 7 months
Text
Les comparto un codigo bonito para Livecodelab
noStroke background black fill yellow ball fill red rotate time/100 move move 0.2 ball 0.2 fill orange rotate time/200 move move 0.3 ball 0.3 fill green rotate time/300 move move 0.3 ball 0.4 fill brown rotate time/400 move move 0.5 ball 0.5 fill silver rotate time/600 move move 0.3 ball 0.6 fill white rotate time/700 move move 0.3 ball 0.6 fill cyan rotate time/800 move move 0.3 ball 0.6 fill blue rotate time/900 move move 0.3 ball 0.6
Pruebalo aqui ^v^:
0 notes
carl1301 · 7 months
Text
LIVECODELAB
background black noStroke fill yellow scale 1 rotate ball move 0.5 scale 0.2 fill brown ball fill pink move 2,-8, -4 scale 2 ball move 2 fill blue ball scale 5 move -4 fill red ball move 5 fill 40, 90, 89 ball move 9 scale 7 fill 90, 59, 29 ball move 8 fill 45, 38, 19 ball fill 36,9, 67 ball move -8 fill12, 67,39 ball
1 note · View note
zozo-p · 7 months
Text
rotate 0, time,-1 rotate 0.4 scale .8 noStroke fill red ball
move 1 scale 0.5 fill blue ball
move 1 scale 0.6 fill orange ball
move 0.3 scale 0.7 fill yellow
move 1 ball scale 0.7 fill pink ball
move 1 scale 0.7 fill green ball
1 note · View note
addyyyyyyyy · 7 months
Text
background black
fill yellow
scale 0.3
1 times
move 3, 1, 1
noStroke
ball
fill orange
scale 0.7
1 times
rotate 5, 3, time
move 2, 3, 1
ball
fill pink
scale 0.8
1 times
rotate 5, 4, time
move 5, 3, 1
ball
fill blue
scale 1
1 times
rotate 6, 4, time
move 5, 3, 2
ball
fill red
scale 1.2
1 times
rotate 8,1, time
move 5,3,2
ball
fill gray
scale 1.7
1 times
rotate 9, 1, time
move 5,2,3
ball
fill green
scale 1.3
1 times
rotate 5, 3, time
move 1, 3, 2
ball
fill indigo
scale 1.4
1 times
rotate 4, 3, time
move 2,1,3
ball
fill brown
scale 1.1
1 times
rotate 5, 3, time
move 2, 3, 1
ball
1 note · View note
la-jaiba-chida · 7 months
Text
Live codeLab
scale 0.1 background black
rotate fill yellow ball noStroke fill brown scale 0.5 move move 0,2 ball
move 0,2 move fill red ball move 0,2 move 0,1 fill blue ball
move 0,3 move 0,2 fill green ball
move 0,4 move 0,3 fill pink ball
fill violet ball 0,3
move 0,5 move 0,4 fill orange ball
move 0,6 move 0,5 fill white ball
0 notes
darknessproductions · 7 months
Text
Live Code Lab :v
noStroke background black fill yellow scale 0.18 ball
fill red rotate 1, 0, 1 move 0.2 ball 0.2
fill orange //rotate frame /150 move move 0.3 ball 0.3
fill blue //rotate frame / 170 move move 0.4 ball 0.4
fill orange //rotate frame /180 move move 0.5 ball 0.5
fill red //rotate frame /190 move move 0.6 ball 0.6
fill green //rotate frame /200 move move 0.7 ball 0.7
fill blue //rotate frame /190 move move 0.9 ball 0.9 fill white move move 1.1 ball 0.9
fill violet move move 1.2 ball 0.2
0 notes
livecodelab · 7 months
Text
simpleGradient (color 0), (color 10,0,56), color 0
//Sol rotate 0.1, time ,-1 scale 1 fill 254,35,0 noStroke ball
//Mercurio move 0.5, 1,.5 scale .2 fill 162,53,8 noStroke ball
//Venus move 1.9, 1, .5 scale 1.3 fill 159,95,40 noStroke ball
//Tierra move 2, 1, .5 scale 1.4 fill 44,109,223 noStroke ball
//Marte move 1.3, 1, .5 scale .65 fill 162,4,4 noStroke ball
//Jupiter move 4.3, 1, .5 scale 4 fill 198,122,67 noStroke ball
//Saturno move 1.6, 1, .5 scale .8 fill 241,208,193 noStroke ball
0 notes
hakairaito · 7 months
Text
background black
rotate
scale 0.5
noStroke
fill yellow
ballmove 0.7
scale 0.1
fill red
ball
move 1.4
scale 2
fill orange
ball
move 1
scale 1
fill blue
ball
move 1
scale 1
fill red
ball
move 2
scale 4
fill green
ball
move 1
scale 1
fill orange
ball
move 1
scale 0.7
fill purple
ball
move 1
scale 0.7
fill
ball
0 notes
sratl · 7 months
Text
rotate 0, time,-1 rotate 0.4 scale .8 noStroke fill red ball
move 1 scale 0.5 fill blue ball
move 1 scale 0.6 fill orange ball
move 0.3 scale 0.7 fill yellow
move 1 ball scale 0.7 fill pink ball
move 1 scale 0.7 fill green ball
1 note · View note
coffee-hug · 7 months
Text
Sistema Solar
background black rotate scale 0.5 noStroke fill yellow ball move 0.7 scale 0.1 fill red ball move 1.4 scale 2 fill orange ball move 1 scale 1 fill blue ball move 1 scale 1 fill red ball move 2 scale 4 fill green ball move 1 scale 1 fill orange ball move 1 scale 0.7 fill purple ball move 1 scale 0.7 fill ball
0 notes
lacajitaazul · 7 months
Text
noStroke
background black
fill yellow
scale 0.1
ball
fill red
rotate frame/ 100
move
move 0.2
ball 0.2
fill orange
move
move 0.3
ball 0.3
fill green
move
move 0.3
ball 0.2
fill brown
move
move 0.3
ball 0.2
fill purple
move
move 0.3
ball 0.2
fill blue
move
move 0.3
ball 0.2
fill pink
move
move 0.3
ball 0.2
fill brown
move
move 0.3
ball 0.2
fill yellow
move
move 0.3
ball 0.2
0 notes
insidesrooms · 7 months
Text
LIVECODELAB
rotate 0,time,-1
scale 0.7
background 24,33,74
noStroke
fill yellow
ball
scale 0.1
move 4.5
noStroke
fill red
ball
scale 1.5
move 0.8
noStroke
fill brown
ball
scale 0.8
move 1
noStroke
fill skyblue
ball
scale 2
move 0.6
noStroke
fill orange
ball
scale 1.7
move 0.6
noStroke
fill 160,98,47
ball
scale 0.9
move 0.8
noStroke
fill 237,238,226
ball
scale 0.8
move 0.9
noStroke
fill 88,174,186
ball
scale 0.9
move 0.9
noStroke
fill blue
ball
0 notes