{"_id":"voxel-mesh","_rev":"47-1cb1dbb9e32a64f1239fc6a32d381fb8","name":"voxel-mesh","description":"generate a three.js mesh from voxel data","dist-tags":{"latest":"0.3.0"},"versions":{"0.0.1":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.1","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n## require('voxel').generate(low, high, iterator)\n\nwhere `low` and `high` are `[x, y, z]` start and end positions to iterate over and `iterator` is the function that visits each voxel\n\nreturns an object like this: `{ \"voxels\": \"a 1D Int32Array filled with voxel data\", \"dims\": [x, y, z] }`\n\nexample that creates randomly colored voxels:\n\n```javascript\nrequire('voxel').generate([0,0,0], [16,16,16], function(x,y,z) {\n  return Math.round(Math.random() * 0xffffff)\n})\n```\n\na sphere:\n\n```javascript\nrequire('voxel').generate([0,0,0], [32,32,32], function(x,y,z) {\n  return x*x+y*y+z*z <= 16*16 ? 0x113344 : 0\n})\n```\n\nusing the included generator functions:\n\n```javascript\nvar voxel = require('voxel')\nvoxel.generate([0,0,0], [32,32,32], voxel.generator['Hilly Terrain'])\n// or\nvoxel.geometry['Hilly Terrain'] // pre-generated at some specific example size\n```\n\n## require('voxel').meshers\n\n`meshers` is an object with `stupid`, `culled`, `monotone` and `greedy` mesher functions. you probably want to just use `greedy`. all mesher functions accept voxel data in the format the gets returned by the `generate` function.\n\n## require('voxel').generator\n\nan object that contains a bunch of voxel generation functions to play with, from http://mikolalysenko.github.com/MinecraftMeshes2/\n\n## require('voxel').generateExamples()\n\nreturns an object that contains a bunch of pre-generated voxel geometries to play with, from http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.1","dist":{"shasum":"14a716ef996096b16c03d260bb754625a44975df","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.1.tgz","integrity":"sha512-5V/W/5rvg+zHBMZYXXPqZeCNfEPMHeG8uLF1oBRH5pv+3e+QBtNeQt/wfne00muN0AFqF8SRCuMQUFAJ2iViKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/3goPfcpQwiTfJ6VjqKKMvb7jfQk/LrzL9v0Brftb9AiEAmbW57YzSYHyV6g4h2fyIx1qpGoSuyHrlxO04YY9jKpg="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.2":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.2","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.2","dist":{"shasum":"d93c38d9c239f313c9c08e04a1d7ca084e53556e","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.2.tgz","integrity":"sha512-ZOqnHUdqt3WAhkH6nrz25iuf8e6UZHufC0czZf33Xg/SDVPdWlJGuzO0oYs6lG8VivT+DCoun167oEgOmiPdYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCd9wVBd+w1ioFTDKSKb9lezTeWnLoCrp2sl79aboYwvAIgWN7Mqeb4bwkHbSfALHC4Ez57xY0YZy52FNMNkg6+FD8="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.3":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.3","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.3","dist":{"shasum":"783837f9c73138fd6b3e03d453ce4721d4ed194f","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.3.tgz","integrity":"sha512-F/XUzaKv9XeDCTBdF9gqQzo2bYf7dkuBNAkn5rJRQbl31n+Q/Gu5gTXouzwTnbwacASaaCtot9N+4slB9vpe+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUsPv5zFzBWfUjbC40uyXbnq0FIdGRqzlMNJFznvvE1gIhAPnjP87aXx+80Hpi8bRd8Ot/4osDqIck1yzOpsVMm6N+"}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.4":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.4","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.4","dist":{"shasum":"98b26baf2e431d2cf9c65fb18676aa5b4872dc3c","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.4.tgz","integrity":"sha512-Vnx0Tk9lFLdTCAIoSzie3eks6OjehXYKuzrpNOt5TP+sKYl4g/gT+gvPPF1AQnCmA+XJFqVfX5Q98+3ctGId/A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9KeqCl79bSqUYjrZyPOwqwzVFJQ3gKiBe4NdOXxtd6AiAkIr3bRvcj7cQaXNz4SLo7e2W9khLSWV0aPkLZg2wiwg=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.5":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.5","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3","three":"0.54"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.5","dist":{"shasum":"1bbabef5b7263995cfbf4ceabcba506659aaeeeb","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.5.tgz","integrity":"sha512-hOxFfapahQi773EpOMXu0LAFxgV8AnleL8mT8g1m0MFFqXVptv3rlyJhFfaJcu5mvooGXjUnxcHHaor5IT819Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCfGZydByPlKozuhfFhSrxyQsFjm1ihL0CUDXDRv89RAiEA/1zUFY3FDfbXuZT9rwIgAKdW9iRd9HJhg3SowGOFmko="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.6":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.6","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3","three":"0.54.0-dev"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.6","dist":{"shasum":"bb85ca6d6f7e7de8cab77bdd2eadeeb1d574ee26","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.6.tgz","integrity":"sha512-e/6hPc7XvjCtQDnRN54TjQXwTbR0He9B9/+4b2zFn62+opGfsKSLLn1U7atLHCNyDb2K0q2Qfw9tk0Y1NlpZXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9QPjUUDlYib1ttFk7qOlhNn3qyRrJqRde2QF1LYT5GgIgDaWSX7Kx5kHq/zKjs5YjpvO/9srHUKhDJZw7YgLLbfQ="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.7":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.7","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3","three":"0.54.5-dev"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.7","dist":{"shasum":"2e35e2704d4f62e61de90b415bc3fd9f4aa0c041","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.7.tgz","integrity":"sha512-T+tcGkZM7HfS/PEaWcaGRtHbW6wiBGssps+5KNeTvoDVHneI911bDucZ70xxJhOMpkmdjSVpagibwuNy6nSW2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBh4Yi+M1gKbNryDw+cBpwQ4vjmy51SzGQGTd6nrvRM6AiEAgo9FURtL1sNNjgPa7xElkb7mfqO/A+nGQo+269xfcaQ="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.8":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.8","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.3","three":"0.54.5-dev"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.8","dist":{"shasum":"2f5282f94a4acd586bb190f0af17c42b5711f65e","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.8.tgz","integrity":"sha512-GwOJlUjtHOCW5dXDFp4Q4O+/vSflH7kBTuApDFG79/CCbM05HaaCL9LPmWvCVVguMBFYD8aX4GVbGa7KUtnoWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfYUP34bFUaRfCNpIxl5nNLk/f4OcWiB0iO7qbCG2GLwIgFqDrqmYPVPBGaGDjgmkjH/GgtRsc3NjIMoJyW/5hpqs="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.0.9":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.0.9","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"voxel":"0.0.9","three":"0.54.0"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nload [three.js](http://mrdoob.github.com/three.js/) into your page. this library has been tested with version `r54`\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generateExamples()['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, scaleFactor, meshingAlgorithm)\n\n`voxelData` is required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)` and `meshingAlgorithm` defaults to `greedy` (from the [voxel](http://npmjs.org/voxel) module)\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.0.9","dist":{"shasum":"bc26e724e49694318ee0e45eea1121520d014393","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.0.9.tgz","integrity":"sha512-rHqeVHAE0k0NpWGFGSg+M26TNG8W31O7WV0mAjhmtYzLiAxppmwCQAb/SIYqQlj8Irwh53w3XmsIEtf1mUnIuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDZLx9+8/rM0er6uEbFl7+zon18Jx+224TaH0x3ZWE0CAiEAofL4udBBTOQANg5xdYcWVI4B7C3ulvfWF2pJ8J9M7+E="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.1.0":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.1.0","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"three":"0.54.0"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generator['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, meshingAlgorithm, scaleFactor)\n\n`voxelData` and `meshingAlgorithm` are required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)`.\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.1.0","dist":{"shasum":"1fedf524924d8d05478c287fe3f7257d113a1766","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.1.0.tgz","integrity":"sha512-E1dszR9TLkCXImQnD5m+mh03NTgs3Zb0y5+tfVyKf+QbqqnIxrOQ9iXd3OkhhU7WAMTUQIdURSEHcZq/KGaQ7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBj2kS9xpmGnUE2MXDTWC+UZwEegiMJYMFtFyFEGq509AiA8RkPO+uMBAQF7khX2jTp9/jZuW7tUiGreBsY8j7Lzuw=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.1.1":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.1.1","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"three":"0.54.0"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generator['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, meshingAlgorithm, scaleFactor)\n\n`voxelData` and `meshingAlgorithm` are required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)`.\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","_id":"voxel-mesh@0.1.1","dist":{"shasum":"0788e87296a563d5b1390dab1496ca592377372e","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.1.1.tgz","integrity":"sha512-9vj8qYGbN1E8b5mhxAovbWr0hD8UUU0SBI/TjZgoBM5UMDV+yXoKuA3nn8bPzPCE1Na5YTN/qfvzmaMJ2OvVHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID0ShPg5lEWR6S8dxBvbPuwiEs0VH6gy36RuZFUKDNuoAiEAme+GVu2gszi+EuRMpQa7KSedB7fens+1Np5GZvnf2Ic="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"directories":{}},"0.2.0":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.2.0","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","dependencies":{"three":"0.56.0"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generator['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, meshingAlgorithm, scaleFactor)\n\n`voxelData` and `meshingAlgorithm` are required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)`.\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","readmeFilename":"readme.md","_id":"voxel-mesh@0.2.0","dist":{"shasum":"1fb3ed442c7357cc701d385a623110e4bec68fd6","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.2.0.tgz","integrity":"sha512-ejmDHY4YhLPop+cwbPeitcGE3BAVU5POY41Dajvl89CTgQ6LfYAq/GvTsCkDjHYTuM6//WPoL/7nD5LOOvR8+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2DoHbMJfq0elKflLCOApKjgiHMxmH6VYkDWv4Ry08gAiBXg7hGvTehRcNTp19k3klpFzfTMiIljBKNgby2GjQYOg=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}]},"0.2.1":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.2.1","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","peerDependencies":{"three":"*"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generator['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, meshingAlgorithm, scaleFactor)\n\n`voxelData` and `meshingAlgorithm` are required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)`.\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","readmeFilename":"readme.md","_id":"voxel-mesh@0.2.1","dist":{"shasum":"6b7539e46e08435ddcb3ee7ccb6a2f5144eeca69","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.2.1.tgz","integrity":"sha512-JGSdPEM3oE/zIIZqAflji8dv2ZPNl7QSmUrTgSMKm6StaeVVURa8yCktetyDmtB1r3SwVKd/rI7+XAJYt0/Wew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3VWMCsIQZhiag+fMTmajJQwWUYYwKPepZPCdCcPNxzAiB4fPZ0JBAXnrTGZM4TzL1wVEp7CTCIFp390HrKkkAj2A=="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}]},"0.3.0":{"name":"voxel-mesh","description":"generate a three.js mesh from voxel data","version":"0.3.0","main":"index.js","repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"license":"MIT","peerDependencies":{"three":"*"},"engine":{"node":">=0.6.0"},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nit is recommended that you use browserify to use this module\n\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n```javascript\nvar Mesh = require('voxel-mesh')\nvar voxelData = require('voxel').generator['Hilly Terrain']\nvar mesh = new Mesh(voxelData)\nmesh.createSurfaceMesh()\nthreeJSScene.add(mesh)\n```\n\n## new Mesh(voxelData, meshingAlgorithm, scaleFactor)\n\n`voxelData` and `meshingAlgorithm` are required, `scaleFactor` defaults to `new Three.Vector3(10, 10, 10)`.\n\n## Mesh.prototype.createSurfaceMesh(material)\n\nreturns the generated surface mesh. `material` defaults to `new THREE.MeshNormalMaterial()`. after calling this method your mesh will also have `.surfaceMesh` populated with the new mesh\n\n## Mesh.prototype.createWireMesh(hexColor)\n\nreturns the generated wire mesh. `hexColor` defaults to `0xffffff`. after calling this method your mesh will also have `.wireMesh` populated with the new mesh\n\n## Mesh.prototype.addToScene(scene)\n\nconvenience method for adding the currently generated meshes (either `surfaceMesh` or `wireMesh`) to a `three.js` scene instance\n\n## Mesh.prototype.setPosition(x, y, z)\n\nconvenience method for setting the position of the currently generated meshes (either `surfaceMesh` or `wireMesh`)\n\n# license\n\nMIT","readmeFilename":"readme.md","_id":"voxel-mesh@0.3.0","dist":{"shasum":"33d61695f67293c2857715986f177dd27c6a87e9","tarball":"https://registry.npmjs.org/voxel-mesh/-/voxel-mesh-0.3.0.tgz","integrity":"sha512-drtXdnU21wZVMavWQSx+b6YmuksV+nHir1neYaYn2gV6yoT66xFxlPo5OJG0K9UmI4dfk1GBSFFcMPjNie6MCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSE0qUkWz+o1+emEwfuPFI8RMUAL0HUeFwGLMbWXCV0gIgFXjOiFlb6pjnamBs+FmoRTdDkPqA3X5xBZfHr9kkzGA="}]},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"maxogden","email":"max@maxogden.com"},"maintainers":[{"name":"maxogden","email":"max@maxogden.com"}]}},"readme":"# voxel-mesh\n\ngenerate a three.js mesh from voxel data. extracted from some code by @mikolalysenko\n\n- original repo: https://github.com/mikolalysenko/mikolalysenko.github.com/tree/master/MinecraftMeshes2\n- blog post: http://0fps.wordpress.com/2012/07/07/meshing-minecraft-part-2/\n- webgl demo: http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# installation\n\nuse `voxel-mesh-browserified.js`\n\nor to build yourself:\n```\nnpm install voxel-mesh\nnpm install browserify -g\nbrowserify -r voxel-mesh > voxel-mesh-browserified.js\n```\n\n# usage\n\n## require('voxel').generate(low, high, iterator)\n\nwhere `low` and `high` are `[x, y, z]` start and end positions to iterate over and `iterator` is the function that visits each voxel\n\nreturns an object like this: `{ \"voxels\": \"a 1D Int32Array filled with voxel data\", \"dims\": [x, y, z] }`\n\nexample that creates randomly colored voxels:\n\n```javascript\nrequire('voxel').generate([0,0,0], [16,16,16], function(x,y,z) {\n  return Math.round(Math.random() * 0xffffff)\n})\n```\n\na sphere:\n\n```javascript\nrequire('voxel').generate([0,0,0], [32,32,32], function(x,y,z) {\n  return x*x+y*y+z*z <= 16*16 ? 0x113344 : 0\n})\n```\n\nusing the included generator functions:\n\n```javascript\nvar voxel = require('voxel')\nvoxel.generate([0,0,0], [32,32,32], voxel.generator['Hilly Terrain'])\n// or\nvoxel.geometry['Hilly Terrain'] // pre-generated at some specific example size\n```\n\n## require('voxel').meshers\n\n`meshers` is an object with `stupid`, `culled`, `monotone` and `greedy` mesher functions. you probably want to just use `greedy`. all mesher functions accept voxel data in the format the gets returned by the `generate` function.\n\n## require('voxel').generator\n\nan object that contains a bunch of voxel generation functions to play with, from http://mikolalysenko.github.com/MinecraftMeshes2/\n\n## require('voxel').generateExamples()\n\nreturns an object that contains a bunch of pre-generated voxel geometries to play with, from http://mikolalysenko.github.com/MinecraftMeshes2/\n\n# license\n\nMIT","maintainers":[{"name":"maxogden","email":"max@maxogden.com"}],"time":{"modified":"2022-06-28T18:31:14.381Z","created":"2013-01-01T19:55:15.058Z","0.0.1":"2013-01-01T19:55:19.388Z","0.0.2":"2013-01-03T22:41:46.139Z","0.0.3":"2013-01-04T04:01:34.529Z","0.0.4":"2013-01-04T05:12:00.498Z","0.0.5":"2013-01-04T20:15:42.020Z","0.0.6":"2013-01-04T20:40:54.518Z","0.0.7":"2013-01-05T00:23:46.580Z","0.0.8":"2013-01-07T21:28:41.334Z","0.0.9":"2013-01-17T05:59:54.888Z","0.1.0":"2013-01-17T06:54:41.391Z","0.1.1":"2013-01-31T04:29:23.594Z","0.2.0":"2013-03-13T05:07:25.613Z","0.2.1":"2013-03-23T17:33:27.184Z","0.3.0":"2013-06-13T23:08:46.764Z"},"author":{"name":"Max Ogden","email":"max@maxogden.com"},"repository":{"type":"git","url":"http://github.com/maxogden/voxel-mesh.git"}}