Introducing a new way to review your PRs.

Read the announcement

visgl / luma.gl

High-performance Toolkit for WebGL-based Data Visualization

View on GitHub

30 documents · Updated Nov 20, 2026

overview

Knowledge Base updated: 2026-11-19

luma.gl knowledge base

luma.gl is a TypeScript GPU rendering and computation toolkit. Its core package supplies cross-platform GPU abstractions and contains the WebGL and WebGPU implementations; higher-level packages add rendering, shaders, data assets, graph workflows, and deck.gl integration.

Critical runtime state lives in device and canvas-context adapters, backend resource/state trackers, and package-specific render or graph execution objects. The public API is centered on shared GPU concepts rather than a single backend.

flowchart TD
  App[Applications / deck.gl] --> Core[core: GPU abstractions]
  Core --> GL[WebGL backend]
  Core --> GPU[WebGPU backend]
  Engine[engine: render runtime] --> Core
  Shader[shaders / Slang] --> Engine
  Assets[Data and visual assets] --> Engine
  Graph[graph: GPU workflows] --> Core
  Graph --> Engine
  Deck[deck layer packages] --> Core
  Deck --> Assets
  GL --> Browser[WebGL context]
  GPU --> Native[WebGPU device]

Glossary

  • Device — the common luma.gl interface through which applications create and use GPU resources.
  • Backend — a concrete WebGL or WebGPU implementation of the shared GPU abstractions.
  • GPU Simple Graph — the lightweight graph-value and evaluator system for composing GPU-resident workflows.
  • GPU Project — graph package projection planning and GPU transformation system.
  • ANARI — the scene-graph and ray-tracing integration subsystem.

Codebase-wide invariants

  • Shared device defaults and behavior are defined centrally, with backends adapting them; see modules/…/device-defaults.ts and modules/…/device.ts.
  • WebGL canvas creation and context state tracking remain backend responsibilities; see modules/…/create-browser-context.ts and modules/…/webgl-state-tracker.ts.
  • WebGL and WebGPU device implementations live under modules/core/src/webgl/adapter/** and modules/core/src/webgpu/adapter/**, respectively.
  • Higher-level rendering and graph systems consume common runtime APIs rather than exposing backend-specific application contracts; see modules/engine/** and modules/graph/**.

Routing table