Skip to content

Commit

Permalink
P_2_1_3: Code style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels-NTG committed Aug 25, 2017
1 parent 673445c commit f5710e1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
5 changes: 3 additions & 2 deletions 01_P/P_2_1_3_01/sketch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// P_2_1_3_01.pde
// P_2_1_3_01
//
// Generative Gestaltung, ISBN: 978-3-87439-759-9
// First Edition, Hermann Schmidt, Mainz, 2009
Expand Down Expand Up @@ -29,13 +29,14 @@
*/
'use strict';

var count = 0;
var tileCountX = 10;
var tileCountY = 10;
var tileWidth = 0;
var tileHeight = 0;

var count = 0;
var colorStep = 15;

var circleCount = 0;
var endSize = 0;
var endOffset = 0;
Expand Down
9 changes: 4 additions & 5 deletions 01_P/P_2_1_3_02/sketch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// P_2_1_3_02.pde
// P_2_1_3_02
//
// Generative Gestaltung, ISBN: 978-3-87439-759-9
// First Edition, Hermann Schmidt, Mainz, 2009
Expand Down Expand Up @@ -30,11 +30,10 @@
'use strict';

var count = 10;
var colorStep = 20;

var colorStep = 20;
var lineWeight = 0;
var strokeColor = 0;

var backgroundColor = 0;

var drawMode = 1;
Expand Down Expand Up @@ -98,11 +97,11 @@ function draw() {
// set colors depending on draw mode
switch (drawMode) {
case 1:
backgroundColor = 360;
backgroundColor = 255;
stroke(0);
break;
case 2:
backgroundColor = 360;
backgroundColor = 255;
stroke(0);
strokeWeight(lineWeight);
break;
Expand Down
5 changes: 2 additions & 3 deletions 01_P/P_2_1_3_03/sketch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// P_2_1_3_03.pde
// P_2_1_3_03
//
// Generative Gestaltung, ISBN: 978-3-87439-759-9
// First Edition, Hermann Schmidt, Mainz, 2009
Expand Down Expand Up @@ -31,17 +31,16 @@
*/
'use strict';

var count = 0;
var tileCountX = 6;
var tileCountY = 6;
var count = 0;

var drawMode = 1;

function setup() {
createCanvas(windowWidth, windowHeight);
rectMode(CENTER);
noFill();
stroke(0);
}

function draw() {
Expand Down
4 changes: 2 additions & 2 deletions 01_P/P_2_1_3_04/sketch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// P_2_1_3_04.pde
// P_2_1_3_04
//
// Generative Gestaltung, ISBN: 978-3-87439-759-9
// First Edition, Hermann Schmidt, Mainz, 2009
Expand Down Expand Up @@ -31,9 +31,9 @@
*/
'use strict';

var count = 0;
var tileCountX = 6;
var tileCountY = 6;
var count = 0;

var drawMode = 1;

Expand Down
5 changes: 4 additions & 1 deletion 01_P/P_2_1_3_05/sketch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// P_2_1_3_05.pde
// P_2_1_3_05
//
// Generative Gestaltung, ISBN: 978-3-87439-759-9
// First Edition, Hermann Schmidt, Mainz, 2009
Expand Down Expand Up @@ -33,9 +33,12 @@ var tileCountX = 10;
var tileCountY = 10;
var tileWidth;
var tileHeight;

var colorStep = 6;

var endSize = 0;
var stepSize = 30;

var actRandomSeed = 0;

function setup() {
Expand Down

0 comments on commit f5710e1

Please sign in to comment.