Skip to content
Design System
GitHub

Point cloud

v0.24.1Beta

A LiDAR or depth point cloud (a decoded ROS PointCloud2) drawn with raw WebGL2 and no 3D library: coloured by height or intensity on the accent's single-hue ramp with its scale, a recessive ground grid, the robot at the origin and an axes gizmo in words; orbit, pan and zoom by pointer, touch and keyboard; loading, empty, error, stale and no-WebGL states.

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

100,000 points

Height0.0 m4.5 m

Point cloud by height

Install
npx shadcn add @syncrobotic/point-cloud

Also installs: lucide-react, @syncrobotic/cn, @syncrobotic/button, @syncrobotic/button-group, @syncrobotic/skeleton

Overview

When to use

  • What a robot's LiDAR sees right now, beside its camera on a robot's page or a teleoperation screen.
  • Checking a depth camera's mounting or calibration: is the floor flat, are the shelves where they should be.
  • Reviewing a saved scan after an incident or while building a map.

Use something else

  • Where robots are on a site, in 2D: Robot map.
  • What a camera sees: Camera feed, or Annotated image for one frame with detections.
  • A mesh, a CAD model or a robot's URDF: a 3D-model item built on three.js, not this viewer.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

100,000 points

Intensity22236

Point cloud by intensity

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.Loading the point cloud

Point cloud loading

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

No points

Point cloud empty

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

Point cloud error

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

100,000 points

Height0.0 m4.5 m

Point cloud stale

Drag to rotate, right-drag or two fingers to pan; the wheel or a pinch zooms once the view has focus. Arrow keys rotate, Shift with the arrows pans, plus and minus zoom, 0 resets the view.

100,000 points

Height0.0 m4.5 m

Point cloud no web gl

Usage rules

  • For what a LiDAR or depth camera sees, in 3D. A site's floor plan with robots on it is robot-map; a mesh or a CAD model is a different item.
  • Pass the points in the ROS frame they came in (REP 103: x forward, y left, z up, metres), as a Float32Array of x, y, z. Decode the PointCloud2 in the app; NaN points are skipped.
  • Colour by height unless intensity answers the question (reflective tape, glass, a retro-reflector). Colour is the accent's single-hue ramp with its scale in the footer, never a rainbow; colorBy="none" draws the grey of a map's scans.
  • For a live cloud, fix colorRange so a colour means the same height from one scan to the next, and set staleAfterMs (with receivedAt from the message's stamp when you have it) so a frozen cloud says Stale instead of passing for live.
  • Give label the sensor and the robot ("Front lidar, Patrol dog 7F3A"); screen readers hear it as the view's name, with the point count and the extent in metres as its description.
  • Keep pointSize at 2 px for dense clouds; 3–4 px for sparse ones. Up to about 500,000 points stay smooth to turn: thin larger clouds before passing them (a voxel grid in the app).
  • Bottom left holds Reset view and Fit, so the emergency stop keeps the bottom right.

Changelog

  • 0.24.12026-11-21A colorRange written inline no longer re-uploads the whole cloud on every render; resizing no longer flashes an empty frame; under Windows High Contrast the points stay visible (CanvasText on Canvas); a lost pointer capture ends the drag; the middle button no longer starts autoscroll; wheels that scroll by lines or pages zoom the right amount; a live cloud reuses its buffers instead of allocating new ones for each scan. Screen readers now hear a stable name (the label and “3D point cloud”) with the count and extent in the description, which changes at most every 5 s. New label viewName; new exports pointCloudWheelZoom and pointCloudPaletteSources; packPointCloud takes an optional array to pack into.
  • 0.24.02026-11-21First release.

How to upgrade