Thursday, July 2, 2015

Typed Arrays

Before I talk about the canvas an understanding of typed arrays is needed. This is from the Mozilla Developer Network. These arrays will help us write to the canvas in a simpler way.

new TypedArray(length);
new TypedArray(typedArray);
new TypedArray(object);
new TypedArray(buffer [, byteOffset [, length]]);

where TypedArray is one of:

Int8Array();
Uint8Array();
Uint8ClampedArray();
Int16Array();
Uint16Array();
Int32Array();
Uint32Array();
Float32Array();
Float64Array();


No comments:

Post a Comment