// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/layers/vectorTiles/views/vectorTiles/VertexMemoryBuffer","require exports ../../core/tsSupport/extendsHelper ../../core/tsSupport/decorateHelper ./MemoryBuffer ./GeometryUtils".split(" "),function(h,l,m,v,d,t){Object.defineProperty(l,"__esModule",{value:!0});var q=new Float32Array(1),r=new Uint32Array(q.buffer);h=function(f){function b(a){var b=f.call(this,a?20:12)||this;b._isDataDriven=a;return b}m(b,f);b.prototype.isDataDriven=function(){return this._isDataDriven};b.prototype.add=function(a,
b,c,e,f,h,k,n){var g=this.array;a=d.i1616to32(a,b);g.push(a);a=d.i8888to32(Math.round(31*c),Math.round(31*e),Math.round(31*f),Math.round(31*h));g.push(a);a=d.i1616to32(k,0);g.push(a);if(this._isDataDriven){if(!n)throw Error("Expecting data driven values.");c=n.color;e=c[3]*n.opacity*255;g.push(d.i8888to32(c[0]*e,c[1]*e,c[2]*e,e));q[0]=n.size;g.push(r[0])}};return b}(d);l.LineVertexBuffer=h;h=function(f){function b(a){var b=f.call(this,a?8:4)||this;b._isDataDriven=a;return b}m(b,f);b.prototype.isDataDriven=
function(){return this._isDataDriven};b.prototype.add=function(a,b,c){var e=this.array;e.push(d.i1616to32(a,b));if(this._isDataDriven){if(!c)throw Error("Expecting data driven values.");a=c.color;c=a[3]*c.opacity*255;e.push(d.i8888to32(a[0]*c,a[1]*c,a[2]*c,c))}};return b}(d);l.FillVertexBuffer=h;h=function(f){function b(a){var b=f.call(this,a?12:8)||this;b._isDataDriven=a;return b}m(b,f);b.prototype.isDataDriven=function(){return this._isDataDriven};b.prototype.add=function(a,b,c,e,f,h,k){var g=this.array,
l=this.index;a=d.i1616to32(a,b);g.push(a);a=d.i8888to32(Math.round(15*c),Math.round(15*e),f,h);g.push(a);if(this._isDataDriven){if(!k)throw Error("Expecting data driven values.");c=k.color;k=c[3]*k.opacity*255;g.push(d.i8888to32(c[0]*k,c[1]*k,c[2]*k,k))}return l};return b}(d);l.OutlineVertexBuffer=h;h=function(f){function b(a){var b=f.call(this,a?24:16)||this;b._isDataDriven=a;return b}m(b,f);b.prototype.isDataDriven=function(){return this._isDataDriven};b.prototype.add=function(a,b,c,e,f,h,k,l,m,
u,p){var g=this.array;a=d.i1616to32(a,b);g.push(a);a=d.i1616to32(Math.round(32*c),Math.round(32*e));g.push(a);a=d.i8888to32(f/4,h/4,0,0);g.push(a);a=d.i8888to32(Math.ceil(10*u),t.radToByte(k),10*l,Math.min(10*m,255));g.push(a);if(this._isDataDriven){if(!p)throw Error("Expecting data driven values.");c=p.color;e=c[3]*p.opacity*255;g.push(d.i8888to32(c[0]*e,c[1]*e,c[2]*e,e));q[0]=p.size;g.push(r[0])}};return b}(d);l.SymbolVertexBuffer=h});