createVector(random(-10,5),random(-10,5)),
for(let i = 0; i < blob.length; i++){
if (mouseX <=blob[i].position.x && blob[i].position.x <=mouseX+60
&&height/2-15 <= blob[i].position.y && blob[i].position.y <= height/2+15
&&blob.length < jyougen) {
createVector(blob[i].position.x+30,blob[i].position.y+30),
createVector(random(-2,2),random(-2,2)),
constructor(diameter, position, velocity, colorA, colorB, colorC){
this.diameter = diameter;
this.position = position;
this.velocity = velocity;
this.position.add(this.velocity);
if (this.position.x < this.diameter / 2 || this.position.x > width - this.diameter / 2) {
if (this.position.y < this.diameter / 2 || this.position.y > height - this.diameter / 2) {
if (mouseX<=this.position.x && this.position.x <=mouseX+60
&&height/2-10 <= this.position.y && this.position.y <= height/2+10
&& this.velocity.y <=0) {
if (mouseX<=this.position.x && this.position.x <=mouseX+60
&&height/2-10 <= this.position.y && this.position.y <= height/2+10
&& this.velocity.y > 0) {
fill(this.A,this.B,this.C, 127);
let currentDiameter = sin(frameCount * 0.1) * (this.diameter / 4) + this.diameter;
circle(this.position.x, this.position.y, currentDiameter);
circle(this.position.x, this.position.y, this.diameter / 6.0);
this.position = createVector(width/2,height/2)
this.position.x = mouseX;
rect(this.position.x, this.position.y, 60,10);