Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

isosurface

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isosurface - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

LICENSE

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc