Skip to content

Commit

Permalink
Updated dependencies, removed all double quoted strings. Updated vers…
Browse files Browse the repository at this point in the history
…ion and build files.
  • Loading branch information
kbirk committed Feb 27, 2016
1 parent 1017069 commit 1dbe759
Show file tree
Hide file tree
Showing 23 changed files with 3,021 additions and 2,974 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"noempty" : true, // true: Prohibit use of empty blocks
"nonew" : false, // true: Prohibit use of constructors for side-effects (without assignment)
"plusplus" : false, // true: Prohibit use of `++` & `--`
"quotmark" : false, // Quotation mark consistency:
"quotmark" : "single", // Quotation mark consistency:
// false : do nothing (default)
// true : ensure whatever is used is consistent
// "single" : require single quotes
Expand Down
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ language: node_js
notifications:
email: false
node_js:
- "node"
- "4.3"
- "4.2"
- "4.1"
- "4.0"
- "0.12"
script: npm run test
after_success: npm run coveralls
50 changes: 25 additions & 25 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"name": "alfador",
"version": "0.4.10",
"homepage": "https://github.com/kbirk/alfador",
"description": "A fast 3D math library for JavaScript",
"author": "Kevin Birk <birk.kevin@gmail.com>",
"main": "./build/alfador.min.js",
"moduleType": [
"globals"
],
"keywords": [
"vector",
"matrix",
"3d",
"math"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"src",
"gulpfile.js",
"package.json",
"test"
]
"name": "alfador",
"version": "0.4.11",
"description": "A fast 3D math library for JavaScript",
"homepage": "https://github.com/kbirk/alfador",
"author": "Kevin Birk <birk.kevin@gmail.com>",
"main": "build/alfador.min.js",
"moduleType": [
"globals"
],
"keywords": [
"vector",
"matrix",
"3d",
"math"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"src",
"gulpfile.js",
"package.json",
"test"
]
}
78 changes: 42 additions & 36 deletions build/alfador.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/alfador.min.js

Large diffs are not rendered by default.

21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alfador",
"version": "0.4.10",
"version": "0.4.11",
"description": "A fast 3D math library for JavaScript",
"author": "Kevin Birk <birk.kevin@gmail.com>",
"main": "./src/exports.js",
Expand All @@ -20,24 +20,23 @@
],
"dependencies": {},
"devDependencies": {
"browserify": "12.0.1",
"del": "2.0.2",
"gulp": "3.9.0",
"browserify": "13.0.0",
"del": "2.2.0",
"gulp": "3.9.1",
"gulp-coveralls": "0.1.4",
"gulp-istanbul": "0.10.2",
"gulp-istanbul": "0.10.3",
"gulp-jshint": "1.12.0",
"gulp-mocha": "2.1.3",
"gulp-uglify": "1.4.2",
"jshint-stylish": "2.0.1",
"run-sequence": "1.1.4",
"gulp-mocha": "2.2.0",
"gulp-uglify": "1.5.3",
"jshint-stylish": "2.1.0",
"run-sequence": "1.1.5",
"vinyl-buffer": "1.0.0",
"vinyl-source-stream": "1.1.0"
},
"scripts": {
"build": "./node_modules/.bin/gulp build",
"test": "./node_modules/.bin/gulp test",
"coveralls": "./node_modules/.bin/gulp coveralls",
"lint": "./node_modules/.bin/gulp lint",
"serve": "./node_modules/.bin/gulp serve"
"lint": "./node_modules/.bin/gulp lint"
}
}
34 changes: 20 additions & 14 deletions src/Mat33.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

var Vec3 = require( './Vec3' );

Expand All @@ -20,7 +20,8 @@
this.data = [
that.data[0], that.data[1], that.data[2],
that.data[4], that.data[5], that.data[6],
that.data[8], that.data[9], that.data[10] ];
that.data[8], that.data[9], that.data[10]
];
}
} else if ( that.length === 9 ) {
// copy array by value, use prototype to cast array buffers
Expand Down Expand Up @@ -70,9 +71,11 @@
* @returns {Mat33} The identiy matrix.
*/
Mat33.identity = function() {
return new Mat33([ 1, 0, 0,
return new Mat33([
1, 0, 0,
0, 1, 0,
0, 0, 1 ]);
0, 0, 1
]);
};

/**
Expand All @@ -84,21 +87,24 @@
* @returns {Mat33} The scale matrix.
*/
Mat33.scale = function( scale ) {
if ( typeof scale === "number" ) {
if ( typeof scale === 'number' ) {
return new Mat33([
scale, 0, 0,
0, scale, 0,
0, 0, scale ]);
0, 0, scale
]);
} else if ( scale instanceof Array ) {
return new Mat33([
scale[0], 0, 0,
0, scale[1], 0,
0, 0, scale[2] ]);
0, 0, scale[2]
]);
}
return new Mat33([
scale.x, 0, 0,
0, scale.y, 0,
0, 0, scale.z ]);
0, 0, scale.z
]);
};

