awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
toji avatar

toji/gl-matrix

0
View on GitHub↗
5,654 stars·728 forks·JavaScript·mit·16 viewsglmatrix.net↗

Gl Matrix

gl-matrix is a high-performance JavaScript library for vector and matrix math, purpose-built for real-time 3D graphics and physics simulations. It stores all vectors and matrices as typed arrays (Float32Array or Float64Array) in column-major order, matching the memory layout expected by OpenGL and WebGL shaders without requiring transposition. The library is implemented from scratch with zero external dependencies, keeping its bundle size minimal for web and Node.js environments.

The library distinguishes itself through its immutable operation pattern, where each math function returns a new typed array rather than mutating the input, enabling predictable state management in animation loops. It also offers a precision-switched build system that generates separate 32-bit and 64-bit float versions from a single codebase, allowing developers to trade performance for accuracy as needed. All matrix and vector operations output data in a format ready for direct upload to GPU uniform buffers, eliminating reformatting overhead.

The library covers the full range of vector and matrix operations needed for 3D graphics pipelines, including manipulation of 4x4 matrices and computation of vector math optimized for real-time rendering. Its typed array core ensures fast numeric operations and direct GPU-compatible memory layout across all computations.

Features

  • 3D Math and Geometry Toolkits - Performs vector and matrix math for real-time 3D graphics and physics simulations using typed arrays.
  • Component-wise Math Operators - Returns new typed arrays from each operation instead of mutating inputs for predictable state management.
  • GPU-Compatible Typed Array Math - Stores vectors and matrices as Float32Array or Float64Array for direct GPU-compatible memory layout and fast numeric operations.
  • Typed Array Math Computations - Computes vector and matrix operations with typed arrays for high-performance 3D graphics and physics calculations.
  • Typed Array Math Cores - Stores vectors and matrices as Float32Array or Float64Array for direct GPU-compatible memory layout.
  • WebGL-Formatted Outputs - Exposes matrices and vectors as flat arrays ready for direct upload to GPU uniform buffers without reformatting.
  • WebGL Matrix Formattings - Stores and formats 4x4 matrices as column-major float arrays for direct use in WebGL rendering pipelines.
  • Column-Major Matrix Libraries - Provides column-major 4x4 matrix operations formatted for direct use with WebGL shaders.
  • Spatial Vector and Matrix Operations - Computes vector and matrix math with typed arrays for fast 3D graphics and physics calculations.
  • JavaScript Math Libraries - Provides high-performance vector and matrix math using typed arrays for WebGL and graphics applications.
  • Column-Major Matrix Conventions - Provides column-major matrix storage that matches OpenGL and WebGL shader memory layout without transposition.
  • Immutable Data Patterns - Returns new typed arrays from each operation instead of mutating inputs for predictable state management.
  • Column-Major Matrix Libraries - Stores 4x4 matrices in column-major order matching OpenGL and WebGL shader memory layout.
  • WebGL Matrix Formatters - Formats 4x4 matrices as contiguous float arrays with translation components at specific indices for OpenGL conventions.
  • WebGL Matrix Manipulators - Stores transformation data in column-major float arrays matching OpenGL memory layout conventions.
  • 32/64-bit Build Variants - Generates separate 32-bit and 64-bit float builds from a single codebase for performance or accuracy trade-offs.
  • Dependency Minimizers - Implements all math from scratch with zero external dependencies, keeping bundle size minimal.
  • Zero-Dependency Implementations - Implements vector and matrix math from scratch with zero external dependencies for minimal bundle size.
  • Floating-Point Precision Utilities - Switches between 32-bit and 64-bit float versions of math operations to trade performance for precision.
  • Precision-Switched Float Builds - Generates separate 32-bit and 64-bit float builds from a single codebase for performance or accuracy.
  • Precision Math Polyfills - Supports both 32-bit and 64-bit float precision for vector and matrix computations.
  • Zero-Dependency Libraries - Implements all math from scratch with zero external dependencies, keeping bundle size minimal.

Star history

Star history chart for toji/gl-matrixStar history chart for toji/gl-matrix

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does toji/gl-matrix do?

