diff --git a/sketch.js b/sketch.js index 1dcd51e..9cae4ec 100644 --- a/sketch.js +++ b/sketch.js @@ -42,7 +42,7 @@ class RotatingOnion { scale(this.scale); model(onion_stroke); push() - emissiveMaterial(0,0,0) + emissiveMaterial(backgroundColor) model(onion_fill); pop() @@ -191,6 +191,9 @@ function setup() { textAlign(CENTER, CENTER); randomSeed() + // Background color + backgroundColor = [0, 0, 0]; + // Initialize camera to get its position camera = createCamera(); @@ -216,7 +219,7 @@ function setup() { } function draw() { - background(0); + background(backgroundColor); orbitControl(); ambientLight(100); shininess(0);