npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@northpool/pcl.js

v1.17.4

Published

Point Cloud Library (PCL) for browser, powered by WebAssembly.|在浏览器运行的点云库 (PCL),由 WebAssembly 提供支持。

Downloads

9

Readme

Overview

pcl.js is a Point Cloud Library (PCL) that runs in the browser, powered by Emscripten and WebAssembly

The Point Cloud Library (PCL) is a large scale, open project for 2D/3D image and point cloud processing. The PCL framework contains numerous state-of-the art algorithms including filtering, feature estimation, surface reconstruction, registration, model fitting and segmentation. PCL has its own data format for storing point clouds - PCD (Point Cloud Data), but also allows datasets to be loaded and saved in many other formats.

A point cloud is a set of data points in space. The points may represent a 3D shape or object. Each point position has its set of Cartesian coordinates (X, Y, Z). Point clouds are generally produced by Lidar(light detection and ranging) or by photogrammetry software, which measure many points on the external surfaces of objects around them.

Featured Demos

Features

  • 💌 Provides an API similar to PCL(C++), easy to use
  • 🌍 Supports all modern browsers and Node.js 14+
  • 💪 Written in TypeScript, with predictable static typing
  • 🚀 And many, many more!

Resources

Environment Support

| Edge | Firefox | Chrome | Safari | Opera | Node.js | | --------- | --------- | --------- | --------- | --------- | --------- | | 16+ | 52+ | 57+ | 11+ | 44+ | 14+

Bundle Size

pcl.js version: latest

| Source | Link | Size | | :------------ | :---------------------------------------------------------------------------------------------------------: | :-----------: | | pcl.js | https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.js | ~36k gzip’d | | pcl-core.wasm | https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm | ~553k gzip’d |

Installation

NPM

# NPM
npm install pcl.js

# Yarn
yarn add pcl.js

CDN

<!-- Development -->
<script src="https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.js"><script>

<!-- Production -->
<script src="https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl.min.js"><script>

Usage

NPM

Browser

import * as PCL from 'pcl.js';

async function main() {
  // Initialization
  await PCL.init({
    /**
     * Recommend, optional configuration, custom WebAssembly file link.
     * @default js file dir + pcl-core.wasm
     */
    url: 'https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm',
    // You can also pass an ArrayBuffer of WebAssembly files.
    // arrayBuffer: ArrayBuffer
  });

  // ...
}

main();

Node.js

const PCL = require("pcl.js");

async function main() {
  // Initialization
  await PCL.init();
  // ...
}

main();

CDN

<script>
async function main() {
  // Initialization, PCL is a global object.
  await PCL.init();
  // ...
}

main();
</script>

Basic Usage Example

// TypeScript

import * as PCL from 'pcl.js';

async function main() {
  await PCL.init({
    url: 'https://cdn.jsdelivr.net/npm/pcl.js/dist/pcl-core.wasm',
  });

  // Get PCD file
  const data = await fetch('https://cdn.jsdelivr.net/gh/luoxuhai/pcl.js@master/data/rops_tutorial/points.pcd').then(res => res.arrayBuffer());
  // Load PCD file data, return point cloud object
  const cloud = PCL.loadPCDData<PCL.PointXYZ>(data, PCL.PointXYZ);

  // Filtering a PointCloud using a PassThrough filter
  // See: https://pcl.readthedocs.io/projects/tutorials/en/master/passthrough.html#passthrough
  const pass = new PCL.PassThrough<PCL.PointXYZ>(PCL.PointXYZ);
  pass.setInputCloud(cloud);
  pass.setFilterFieldName('z');
  pass.setFilterLimits(0.0, 1.0);
  const cloudFiltered = pass.filter();

  // Save filtered point cloud objects as PCD files, the content is ArrayBuffer
  const cloudFilteredData = PCL.savePCDDataASCII(cloudFiltered);
}

main();

Changelog

The changelog is regularly updated to reflect what's changed in each new release.

Roadmap

Checkout the full roadmap here.

Online Development

Use Gitpod, a free online dev environment for GitHub.

Open in Gitpod

Contributing

pcl.js has adopted the Contributor Covenant as its Code of Conduct, and we expect project participants to adhere to it. Please read the full text so that you can understand what actions will and will not be tolerated.

Please make sure to read the Contributing Guide before making a pull request.

Thank you to all the people who already contributed to pcl.js!

Contributors

License

This project is licensed under the terms of the MIT license.

Star History Chart