Back to directory

GPU.js

A JavaScript library that transpiles ordinary functions into shader code so they run accelerated on the GPU in the browser or Node, falling back to plain JavaScript when no GPU is available.

GPU.js

GPU.js is a general-purpose GPU computing (GPGPU) library for JavaScript. It automatically transpiles simple JavaScript functions into shader language and compiles them to run on the GPU, computing elements of an array or matrix in parallel; when no GPU is present, the same functions still run as regular JavaScript.

It works in both the browser, via a CDN build, and in Node through an npm package, and includes a kernel API for defining GPU-accelerated computations such as matrix multiplication.

An upcoming major version changes every kernel call to return a Promise, since WebGL's synchronous readback blocks the main thread for the duration of a GPU operation; code already written against the newer async mode is unaffected by the change.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.