• 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.

    Parameters

    Returns AlphaMask