define(["exports","./GeometryOffsetAttribute-1772960d","./Transforms-d13cc04e","./Matrix2-9aa31791","./ComponentDatatype-93750d1a","./CylinderGeometryLibrary-dc0b434b","./when-4bbc8319","./RuntimeError-346a3079","./GeometryAttribute-43536dc0","./GeometryAttributes-7827a6c2","./IndexDatatype-b7d979a6","./VertexFormat-71718faa"],(function(t,e,a,r,n,o,i,s,m,u,d,p){"use strict";var y=new r.Cartesian2,l=new r.Cartesian3,f=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,p.VertexFormat.DEFAULT),o=i.defaultValue(t.slices,128);this._length=e,this._topRadius=a,this._bottomRadius=r,this._vertexFormat=p.VertexFormat.clone(n),this._slices=o,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}v.packedLength=p.VertexFormat.packedLength+5,v.pack=function(t,e,a){return a=i.defaultValue(a,0),p.VertexFormat.pack(t._vertexFormat,e,a),a+=p.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 p.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=p.VertexFormat.unpack(t,e,x);e+=p.VertexFormat.packedLength;var n=t[e++],o=t[e++],s=t[e++],m=t[e++],u=t[e];return i.defined(a)?(a._vertexFormat=p.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,p=t._topRadius,v=t._bottomRadius,A=t._vertexFormat,x=t._slices;if(!(s<=0||p<0||v<0||0===p&&0===v)){var g,_=x+x,h=x+_,F=_+_,C=o.CylinderGeometryLibrary.computePositions(s,p,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-p,s),M=l;M.z=Math.sin(E);var k=Math.cos(E),z=b,N=f;for(g=0;g