(textureManager, alphaTolerance)
| 24 | * @return {function} The new Pixel Perfect Handler function. |
| 25 | */ |
| 26 | var CreatePixelPerfectHandler = function (textureManager, alphaTolerance) |
| 27 | { |
| 28 | return function (hitArea, x, y, gameObject) |
| 29 | { |
| 30 | var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name); |
| 31 | |
| 32 | return (alpha && alpha >= alphaTolerance); |
| 33 | }; |
| 34 | }; |
| 35 | |
| 36 | module.exports = CreatePixelPerfectHandler; |
no outgoing calls
no test coverage detected
searching dependent graphs…