Builds a one-byte-per-pixel AlphaMask from an
AlphaSource (e.g. browser ImageData). Pixels whose alpha
byte is >= threshold become 1; everything else becomes 0.
threshold defaults to 128, matching Carve.fromAlphaTexture's
convention so that "non-transparent counts as solid" gives the same
result for both carving and collision.
Builds a one-byte-per-pixel AlphaMask from an AlphaSource (e.g. browser
ImageData). Pixels whose alpha byte is>= thresholdbecome1; everything else becomes0.thresholddefaults to 128, matchingCarve.fromAlphaTexture's convention so that "non-transparent counts as solid" gives the same result for both carving and collision.