gl-matrix is a high-performance JavaScript library for vector and matrix math, purpose-built for real-time 3D graphics and physics simulations. It stores all vectors and matrices as typed arrays (Float32Array or Float64Array) in column-major order, matching the memory layout expected by OpenGL and WebGL shaders without requiring transposition. The library is implemented from scratch with zero external dependencies, keeping its bundle size minimal for web and Node.js…

What are the main features of toji/gl-matrix?

The main features of toji/gl-matrix are: 3D Math and Geometry Toolkits, Component-wise Math Operators, GPU-Compatible Typed Array Math, Typed Array Math Computations, Typed Array Math Cores, WebGL-Formatted Outputs, WebGL Matrix Formattings, Column-Major Matrix Libraries.

What are some open-source alternatives to toji/gl-matrix?

Open-source alternatives to toji/gl-matrix include: g-truc/glm — This project is a header-only C++ library designed for graphics mathematics, providing a comprehensive suite of… microsoft/directxtk — DirectXTK is a C++ library designed to simplify 2D and 3D graphics, audio, and input programming for DirectX… numbers/numbers.js — numbers.js is a comprehensive mathematics library for JavaScript that provides a collection of advanced functions for… 0hq/webgpt — WebGPT is a browser-based machine learning framework designed to execute transformer models entirely within the client… mikemcl/decimal.js — decimal.js is a JavaScript arbitrary precision library designed to perform mathematical calculations without the… nvidiagameworks/kaolin — Kaolin is a PyTorch 3D deep learning library providing a comprehensive suite of tools for 3D geometry processing,…

Open-source alternatives to Gl Matrix

Similar open-source projects, ranked by how many features they share with Gl Matrix.
  • g-truc/glmg-truc avatar

    g-truc/glm

    10,710View on GitHub↗

    This project is a header-only C++ library designed for graphics mathematics, providing a comprehensive suite of vector, matrix, and quaternion types. It is built using template metaprogramming to generate mathematical primitives at compile time, eliminating the need for precompiled binary libraries and allowing for direct integration into existing build systems. The library is distinguished by its strict adherence to the OpenGL Shading Language specification, ensuring that mathematical results remain consistent across both CPU and GPU code. It provides specialized utilities for managing float

    C++cppcpp-libraryglm
    View on GitHub↗10,710
  • microsoft/directxtkmicrosoft avatar

    microsoft/DirectXTK

    2,781View on GitHub↗

    DirectXTK is a C++ library designed to simplify 2D and 3D graphics, audio, and input programming for DirectX applications. It serves as a comprehensive toolkit providing high-level wrappers for DirectX graphics, audio management, and input handling. The toolkit includes a graphics wrapper for loading textures and rendering 3D models and 2D sprites, alongside a dedicated audio manager for sound effects and 3D spatial audio. It also provides an input handler to track and process state updates from keyboards, mice, and gamepads. The library covers a broad capability surface including 3D math an

    C++cpp-librarydesktopdirectx
    View on GitHub↗2,781
  • numbers/numbers.jsnumbers avatar

    numbers/numbers.js

    1,757View on GitHub↗

    numbers.js is a comprehensive mathematics library for JavaScript that provides a collection of advanced functions for scientific computing and data analysis. It is designed to handle complex mathematical operations through a modular architecture, offering tools for calculus, statistics, linear algebra, and prime number analysis. The library distinguishes itself by providing explicit control over numerical precision, allowing users to define error thresholds and manage decimal accuracy to mitigate rounding discrepancies. This focus on precision is paired with a suite of computational tools tha

    JavaScript
    View on GitHub↗1,757
  • 0hq/webgpt0hq avatar

    0hq/WebGPT

    3,788View on GitHub↗

    WebGPT is a browser-based machine learning framework designed to execute transformer models entirely within the client environment. By leveraging native web standards, it provides a zero-dependency runtime that enables local text generation without the need for backend server processing. The engine distinguishes itself by utilizing hardware-accelerated compute shaders to perform high-performance tensor computations directly on the user's graphics hardware. This approach allows for the execution of large language models locally, ensuring that all data processing remains private to the client d

    JavaScriptgptnanogpttransformers
    View on GitHub↗3,788
  • See all 30 alternatives to Gl Matrix→