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

docs / data-and-visualization-assets

Data and visualization assets

Luma.gl turns structured source data into GPU-ready content for tables, 3D scenes, labels, Gaussian splats, and lighting. Its asset systems preserve source meaning such as schema, hierarchy, text identity, row identity, and scene placement while preparing content for portable rendering and GPU analysis.

Asset preparation flow

Asset preparation connects source formats to content-specific visual systems. Tabular data becomes GPU tables or visual batches. glTF becomes scene content. Text, splat data, and lighting data follow their own preparation paths before a renderer consumes them.

Source or contentPrepared representationVisual result
Apache Arrow tables and vectorsGPU vectors, tables, record batches, and source mappingsTables, paths, polygons, text, and splats
glTF and GLB assetsResolved asset data and scene descriptions3D scene graphs
Text and font dataFont atlases and GPU text data2D or 3D labels
Gaussian-splat attributesSplat data, hierarchy pages, and renderer batchesView-dependent point-based scenes
Lightmap and reflection dataAtlas charts, baked lighting data, and filtered probe texturesBaked and image-based lighting
Three.js scenes and GPU buffersShared or adapted scene and buffer resourcesThree.js, luma.gl, and deck.gl composition

This diagram shows how source data moves into a selected asset system and then into shared GPU rendering.

flowchart LR
  A[Source data] --> B{Content kind}
  B -->|Arrow| C[GPU tables and visual batches]
  B -->|glTF or GLB| D[Resolved scene content]
  B -->|Text and fonts| E[GPU text data]
  B -->|Splat attributes| F[GPU splat data]
  B -->|Lightmaps or probe captures| I[Lighting assets]
  B -->|Three.js scenes or buffers| H[Interop resources]
  C --> G[GPU renderers or analysis]
  D --> G
  E --> G
  F --> G
  I --> G
  H --> G

The data interchange page explains Arrow and glTF boundaries. Scene graphs explains retained 3D composition. Text rendering, Gaussian splats, Three.js interoperability, glTF rendering features, and rendering and lighting describe the specialized paths.

Structured data assets

Structured data assets give GPU workflows a shared shape for named columns and batches. A GPU table carries a schema, row count, columns, and record-batch boundaries so data adapters, visual models, and GPU analysis can use the same source view.

The system separates general data preparation from content-specific rendering:

  • General GPU data tools inspect Arrow types and convert them to GPU vectors, matrices, colors, time values, and shader layouts.
  • Graph data tools convert tables and GeoArrow data for analytics and spatial work.
  • Engine adapters map prepared data to paths, polygons, text, splats, picking, and geometry.

These layers let one source table support analysis, rendering, streaming, and source-row selection without requiring a separate source-data model for every visual type.

Arrow-backed visual data

Arrow is the source-facing format. The prepared GPU representation supplies the layout required by each visual system while retaining column meaning, batch identity, and row mapping where the consumer needs them.

The main content-specific conversions are:

  • Mesh columns become geometry with normalized mesh semantics, supported numeric vertex formats, optional indices, and point or triangle topology.
  • Path rows become renderable segments while row-aligned style and time values remain available for display and selection.
  • Polygon rows become tessellated triangles with source-row metadata.
  • Text columns become label data.
  • Splat columns become Gaussian-splat data.
  • GeoArrow data preserves coordinate meaning, layout, validity, and batch views.

Fixed-width numeric columns can also preserve null-row validity and produce low components for precision-sensitive values. Format selection uses column semantics such as position, scalar, numeric, or color before values become owned GPU vectors.

Large path coordinates can remain as source Float64 origins while the GPU uses Float32 deltas. View-space origins refresh when the model-view transform changes, so precision preparation and camera updates remain separate.

The same boundary supports analysis, rendering, streaming, and source-row selection without forcing each visual type to define a new source-data model.

