define(["exports","./arrayFill-4d3cc415","./buildModuleUrl-dba4ec07","./Cartesian2-1b9b0d8a","./Cartographic-1bbcab04","./ComponentDatatype-d430c7f7","./CylinderGeometryLibrary-4c16342b","./when-515d5295","./Check-3aa71481","./GeometryAttribute-9bc31a7f","./GeometryAttributes-7d904f0f","./GeometryOffsetAttribute-800f7650","./IndexDatatype-eefd5922","./Math-5e38123d","./PrimitiveType-b38a4004","./VertexFormat-e844760b"],(function(t,e,n,a,o,r,i,s,u,f,p,m,d,b,c,y){"use strict";var l=new a.r,v=new o.a,h=new o.a,w=new o.a,g=new o.a;function A(t){var e=(t=s.e(t,s.e.EMPTY_OBJECT)).length,n=t.topRadius,a=t.bottomRadius,o=s.e(t.vertexFormat,y.n.DEFAULT),r=s.e(t.slices,128);if(!s.t(e))throw new u.t("options.length must be defined.");if(!s.t(n))throw new u.t("options.topRadius must be defined.");if(!s.t(a))throw new u.t("options.bottomRadius must be defined.");if(r<3)throw new u.t("options.slices must be greater than or equal to 3.");if(s.t(t.offsetAttribute)&&t.offsetAttribute===m.I.TOP)throw new u.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=n,this._bottomRadius=a,this._vertexFormat=y.n.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}A.packedLength=y.n.packedLength+5,A.pack=function(t,e,n){if(!s.t(t))throw new u.t("value is required");if(!s.t(e))throw new u.t("array is required");return n=s.e(n,0),y.n.pack(t._vertexFormat,e,n),n+=y.n.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=s.e(t._offsetAttribute,-1),e};var _,x=new y.n,R={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};A.unpack=function(t,e,n){if(!s.t(t))throw new u.t("array is required");e=s.e(e,0);var a=y.n.unpack(t,e,x);e+=y.n.packedLength;var o=t[e++],r=t[e++],i=t[e++],f=t[e++],p=t[e];return s.t(n)?(n._vertexFormat=y.n.clone(a,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=i,n._slices=f,n._offsetAttribute=-1===p?void 0:p,n):(R.length=o,R.topRadius=r,R.bottomRadius=i,R.slices=f,R.offsetAttribute=-1===p?void 0:p,new A(R))},A.createGeometry=function(t){var u=t._length,y=t._topRadius,A=t._bottomRadius,_=t._vertexFormat,x=t._slices;if(!(u<=0||y<0||A<0||0===y&&0===A)){var R,F=x+x,D=x+F,T=F+F,O=i.x.computePositions(u,y,A,x,!0),C=_.st?new Float32Array(2*T):void 0,L=_.normal?new Float32Array(3*T):void 0,P=_.tangent?new Float32Array(3*T):void 0,k=_.bitangent?new Float32Array(3*T):void 0,G=_.normal||_.tangent||_.bitangent;if(G){var I=_.tangent||_.bitangent,M=0,z=0,E=0,N=Math.atan2(A-y,u),U=v;U.z=Math.sin(N);var q=Math.cos(N),S=w,B=h;for(R=0;R