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/**andmodules/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/**andmodules/graph/**.
Routing table
modules/core/src/api/**-> docs/core-api.mdmodules/core/src/api/adapter/**-> docs/core-api.mdmodules/core/src/**-> docs/rendering-runtime-platforms.mdmodules/engine/src/**-> docs/engine-render-loop.mdmodules/core/src/webgl/**-> docs/webgl-backend.mdmodules/core/src/webgpu/**-> docs/webgpu-backend.mdmodules/shaders/**-> docs/shadertools.mdmodules/slang/**-> docs/slang-integration.mdmodules/engine/src/lib/arrow/**-> docs/data-interchange-formats.mdmodules/engine/src/lib/gltf/**-> docs/data-interchange-formats.mdmodules/anari/**-> docs/scene-graph.mdmodules/engine/src/lib/text/**-> docs/text-rendering.mdmodules/engine/src/lib/gaussian-splats/**-> docs/gaussian-splats.mdmodules/engine/src/lib/three/**-> docs/three-integration.mdmodules/engine/src/lib/gltf/**-> docs/gltf-rendering-features.mdmodules/engine/src/lib/lighting/**-> docs/rendering-lighting.mdmodules/graph/src/gpgpu/**-> docs/gpgpu-compute.mdmodules/engine/src/lib/effects/**-> docs/rendering-effects.mdmodules/graph/src/**-> docs/rendering-effects.mdmodules/deck-gpu-layers/**-> docs/deck-layer-packages.mdmodules/deck-arrow-layers/**-> docs/deck-layer-packages.mdmodules/graph/src/gpu-core/**-> docs/gpu-graph-workflows.mdmodules/graph/src/gpu-simple-graph/**-> docs/gpu-simple-graph.mdmodules/graph/src/geospatial/**-> docs/gpu-geospatial-workflows.mdmodules/graph/src/dggs/**-> docs/gpu-geospatial-workflows.mdmodules/graph/src/h3/**-> docs/gpu-geospatial-workflows.mdmodules/graph/src/physics/**-> docs/gpu-physics.mdmodules/graph/src/spatial/**-> docs/gpu-physics.mdmodules/graph/src/gpu-project/**-> docs/gpu-project.mdmodules/graph/src/experimental/**-> docs/experimental-gpu-workflows.mdmodules/graph/src/gpu-tables/**-> docs/gpu-data-tables.mdmodules/graph/**-> docs/gpu-graph-systems.mdmodules/shaders/**-> docs/shader-systems.mdmodules/engine/src/lib/**-> docs/data-and-visualization-assets.mdmodules/graph/**-> docs/gpu-compute-and-effects.mdmodules/deck-gpu-layers/**-> docs/deck-integration.md