Initial Drawing Factory Setup Part 1



Unit Progress: Unit 2: Build your Creativity

 71%

Initial Drawing Factory Setup

 

 

Click here to load the live code in P5JS

 

Or you can copy and paste the code below into your own P5JS

 

function setup() {
  createCanvas(600, 600);
  drawSetup();
}

function draw() {
  // Empty draw loop – all drawing is done in drawSetup()
}

function drawSetup() {
  console.log("I am in the drawSetup function!");

  // Setup configuration for drawSetup
  background('#FFFFCD');
  strokeWeight(5);
  rectMode(CORNER);

  let xPosition = 50;
  let yPosition = 50;
  let shapeWidth = 300;
  let shapeHeight = 300;
  let shapeColor = "8,129,249";
  let shapeOutline = "5,6,7";

  // Currently, shapeColor and shapeOutline are not used. You can add logic to apply these if needed.
  rect(xPosition, yPosition, shapeWidth, shapeHeight);
}

Previous Next