gl-fbo-matching
Compare two gl-fbo instances' contents for matching pixels.
Last updated 7 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gl-fbo-matching 
SYNC missed versions from official npm registry.

gl-fbo-matching experimental

Compare two gl-fbo instances' contents for matching pixels. There are certainly smarter ways of doing this but this is the simplest :)

Usage

NPM

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 for details.

Current Tags

  • 1.0.0                                ...           latest (7 years ago)

1 Versions

  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 10
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |