define(["exports","./arrayFill-deb10550","./buildModuleUrl-d920237a","./Cartesian2-2b41fabe","./Cartographic-1d953166","./ComponentDatatype-07894a2b","./CylinderGeometryLibrary-a63776ca","./when-d186add7","./Check-2514d21d","./GeometryAttribute-95780fd1","./GeometryAttributes-9c67dd14","./GeometryOffsetAttribute-da5a1d35","./IndexDatatype-61ffec74","./Math-7f5f2992","./FeatureDetection-4281d393","./VertexFormat-769ac289"],(function(t,e,n,o,a,r,i,s,u,d,f,p,m,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===p.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,F={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++],d=t[e++],f=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=d,n._offsetAttribute=-1===f?void 0:f,n):(F.length=a,F.topRadius=r,F.bottomRadius=i,F.slices=d,F.offsetAttribute=-1===f?void 0:f,new A(F))},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 F,R=x+x,D=x+R,O=R+R,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(F=0;F