/**
Expand Down Expand Up @@ -188,7 +194,7 @@
ux, uz,
c1, c2, c3;
if ( f > ( 1.0-EPSILON ) ) {
// "from" and "to" almost parallel
// 'from' and 'to' almost parallel
// nearly orthogonal
fx = Math.abs( from.x );
fy = Math.abs( from.y );
Expand Down Expand Up @@ -225,7 +231,7 @@
that.data[4] += 1.0;
that.data[8] += 1.0;
} else {
// the most common case, unless "from"="to", or "to"=-"from"
// the most common case, unless 'from'='to', or 'to'=-'from'
v = from.cross( to );
u = 1.0 / ( 1.0 + e ); // optimization by Gottfried Chen
ux = u * v.x;
Expand Down Expand Up @@ -355,7 +361,7 @@
* @returns {Mat33|Vec3} The resulting product.
*/
Mat33.prototype.mult = function( that ) {
if ( typeof that === "number" ) {
if ( typeof that === 'number' ) {
// scalar
return this.multScalar( that );
} else if ( that instanceof Array ) {
Expand Down Expand Up @@ -501,9 +507,9 @@
* @returns {String} The string representation of the matrix.
*/
Mat33.prototype.toString = function() {
return this.data[0] +", "+ this.data[3] +", "+ this.data[6] +",\n" +
this.data[1] +", "+ this.data[4] +", "+ this.data[7] +",\n" +
this.data[2] +", "+ this.data[5] +", "+ this.data[8];
return this.data[0] +', '+ this.data[3] +', '+ this.data[6] +',\n' +
this.data[1] +', '+ this.data[4] +', '+ this.data[7] +',\n' +
this.data[2] +', '+ this.data[5] +', '+ this.data[8];
};

/**
Expand Down
14 changes: 7 additions & 7 deletions src/Mat44.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

var Vec3 = require( './Vec3' ),
Vec4 = require( './Vec4' ),
Expand Down Expand Up @@ -91,7 +91,7 @@
* @returns {Mat44} The scale matrix.
*/
Mat44.scale = function( scale ) {
if ( typeof scale === "number" ) {
if ( typeof scale === 'number' ) {
return new Mat44([
scale, 0, 0, 0,
0, scale, 0, 0,
Expand Down Expand Up @@ -335,7 +335,7 @@
* @returns {Mat44|Vec4} The resulting product.
*/
Mat44.prototype.mult = function( that ) {
if ( typeof that === "number" ) {
if ( typeof that === 'number' ) {
// scalar
return this.multScalar( that );
} else if ( that instanceof Array ) {
Expand Down Expand Up @@ -632,10 +632,10 @@
* @returns {String} The string representation of the matrix.
*/
Mat44.prototype.toString = function() {
return this.data[0] +", "+ this.data[4] +", "+ this.data[8] +", "+ this.data[12] +",\n" +
this.data[1] +", "+ this.data[5] +", "+ this.data[9] +", "+ this.data[13] +",\n" +
this.data[2] +", "+ this.data[6] +", "+ this.data[10] +", "+ this.data[14] +",\n" +
this.data[3] +", "+ this.data[7] +", "+ this.data[11] +", "+ this.data[15];
return this.data[0] +', '+ this.data[4] +', '+ this.data[8] +', '+ this.data[12] +',\n' +
this.data[1] +', '+ this.data[5] +', '+ this.data[9] +', '+ this.data[13] +',\n' +
this.data[2] +', '+ this.data[6] +', '+ this.data[10] +', '+ this.data[14] +',\n' +
this.data[3] +', '+ this.data[7] +', '+ this.data[11] +', '+ this.data[15];
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Quaternion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

var Vec3 = require('./Vec3'),
Mat33 = require('./Mat33');
Expand Down Expand Up @@ -291,7 +291,7 @@
* @returns {String} The string representation of the quaternion.
*/
Quaternion.prototype.toString = function() {
return this.x + ", " + this.y + ", " + this.z + ", " + this.w;
return this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Transform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

var Vec3 = require( './Vec3' ),
Mat33 = require( './Mat33' ),
Expand Down Expand Up @@ -165,7 +165,7 @@
*/
Transform.prototype.scale = function( scale ) {
if ( scale ) {
if ( typeof scale === "number" ) {
if ( typeof scale === 'number' ) {
this._scale = new Vec3( scale, scale, scale );
} else {
this._scale = new Vec3( scale );
Expand Down
6 changes: 3 additions & 3 deletions src/Triangle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {

"use strict";
'use strict';

var Vec3 = require('./Vec3');

Expand Down Expand Up @@ -247,8 +247,8 @@
* @returns {String} The string representation of the vector.
*/
Triangle.prototype.toString = function() {
return this.a.toString() + ", " +
this.b.toString() + ", " +
return this.a.toString() + ', ' +
this.b.toString() + ', ' +
this.c.toString();
};

Expand Down
4 changes: 2 additions & 2 deletions src/Vec2.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

/**
* Instantiates a Vec2 object.
Expand Down Expand Up @@ -240,7 +240,7 @@
* @returns {String} The string representation of the vector.
*/
Vec2.prototype.toString = function() {
return this.x + ", " + this.y;
return this.x + ', ' + this.y;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Vec3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

/**
* Instantiates a Vec3 object.
Expand Down Expand Up @@ -285,7 +285,7 @@
* @returns {String} The string representation of the vector.
*/
Vec3.prototype.toString = function() {
return this.x + ", " + this.y + ", " + this.z;
return this.x + ', ' + this.y + ', ' + this.z;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Vec4.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function() {

"use strict";
'use strict';

/**
* Instantiates a Vec4 object.
Expand Down Expand Up @@ -236,7 +236,7 @@
* @returns {String} The string representation of the vector.
*/
Vec4.prototype.toString = function() {
return this.x + ", " + this.y + ", " + this.z + ", " + this.w;
return this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/exports.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function () {

"use strict";
'use strict';

module.exports = {
Mat33: require('./Mat33'),
Expand Down

0 comments on commit 1dbe759

Please sign in to comment.