Gladly
A lightweight, GPU-accelerated plotting library with a declarative API.
Overview
Gladly combines WebGL rendering (via regl) with D3.js for interactive axes and zoom controls. It features a declarative API that lets you create high-performance plots with minimal boilerplate.
Key Features:
- π GPU-accelerated rendering using WebGL
- π¨ Zero JavaScript loops over data - all processing in GPU shaders
- π Declarative plot configuration
- π― Interactive multi-axis support (up to 4 axes)
- π Zoom and pan interactions
- π§© Extensible layer type registry
- π Quantity and unit-aware axis management
- π¨ Supports all standard colorscales
- π Subplot axis linking
- π Axis to coloring or filtering linking
- π GIS layers:
- πΊοΈ Tile sources: XYZ, WMS, WMTS, COG
- π Basemap layer
- ποΈ 3D terrain layer: satellite imagery draped over DTM elevation meshes
- π CRS reprojection
Extensions
- gladly-jupyter - Jupyter notebook widget extension for Gladly
Documentation
- Quick Start - Installation and minimal working example
- Concepts - Data model overview: axes, quantity kinds, colorscales, layer types, data format
- Configuration - Plot configuration, layers, axes, colorscales, built-in computations
- User API - Programmatic APIs for plots, axes, data, and computations
- Extension API - Writing custom layer types and computations
- Architecture - Design patterns and module responsibilities
Technology Stack
- WebGL Rendering: regl v2.1.0
- Axes & Interaction: D3.js v7.8.5
- Module Format: ES6 modules
- Build Tool: Parcel v2.9.0
Development
Install dependencies:
npm install
Run the test suite (launches a real Chromium browser via Playwright):
npm test
Tests live in test/. The pretest script pre-bundles CJS dependencies (regl, proj4) to ESM before the runner starts. On first run, Playwright downloads its Chromium binary automatically.
To run a subset of tests by name:
npm test -- --grep "uploadToTexture"
License
MIT