Skip to content

Commit

Permalink
Fix comma-dangle style rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels-NTG committed Nov 22, 2018
1 parent 90e2c43 commit fec8bdf
Show file tree
Hide file tree
Showing 34 changed files with 3,844 additions and 3,844 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eol-last": "error",
"comma-dangle": [
"error",
"always"
"never"
],
"func-call-spacing": "error",
"key-spacing": "error",
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_1_2_1_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function mouseReleased() {
}

function keyPressed() {
if (key == 'c' || key == 'C') writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
if (key == 'c' || key == 'C') writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
if (key == 's' || key == 'S') saveCanvas(gd.timestamp(), 'png');
if (key == '1') interpolateShortest = true;
if (key == '2') interpolateShortest = false;
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_1_2_2_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function draw() {
}

function keyReleased() {
if (key == 'c' || key == 'C') writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
if (key == 'c' || key == 'C') writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
if (key == 's' || key == 'S') saveCanvas(gd.timestamp(), 'png');

if (key == '1') loadImage('data/pic1.jpg', setImage);
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_1_2_3_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function keyPressed() {
for (var i = 0; i < hueValues.length; i++) {
colors.push(color(hueValues[i], saturationValues[i], brightnessValues[i]));
}
writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
}

if (key == '1') {
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_1_2_3_02/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ function keyPressed() {
for (var i = 0; i < hueValues.length; i++) {
colors.push(color(hueValues[i], saturationValues[i], brightnessValues[i]));
}
writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
}
}
2 changes: 1 addition & 1 deletion 01_P/P_1_2_3_03/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,6 @@ function keyPressed() {
for (var i = 0; i < hueValues.length; i++) {
colors.push(color(hueValues[i], saturationValues[i], brightnessValues[i]));
}
writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
}
}
2 changes: 1 addition & 1 deletion 01_P/P_1_2_3_04/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ function keyPressed() {
for (var i = 0; i < hueValues.length; i++) {
colors.push(color(hueValues[i], saturationValues[i], brightnessValues[i]));
}
writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
}
}
2 changes: 1 addition & 1 deletion 01_P/P_1_2_3_05/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ function keyPressed() {
for (var i = 0; i < hueValues.length; i++) {
colors.push(color(hueValues[i], saturationValues[i], brightnessValues[i]));
}
writeFile([gd.ase.encode(colors),], gd.timestamp(), 'ase');
writeFile([gd.ase.encode(colors)], gd.timestamp(), 'ase');
}
}
2 changes: 1 addition & 1 deletion 01_P/P_2_3_6_02/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'use strict';

var modules;
var moduleType = ['A', 'B', 'C', 'D', 'E', 'F', 'J', 'K',];
var moduleType = ['A', 'B', 'C', 'D', 'E', 'F', 'J', 'K'];
var activeModuleSet = 'A';

var tileSize = 30;
Expand Down
4 changes: 2 additions & 2 deletions 01_P/P_2_3_7_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function draw() {
}

if (recording) {
gif.addFrame(canvasElement.canvas, {delay: 1, copy: true,});
gif.addFrame(canvasElement.canvas, {delay: 1, copy: true});
}
}

