Make models be layers of DataSets

I ported part of Agentscript's DataSet along with the necessary subset of Util. I didn't port anything that had to do with images, canvases, patches, and so on. *A lot of it is untested.* I plan to port the Raster class from ecostem-sand to this and will be testing resampling and interpolation.

I replaced typed arrays in models with DataSets wrapping typed arrays.

I added some more get/set utility functions to DataSet.

I added some more helpers to BaseModel having to do with transfering data between layers or between indices within a layer.

I ported the models to take into account these changes.
Oh yeah that's a mistake. Should be a multiplication.
On Jun 30, 2014 3:59 PM, "Benny Lichtner" <notifications@github.com> wrote:

> In ModelingCore/DataSet.js:
>
> > +
> > +        if (this.crop) {
> > +            x0 = y0 = 1;
> > +            h = this.height-1;
> > +            w = this.width-1;
> > +        } else {
> > +            x0 = y0 = 0;
> > +            h = this.height;
> > +            w = this.width;
> > +        }
> > +
> > +        var constr = this.data.constructor;
> > +
> > +        var newW = w - x0,
> > +            newH = h - y0;
> > +        var newDS = new DataSet(newW, newH, new constr(newW, newH));
>
> Won't the constructor be expecting one size argument instead of a width
> and a height?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/simtable/st-api/pull/11/files#r14378377>.
>