Bitruvius SDK Examples
Runnable, editable examples for the Bitruvius SDK. Pick an example, tweak the code, hit Run — the preview updates instantly, right in your browser.
Image Codecs
Zero-build, per-package codec examples — 2D image/raster formats.
TurboWebP — decode
Decode WebP in the browser — the same code as an npm import, a CDN ESM URL, or a plain script tag.
TurboJXL — JPEG-XL decode
Decode JPEG-XL with one <script type="module"> import from the CDN.
TurboLERC — raster decode
Decode Esri LERC elevation/raster tiles with one <script type="module"> import from the CDN.
RIPT — raster decode
Decode Bitruvius's own scientific raster codec with one <script type="module"> import from the CDN.
3D Data Codecs
Zero-build, per-package codec examples — point clouds and Gaussian splats.
BVC
Zero-build examples that load the SDK straight from cdn.bitruvius.com.
BVC point-cloud decode
Decode a Bitruvius BVC point-cloud container with one <script type="module"> import from the CDN.
BVC Gaussian splats — point preview
Decode a BVC Gaussian-splat container and preview each splat as a point — covariance and SH bands decoded but not rasterized.
BVC Gaussian splats — EWA rendering
Render a BVC splat container properly — projected covariance ellipses, depth-sorted and alpha-blended in hand-written WebGL2.
TurboSPZ
Zero-build examples that load the SDK straight from cdn.bitruvius.com.
SPZ Gaussian splats — point preview
Decode Niantic SPZ Gaussian splats and preview each splat as a point — covariance and SH bands decoded but not rasterized.
SPZ Gaussian splats — EWA rendering
Render a Niantic SPZ capture properly — projected covariance ellipses, depth-sorted and alpha-blended in hand-written WebGL2.
MapLibre SDK
Bundler-style examples — bare imports, package.json, Vite. Run them here or clone and `bun run dev`.
3D Tiles
Cesium's 3D Tiles — now an OGC community standard — streamed into MapLibre. Bundler-style examples — bare imports, package.json, Vite. Run them here or clone and `bun run dev`.
3D-Tiles Gaussian splats
Stream Niantic SPZ Gaussian splats in an OGC 3D Tiles tileset, decoded by Bitruvius TurboSPZ.
3D Objects
Stream a 3D Tiles tileset of textured 3D-object meshes.
Integrated Mesh — Aerial
Stream an aerial-photogrammetry 3D Tiles integrated mesh.
Integrated Mesh — Satellite
Stream a satellite-derived 3D Tiles integrated mesh (Planet SkySat stereo).
Integrated Mesh — Vienna
Vienna photogrammetry as OGC 3D Tiles from an Esri 3DTilesServer — the same survey the I3S example streams.
Point Cloud
Stream a 3D Tiles point cloud from a Cesium ion asset (bring your own token).
Building
Stream a 3D Tiles building tileset.
Integrated Mesh — Google Photorealistic
Google's planet-wide photogrammetric mesh over 3D Tiles — paste your own Maps API key to stream it.
I3S (Indexed 3D Scene)
Esri I3S scene layers streamed into MapLibre. Bundler-style examples — bare imports, package.json, Vite. Run them here or clone and `bun run dev`.
3D Objects (Wellington Buildings)
Stream Esri I3S 3D-Object building meshes via I3sMeshLayer — Wellington City Council's CBD models, CC BY 4.0.
Integrated Mesh
Stream an Esri I3S IntegratedMesh scene layer via I3sIntegratedMeshLayer.
Integrated Mesh — Vienna
Vienna photogrammetry as an Esri I3S IntegratedMesh scene layer — the same survey the 3D Tiles example streams.
Point
Stream an Esri I3S Point scene layer as instanced 3D models (autoModel).
Point Cloud
Stream an Esri I3S PointCloud scene layer via I3sPointCloudLayer — LEPCC tiles decoded by Bitruvius TurboLEPCC.
Point Cloud — Christchurch LiDAR (NZTM)
Stream a city-wide high-density LiDAR survey published on a national grid (NZTM 2000) — LEPCC tiles decoded by Bitruvius TurboLEPCC, projection resolved from the wkid.
Building
Stream an Esri I3S Building scene layer via I3sBuildingLayer.
Bitruvius
Standalone captures — BVC, SPZ and LEPCC — placed on the map at a lng/lat, one file per layer. Bundler-style examples — bare imports, package.json, Vite. Run them here or clone and `bun run dev`.
BVC Gaussian Splat
Render a BVC Gaussian-splat capture georeferenced via BvcMapLibreLayer, with a flat/3D-terrain toggle.
SPZ Gaussian Splat
A standalone Niantic SPZ capture placed at a lng/lat and decoded by Bitruvius TurboSPZ — friendly placement, no basis matrix.
BVC Point Cloud (Autzen Stadium)
Stream a ~1.06M-point LiDAR scan via BvcMapLibreLayer, georeferenced at its real-world capture site.
LEPCC Point Cloud (Autzen Stadium)
The same LiDAR scan as an Esri LEPCC container, decoded by Bitruvius TurboLEPCC — colour, intensity and LAS classes all live.
Masking
Cutting geometry away with clipping planes — masking one layer so another can occupy its footprint.
Elevation
Terrain surfaces streamed from elevation services and decoded by Bitruvius codecs.
Unified Layers
Many services driven as one cohesive layer — a whole campus, a whole city — with the widgets over the top.
Wellington — 57 suburb services as one layer
A whole city published as 57 separate SceneServers, driven as one layer by unifyLayers() — one settings panel, one memory ceiling redistributed to whatever is on screen.
Clemson University campus
Ten Esri I3S integrated-mesh services streamed as one campus, with every widget over the top.
Widgets
Drop-in maplibregl.IControl panels from @bitruvius/sdk-maplibre, shown over streamed 3D content.
Sun control (time of day)
SunControlWidget over a geo-accurate Atmosphere — one call relights basemap, sky, hillshade and 3D layers together.
Measure (distance, area, height, volume)
MeasurementWidget snapping vertices to a streamed Gaussian splat — a surface with no mesh, read from the depth buffer.
Elevation profile
ElevationProfileWidget charting terrain along a drawn line, plus a second line sampled from a Gaussian splat.
First-person navigation
FirstPersonNavWidget — drop the pegman and walk street level through streamed buildings.
Slice (clipping volume)
Slice a Gaussian-splat tileset with a clipping volume — Niantic SPZ decoded by Bitruvius TurboSPZ.
First-person navigation — BIM interiors
FirstPersonNavWidget walking inside an Esri I3S BuildingSceneLayer — walls block, doorways open, staircases climb.