You are currently viewing Building a digital environment

The brief for this was to build an environment that would utilize interactivity and loop functions to create an experience. Building the basic background and envisioning the experience was the easy part, implementing the functionality was more difficult and will require some research and trial and error.

I was able to map a ‘flashlight’ type circle to the mouse x location and through trial and error was able to scale the flashlight beam using the y location – sort of a zoom in zoom out of the flashlight circle. It kid of works, but lacks finesse and usability. I do like how the transparency of the alpha channel is ‘illuminating’ the scene and may add other elements that become revealed in the light beam.

void setup() {
  size(1000, 1000);
  noStroke();
}

void draw() {
  float x = mouseX;
  float y = mouseY;
  background(10, 16,90);
  fill(255, 50);
  // road
    quad(380,200, 520, 200, 900, 1000, 100, 1000);
    // lines
        quad(445,200, 448, 200,450, 220, 444,  220);
        quad(444,240, 450, 240, 452, 260, 446,260);
        quad(446,280, 452, 280,456, 310 , 446, 310);
        quad(446,330, 456, 330,460, 360 , 446, 360);
        quad(442,390, 458, 390,460, 440 , 440, 440);



// horizon
    rect(0,0,1000,200);

  ellipse(x, 300, y, y);
}