Open mdvanes opened 4 years ago
iteration:
for(var i = 20; i < 600; i += 50) {
drawFish(i, 100 + i*0.5, randomColor(), -30, 28);
}
Fix for drawing the scene once (and not calling randomColor on each frame):
// Draw the Scene once
drawScene();
// Make a copy of the entire canvas
var sceneCopy = get();
var bubbleSize = 6;
var centreBX = (250);
var centreBY = (350);
// Draw Frame
draw = function () {
// On each frame, instead of redrawing scene (which calls "randomColor each time")...
// drawScene();
// ... just paste the copy
image(sceneCopy, 0, 0)
// Bubble
stroke(5, 242, 230);
noFill();
ellipse(377, 250, bubbleSize, bubbleSize);
};
semi random color: