Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/vertex-ao
Vertex based ambient occlusion calculation for meshes
https://github.com/mikolalysenko/vertex-ao
Last synced: about 2 months ago
JSON representation
Vertex based ambient occlusion calculation for meshes
- Host: GitHub
- URL: https://github.com/mikolalysenko/vertex-ao
- Owner: mikolalysenko
- License: mit
- Created: 2017-02-22T03:52:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T03:58:21.000Z (almost 8 years ago)
- Last Synced: 2024-10-20T04:53:29.397Z (2 months ago)
- Language: JavaScript
- Homepage: https://mikolalysenko.github.io/vertex-ao/index.html
- Size: 1.12 MB
- Stars: 55
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vertex-ao
Calculates vertex based ambient occlusion values for a triangular mesh.# Install
```
npm install vertex-ao
```# Example
```javascript
var bunny = require('bunny')
var ao = require('vertex-ao')(bunny.cells, bunny.positions, 2, 256)
```# API
### `require('vertex-ao')(cells, positions, radius, samples)`
Generates an ambient occlusion map for a mesh from the vertices of a mesh.* `cells` are the cells of the mesh
* `positions` are the positions of the vertices of the mesh
* `radius` is the radius of the ambient occlusion samples
* `samples` are the number of samples to take for each triangle# License
(c) 2017 MIT License. Mikola Lysenko