define(["exports","./GeometryOffsetAttribute-ff1e192c","./Transforms-7cd3197b","./Matrix2-f2da41d4","./ComponentDatatype-17b06483","./CylinderGeometryLibrary-7b000e1b","./when-229515d6","./RuntimeError-ffe03243","./GeometryAttribute-80036e07","./GeometryAttributes-b253752a","./IndexDatatype-b10faa0b","./VertexFormat-565d6a6c"],(function(t,e,a,r,n,o,i,s,m,u,d,f){"use strict";var p=new r.Cartesian2,y=new r.Cartesian3,l=new r.Cartesian3,b=new r.Cartesian3,c=new r.Cartesian3;function v(t){var e=(t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT)).length,a=t.topRadius,r=t.bottomRadius,n=i.defaultValue(t.vertexFormat,f.VertexFormat.DEFAULT),o=i.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=f.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}v.packedLength=f.VertexFormat.packedLength+5,v.pack=function(t,e,a){return a=i.defaultValue(a,0),f.VertexFormat.pack(t._vertexFormat,e,a),a+=f.VertexFormat.packedLength,e[a++]=t._length,e[a++]=t._topRadius,e[a++]=t._bottomRadius,e[a++]=t._slices,e[a]=i.defaultValue(t._offsetAttribute,-1),e};var A,x=new f.VertexFormat,g={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};v.unpack=function(t,e,a){e=i.defaultValue(e,0);var r=f.VertexFormat.unpack(t,e,x);e+=f.VertexFormat.packedLength;var n=t[e++],o=t[e++],s=t[e++],m=t[e++],u=t[e];return i.defined(a)?(a._vertexFormat=f.VertexFormat.clone(r,a._vertexFormat),a._length=n,a._topRadius=o,a._bottomRadius=s,a._slices=m,a._offsetAttribute=-1===u?void 0:u,a):(g.length=n,g.topRadius=o,g.bottomRadius=s,g.slices=m,g.offsetAttribute=-1===u?void 0:u,new v(g))},v.createGeometry=function(t){var s=t._length,f=t._topRadius,v=t._bottomRadius,A=t._vertexFormat,x=t._slices;if(!(s<=0||f<0||v<0||0===f&&0===v)){var g,_=x+x,h=x+_,F=_+_,C=o.CylinderGeometryLibrary.computePositions(s,f,v,x,!0),w=A.st?new Float32Array(2*F):void 0,G=A.normal?new Float32Array(3*F):void 0,R=A.tangent?new Float32Array(3*F):void 0,D=A.bitangent?new Float32Array(3*F):void 0,V=A.normal||A.tangent||A.bitangent;if(V){var T=A.tangent||A.bitangent,O=0,L=0,P=0,E=Math.atan2(v-f,s),M=y;M.z=Math.sin(E);var k=Math.cos(E),z=b,N=l;for(g=0;g