-1
Daily
5,706
stars
732
forks
144
watchers
208
prs
295
issues
12
releases
README
glMatrix ======================= JavaScript has evolved into a language capable of handling realtime 3D graphics, via WebGL, and computationally intensive tasks such as physics simulations. These types of applications demand high performance vector and matrix math, which is something that JavaScript doesn't provide by default. glMatrix to the rescue! glMatrix is designed to perform vector and matrix operations stupidly fast! By hand-tuning each function for maximum performance and encouraging efficient usage patterns through API conventions, glMatrix will help you get the most out of your browser's JavaScript engine. Learn More ---------------------- For documentation and news, visit the glMatrix Homepage For a tutorial, see the "Introducing glMatrix" section of _Introduction to Computer Graphics_ by David J. Eck For a babel plugin to make writing the API nicer, see babel-plugin-transform-gl-matrix Regarding the current performance in modern web browsers, calling glMatrix.setMatrixArrayType(Array) to use normal arrays instead of Float32Arrays can greatly increase the performance. Contributing Guidelines ---------------------- See CONTRIBUTING.md Building ---------------------- See BUILDING.md
Top issues
#453glMatrix v4.0 - Request for feedback80 comments · 2022-11-28#303Class and chaining17 comments · 2018-05-11#283WebAssembly Port14 comments · 2018-02-24#420[AssemblyScript] gl-matrix port to WebAssembly13 comments · 2021-03-26#308vec2 truncate function13 comments · 2018-05-17#276Retrieve vector values using cartesian coordinates9 comments · 2017-12-12#153Mat4 perspective function wrong coordinate system.8 comments · 2015-03-25#389The type define can't be derived correctly7 comments · 2020-05-07
Latest release
v3.4.4 v3.4.4 2025-08-08Merged multiple pull requests, addressed upcoming compatibility issues with Typescript, and updated some dependencies. What's Changed Convert to type "module" and use package exports by @lkmill in https://github.com/toji/gl-matrix/pull/432 random should only return unit vector when scale is undefined by @marcusround in https://github.com/toji/gl-matrix/pull/437 Fix mat3.scale docs claiming to rotate input mat by @cedric-h in https://github.com/toji/gl-matrix/pull/445 use symmetric half up rounding in all vector modules. fixes 447 by @mreinstein in https://github.com/toji/gl-matrix/