References: modules/…/arrow-geometry.ts• L19-45 modules/…/arrow-picking.ts• L155-182 modules/…/index.ts• L5-25 modules/…/arrow-column-gpu-vector.ts• L9-20 modules/…/arrow-column-gpu-vector.ts• L39-77 modules/…/index.ts• L5-42 modules/…/arrow-path-source-mapping.ts• L57-93 modules/…/arrow-path-gpu-vectors.ts• L122-176 modules/…/gpu-path-float64-deltas.ts• L90-194 modules/…/arrow-polygon-gpu-vectors.ts• L46-100 modules/…/arrow-polygon-source-mapping.ts• L13-28

3D asset representation

The glTF system provides standards-based 3D asset interchange. It resolves resource references and typed accessors into scene-ready content, then maps meshes, materials, textures, cameras, lights, skins, morphs, instancing, metadata, and animation into retained scene data.

The glTF schema also represents sparse attributes, packaged or external files, compressed mesh data, and alternate compressed image sources. These asset forms let loaders preserve portable source references while preparing data for rendering.

The scene system provides a retained composition model around that content. A retained scene keeps objects and their relationships available across frames, so an application can update a transform, material, light, world, or camera without rebuilding the whole description. The scene path also accepts validated JSON descriptions and can import supported interchange assets into editable scene data.

This diagram shows how an asset becomes a retained frame while keeping object identity for later updates and inspection.

flowchart LR
  A[glTF or JSON scene description] --> B[Resolved asset data]
  B --> C[Retained scene objects]
  C --> D[World, camera, and renderer]
  D --> E{Rendering runtime}
  E -->|Forward or deferred| F[Rendered frame]
  E -->|Ray tracing| F
  F --> G[Picking and hit channels]

The scene graph page covers retained composition and renderer choice. The glTF rendering features page covers authored effects that extend the base asset model.

Scene surface rendering

The shared scene renderer turns retained surface descriptions into reusable physically based draw batches. A surface combines geometry, material state, world placement, and stable identity so structural changes remain separate from transform or uniform updates.

The same scene description can use a forward renderer on WebGL or WebGPU. Compatible opaque and masked scenes can use a WebGPU deferred path that stores material data first and resolves lighting later. Scenes with advanced materials, unsupported lights, or environment effects use forward rendering instead of losing those effects.

The render contract supports opaque, masked, blended, transmissive, forward, deferred, and ray-traced scene paths. Environment lighting, tone mapping, output color space, fog, picking, shadows, transmission capture, and render statistics remain scene-level concerns rather than format-specific concerns. Transparent content can use exact per-pixel capture or weighted blended composition.

References: modules/…/scene-renderer.ts• L54-107 modules/…/scene-renderer.ts• L292-359 modules/…/scene-renderer.ts• L544-681 modules/…/scenegraph-surfaces.ts• L20-125 modules/…/deferred-scene-renderer.ts• L33-103 modules/…/a-buffer.ts• L8-40 modules/…/wboit-renderer.ts• L85-116 modules/…/shadow-map-renderer.ts• L174-216

glTF rendering features

The glTF feature layer carries authored effects that need more than mesh and material data. It connects supported lights, lightmaps, scene-linked audio, billboards, material variants, level of detail, metadata, node visibility, and physics data to a loaded asset.

Feature support is explicit. The public glTF boundary exposes scene creation, animation, morph targets, level of detail, extension status, lights, materials, environment lighting, billboards, audio, area lights, post-processing, and asset types through modules/…/index.ts. Required extensions without complete runtime support are rejected instead of being silently treated as ordinary scene content.

Animation channels can update node transforms and morph weights. Supported targets can also update visibility, material values, texture transforms, camera projection, and punctual-light properties. Punctual lights follow their source node hierarchy so animation and scene changes keep light placement and visibility aligned with the asset.

Environment lighting uses a BRDF lookup texture plus diffuse and specular cubemaps. loadPBREnvironment loads these resources asynchronously from application-provided image data. resolveLoadedPBREnvironment waits for all uploads and exposes the completed textures as the lighting resources used by the physically based scene path.

Gaussian-splat primitives can be left out of the mesh scene so a caller-managed splat path can render them without changing ordinary mesh loading. Metadata, variants, level of detail, and other feature data remain tied to their source asset objects.

