io-devices-lib icon indicating copy to clipboard operation
io-devices-lib copied to clipboard

Quick Start wrong pixelIndex?

Open niutech opened this issue 3 years ago • 0 comments

In the Quick Start for Assembly Script there is the following code:

    // Set our Red
    rgbaFrame[pixelIndex + 0] = 0;
    // Set our Blue
    rgbaFrame[pixelIndex + 0] = 0;
    // Set our Green
    rgbaFrame[pixelIndex + 0] = 255;
    // Set our Alpha
    rgbaFrame[pixelIndex + 0] = 255;

Shouldn't there be rgbaFrame[pixelIndex + n] where n ∈ {0, 1, 2, 3}?

niutech avatar Dec 07 '21 00:12 niutech