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

@urban-toolkit/autk-core

v2.2.0

Published

Shared runtime utilities for the Autark toolkit

Readme

Autark toolkit

Autark is a serverless, modular TypeScript toolkit for prototyping urban visual analytics systems entirely in the browser. It supports client-side workflows for loading, storing, querying, joining, computing, and visualizing physical and thematic urban data using standard formats such as OpenStreetMap, GeoJSON, GeoTIFF, and CSV.

The toolkit is available as the umbrella package @urban-toolkit/autk or as individual modules:

  • @urban-toolkit/autk-core: Shared low-level core package.
  • @urban-toolkit/autk-db: In-browser spatial database for urban datasets.
  • @urban-toolkit/autk-compute: WebGPU computation engine for analytical and render-based pipelines.
  • @urban-toolkit/autk-map: WebGPU-based 2D/3D vector map visualization library.
  • @urban-toolkit/autk-plot: D3.js-based plotting library for linked urban data views.

@urban-toolkit/autk-core

@urban-toolkit/autk-core contains the shared low-level building blocks used by the other Autark packages. It is useful when you want direct access to color mapping helpers, camera primitives, triangulators, event utilities, or shared type definitions without going through the higher-level map, compute, db, or plot packages.

Use the higher-level packages when possible:

  • use @urban-toolkit/autk-map for map rendering and interaction
  • use @urban-toolkit/autk-db for data loading and spatial queries
  • use @urban-toolkit/autk-compute for GPU compute and render-analysis workflows
  • use @urban-toolkit/autk-plot for charts and linked plot interactions

Use @urban-toolkit/autk-core directly when you specifically need shared low-level primitives.

Installation

npm install @urban-toolkit/autk-core

Basic usage

import {
  Camera,
  ColorMap,
  ColorMapDomainStrategy,
  ColorMapInterpolator,
  TriangulatorPolygons,
  computeOrigin,
} from '@urban-toolkit/autk-core';

const origin = computeOrigin(buildingsGeojson);
const [geometry, components] = TriangulatorPolygons.buildMesh(buildingsGeojson, origin);

const camera = new Camera();
const colormap = ColorMap.getColorMap(
  ColorMapInterpolator.SEQ_VIRIDIS,
  16,
  [0, 100],
);

console.log(origin, geometry.length, components.length, camera.eye, colormap.length);

API summary

@urban-toolkit/autk-core groups its exports around a few responsibilities:

  • Color mapping: ColorMap, ColorMapDomainStrategy, ColorMapInterpolator, ColorMapConfig, ResolvedDomain
  • Transfer functions: DEFAULT_TRANSFER_FUNCTION, buildTransferContext, computeAlphaByte
  • Camera utilities: Camera, CameraMotion, CameraData, ViewProjectionParams
  • Events: EventEmitter, EventListener, SelectionData
  • Mesh types: LayerGeometry, LayerComponent, LayerBorder, LayerBorderComponent
  • Layer and buffer types: LayerType, BoundingBox, TypedArray, TypedArrayConstructor
  • Utilities: valueAtPath, isNumericLike, computeOrigin, computeGeometryCentroid, computeBoundingBox, isLayerType, mapGeometryTypeToLayerType, offsetPolyline
  • Triangulators: TriangulatorPoints, TriangulatorPolylines, TriangulatorPolygons, TriangulatorBuildings, TriangulatorBuildingWithWindows, TriangulatorRaster

The complete export list lives in src/index.ts.

Notes

  • Geometry helpers assume planar coordinates unless a function states otherwise.
  • Triangulators convert GeoJSON and related feature data into render-ready mesh buffers.
  • @urban-toolkit/autk-core is a stable shared dependency of the other Autark packages, but it exposes lower-level APIs than the higher-level modules.

Resources