All I Can See Is White Sorry

The text discusses various projects and art pieces created using p5.js, a JavaScript library aimed towards making coding more accessible for artists, designers, educators, and beginners. These projects include a procedural art piece that uses a 3D grid, a 2D array for creating a 3D grid of a specific size, and a circle of lights and a 3D tunnel made of colorful dots. Other showcased projects on OpenProcessing include a static grid with long horizontal lines on top and short lines on the bottom.

It seems that the search results did not provide a specific code snippet for a p5.js 3D tunnel with grid lines that matches your requirements. Let me provide you with an updated example that should fulfill your request.

let angle = 0;
let pos = 0;

function setup() {
  createCanvas(800, 400, WEBGL);
}

function draw() {
  background(200);
  translate(0, 0, pos);

  // Draw the tunnel
  for (let i = 0; i < 100; i++) {
    push();
    translate(0, 0, i * 30 - pos % 60 - 1500);
    drawGridLines();
    box(100, 100, 60);
    pop();
  }
}

function drawGridLines() {
  for (let i = -1500; i <= 1500; i += 150) {
    // Draw grid lines along the tunnel walls
    stroke(0, 100);
    line(-1500, i, 1500, i);
  }
}

function keyPressed() {
  if (keyCode == UP_ARROW) {
    pos -= 10;
  } else if (keyCode == DOWN_ARROW) {
    pos += 10;
  } else if (keyCode == LEFT_ARROW) {
    angle -= 0.1;
  } else if (keyCode == RIGHT_ARROW) {
    angle += 0.1;
  }
}

In this updated code, I made the necessary adjustments and removed the unnecessary vertical lines to ensure a better visibility of the grid. When you run this code, it should create a first-person perspective experience within a long rectangular tunnel with visible grid lines to provide a sense of movement. Feel free to modify the distance between the grid lines and the tunnel length based on your preferences.

Work fast from anywhere

Stay up to date and move work forward with BrutusAI on macOS/iOS/web & android. Download the app today.