Comparing version 0.1.0 to 1.0.0
{ | ||
"name": "isosurface", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "3D isosurface polygonizer", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,24 +6,33 @@ isosurface | ||
http://0fps.wordpress.com/2012/08/29/what-is-a-solid/ | ||
* [What is a solid?](http://0fps.wordpress.com/2012/08/29/what-is-a-solid/) | ||
* Smooth voxel terrain [Part 1](http://0fps.wordpress.com/2012/07/10/smooth-voxel-terrain-part-1/) [Part 2](http://0fps.wordpress.com/2012/07/12/smooth-voxel-terrain-part-2/) | ||
http://0fps.wordpress.com/2012/07/10/smooth-voxel-terrain-part-1/ | ||
[Or try out a live demo](http://mikolalysenko.github.com/Isosurface/) | ||
http://0fps.wordpress.com/2012/07/12/smooth-voxel-terrain-part-2/ | ||
# Example | ||
Or try out the following live demo: | ||
```javascript | ||
var isosurface = require("isosurface") | ||
http://mikolalysenko.github.com/Isosurface/ | ||
var mesh = isosurface.surfaceNets([64,64,64], function(x,y,z) { | ||
return x*x + y*y + z*z - 100 | ||
}, [[-11,-11,-11], [11,11,11]]) | ||
console.log(mesh) | ||
``` | ||
Usage | ||
===== | ||
First, install the library via npm: | ||
# Install | ||
npm install isosurface | ||
``` | ||
npm install isosurface | ||
``` | ||
# API | ||
`require("isosurface").surfaceNets(dims, potential[, bounds])` | ||
-------------------------------------------------------------- | ||
```javascript | ||
var isosurface = require("isosurface") | ||
``` | ||
#### `isosurface.surfaceNets(dims, potential[, bounds])` | ||
Extracts an isosurface from `potential` using surface nets with resolution given by `dims`. | ||
@@ -40,9 +49,7 @@ | ||
`require("isosurface").marchingCubes(dims, potential[, bounds])` | ||
-------------------------------------------------------------- | ||
#### `isosurface..marchingCubes(dims, potential[, bounds])` | ||
Same as above, except uses marching cubes instead of surface nets to extract the isosurface. | ||
`require("isosurface").marchingTetrahedra(dims, potential[, bounds])` | ||
-------------------------------------------------------------- | ||
#### `isosurface.marchingTetrahedra(dims, potential[, bounds])` | ||
@@ -52,5 +59,3 @@ Same as above, except uses marching tetrahedra instead of surface nets to extract the isosurface. | ||
Acknowledgements | ||
================ | ||
(c) 2012-2013 Mikola Lysenko. MIT License | ||
# Credits | ||
(c) 2012-2014 Mikola Lysenko. MIT License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
28646
9
1
58