{"_id":"@mapbox/martini","_rev":"403745","name":"@mapbox/martini","description":"A JavaScript library for real-time terrain mesh generation","dist-tags":{"latest":"0.2.0"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"time":{"modified":"2021-08-04T04:41:23.000Z","created":"2019-08-19T16:11:54.527Z","0.2.0":"2020-01-31T21:30:42.729Z","0.1.0":"2019-08-19T16:11:54.527Z"},"users":{},"author":{"name":"Vladimir Agafonkin"},"versions":{"0.2.0":{"name":"@mapbox/martini","version":"0.2.0","description":"A JavaScript library for real-time terrain mesh generation","main":"martini.js","unpkg":"martini.min.js","module":"index.js","scripts":{"pretest":"eslint index.js bench.js test","test":"node -r esm test/test.js","bench":"node -r esm bench.js","build":"rollup -c","prepublishOnly":"npm run test && npm run build"},"keywords":["terrain","rtin","mesh","3d","webgl"],"author":{"name":"Vladimir Agafonkin"},"license":"ISC","devDependencies":{"eslint":"^6.8.0","eslint-config-mourner":"^3.0.0","esm":"^3.2.25","pngjs":"^3.4.0","rollup":"^1.31.0","rollup-plugin-terser":"^5.2.0","tape":"^4.13.0"},"eslintConfig":{"extends":"mourner","rules":{"no-use-before-define":0}},"gitHead":"66124b64153c2b34f89c6551db8ceacaa0778c9a","_id":"@mapbox/martini@0.2.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.6","dist":{"shasum":"1af70211fbe994abf26e37f1388ca69c02cd43b4","size":4637,"noattachment":false,"key":"/@mapbox/martini/-/@mapbox/martini-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/martini/download/@mapbox/martini-0.2.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmUser":{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/martini_0.2.0_1580506242597_0.6275119906825504"},"_hasShrinkwrap":false,"publish_time":1580506242729,"_cnpm_publish_time":1580506242729},"0.1.0":{"name":"@mapbox/martini","version":"0.1.0","description":"A JavaScript library for real-time terrain mesh generation","main":"martini.js","unpkg":"martini.min.js","module":"index.js","scripts":{"pretest":"eslint index.js bench.js test","test":"node -r esm test/test.js","bench":"node -r esm bench.js","build":"rollup -c","prepublishOnly":"npm run test && npm run build"},"keywords":["terrain","rtin","mesh","3d","webgl"],"author":{"name":"Vladimir Agafonkin"},"license":"ISC","devDependencies":{"eslint":"^6.1.0","eslint-config-mourner":"^3.0.0","esm":"^3.2.25","pngjs":"^3.4.0","rollup":"^1.19.4","rollup-plugin-terser":"^5.1.1","tape":"^4.11.0"},"eslintConfig":{"extends":"mourner","rules":{"no-use-before-define":0}},"gitHead":"1ca5ca075a169231feb3357c513de774425ff1de","_id":"@mapbox/martini@0.1.0","_nodeVersion":"10.16.2","_npmVersion":"6.10.3","dist":{"shasum":"1801b9234140e1136f37939157ba647d46f1ea30","size":4630,"noattachment":false,"key":"/@mapbox/martini/-/@mapbox/martini-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/martini/download/@mapbox/martini-0.1.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmUser":{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/martini_0.1.0_1566231114371_0.8480641150514483"},"_hasShrinkwrap":false,"publish_time":1566231114527,"_cnpm_publish_time":1566231114527}},"readme":"# MARTINI\n\n[![Build Status](https://travis-ci.com/mapbox/martini.svg?branch=master)](https://travis-ci.com/mapbox/martini) [![Simply Awesome](https://img.shields.io/badge/simply-awesome-brightgreen.svg)](https://github.com/mourner/projects)\n\nMARTINI stands for **Mapbox's Awesome Right-Triangulated Irregular Networks, Improved**.\n\nIt's an experimental JavaScript library for **real-time terrain mesh generation** from height data. Given a (2<sup>k</sup>+1) × (2<sup>k</sup>+1) terrain grid, it generates a hierarchy of triangular meshes of varying level of detail in milliseconds. _A work in progress._\n\nSee the algorithm in action and read more about how it works in [this interactive Observable notebook](https://observablehq.com/@mourner/martin-real-time-rtin-terrain-mesh).\n\nBased on the paper [\"Right-Triangulated Irregular Networks\" by Will Evans et. al. (1997)](https://www.cs.ubc.ca/~will/papers/rtin.pdf).\n\n![MARTINI terrain demo](martini.gif)\n\n## Example\n\n```js\n// set up mesh generator for a certain 2^k+1 grid size\nconst martini = new Martini(257);\n\n// generate RTIN hierarchy from terrain data (an array of size^2 length)\nconst tile = martini.createTile(terrain);\n\n// get a mesh (vertices and triangles indices) for a 10m error\nconst mesh = tile.getMesh(10);\n```\n\n## Install\n\n```bash\nnpm install @mapbox/martini\n```\n","_attachments":{},"license":"ISC"}