PCDLoader parse/parseAsync (web worker)

loaders
#1

Hi,
I finally had the time to apply the generic Builder and WorkerSupport (extracted from OBJLoader2 to LoaderSupport in release 88) to another loader. I chose PCDLoader as it is not too complex and someone asked me whether a worker based version of it could be created. See the prototype here:
https://kaisalmen.de/proto/test/pcd/webgl_loader_pcd.html
Code:

I extracted main parsing functionality into a Parser object which can be used directly or wrapped into a web-worker. LoaderSupport & Builder needed some minor modification, but apart from that the whole concept can be applied to other workers. :smile:

Kai

0 Likes

#2

Your code only works for binary PCD, not for ASCII PCD
I get the following error:
THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.

0 Likes