99 Commits

Author SHA1 Message Date
Brandon Jones
06e60a96c8 Added vec_.random 2013-03-15 22:22:55 -07:00
Colin MacKenzie IV
3168878ced revert changes to vec3.transformMat3, fix transposed mat3.fromQuat 2013-03-11 10:37:29 -04:00
Colin MacKenzie IV
6922bb8475 unit tests for mat3.normalFromMat4, you're welcome :)
I hope they're correct....
2013-03-09 19:44:47 -05:00
cm4
ec94bb8480 Merge branch 'dev' of github.com:toji/gl-matrix into dev 2013-03-01 10:18:33 -05:00
cm4
897a5d9da2 make gl-matrix work with web workers 2013-03-01 10:18:14 -05:00
Colin MacKenzie IV
e69f262eb9 extra test for mat4.perspective() 2013-02-28 18:44:45 -05:00
cm4
8b2c11af46 bugfix vec3.transformMat3, quat.setAxes, quat.fromMat3
also, many more tests, and fixed some erroneous tests which were
how the bugs got started.
2013-02-26 21:28:23 -05:00
cm4
b9c8409d93 more tests for mat4.lookAt 2013-02-23 22:20:35 -05:00
cm4
f9f9d4f63e fix quat.rotationTo doesn't always return a value 2013-02-22 16:10:33 -05:00
Colin MacKenzie IV
5e0b3faa04 faster implementation of quat.slerp 2013-02-08 20:55:51 -05:00
Colin MacKenzie IV
30b580933b code coverage for quat.rotateX, quat.rotateY, quat.rotateZ 2013-02-08 17:22:44 -05:00
Brandon Jones
996055525c Added vec_.scaleAndAdd
I've found this to be particularly useful for timing-dependent code,
such as applying velocity to a vector
2013-02-07 12:55:25 -08:00
Colin MacKenzie IV
0b0a80bf9b quat.setAxes 2013-02-06 07:39:39 -05:00
Colin MacKenzie IV
6c12ff6425 fix quat.fromMat3 sometimes produces reverse of expected result
when fTrace > 0.0, m was treated as the transpose of m, causing
specs to fail.
2013-02-06 07:36:44 -05:00
Colin MacKenzie IV
85f5a1e094 unit tests for mat3.fromQuat 2013-02-05 21:33:20 -05:00
Colin MacKenzie IV
a1caeae2eb quat.rotationTo 2013-02-05 19:43:33 -05:00
Colin MacKenzie IV
dd546e2334 vec3.transformMat3 2013-02-05 10:59:37 -05:00
Colin MacKenzie IV
e673c6614f test coverage for vec3.transformMat4 2013-02-05 10:51:48 -05:00
Colin MacKenzie IV
9d14fb9289 fix NaN in mat3.scale
This closes #68.
2013-02-05 10:02:31 -05:00
Colin MacKenzie IV
3da8b8ec5d fix node helper 2013-02-05 09:56:50 -05:00
Colin MacKenzie IV
fedb5aa224 code coverage generation task 2013-02-04 21:17:56 -05:00
Colin MacKenzie IV
fb436a8f6b mat3.fromMat4 2013-02-04 16:54:37 -05:00
Brandon Jones
56b7e73181 Upped version to 2.1.0, multiple changes
Fixes #62.
Fixes #66.
Adds several mat3 functions to handle 2d transforms.
Added vec2.tramsformMat3/4
Fixed class description in mat2d docs.
2013-01-21 21:15:39 -08:00
Robin Beitra
9074c0dd36 Add mat2d spec and some missing functions
Added specfile for mat2d
Add vec2.transformMat2d
Add mat2d.translate
2013-01-15 08:50:03 +00:00
Brandon Jones
e06af1f6da Updated to 2.0.1
Added glMatrix.setMatrixType and a few related changes.
2013-01-03 14:22:32 -08:00
Brandon Jones
9380f3ea8e Fixed issue with forEach offsets
Finished forEach specs
2012-12-27 14:41:47 -08:00
Brandon Jones
172480ee6b Implemented mat3/4.adjoint 2012-12-04 18:41:48 -08:00
Brandon Jones
01c31a37e2 Added specs for all mat3 functions
Removed several stub functions. I'm more interested in releasing at
this point than being overly robust.
2012-12-04 16:01:22 -08:00
Brandon Jones
4d104a44b1 All mat4 functions now have specs
Changed mat4.perspective to produce matricies according to
gluPerspective documentation. fovy is now given in radians to be
consistent with the rest of the API
2012-12-04 15:49:27 -08:00
Brandon Jones
980f380ed7 Inching forward on mat4 spec 2012-12-04 00:02:17 -08:00
Brandon Jones
a11b9b4a84 Stubbing in specs for mat3/4 2012-12-02 16:05:19 -08:00
Brandon Jones
77460dcec1 Removed common.js
Accuracy suffered with invsqrt and benchmarks didn't show it as a
consistent win. Better to let the browsers continue to optimize their
math. A few other cleanups included.
2012-12-02 15:51:11 -08:00
Brandon Jones
d646894b4b glMatrix 2.0 will be released under a 2 clause BSD license 2012-11-04 22:36:44 -08:00
Brandon Jones
ff7048956d Renamed quat4 to quat
If you don't like this change, blame Won Chun :)
2012-10-13 22:30:02 -07:00
Brandon Jones
ff8bcdfc42 Added some functions to quat4
Added partial quat4 unit tests as well
2012-09-02 00:16:12 -07:00
Brandon Jones
107f1fd2ef First pass at vec4 functions 2012-08-26 21:21:56 -07:00
Brandon Jones
42080b4c82 First pass at vec3 functions
Also fixed a couple of minor issues with vec2
2012-08-26 20:57:25 -07:00
Brandon Jones
060d3cc3b4 Renamed vec2.transform to vec2.transformMat2 2012-08-26 20:25:01 -07:00
Brandon Jones
8f1826f6a2 Changed "inverse" to "invert"
I feel it's more natural to state the function as an action rather than
a use. It's more consistent with other functions like "rotate" (rather
than "rotation")
2012-08-26 20:15:04 -07:00
Brandon Jones
125d28691c Had second thoughts on Math function aliasing
See Colin's benchmark at
http://jsperf.com/variable-caching-math-functions to see why.
Significant pert penalty in Firefox, very little gain in Chrome.
2012-08-26 20:04:33 -07:00
Brandon Jones
931d2f388e Added common.js with common math functions 2012-08-26 16:17:01 -07:00
Brandon Jones
31f2cdecf7 Added mat2 transpose, inverse, adjoint, determinant, multiply, rotate, scale, and str. Added vec2 transform 2012-08-25 11:05:18 -07:00
Brandon Jones
39d7043628 Started mat2 implementation 2012-08-23 23:01:01 -07:00
Brandon Jones
6ba0af5e3c added vec2 set, min, and max 2012-08-23 21:40:26 -07:00
Brandon Jones
e9e06179ec Added vec2.copy 2012-08-23 11:03:28 -07:00
Colin MacKenzie IV
c4c1cf8f90 Added a Rake task for releasing.
Just bump version in
lib/gl-matrix/version.rb and run:

  $ rake release

...done!

We can add other tasks and call them
from the release task (see Rakefile:35)
so that if any of the other tasks fails,
the release is aborted. This is great
for publishing updated docs, for example.
2012-08-23 11:25:55 -04:00
Colin MacKenzie IV
4d6e2c81c5 Rake tasks for building, minifying and testing in both node and jasmine
Just run `rake` to build and test, first against node and if that passes,
then against jasmine using a real browser.

Run `rake --tasks` for all tasks & descriptions.

Build tasks:
  rake compile    # rebuild sources

  rake minify     # rebuild and minify sources

Test tasks:
  rake node       # run under node

  rake jasmine:ci # run in browser, collect results,
                  # close browser and display summary

  rake server     # start server for rapid retesting
                  # (although really node is fast too)
2012-08-23 10:02:32 -04:00
Brandon Jones
022d9d6b8b Added ZLIB license headers 2012-08-22 22:52:59 -07:00
Brandon Jones
3ef3eae763 Added vec2 clone and fromValues 2012-08-22 22:19:12 -07:00
Brandon Jones
7d789e8e56 Added vec2 cross, lerp, and str 2012-08-22 22:08:31 -07:00