References: modules/…/index.ts• L16-78 modules/…/index.ts• L96-123 modules/…/gltf-json-schema.ts• L716-799 modules/…/gltf-json-schema.ts• L852-923 modules/…/pbr-environment.ts• L18-42 modules/…/pbr-environment.ts• L41-93 modules/…/pbr-environment.ts• L138-156 modules/…/post-process-gltf.ts• L120-219 modules/…/create-scenegraph-from-gltf.ts• L49-224 modules/…/gltf-extension-support.ts• L321-417 modules/…/gltf-lod.ts• L18-207 modules/…/parse-gltf-animations.ts• L36-149 modules/…/parse-gltf-lights.ts• L15-122

Lighting assets

Lighting assets prepare scene lighting separately from surface geometry. The public lighting boundary supports physically based materials, shadows, environment lighting, lightmap baking, atlas layout, and reflection probes so scenes can combine baked and dynamic light sources.

Lightmap assets

Lightmap assets turn triangle geometry into a stable atlas layout for baked lighting. The atlas gives each chart a padded pixel rectangle, object-space lightmap coordinates, world-space area, and ownership data that a baker can use to write and validate lightmap results.

The atlas is an independent CPU result. It does not upload textures, allocate GPU resources, or mutate the source geometry. This separation lets applications inspect chart coverage before baking and pass the prepared meshes and chart ownership data to the lightmap baking path.

References: modules/…/lightmap-atlas.ts• L8-40 modules/…/lightmap-atlas.ts• L43-57 modules/…/lightmap-atlas.ts• L197-254 modules/…/lightmap-atlas.ts• L257-347 modules/…/index.ts• L90-107

Reflection probe assets

Reflection probes capture the surrounding scene as a cube and publish filtered mip levels for specular environment lighting. A probe updates its six views over time or within one frame, then exposes a completed cube only after the refreshed result is ready.

The update path uses a frame budget and can prioritize faces toward requested view directions. Double-buffered publication keeps the previous probe available while the next capture and filter cycle completes, so scene rendering does not read a partial environment.

References: modules/…/reflection-probe.ts• L26-60 modules/…/reflection-probe.ts• L62-145 modules/…/reflection-probe.ts• L147-245 modules/…/index.ts• L109-124

Three.js interoperability

Three.js interoperability connects existing Three.js applications to luma.gl and deck.gl without forcing one system to own every scene or frame. Each path preserves a clear owner for the camera, animation clock, redraws, source objects, and device while sharing only resources that the selected path can safely share.

Application needShared boundaryResult
Add deck.gl layers to an existing Three.js appHost camera and frame loop with shared depth or a separate transparent canvasNative Three.js content and deck layers appear in one application view
Render Three.js scenes through luma.glThree.js scene traversal and luma.gl GPU resourcesThree.js graphics and supported compute use a luma-managed backend
Put Three.js objects into a luma.gl or deck.gl passBorrowed Three.js objects with a caller-owned pass and deviceAdapted objects share color and depth with native luma or deck content
Send luma.gl compute output to Three.jsOne WebGPU device and borrowed GPU buffersThree.js reads GPU results without a CPU upload

The Three.js interoperability page explains the ownership and support contracts. Shared-depth composition depends on the host canvas and depth setup. An overlay uses a separate canvas. The buffer bridge shares storage without moving render ownership.

References: modules/…/README.md• L8-15 modules/…/README.md• L60-142 modules/…/README.md• L181-199 modules/…/interleaved.ts• L18-52 modules/…/overlay.ts• L26-45 modules/…/scene-adapter.ts• L48-59 modules/…/interop.ts• L26-56 modules/…/deck.ts• L103-201

Specialized visual assets

Specialized visual assets preserve rules that a generic mesh or table cannot express well. Text needs glyph layout and font sampling. Gaussian splats need per-point shape, view-dependent color, depth order, and progressive detail.

Text assets

The text system prepares text content and font data for GPU rendering. Font atlases provide glyph metrics, image pages, sampling settings, and layout offsets. GPU text data then represents rows and glyphs in a form that supports the selected rendering strategy.

