define(["exports","./arrayFill-4513d7ad","./buildModuleUrl-4e1b81e7","./Cartesian2-47311507","./Cartographic-3309dd0d","./ComponentDatatype-c140a87d","./CylinderGeometryLibrary-aa453214","./when-b60132fc","./Check-7b2a090c","./GeometryAttribute-3a88ba31","./GeometryAttributes-252e9929","./GeometryOffsetAttribute-fbeb6f1a","./IndexDatatype-8a5eead4","./Math-119be1a3","./PrimitiveType-a54dc62f","./VertexFormat-6446fca0"],(function(t,e,a,r,n,o,i,s,u,m,d,l,p,y,f,b){"use strict";var c=new r.Cartesian2,v=new n.Cartesian3,A=new n.Cartesian3,g=new n.Cartesian3,h=new n.Cartesian3;function x(t){var e=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=s.defaultValue(t.vertexFormat,b.VertexFormat.DEFAULT),o=s.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=b.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}x.packedLength=b.VertexFormat.packedLength+5,x.pack=function(t,e,a){return a=s.defaultValue(a,0),b.VertexFormat.pack(t._vertexFormat,e,a),a+=b.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=s.defaultValue(t._offsetAttribute,-1),e};var _,C=new b.VertexFormat,F={vertexFormat:C,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};x.unpack=function(t,e,a){e=s.defaultValue(e,0);var r=b.VertexFormat.unpack(t,e,C);e+=b.VertexFormat.packedLength;var n=t[e++],o=t[e++],i=t[e++],u=t[e++],m=t[e];return s.defined(a)?(a._vertexFormat=b.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=i,a._slices=u,a._offsetAttribute=-1===m?void 0:m,a):(F.length=n,F.topRadius=o,F.bottomRadius=i,F.slices=u,F.offsetAttribute=-1===m?void 0:m,new x(F))},x.createGeometry=function(t){var u=t._length,b=t._topRadius,x=t._bottomRadius,_=t._vertexFormat,C=t._slices;if(!(u<=0||b<0||x<0||0===b&&0===x)){var F,w=C+C,G=C+w,D=w+w,R=i.CylinderGeometryLibrary.computePositions(u,b,x,C,!0),V=_.st?new Float32Array(2*D):void 0,T=_.normal?new Float32Array(3*D):void 0,O=_.tangent?new Float32Array(3*D):void 0,L=_.bitangent?new Float32Array(3*D):void 0,P=_.normal||_.tangent||_.bitangent;if(P){var M=_.tangent||_.bitangent,k=0,z=0,E=0,N=Math.atan2(x-b,u),I=v;I.z=Math.sin(N);var U=Math.cos(N),S=g,B=A;for(F=0;F