Skip to content

Commit 148571b

Browse files
author
almchung
committed
style clean up
1 parent 5758c61 commit 148571b

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ module.exports = function(grunt) {
212212
run: true,
213213
log: true,
214214
logErrors: true,
215-
timeout: 1000000
215+
timeout: 100000
216216
}
217217
},
218218
},

src/core/2d_primitives.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ p5.prototype.arc = function(x, y, w, h, start, stop, mode) {
7575
for (var i = 0; i < args.length; ++i) {
7676
args[i] = arguments[i];
7777
}
78-
// check with FES:validateParameters
78+
7979
p5._validateParameters('arc', args);
8080
if (!this._renderer._doStroke && !this._renderer._doFill) {
8181
return this;
@@ -171,7 +171,7 @@ p5.prototype.ellipse = function() {
171171
if (args.length === 3) {
172172
args.push(args[2]);
173173
}
174-
// check with FES:validateParameters
174+
175175
p5._validateParameters('ellipse', args);
176176
// p5 supports negative width and heights for rects
177177
if (args[2] < 0){args[2] = Math.abs(args[2]);}
@@ -246,7 +246,7 @@ p5.prototype.line = function() {
246246
for (var i = 0; i < args.length; ++i) {
247247
args[i] = arguments[i];
248248
}
249-
// check with FES:validateParameters
249+
250250
p5._validateParameters('line', args);
251251
//check whether we should draw a 3d line or 2d
252252
if (this._renderer.isP3D) {
@@ -299,7 +299,7 @@ p5.prototype.point = function() {
299299
for (var i = 0; i < args.length; ++i) {
300300
args[i] = arguments[i];
301301
}
302-
// check with FES:validateParameters
302+
303303
p5._validateParameters('point', args);
304304
//check whether we should draw a 3d line or 2d
305305
if (this._renderer.isP3D) {
@@ -366,7 +366,7 @@ p5.prototype.quad = function() {
366366
for (var i = 0; i < args.length; ++i) {
367367
args[i] = arguments[i];
368368
}
369-
// check with FES:validateParameters
369+
370370
p5._validateParameters('quad', args);
371371
if (this._renderer.isP3D) {
372372
this._renderer.quad(
@@ -466,7 +466,7 @@ p5.prototype.rect = function() {
466466
if (!this._renderer._doStroke && !this._renderer._doFill) {
467467
return;
468468
}
469-
// check with FES:validateParameters
469+
470470
p5._validateParameters('rect', args);
471471
var vals = canvas.modeAdjust(
472472
args[0],
@@ -515,7 +515,7 @@ p5.prototype.triangle = function() {
515515
for (var i = 0; i < args.length; ++i) {
516516
args[i] = arguments[i];
517517
}
518-
// check with FES:validateParameters
518+
519519
p5._validateParameters('triangle', args);
520520
this._renderer.triangle(args);
521521
return this;

src/core/curves.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ p5.prototype.bezier = function() {
7878
for (var i = 0; i < args.length; ++i) {
7979
args[i] = arguments[i];
8080
}
81-
// check with FES:validateParameters
81+
8282
p5._validateParameters('bezier', args);
8383
if (!this._renderer._doStroke && !this._renderer._doFill) {
8484
return this;
@@ -163,7 +163,7 @@ p5.prototype.bezierPoint = function(a, b, c, d, t) {
163163
for (var i = 0; i < args.length; ++i) {
164164
args[i] = arguments[i];
165165
}
166-
// check with FES:validateParameters
166+
167167
p5._validateParameters('bezierPoint', args);
168168
var adjustedT = 1-args[4];
169169
return Math.pow(adjustedT,3)*args[0] +
@@ -242,7 +242,7 @@ p5.prototype.bezierTangent = function(a, b, c, d, t) {
242242
for (var i = 0; i < args.length; ++i) {
243243
args[i] = arguments[i];
244244
}
245-
// check with FES:validateParameters
245+
246246
p5._validateParameters('bezierTangent', args);
247247
var adjustedT = 1-args[4];
248248
return 3*args[3]*Math.pow(args[4],2) -
@@ -333,7 +333,7 @@ p5.prototype.curve = function() {
333333
for (var i = 0; i < args.length; ++i) {
334334
args[i] = arguments[i];
335335
}
336-
// check with FES:validateParameters
336+
337337
p5._validateParameters('curve', args);
338338
if (!this._renderer._doStroke) {
339339
return this;
@@ -462,7 +462,7 @@ p5.prototype.curvePoint = function(a, b, c, d, t) {
462462
for (var i = 0; i < args.length; ++i) {
463463
args[i] = arguments[i];
464464
}
465-
// check with FES:validateParameters
465+
466466
p5._validateParameters('curvePoint', args);
467467
var t3 = args[4]*args[4]*args[4],
468468
t2 = args[4]*args[4],
@@ -513,7 +513,7 @@ p5.prototype.curveTangent = function(a, b, c, d, t) {
513513
for (var i = 0; i < args.length; ++i) {
514514
args[i] = arguments[i];
515515
}
516-
// check with FES:validateParameters
516+
517517
p5._validateParameters('curveTangent', args);
518518
var t2 = args[4]*args[4],
519519
f1 = (-3*t2)/2 + 2*args[4] - 0.5,

src/core/error_helpers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ function testParamFormat(args, format){
206206
// Returns true if PASS, false if FAIL
207207
function testParamClass(param, types){
208208
for (var i = 0; i < types.length; i++) {
209-
if (types[i] === 'Array'){
210-
if(param instanceof Array){
209+
if (types[i] === 'Array') {
210+
if(param instanceof Array) {
211211
return true;
212212
}
213-
}else{
213+
} else {
214214
if (param.name === types[i]) {
215215
return true; // class name match, pass
216-
} else if (types[i] === 'Constant'){
216+
} else if (types[i] === 'Constant') {
217217
return true; // accepts any constant, pass
218218
}
219219
}
@@ -226,7 +226,7 @@ function testParamType(param, types){
226226
for (var i = 0; i < types.length; i++) {
227227
if (typeof(param) === types[i].toLowerCase()) {
228228
return true; // type match, pass
229-
} else if (types[i] === 'Constant'){
229+
} else if (types[i] === 'Constant') {
230230
return true; // accepts any constant, pass
231231
}
232232
}

0 commit comments

Comments
 (0)