The renderer can expand labels into glyph data, keep label work in GPU storage, use a direct source-row index for each glyph, or reuse shared glyph data for repeated values. All paths preserve row style and picking identity. Atlas mappings also carry kerning and page information so adjacent glyphs use the correct spacing and image page.

Arrow text adapters connect UTF-8 and supported dictionary text columns to this system. They can prepare a complete table or append record batches as a stream. Positions and style columns stay aligned with source rows, and picking maps visible labels back to those rows.

References: modules/…/index.ts• L5-44 modules/…/README.md• L3-12 modules/…/README.md• L71-127 modules/…/text-utils.ts• L6-145 modules/…/arrow-text-renderer.ts• L80-137 modules/…/arrow-text-renderer.ts• L274-363 modules/…/arrow-text-renderer.ts• L545-675 modules/…/convert-arrow-text-to-attribute.ts• L21-196 modules/…/convert-arrow-text-to-storage.ts• L25-61

Gaussian splat assets

The splat system represents a scene as many Gaussian primitives instead of conventional mesh surfaces. Prepared data keeps positions, appearance, spherical-harmonic values, semantic classes, and source-row identity available to the renderer.

Rendering can use complete batches or progressively loaded pages. Hierarchy and residency systems select view-dependent detail while keeping a coarse parent visible until the required child data is resident. Sorting and picking preserve depth order and source selection.

Arrow and glTF adapters normalize supported splat attributes into independently owned GPU batches. A glTF mesh primitive is the prepared data identity, while visible scene nodes and GPU-instanced node matrices produce separate instances that borrow those batches. The caller applies each instance's current world transform when drawing, so animation and visibility changes update placement without rebuilding the prepared splat data. Decoded glTF feature IDs can remain available as semantic row data when they match the decoded table.

The glTF bridge accepts decoded Arrow splats and uncompressed Gaussian attributes. It preserves Arrow record-batch boundaries and source mesh and primitive indices, checks supported decoded extension settings, and releases prepared batches if conversion fails or is cancelled. A WebGPU graph path can move projection, filtering, depth sorting, and indirect drawing into a reusable GPU command graph.

References: modules/…/README.md• L3-39 modules/…/README.md• L45-85 modules/…/splat-data.ts• L14-48 modules/…/splat-data.ts• L87-194 modules/…/splat-renderer.ts• L41-85 modules/…/splat-renderer.ts• L206-219 modules/…/gpu-splat-graph-renderer.ts• L115-151 modules/…/gpu-splat-graph-renderer.ts• L372-439 modules/…/make-gpu-splat-data-from-gltf.ts• L23-163 modules/…/make-gpu-splat-data-from-gltf.ts• L165-223 modules/…/make-gpu-splat-data-from-arrow.ts• L94-149

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep Arrow schemas, GPU layouts, record-batch boundaries, coordinate meaning, and source-row identity aligned across analysis and rendering.
  • Keep Arrow null validity, transformed widths, color ranges, and precision residuals aligned with the shader formats that consume them.
  • Keep path precision data and view-origin updates aligned across attribute and storage paths.
  • Keep glTF source references, resolved asset data, scene-node mappings, feature status, environment resources, and public exports aligned.
  • Keep glTF extension requirements, animation targets, light bindings, metadata, level of detail, and Gaussian primitive ownership aligned.
  • Keep retained scene identities, material features, environment lighting, transparency paths, shadow resources, and forward or deferred eligibility aligned.
  • Keep lightmap chart IDs, padded rectangles, UV sets, chart ownership, bake inputs, and validation results aligned.
  • Keep reflection probe capture faces, mip levels, matrix snapshots, frame budgets, and publication state aligned with the scene render loop.
  • Keep text input schemas aligned with atlas mappings, kerning, page data, glyph expansion, streaming, and row counts.
  • Keep splat attributes, hierarchy pages, residency limits, graph capacities, sorting, semantic filtering, instance transforms, and picking aligned.
  • Keep Three.js camera, depth, device, buffer, and ownership contracts aligned with the selected integration path.

