Fix background colour loading
This commit is contained in:
parent
7f6f0763c4
commit
47d83a5919
@ -56,19 +56,8 @@ var amplitude;
|
|||||||
var duration;
|
var duration;
|
||||||
|
|
||||||
// The background colour choices for the environment
|
// The background colour choices for the environment
|
||||||
var bgChoices [
|
var bgChoices;
|
||||||
color("#F6B2FF"),
|
var bgColour;
|
||||||
color("#F58F6C"),
|
|
||||||
color("#C3EFDB"),
|
|
||||||
color("#CFE4D9"),
|
|
||||||
color("#ADCA95"),
|
|
||||||
color("#F58F6C"),
|
|
||||||
color("#A5F1F7"),
|
|
||||||
color("#FFC266"),
|
|
||||||
color("#FF66BB"),
|
|
||||||
color("#F6B2FF"),
|
|
||||||
];
|
|
||||||
var bgColour = bgChoices[floor(random(0, bgChoices.length - 1))];
|
|
||||||
|
|
||||||
function record() {
|
function record() {
|
||||||
/**
|
/**
|
||||||
@ -532,13 +521,27 @@ function setup() {
|
|||||||
createCanvas(windowWidth, windowHeight);
|
createCanvas(windowWidth, windowHeight);
|
||||||
frameRate(frameRate);
|
frameRate(frameRate);
|
||||||
setupRecording();
|
setupRecording();
|
||||||
|
|
||||||
|
bgChoices = [
|
||||||
|
color("#F6B2FF"),
|
||||||
|
color("#F58F6C"),
|
||||||
|
color("#C3EFDB"),
|
||||||
|
color("#CFE4D9"),
|
||||||
|
color("#ADCA95"),
|
||||||
|
color("#F58F6C"),
|
||||||
|
color("#A5F1F7"),
|
||||||
|
color("#FFC266"),
|
||||||
|
color("#FF66BB"),
|
||||||
|
color("#F6B2FF")
|
||||||
|
];
|
||||||
|
bgColour = bgChoices[floor(random(0, bgChoices.length - 1))];
|
||||||
}
|
}
|
||||||
|
|
||||||
function draw() {
|
function draw() {
|
||||||
/**
|
/**
|
||||||
* The draw loop which is called x times a second where x is the frameRate.
|
* The draw loop which is called x times a second where x is the frameRate.
|
||||||
**/
|
**/
|
||||||
background(backgroundColour);
|
background(bgColour);
|
||||||
blendMode(BLEND);
|
blendMode(BLEND);
|
||||||
smooth();
|
smooth();
|
||||||
noStroke();
|
noStroke();
|
||||||
|
Loading…
Reference in New Issue
Block a user