# greggman/twgl.js

A Tiny WebGL helper Library

Repository: https://github.com/greggman/twgl.js
Canonical: https://ross.abutalabs.com/products/twgljs
Homepage: http://twgljs.org
Language: JavaScript
License: MIT
License Family: permissive
Topics: webgl, webgl2
Last push: 2025-10-13T21:55:41+00:00

## Health v2 (maintenance only)
Score: 53/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 46, release rhythm 35, longevity 100
- inputs: {"age_days": 4177, "days_push": 324, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2997, forks 261 (observed 2026-08-28T04:07:37.137700+00:00)

## What it is
TWGL.js is a tiny JavaScript helper library that reduces the verbosity of the raw WebGL and WebGL2 APIs. It provides concise functions for compiling shader programs, creating buffers, setting uniforms and attributes, creating textures, and managing framebuffers.

## Use cases
- write low-level WebGL code without boilerplate
- compile shaders and set uniforms with minimal code
- create and bind buffers and attributes from arrays
- create textures and framebuffers easily
- build custom WebGL renderers or visualizations
- learn WebGL without a heavy 3D engine

## When to choose
- you want low-level control over WebGL without verbose API calls
- you find three.js too heavy or abstract for your needs
- you're learning WebGL internals
- you need a small dependency for shader-based graphics or effects

## When to avoid
- you want a full-featured 3D engine with scenes, cameras, and loaders — use three.js
- you need high-level abstractions like physics or animation systems
- you're not working with WebGL at all

## Facets
- artifact type: library
- maturity: stable
- function: graphics, ui-components, developer-tools
- domain: web-development, graphics, frontend
- platform: browser
- tags: webgl, webgl2, 3d-graphics, shaders, canvas, helper-library, javascript, web

## Member repositories
- greggman/twgl.js (main) score 53

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:37.137700+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:30:44.242569+00:00, confidence not recorded.
  - readme: https://github.com/greggman/twgl.js (fetched 2026-08-28T04:07:37.137700+00:00, sha bcf51fb90c40)
  - homepage: http://twgljs.org (fetched 2026-08-29T09:46:13.875334+00:00, sha 60fe9717c4f8)
  - site_page: http://twgljs.org/docs (fetched 2026-08-29T09:46:13.884925+00:00, sha 91647e2c8382)
  - registry_npm: https://registry.npmjs.org/twgl.js (fetched 2026-08-29T09:46:13.887370+00:00, sha d829f50a0f4b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
