luma.gl is split into several modules that are each responsible for a particular part of the rendering stack:

  • engine: High-level constructs such as Model, AnimationLoop and Geometry that allow a developer to work without worrying about rendering pipeline details.
  • webgl: Wrapper classes around WebGL objects such as Program, Buffer, VertexArray that allow a developer to manager the rendering pipeline directly but with a more convenient API.
  • gltools: A set of helper functions for instrumenting and managing state on an WebGL context. This allows developers to program directly against the WebGL API with some helpful polyfilling and state tracking.
  • shadertools: A system for modularizing and composing GLSL shader code.
  • debug: Tooling to aid in debugging.

luma.gl also exposes a core module that simply re-exports key parts of the other modules. This can be helpful to just get started without worrying too much about fine-grained control of dependencies. The core module re-exports the following functions and classes from other modules:

engineAnimationLoop, Model, Transform, ProgramManager, Timeline, Geometry, ClipSpace, ConeGeometry, CubeGeometry, CylinderGeometry, IcoSphereGeometry, PlaneGeometry, SphereGeometry, TruncatedConeGeometry
webgllumaStats, FEATURES, hasFeature, hasFeatures, Buffer, Program, Framebuffer, Renderbuffer, Texture2D, TextureCube, clear, readPixelsToArray, readPixelsToBuffer, cloneTextureFrom, copyToTexture, Texture3D, TransformFeedback
gltoolscreateGLContext, instrumentGLContext, isWebGL, isWebGL2, getParameters, setParameters, withParameters, resetParameters, cssToDeviceRatio, cssToDevicePixels
shadertoolsnormalizeShaderModule, fp32, fp64, project, dirlight, picking, gouraudLighting, phongLighting, pbr