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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@voxelkloud/format-las

v0.5.2

Published

The LAS point record, shared by every voxelkloud driver that stores one: dimension layout for point formats 0-10, the Extra Bytes VLR, and the decode into neutral typed arrays.

Downloads

1,002

Readme

@voxelkloud/format-las

The LAS point record, shared. Part of voxelkloud.

npm install @voxelkloud/format-las

Not a driver. Three of them stand on it: a COPC node is a LAS 1.4 record, an EPT laszip node is a whole LAS file, and the single-file tier is a .las or .laz outright. The record layout is fixed by the spec and identical in all three, so it is stated once here rather than three times with two of them subtly wrong.

What is here:

  • the dimension layout for point formats 0–10 — where each field sits, how wide it is, and which of them are bit runs sharing a byte.
  • the Extra Bytes VLR (LASF_Spec, record 4), so a custom dimension is a named attribute instead of four unreadable bytes.
  • the decode into the neutral DecodedPointData from @voxelkloud/core: relative float32 positions with the origin carried as data, colour repacked to RGBA with a once-per-source narrowing, and 4-byte GPU lanes for scalars.
import { createLasDecodePlan, decodeLasRecords, lasLayout } from "@voxelkloud/format-las";

const layout = lasLayout({ format: 7, pointSize: 40, extraBytes, bounds });
const plan = createLasDecodePlan(layout, { scale, offset, cloudOrigin });
const data = decodeLasRecords(plan, node, rawRecords);

Two decisions worth knowing

The names are PotreeConverter's. "position", "intensity", "return number", "scan angle rank", "gps-time", "rgb" — not the LAS spec's CamelCase. A colour mode that keys off "classification" has to work on a COPC cloud and a Potree cloud without the renderer knowing which it got, and Potree shipped first.

Bit runs come apart. LAS packs the return number, the number of returns, the classification flags and the scanner channel into shared bytes. Every writer in this space presents them as separate dimensions, and so does this: a { kind: "bits", at, shift, width } accessor alongside the plain offsets.

The decode makes the same choices as Potree's DEFAULT decoder field for field — the same output kinds, the same GPU lanes, the same colour narrowing decided once from the declared max rather than per value. Two drivers that disagreed about any of those would render the same LiDAR two different ways.

Wave packet fields (formats 4, 5, 9, 10) are deliberately absent. Their bytes are still counted in the stride, so nothing is misaligned by leaving them out — only unavailable.

MIT.