define(["exports","./arrayFill-0358accf","./buildModuleUrl-3d15f25c","./Cartesian2-6033fa5d","./Cartographic-67e73ef9","./ComponentDatatype-81047f82","./CylinderGeometryLibrary-6601cb33","./when-92c6cf3c","./Check-52a7d806","./GeometryAttribute-ef657318","./GeometryAttributes-7f66ea53","./GeometryOffsetAttribute-b4d599f5","./IndexDatatype-4c0e98b8","./Math-92c3b5f7","./PrimitiveType-cdfe443e","./VertexFormat-f496a3f1"],(function(t,e,n,o,a,r,i,s,u,f,p,m,d,c,b,l){"use strict";var y=new o.o,v=new a.t,h=new a.t,w=new a.t,g=new a.t;function A(t){var e=(t=s.u(t,s.u.EMPTY_OBJECT)).length,n=t.topRadius,o=t.bottomRadius,a=s.u(t.vertexFormat,l.n.DEFAULT),r=s.u(t.slices,128);if(!s.e(e))throw new u.t("options.length must be defined.");if(!s.e(n))throw new u.t("options.topRadius must be defined.");if(!s.e(o))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.e(t.offsetAttribute)&&t.offsetAttribute===m.z.TOP)throw new u.t("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=e,this._topRadius=n,this._bottomRadius=o,this._vertexFormat=l.n.clone(a),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}A.packedLength=l.n.packedLength+5,A.pack=function(t,e,n){if(!s.e(t))throw new u.t("value is required");if(!s.e(e))throw new u.t("array is required");return n=s.u(n,0),l.n.pack(t._vertexFormat,e,n),n+=l.n.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=s.u(t._offsetAttribute,-1),e};var _,x=new l.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.e(t))throw new u.t("array is required");e=s.u(e,0);var o=l.n.unpack(t,e,x);e+=l.n.packedLength;var a=t[e++],r=t[e++],i=t[e++],f=t[e++],p=t[e];return s.e(n)?(n._vertexFormat=l.n.clone(o,n._vertexFormat),n._length=a,n._topRadius=r,n._bottomRadius=i,n._slices=f,n._offsetAttribute=-1===p?void 0:p,n):(R.length=a,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,l=t._topRadius,A=t._bottomRadius,_=t._vertexFormat,x=t._slices;if(!(u<=0||l<0||A<0||0===l&&0===A)){var R,F=x+x,D=x+F,O=F+F,T=i.I.computePositions(u,l,A,x,!0),C=_.st?new Float32Array(2*O):void 0,L=_.normal?new Float32Array(3*O):void 0,P=_.tangent?new Float32Array(3*O):void 0,z=_.bitangent?new Float32Array(3*O):void 0,k=_.normal||_.tangent||_.bitangent;if(k){var G=_.tangent||_.bitangent,I=0,M=0,E=0,N=Math.atan2(A-l,u),U=v;U.z=Math.sin(N);var q=Math.cos(N),S=w,B=h;for(R=0;R