JSPM

@thi.ng/geom-accel

3.5.65
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 862
  • Score
    100M100P100Q114741F
  • License Apache-2.0

n-D spatial indexing data structures with a shared ES6 Map/Set-like API

Package Exports

  • @thi.ng/geom-accel
  • @thi.ng/geom-accel/aspatial-grid
  • @thi.ng/geom-accel/hash-grid
  • @thi.ng/geom-accel/kd-tree-map
  • @thi.ng/geom-accel/kd-tree-set
  • @thi.ng/geom-accel/nd-quadtree-map
  • @thi.ng/geom-accel/nd-quadtree-set
  • @thi.ng/geom-accel/spatial-grid2
  • @thi.ng/geom-accel/spatial-grid3

Readme

@thi.ng/geom-accel

npm version npm downloads Mastodon Follow

[!NOTE] This is one of 190 standalone projects, maintained as part of the @thi.ng/umbrella monorepo and anti-framework.

🚀 Please help me to work full-time on these projects by sponsoring me on GitHub. Thank you! ❤️

About

n-D spatial indexing data structures with a shared ES6 Map/Set-like API.

Some implementations were ported from the Clojure version of thi.ng/geom.

Currently available:

Status

STABLE - used in production

Search or submit any issues for this package

Installation

yarn add @thi.ng/geom-accel

ES module import:

<script type="module" src="https://cdn.skypack.dev/@thi.ng/geom-accel"></script>

Skypack documentation

For Node.js REPL:

const geomAccel = await import("@thi.ng/geom-accel");

Package sizes (brotli'd, pre-treeshake): ESM: 4.67 KB

Dependencies

Usage examples

Several projects in this repo's /examples directory are using this package:

Screenshot Description Live demo Source
Basic 2D boid simulation and spatial indexing neighbor lookups Demo Source
Doodle w/ K-nearest neighbor search result visualization Demo Source
K-nearest neighbor search in an hash grid Demo Source
Poisson-disk shape-aware sampling, Voronoi & Minimum Spanning Tree visualization Demo Source
2D Poisson-disc sampler with procedural gradient map Demo Source
2D Stratified grid sampling example Demo Source

API

Generated API docs

TODO

Authors

If this project contributes to an academic publication, please cite it as:

@misc{thing-geom-accel,
  title = "@thi.ng/geom-accel",
  author = "Karsten Schmidt",
  note = "https://thi.ng/geom-accel",
  year = 2013
}

License

© 2013 - 2024 Karsten Schmidt // Apache License 2.0