DataSet

A DataSet is an object with width/height and an array of numbers of length = width * height.

The array can be a TypedArray or a JavaScript Array.

Constructor

new DataSet(width, height, data)

Creates an instance of DataSet. Checks data is right size, throws an error if not.

Parameters:
NameTypeDescription
widthnumber

The integer width of the array

heightnumber

The integer height of the array

dataArray

The array of numbers of length width * height

Methods

(static) emptyDataSet(width, height, Type) → {DataSet}

Factory method returning an empty dataset of given width, height, dataType

Parameters:
NameTypeDescription
widthnumber

The integer width of the array

heightnumber

The integer height of the array

TypeObject

Array (default) or one of the typed array types

Returns:

The resulting DataSet with no values assigned

Type: 
DataSet