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

webxtile

v0.0.8

Published

Browser client for the webxtile octree format — partial bbox loads for web visualisation

Downloads

66

Readme

webxtile (JS)

Browser client for the webxtile octree format. Read-only; designed for partial bbox loads and level-of-detail rendering in web applications.

The Python library writes a directory of msgpack tile files. This library reads those files over HTTP, caches them in IndexedDB, and returns flat typed arrays suitable for WebGL / point-cloud rendering.

Installation

npm install webxtile

Or install directly from the local source tree:

npm install ./deps/webxtile/js

Documentation

Full API reference with algorithms →

Quick start

import { WebxtileLoader } from "webxtile";

const loader = new WebxtileLoader("https://example.com/tiles");
await loader.open();   // fetches metadata.msgpack

// Load tiles at level 3 for a 2-D bounding box
const result = await loader.loadBBox([500000, 6200000, 520000, 6220000], 3);

// Iterate GPU-sized sub-tiles for rendering
for (const st of result.subTiles()) {
  // st.spatial_coords — { x: Float64Array, y: Float64Array, … }
  // st.variables      — { resistivity: Float32Array, … }
}

// Background: stream all leaf tiles (full resolution, whole dataset)
const ac = new AbortController();
for await (const tile of loader.streamLeaves({ signal: ac.signal })) {
  myTileCache.add(tile);
}

API summary

| Method / property | Description | |---|---| | new WebxtileLoader(baseUrl, [options]) | Create a loader for a tile directory. | | loader.open() | Fetch metadata.msgpack and open IndexedDB cache. Must be awaited first. | | loader.meta | Decoded metadata (spatial_dims, crs, var_meta, …). | | loader.loadBBox(bbox, level) | Load tiles intersecting bbox at octree depth level. | | loader.streamLeaves([options]) | Async generator — yields all leaf tiles in BFS order. Pauses while loadBBox is in flight. | | loader.clearCache() | Evict all tiles from in-memory cache and IndexedDB. | | result.subTiles() | Iterate GPU-sized sub-tiles; each has spatial_coords (1-D arrays) and variables (flat arrays). | | result.getCoord(dim) | Merged sorted coordinate values for one dimension across all tiles. |

See docs/api.md for full parameter descriptions, algorithms, and the concurrency/priority model.

Dependencies

| Package | Purpose | |---------|---------| | @msgpack/msgpack | msgpack decoding | | idb | Promise-based IndexedDB wrapper |