File: PCDLoader.md | Updated: 11/15/2025
A loader for the Point Cloud Data (PCD) format.
PCDLoader supports ASCII and (compressed) binary files as well as the following PCD fields:
const loader = new PCDLoader();
const points = await loader.loadAsync( './models/pcd/binary/Zaghetto.pcd' );
points.geometry.center(); // optional
points.geometry.rotateX( Math.PI ); // optional
scene.add( points );
PCDLoader is an addon, and must be imported explicitly, see Installation#Addons.
import { PCDLoader } from 'three/addons/loaders/PCDLoader.js';
Constructs a new PCD loader.
manager | The loading manager.
---|---
Whether to use little Endian or not.
Default is true.
Starts loading from the given URL and passes the loaded PCD asset to the onLoad() callback.
url | The path/URL of the file to be loaded. This can also be a data URI.
---|---
onLoad | Executed when the loading process has been finished.
onProgress | Executed while the loading is in progress.
onError | Executed when errors occur.
Overrides: Loader#load
Parses the given PCD data and returns a point cloud.
data | The raw PCD data as an array buffer.
---|---
Overrides: Loader#parse
Returns: The parsed point cloud.