Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/gl-fbo-matching
Compare two gl-fbo instances' contents for matching pixels.
https://github.com/hughsk/gl-fbo-matching
Last synced: 8 days ago
JSON representation
Compare two gl-fbo instances' contents for matching pixels.
- Host: GitHub
- URL: https://github.com/hughsk/gl-fbo-matching
- Owner: hughsk
- License: other
- Created: 2014-06-20T13:33:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-20T13:33:04.000Z (over 10 years ago)
- Last Synced: 2024-10-17T16:41:24.813Z (22 days ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# gl-fbo-matching [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)
Compare two [gl-fbo](http://github.com/gl-modules/gl-fbo) instances' contents
for matching pixels. There are certainly smarter ways of doing this but this
is the simplest :)## Usage
[![NPM](https://nodei.co/npm/gl-fbo-matching.png)](https://nodei.co/npm/gl-fbo-matching/)
### channels = matching(fbo1, fbo2, [threshold])
Returns an array of values: one for each channel (RGBA). A value of 1 means that
all of the pixels in `fbo1` match those in `fbo2`, and a value of 0 means that
none of them do.Optionally, you can pass in a `threshold` value to limit the comparison's
sensitivity – effectively, setting the maximum distance between two pixels'
values before considering that pixel matching. Defaults to 0.Note that using this function will result in
`gl.bindFramebuffer(gl.FRAMEBUFFER, null)` being called.## License
MIT. See [LICENSE.md](http://github.com/hughsk/gl-fbo-matching/blob/master/LICENSE.md) for details.