Create the layer. No network happens until it is added to a map; loading starts in onAdd.
See Tiles3DSplatLayerOptions. Only id + url are required.
ReadonlyidA unique layer id.
ReadonlyrenderingEither "2d" or "3d". Defaults to "2d".
ReadonlytypeThe layer's type. Must be "custom".
Revert to the ungraded (full-daylight) look — the clearSun half of SunLightable (used when the
geo-sun system is disabled).
The dataset attribution string this layer contributes, if any.
The dataset's camera target [lng, lat] (degrees), or null until the
tileset's root center is known. Handy for driving your own flyTo.
The dataset's geographic footprint as [west, south, east, north] in degrees.
[west, south, east, north] in degrees, or null until the root resolves.
MapLibre CustomLayerInterface hook — invoked when the layer is added with map.addLayer;
initializes GL resources and begins streaming.
MapLibre CustomLayerInterface hook — invoked when the layer is removed with map.removeLayer;
releases GL resources and stops streaming.
Resolve a canvas point to the 3D geographic position of the frontmost rendered splat — the screen→scene primitive behind measurement and slice placement. GPU pick pass over the drawn splats' CENTERS (depth-tested, so the nearest wins), read back as the EXACT stored anchor-ENU position and converted through the layer's placement (which embeds the vertical-datum seat).
Canvas X in CSS pixels, top-left origin (e.g. a MapLibre click event's e.point.x).
Canvas Y in CSS pixels, top-left origin.
Snap radius in CSS pixels (default 0 = exact pixel): the splat nearest the cursor within the radius wins.
The picked position (lng/lat degrees, height metres above the rendered ground
datum, plus the cross-layer-comparable depth01), or null on a miss / before the first
frame / when the GPU lacks float-color rendering.
Optional method called during a render frame to allow a layer to prepare resources or render into a texture.
The layer cannot make any assumptions about the current GL state and must bind a framebuffer before rendering.
Working-set load fraction (0–1): ready (drawn) tiles over ready + still-pending (fetching/decoding/queued). 1 when the current view is fully resolved.
Called during a render frame allowing the layer to draw into the GL context.
The layer can assume blending and depth state is set to allow the layer to properly blend and clip other layers. The layer cannot make any other assumptions about the current GL state.
If the layer needs to render to a texture, it should implement the prerender method
to do this and only use the render method for drawing directly into the main framebuffer.
The blend function is set to gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA). This expects
colors to be provided in premultiplied alpha form where the r, g and b values are already
multiplied by the a value. If you are unable to provide colors in premultiplied form you
may want to change the blend function to
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA).
Sample the height of the topmost splat surface at each position — the on-nadir DSM used by the
volume / elevation-profile tools. Builds ONE overhead ortho frame over the points' bbox, renders the
pick pass into a full grid (Tiles3DSplatRenderer.sampleDepthGrid), and converts each cell's
splat centre to a height above the rendered ground datum (same frame as queryTerrainElevation).
lng/lat in degrees.
Optionalopts: SurfaceSampleOptionsOptional: gridPx sets the overhead pass's long-axis resolution (default 1024;
small values like 64 for cheap point probes).
Height per point, or null where no splat surface covers the cell / the layer isn't ready.
Resize the resident-memory budget live (the runtime equivalent of the budget ctor option).
Shrinking evicts far/out-of-view tiles down to the new ceiling on the next frame; growing lets
the far LOD pyramid refill. maxSplats is bounded by the renderer's GL texture ceiling.
Replace this layer's clipping planes at runtime. Planes are geographic
(ClippingPlanesOptions) and survive re-anchors; null (or an empty or
disabled set) removes clipping and restores byte-identical rendering.
The new plane set, or null to clear.
Tune far-field coverage live: lodBlur (m, coarse-LOD inflate to fill voids) and minPx
(screen-space minimum radius so far/sparse splats overlap into a surface).
Switch the vertical-datum placement mode live — re-anchors in place (a rigid
vertical shift; no re-decode / re-stream). Optionally update the geoid N that
'orthometric' uses. No-op until the tileset has loaded.
OptionalgeoidN: numberToggle the dev bounding-volume wireframe overlay live.
Switch the render mode live: 'splats' (EWA gaussians) ↔ 'points' (each splat as a
round point sized to its footprint — the point-cloud look). Same streamed geometry.
LOD distance-falloff exponent: 1 = standard SSE / Cesium-matched lean cusp (default), <1 (e.g. 0.6) refines the far field further out (richer, heavier).
Set the screen-space-error target (px) live — lower = more detail, higher = lighter. Takes effect on the next frame's traversal.
Fade the splats over the basemap (0 = transparent, 1 = opaque).
Toggle cascaded sun shadows (cast + self-shadow) at runtime. Part of @bitruvius/sdk-maplibre's
SunLightable, so atmo.setShadows(...) reaches the splats.
Adopt (or clear) the shared vector-drape atlas — satisfies the DrapeReceiver contract, so
enableVectorDrape drives this layer directly. Stashed until the renderer exists.
Grade the splat scene by the environment (day/night exposure + sun tint) — satisfies
@bitruvius/sdk-maplibre's SunLightable. Splats are pre-lit captures, so this is a final
color grade (no directional relight / shadows).
Toggle degree-1 view-dependent lighting (SH). false = flatter + lighter.
Show/hide the splats without removing the layer (streaming continues so it's instant to bring back).
Live streaming + render stats for a debug HUD / perf overlay.
The engine's EngineStats plus drawn (splats rendered last frame) and sortMs (last
depth-sort time in milliseconds), or null until the engine is up.
Streams an OGC 3D-Tiles gaussian-splat tileset and renders it georeferenced — a MapLibre
CustomLayerInterface, added withmap.addLayerand torn down withmap.removeLayer. Onlyidandurlare required (Tiles3DSplatLayerOptions): tiles decode in a worker pool ('spz'by default,'bvc', or your ownGltfSplatDecoder) and the dataset auto-grounds onto the flat map or onto 3D terrain. Nothing is fetched until the layer is added to a map.Requires a WebGL2 context — on WebGL1 the layer goes inert and draws nothing — and renders under the mercator projection only: under a non-affine (globe) projection it hides itself.
Example