define(["exports","./GeometryOffsetAttribute-4f901209","./Transforms-ab7258fe","./Matrix2-46444433","./ComponentDatatype-692a36d3","./CylinderGeometryLibrary-471159cb","./when-229515d6","./RuntimeError-608565a6","./GeometryAttribute-d3bef603","./GeometryAttributes-b253752a","./IndexDatatype-7c683b18","./VertexFormat-7272aabd"],(function(t,e,n,a,o,r,i,s,m,u,c,l){"use strict";const p=new a.Cartesian2,d=new a.Cartesian3,y=new a.Cartesian3,f=new a.Cartesian3,b=new a.Cartesian3;function A(t){const e=(t=i.defaultValue(t,i.defaultValue.EMPTY_OBJECT)).length,n=t.topRadius,a=t.bottomRadius,o=i.defaultValue(t.vertexFormat,l.VertexFormat.DEFAULT),r=i.defaultValue(t.slices,128);this._length=e,this._topRadius=n,this._bottomRadius=a,this._vertexFormat=l.VertexFormat.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}A.packedLength=l.VertexFormat.packedLength+5,A.pack=function(t,e,n){return n=i.defaultValue(n,0),l.VertexFormat.pack(t._vertexFormat,e,n),n+=l.VertexFormat.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=i.defaultValue(t._offsetAttribute,-1),e};const x=new l.VertexFormat,g={vertexFormat:x,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let _;A.unpack=function(t,e,n){e=i.defaultValue(e,0);const a=l.VertexFormat.unpack(t,e,x);e+=l.VertexFormat.packedLength;const o=t[e++],r=t[e++],s=t[e++],m=t[e++],u=t[e];return i.defined(n)?(n._vertexFormat=l.VertexFormat.clone(a,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=s,n._slices=m,n._offsetAttribute=-1===u?void 0:u,n):(g.length=o,g.topRadius=r,g.bottomRadius=s,g.slices=m,g.offsetAttribute=-1===u?void 0:u,new A(g))},A.createGeometry=function(t){let s=t._length;const l=t._topRadius,A=t._bottomRadius,x=t._vertexFormat,g=t._slices;if(s<=0||l<0||A<0||0===l&&0===A)return;const _=g+g,h=g+_,F=_+_,v=r.CylinderGeometryLibrary.computePositions(s,l,A,g,!0),C=x.st?new Float32Array(2*F):void 0,w=x.normal?new Float32Array(3*F):void 0,G=x.tangent?new Float32Array(3*F):void 0,R=x.bitangent?new Float32Array(3*F):void 0;let D;const V=x.normal||x.tangent||x.bitangent;if(V){const t=x.tangent||x.bitangent;let e=0,n=0,r=0;const i=Math.atan2(A-l,s),m=d;m.z=Math.sin(i);const u=Math.cos(i);let c=f,p=y;for(D=0;D