$ show playcanvas/supersplat
SuperSplat is a browser-based 3D Gaussian Splatting editor built with the PlayCanvas engine and PCUI framework. It provides a full-featured editing environment for loading, inspecting, selecting, transforming, color-grading, and exporting Gaussian splat data (PLY, SOG, SPZ, Splat formats). The application supports real-time GPU-accelerated data processing (histograms, bounding boxes, picking), camera animation with keyframe tracks and spline interpolation, video export via WebCodecs, and publishing to the PlayCanvas platform. Its architecture is event-driven with a centralized command queue for serializing async GPU work, an undo/redo system, and a modular tool system covering selection (rect, lasso, polygon, brush, flood, eyedropper, sphere, box) and transformation (move, rotate, scale, measure, orient). The UI is fully localized into 9 languages and includes a service worker for offline caching.
The LLM identified 5 files worth highlighting for reuse:
A generic FIFO async command queue that serializes GPU readback operations and history mutations. It prevents race conditions by ensuring commands execute in order, with support for pending state and error handling. Reusable in any WebGL/WebGPU application that needs ordered async work.
A pool of Uint8Array buffers keyed by byte length, reducing allocation pressure during GPU readback. Provides acquire/release semantics and automatic resizing. Demonstrates a clean pattern for managing reusable typed arrays in performance-critical rendering pipelines.
A compact run-length encoding for index sets, used to represent splat selection, deletion, and lock states efficiently. Supports union, intersection, difference, and iteration operations. Extracted and reusable for any application needing memory-efficient storage of sparse index ranges.
A lightweight, typed event bus with function registration, one-time listeners, and removal. Used throughout the application for decoupled communication between modules. Demonstrates a clean, dependency-free implementation of the observer pattern.
A minimal abstraction for rendering a fullscreen quad with a given shader, supporting blend and depth state configuration. Used for blit and compute-like passes. Reusable in any WebGL application that needs simple offscreen rendering.