{"_id":"3d-adjacency","_rev":"4-1cf1975279d5fc69366e532f873b0996","name":"3d-adjacency","description":"find clusters of adjacent cells from a 3d array.","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"3d-adjacency","version":"0.0.1","description":"find clusters of adjacent cells from a 3d array.","main":"src/index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"gh-pages":"^0.11.0","jsdoc":"^3.4.0","minami":"^1.1.1","nyc":"^6.4.4","shizam":"0.0.5","standard":"^7.1.1","standard-format":"^2.2.1","tape":"^4.5.1"},"scripts":{"lint":"standard \"src/**/*.js\" \"test/**/*.js\"","lintfix":"standard-format -w","validate":"npm ls","preversion":"git checkout master && git pull && npm ls","docs":"mkdir -p docs && jsdoc -c .jsdoc.json src/","deploy-docs":"gh-pages -d docs && rm -rf docs","postpublish":"npm run docs && npm run deploy-docs","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","test":"nyc --reporter=lcov --check-coverage --functions=90 --branches=90 node test/"},"author":{"name":"cdaringe"},"license":"MIT","pre-commit":["validate","lint","test"],"gitHead":"2b9f6d3c0a9aada9f5a3813334968b36047be16a","_id":"3d-adjacency@0.0.1","_shasum":"18bd00bf81648c29782e221439e44763a503c3eb","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"cdaringe","email":"cdaringe@gmail.com"},"dist":{"shasum":"18bd00bf81648c29782e221439e44763a503c3eb","tarball":"https://registry.npmjs.org/3d-adjacency/-/3d-adjacency-0.0.1.tgz","integrity":"sha512-5j/YiKbEwfYPS4KNPV6ocL3eEw7mIlBC1yBsYJHI9ZpP9o13wjGbC6jJfj5/V1ercg3+DmZAi9QkI4SyNKwV5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWYS0WBF+hVtiabcFfqqUFUOj1BkWfKfnvCrhXxPkJ7AiAIUwPgoyLjuixMbJ1oy+1lmBSi1/7pdutWSihhfFNK4A=="}]},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/3d-adjacency-0.0.1.tgz_1464496310950_0.14128401270136237"}},"0.0.2":{"name":"3d-adjacency","version":"0.0.2","description":"find clusters of adjacent cells from a 3d array.","main":"src/index.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"coveralls":"^2.11.9","gh-pages":"^0.11.0","jsdoc":"^3.4.0","minami":"^1.1.1","nyc":"^6.4.4","shizam":"0.0.5","standard":"^7.1.1","standard-format":"^2.2.1","tape":"^4.5.1"},"scripts":{"lint":"standard \"src/**/*.js\" \"test/**/*.js\"","lintfix":"standard-format -w","validate":"npm ls","preversion":"git checkout master && git pull && npm ls","docs":"mkdir -p docs && jsdoc -c .jsdoc.json src/","deploy-docs":"gh-pages -d docs && rm -rf docs","postpublish":"npm run docs && npm run deploy-docs","publish-patch":"npm run preversion && npm version patch && git push origin master --tags && npm publish","publish-minor":"npm run preversion && npm version minor && git push origin master --tags && npm publish","publish-major":"npm run preversion && npm version major && git push origin master --tags && npm publish","test":"nyc --reporter=lcov --check-coverage --functions=90 --branches=90 node test/"},"author":{"name":"cdaringe"},"license":"MIT","pre-commit":["validate","lint","test"],"gitHead":"62dee172610566c485b6a9e826fa37ed3bac8eb7","_id":"3d-adjacency@0.0.2","_shasum":"bca026a5609bf4e2c6f90e811fad91d6b4c3497f","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"cdaringe","email":"cdaringe@gmail.com"},"maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"}],"dist":{"shasum":"bca026a5609bf4e2c6f90e811fad91d6b4c3497f","tarball":"https://registry.npmjs.org/3d-adjacency/-/3d-adjacency-0.0.2.tgz","integrity":"sha512-z9eAXZXDwRr2jUQ9spF46InxRj0xPbDEOLOzNMMAiVYEYIbCCzLsmQU+kwLrFcIMUd9nZQ0bkT7o42H3ptuicg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAE4hVK91ebCxncFJh3NdQNFlQOHJgarR877w5Wnf/qMAiEAwuDwg6S27S2WZO27DfL3hnM3BUK+AmouZL0mGUT1ex8="}]},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/3d-adjacency-0.0.2.tgz_1464712079420_0.8765323809348047"}}},"readme":"# 3d-adjacency\n\n[ ![Codeship Status for cdaringe/3d-adjacency](https://codeship.com/projects/9480c8b0-0977-0134-9cd2-02b70758e3b0/status?branch=master)](https://codeship.com/projects/155284) [![Coverage Status](https://coveralls.io/repos/github/cdaringe/3d-adjacency/badge.svg?branch=master)](https://coveralls.io/github/cdaringe/3d-adjacency?branch=master) <img src=\"https://img.shields.io/badge/standardjs-%E2%9C%93-green.svg\" />\n\nfind \"clusters\" of adjacent cells from a 3d array.  the array does _not_ need to be cubic, but it does need to be a rectangular prism.\n\n## example\n\nsuppose you had a three dimensional array, full of 0s and 1s.  0s are white, and 1s are green.  graphically, it may look like:\n\n<img style=\"max-height: 125px\" src=\"https://raw.githubusercontent.com/cdaringe/3d-adjacency/master/img/green-white-array.png\" />\n\nwhat you desire is the sets of connected green cells.  graphically, it may look like:\n\n<img style=\"max-height: 125px\" src=\"https://raw.githubusercontent.com/cdaringe/3d-adjacency/master/img/green-clusters.png\" />\n\nwell, that's exactly what this module provides!  yahoo!\n\n```js\nconst adj3d = require('3d-adjacency')\nconst exampleCube = [ // as shown above\n\t[\n\t  [1, 0, 1], [0, 0, 0], [1, 0, 1],\n\t],\n\t[\n\t  [1, 0, 1], [0, 0, 0], [1, 0, 1],\n\t],\n\t[\n\t  [1, 0, 1], [0, 0, 0], [1, 0, 2],\n\t],\n]\nconst groups = adj3d.find(exampleCube)\n// ==>\n/*\n[ // four groups of green blocks\n  [\n    { x: 0, y: 0, z: 0, value: 1 },\n    { x: 1, y: 0, z: 0, value: 1 },\n    { x: 2, y: 0, z: 0, value: 1 }\n  ],\n  [\n    { x: 0, y: 0, z: 2, value: 1 },\n    { x: 1, y: 0, z: 2, value: 1 },\n    { x: 2, y: 0, z: 2, value: 1 }\n  ],\n  [\n    { x: 0, y: 2, z: 0, value: 1 },\n    { x: 1, y: 2, z: 0, value: 1 },\n    { x: 2, y: 2, z: 0, value: 1 }\n  ],\n  [\n    { x: 0, y: 2, z: 2, value: 1 },\n    { x: 1, y: 2, z: 2, value: 1 },\n    { x: 2, y: 2, z: 2, value: 2 }\n  ]\n]\n*/\n```\n\n_\"Hey, why is output not matching the same form as the input?\"_\n\nValid question.  Specifically, the output is a set of objects that are coordinates+values. the input is the actual data.  Although one might expect the output to be something like `[ [0, 1, 2] ]`, where `0, 1, 2` are coordinates, the input was not coordinate sets to begin with.\n\n## install\n\n`npm install --save 3d-adjacency`\n\n## usage\n\nSee example above and the [offcial API docs](http://cdaringe.github.io/3d-adjacency)\n\n\n### changelog\n\n- 0.0.3 handle much larger arrays. remove recursive calls to keep stack down\n","maintainers":[{"name":"cdaringe","email":"cdaringe@gmail.com"}],"time":{"modified":"2022-06-12T14:07:18.275Z","created":"2016-05-29T04:31:52.828Z","0.0.1":"2016-05-29T04:31:52.828Z","0.0.2":"2016-05-31T16:28:00.353Z"},"author":{"name":"cdaringe"},"license":"MIT","readmeFilename":"README.md"}