Socket
Book a DemoInstallSign in
Socket

@i-con/pcd-viewer

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@i-con/pcd-viewer

This library is a visualization *React* module developed to efficiently render data output from the module [pcd-lod](https://github.com/AMDlab/pcd-lod), which converts point cloud data into an LOD (Level of Detail) format for efficient drawing. The purpos

0.0.24
latest
npmnpm
Version published
Weekly downloads
7
Maintainers
2
Weekly downloads
 
Created
Source

pcd viewer

This library is a visualization React module developed to efficiently render data output from the module pcd-lod, which converts point cloud data into an LOD (Level of Detail) format for efficient drawing. The purpose of this module is to facilitate effective visualization of this data on web browsers.

It includes a collection of components using React Three Fiber, allowing for easy integration into any React project.

API Documentation

Installation

npm install @i-con/pcd-viewer # or yarn add @i-con/pcd-viewer

Usage

/**
 * Example component for the point cloud.
 * fetches & renders the point cloud in the /examples/public/uav-8bit directory.
 */
const Example = () => {
  const root = "/uav-8bit";
  const [meta, setMeta] = useState<PointCloudMeta | null>(null);

  // Fetch & set the metadata of the point cloud.
  useEffect(() => {
    axios.get(`${root}/meta.json`).then(({ data }) => {
      setMeta(data);
    });
  }, [root]);

  // Loader callback for the point cloud.
  const loader: PointCloudLODLoader<PngBuffer> = useCallback((props) => {
    const { address, color } = props;
    const { lod, coordinate } = address;
    // Construct the URL of the PNG file from the address.
    const url = `${root}/${lod}/${coordinate.x}-${coordinate.y}-${coordinate.z}`;
    return pngLoader({ url, color });
  }, [root]);

  return meta !== null ? (
    <Visualizer
      pointCloud={{
        meta,
        loader,
        parser: pngParser,
        pointSize: 15,
        lodHelper: true,
      }}
    />
  ) : null;
};

Run example

git clone pcd-viewer

cd pcd-viewer

npm install # or yarn install

npm run dev # or yarn dev

# then serve the example folder with a static server

FAQs

Package last updated on 16 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.