createCanvas(windowWidth, windowHeight);
for(let i = 0; i < num; i++) {
vecLocation[i] = createVector(width / 2, height / 2);
vecVelocity[i] = createVector(random(-10, 10), random(-10, 10));
diameter[i] = random(1, random(1, 15));
for(let k = 0; k < num; k++) {
vecLocation2[k] = createVector(width / 2, height / 2);
vecVelocity2[k] = createVector(random(-30, 30), random(-30, 30));
var startX = windowWidth / 2;
var startY = windowHeight / 2;
for(var i=0; i<360; i+=30){
stroke(255, 255, 255, random(0.1, 15));
strokeWeight(random(0.5,5));
var radian = i * Math.PI / 180;
var length = windowWidth * random(0, 2);
var endX = startX + random(-180, 180) + Math.sin(radian) * (length * random(0.1, 1));
var endY = startY + random(-180, 180) + Math.cos(radian) * (length * random(0.1, 1));
line(startX, startY, endX, endY);
ellipse(windowWidth / 2 + random(-5, 5), windowHeight / 2 + random(-5, 5), random(10, 20), random(10, 20))
for(let i = 0; i < num; i++) {
col[i] = color(random(200, 255), random(200, 255), random(200, 255), random(1, 255));
vecLocation[i].add(vecVelocity[i]);
ellipse(vecLocation[i].x, vecLocation[i].y, diameter[i], diameter[i]);
if(vecLocation[i].x < 0 ) {
vecLocation[i].y = windowHeight / 2;
vecLocation[i].x = windowWidth / 2;
}else if(vecLocation[i].x > width){
vecLocation[i].y = windowHeight / 2;
vecLocation[i].x = windowWidth / 2;
if(vecLocation[i].y < 0 ) {
vecLocation[i].y = windowHeight / 2;
vecLocation[i].x = windowWidth / 2;
}else if(vecLocation[i].y > height){
vecLocation[i].y = windowHeight / 2;
vecLocation[i].x = windowWidth / 2;
for(let k = 0; k < 200; k++) {
fill(255, 0, 0, random(0, 1));
vecLocation2[k].add(vecVelocity2[k]);
partdiameter = vecLocation2[k].x - windowWidth / 2
ellipse(vecLocation2[k].x, vecLocation2[k].y, partdiameter, partdiameter);
if(vecLocation2[k].x < windowWidth * -1.7) {
vecLocation2[k].y = windowHeight / 2;
vecLocation2[k].x = windowWidth / 2;
}else if(vecLocation2[k].x > windowWidth * 1.7){
vecLocation2[k].y = windowHeight / 2;
vecLocation2[k].x = windowWidth / 2;
if(vecLocation2[k].y < windowHeight * -1.7 ) {
vecLocation2[k].y = windowHeight / 2;
vecLocation2[k].x = windowWidth / 2;
}else if(vecLocation2[k].y > windowHeight * 1.7){
vecLocation2[k].y = windowHeight / 2;
vecLocation2[k].x = windowWidth / 2;
fill(50, 50, 255, random(0.1, 0.6));
ellipse(windowWidth / 2 + random(-30, 30), windowHeight / 2 + random(-30, 30), random(25, 100), random(25, 10))
stroke(255, 255, 255, 255);
textAlign(CENTER, CENTER);
let speed = random(28, 31);
text("SPEED : " + Math.round(speed) + "0,000 km/s", windowWidth / 2, windowHeight / 2 + 205);
text("WARP DRIVE : ACTIVE", windowWidth / 2, windowHeight / 2 + 250);
line(windowWidth / 2 - 150, windowHeight / 2 + 280, windowWidth / 2 + 150, windowHeight / 2 + 280);