PCDLoader

A loader for PCD files. Loads ascii and binary. Compressed binary files are not suported.

Constructor

PCDLoader( manager )

manager — The loadingManager for the loader to use. Default is THREE.DefaultLoadingManager.
Creates a new PCDLoader.

Properties

littleEndian

Default value is true.

Methods

.load ( url, onLoad, onProgress, onError )

url — required
onLoad — Will be called when load completes. The argument will be the loaded Object3D.
onProgress — Will be called while load progresses. The argument will be the XmlHttpRequest instance, that contain .total and .loaded bytes.
onError — Will be called when load errors.
Begin loading from url and call onLoad with the parsed response content.

.parse ( data,url )

data — The binary structure to parse.
url — The file name or file url.
Parse an pcd binary structure and return an Object3D.
The object is converted to Points with a BufferGeometry and a PointsMaterial.

Example

// instantiate a loader var loader = new THREE.PCDLoader(); // load a resource loader.load( // resource URL 'pointcloud.pcd' , // Function when resource is loaded function ( mesh ) { scene.add( mesh ); } ); webgl_loader_pcd

Source

examples/js/loaders/PCDLoader.js
Edit