Expand Down Expand Up @@ -187,7 +187,7 @@ function setupGIF() {
workers: 16,
quality: 10000,
debug: true,
workerScript: '../../libraries/gif.js/gif.worker.js',
workerScript: '../../libraries/gif.js/gif.worker.js'
});
gif.on('finished', function(blob) {
saveAs(blob, gd.timestamp() + '.gif');
Expand Down
4 changes: 2 additions & 2 deletions 01_P/P_2_3_7_02_TABLET/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function draw() {
}

if (recording) {
gif.addFrame(canvasElement.canvas, {delay: 1, copy: true,});
gif.addFrame(canvasElement.canvas, {delay: 1, copy: true});
}

}
Expand Down Expand Up @@ -220,7 +220,7 @@ function setupGIF() {
workers: 16,
quality: 10000,
debug: true,
workerScript: '../../libraries/gif.js/gif.worker.js',
workerScript: '../../libraries/gif.js/gif.worker.js'
});
gif.on('finished', function(blob) {
saveAs(blob, gd.timestamp() + '.gif');
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_3_1_1_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'use strict';

var textTyped = 'Type slow and fast!';
var fontSizes = [textTyped.length,];
var fontSizes = [textTyped.length];
var minFontSize = 15;
var maxFontSize = 800;
var newFontSize = 0;
Expand Down
14 changes: 7 additions & 7 deletions 01_P/P_3_1_2_02/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ var zoom;
var actRandomSeed;

var palette = [
[253, 195, 0,],
[0, 0, 0,],
[0, 158, 224,],
[99, 33, 129,],
[121, 156, 19,],
[226, 0, 26,],
[224, 134, 178,],
[253, 195, 0],
[0, 0, 0],
[0, 158, 224],
[99, 33, 129],
[121, 156, 19],
[226, 0, 26],
[224, 134, 178]
];

var actColorIndex = 0;
Expand Down
4 changes: 2 additions & 2 deletions 01_P/P_3_1_3_05/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ var allPOSTags = [
'wdt',
'wp',
'wp$',
'wrb',
'wrb'
];
var allPOSTagsFull = [
'Coordinating conjunction',
Expand Down Expand Up @@ -118,7 +118,7 @@ var allPOSTagsFull = [
'Wh-determiner',
'Wh-pronoun',
'Possessive wh-pronoun',
'Wh-adverb',
'Wh-adverb'
];

var counters = [];
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_3_1_4_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function setup() {
// joinedText = joinedText.replace(/\d+/g, '');
var words = joinedText.match(/\w+/g);

treemap = new gd.Treemap(1, 1, width - 3, height - 3, {sort: doSort, direction: rowDirection,});
treemap = new gd.Treemap(1, 1, width - 3, height - 3, {sort: doSort, direction: rowDirection});

// count words
for (var i = 0; i < words.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_3_1_4_02/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function setup() {
sort: doSort,
direction: rowDirection,
padding: 2,
ignore: [],
ignore: []
});

// make an array for the nested treemaps
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_3_2_4_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function Letter(char, x, y) {
this.y = y;

Letter.prototype.draw = function() {
var path = font.textToPoints(this.char, this.x, this.y, fontSize, {sampleFactor: pathSampleFactor,});
var path = font.textToPoints(this.char, this.x, this.y, fontSize, {sampleFactor: pathSampleFactor});
stroke(shapeColor);

for (var d = 0; d < ribbonWidth; d += density) {
Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_3_2_5_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function setup() {
frameRate(25);
rectMode(CENTER);

colors = [color(65, 105, 185), color(245, 95, 80), color(15, 233, 118),];
colors = [color(65, 105, 185), color(245, 95, 80), color(15, 233, 118)];
pixelDensity(1);

setupText();
Expand Down
10 changes: 5 additions & 5 deletions 01_P/P_3_2_5_02/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function AniLetters(_lwidth, _lheight){
that.lineCount = 0;
that.aniSteps = 20;
that.drawMode = 3;
that.cursorLocation = {x: 50, y: 50,};
that.cursorLocation = {x: 50, y: 50};
that.letterPadding = 60;
that.style = 1;

Expand All @@ -101,7 +101,7 @@ function AniLetters(_lwidth, _lheight){
var pathData = {
letter: d.toUpperCase(),
x: that.cursorLocation.x + (that.letterWidth + that.letterPadding * i),
y: that.cursorLocation.y + (that.letterHeight * idx),
y: that.cursorLocation.y + (that.letterHeight * idx)
};

that.paths.push(pathData);
Expand All @@ -112,7 +112,7 @@ function AniLetters(_lwidth, _lheight){

// add a text object for each line
this.addText = function(_text){
var textObject = {counter: 0, text: _text,};
var textObject = {counter: 0, text: _text};
return textObject;
};

Expand Down Expand Up @@ -854,7 +854,7 @@ function AniLetters(_lwidth, _lheight){
var t = i / stepCount;
var cx = curvePoint(a1, b1, c1, d1, t);
var cy = curvePoint(a2, b2, c2, d2, t);
points.push({x: cx, y: cy,});
points.push({x: cx, y: cy});
}
var aniIndex = frameCount % (stepCount);
var ratio = aniIndex / stepCount;
Expand All @@ -878,7 +878,7 @@ function AniLetters(_lwidth, _lheight){
var t = i / stepCount;
var cx = bezierPoint(a1, b1, c1, d1, t);
var cy = bezierPoint(a2, b2, c2, d2, t);
points.push({x: cx, y: cy,});
points.push({x: cx, y: cy});
}
var aniIndex = frameCount % (stepCount);
var ratio = aniIndex / stepCount;
Expand Down
10 changes: 5 additions & 5 deletions 01_P/P_3_2_5_03/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function animatedType(){
that.letterCoordinates = [];
that.pointDensity = 2;
that.startX = 0;
that.colors = [color(65, 105, 185), color(245, 95, 80), color(15, 233, 118), color(233, 15, 130), color(118, 15, 233), color(15, 233, 118),];
that.colors = [color(65, 105, 185), color(245, 95, 80), color(15, 233, 118), color(233, 15, 130), color(118, 15, 233), color(15, 233, 118)];
that.angle = 0;

that.drawMode = 8;
Expand All @@ -140,7 +140,7 @@ function animatedType(){
// create a text object to hold each line of text
// usage: this.textTyped.push(this.addText("hello"))
this.addText = function(_text){
var textObject = {counter: 0, text: _text,};
var textObject = {counter: 0, text: _text};
return textObject;
};

Expand All @@ -165,7 +165,7 @@ function animatedType(){
lineNumber: lineNum,
len: path.commands.length,
breaks: floor(path.commands.length / txt.text.length),
ranges: [],
ranges: []
};

// get the start point of each letter
Expand Down Expand Up @@ -198,7 +198,7 @@ function animatedType(){
len: path.commands.length,
bbox: fontPath.getBoundingBox(),
distX: 0,
startX: 0,
startX: 0
};

// console.log(pathData.bbox.x1)
Expand Down Expand Up @@ -241,7 +241,7 @@ function animatedType(){
path.data.commands.forEach(function(coord){
if (coord.x != undefined && coord.y != undefined){
var yOffset = path.lineNumber * fontSize;
that.coordinates.push({x: coord.x, y: coord.y + yOffset,});
that.coordinates.push({x: coord.x, y: coord.y + yOffset});
}
});

Expand Down
2 changes: 1 addition & 1 deletion 01_P/P_4_2_2_01/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var gridY = 0;
var movie;

function preload() {
movie = createVideo(['data/video.mp4', 'data/video.ogg',]);
movie = createVideo(['data/video.mp4', 'data/video.ogg']);
movie.hide();
}

Expand Down
Loading

0 comments on commit fec8bdf

Please sign in to comment.