# gl-matrix

> Javascript Matrix and Vector library for High Performance WebGL apps

Latest version **3.4.4** (published 2025-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install gl-matrix
pnpm add gl-matrix
yarn add gl-matrix
bun add gl-matrix
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.4.4 |
| Published | 2025-08-08 |
| First published | 2013-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 762.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5695 |
| Maintainers | toji, hughsk, stefnotch |

## Links

- npm: https://www.npmjs.com/package/gl-matrix
- Repository: https://github.com/toji/gl-matrix
- Homepage: http://glmatrix.net
- Issues: https://github.com/toji/gl-matrix/issues
- npm.io page: https://npm.io/package/gl-matrix

## Recent versions

- 3.4.4 (latest) — 2025-08-08
- 4.0.0-beta.2 (beta) — 2024-04-14
- 3.0.0-0 (next) — 2018-11-18
- 4.0.0-beta.1 — 2023-04-17
- 3.4.3 — 2021-10-05
- 3.4.2 — 2021-10-05
- 3.4.1 — 2021-10-05
- 3.4.0 — 2021-10-04
- 3.3.0 — 2020-04-01
- 3.2.1 — 2020-02-14
- 3.2.0 — 2020-02-13
- 3.1.0 — 2019-08-19
- 3.0.0 — 2019-01-05
- 2.8.1 — 2018-08-30
- 2.7.1 — 2018-07-20
- … 13 more at https://npm.io/package/gl-matrix/versions

## README

glMatrix
=======================
[![NPM Version](https://img.shields.io/npm/v/gl-matrix.svg)](https://www.npmjs.com/package/gl-matrix)
[![Build Status](https://travis-ci.org/toji/gl-matrix.svg)](https://travis-ci.org/toji/gl-matrix)

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](http://glmatrix.net/)

For a tutorial, see [the "Introducing glMatrix" section of _Introduction to Computer Graphics_ by David J. Eck](http://math.hws.edu/graphicsbook/c7/s1.html#webgl3d.1.2)

For a babel plugin to make writing the API nicer, see [babel-plugin-transform-gl-matrix](https://github.com/akira-cn/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](./CONTRIBUTING.md)

Building
----------------------
See [BUILDING.md](./BUILDING.md)

---
_Source: https://npm.io/package/gl-matrix · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