Important failure modes

TriggerConsequenceGuard
Arrow rows, nested offsets, or style data do not alignVisual data is rejected or style and picking data map to the wrong rowsValidate input shapes and preserve source-row mappings before conversion
A numeric Arrow column has null rows without validity handlingConversion rejects the column or downstream code treats missing values as real dataSelect null preservation when needed and pass the validity vector to the consumer
Float64 path origins are not refreshed after a view changeLarge-coordinate paths lose view-space precisionUpdate view-origin data with the current model-view transform
A glTF document requires an unsupported extensionAsset loading cannot honor authored behaviorCheck extension support before scene creation
Environment textures are used before all uploads completePhysically based lighting reads incomplete resourcesResolve the loaded environment before creating lighting bindings
A lightmap chart is outside the atlas or overlaps another chartBake samples use invalid UVs or write into another chartValidate chart rectangles, padded UVs, and ownership data before baking
A reflection probe is sampled before a complete refresh is publishedReflections show stale or missing environment dataUse the published probe texture and let the capture/filter cycle finish
Deferred rendering receives unsupported materials, lights, or environmentsThe scene must use forward rendering or cannot preserve its effectsCheck deferred eligibility and keep the shared scene render contract
Gaussian primitives are both in the mesh scene and in a splat rendererThe same content renders twiceAssign clear ownership and exclude caller-owned splats from mesh creation
A glTF splat instance transform is not refreshed after animation or visibility changesSplat placement does not match the scene graphRe-resolve visible instances and apply each current world matrix
A Three.js host does not meet the selected canvas or device contractAttachment fails or depth and resource ownership disagreeRun the support check and use the matching interop path
A borrowing renderer outlives its prepared data or shared resourcesGPU work reads released or stale resourcesDestroy consumers before caller-owned data and shared resources

Key files

FileWhy to read it
modules/…/index.tsShows the public Arrow boundary for geometry, text, splat, path, polygon, and picking preparation.
modules/…/index.tsShows the public graph boundary for Arrow-to-GPU vectors, tables, analytics, and GeoArrow data.
modules/…/arrow-column-gpu-vector.tsShows how numeric Arrow columns become owned GPU vectors with format, null, color, and precision handling.
modules/…/arrow-geometry.tsShows how structured mesh columns become GPU geometry.
modules/…/arrow-text-renderer.tsShows text model selection, streaming, style inputs, and source-row ownership.
modules/…/scene-renderer.tsShows the shared retained-surface rendering contract.
modules/…/deferred-scene-renderer.tsShows deferred eligibility and forward fallback.
modules/…/index.tsShows the public glTF asset, feature, animation, lighting, and environment boundary.
modules/…/gltf-json-schema.tsDefines the structured glTF asset forms and extension data that loaders can resolve.
modules/…/pbr-environment.tsShows asynchronous image-based lighting preparation and resource resolution.
modules/…/post-process-gltf.tsShows how glTF references, accessors, resources, and topology become resolved asset data.
modules/…/create-scenegraph-from-gltf.tsShows how resolved glTF content becomes retained scenes and feature data.
modules/…/index.tsShows the public boundary for physically based lighting, lightmaps, atlas preparation, and reflection probes.
modules/…/lightmap-atlas.tsShows how geometry becomes validated, padded lightmap charts and ownership data.
modules/…/reflection-probe.tsShows incremental or same-frame environment capture and filtered probe publication.
modules/…/splat-data.tsDefines the prepared Gaussian splat data and source identity.
modules/…/gpu-splat-graph-renderer.tsShows the WebGPU graph path for projection, sorting, filtering, and indirect drawing.
modules/…/make-gpu-splat-data-from-gltf.tsShows how glTF splat primitives become reusable batches and scene-node instances.
modules/…/index.tsShows the public text asset boundary for font atlases, glyph layout, and GPU text resources.
modules/…/README.mdSummarizes the Three.js, deck.gl, scene, buffer, picking, and ownership paths.