define(["exports","./GeometryOffsetAttribute-ed56ff58","./Transforms-98ffa11d","./Matrix2-e3fb4559","./Cartesian3-7e9cc2ff","./ComponentDatatype-aaeec80f","./CylinderGeometryLibrary-4083111e","./defaultValue-81eec7ed","./Check-741c5f3c","./GeometryAttribute-b025f9a8","./GeometryAttributes-32b29525","./IndexDatatype-f1e3f799","./Math-5f585871","./VertexFormat-d50a69ba"],(function(t,e,n,a,o,r,i,s,u,m,c,f,l,d){"use strict";const p=new a.Cartesian2,y=new o.Cartesian3,b=new o.Cartesian3,A=new o.Cartesian3,x=new o.Cartesian3;function g(t){const e=(t=s.defaultValue(t,s.defaultValue.EMPTY_OBJECT)).length,n=t.topRadius,a=t.bottomRadius,o=s.defaultValue(t.vertexFormat,d.VertexFormat.DEFAULT),r=s.defaultValue(t.slices,128);this._length=e,this._topRadius=n,this._bottomRadius=a,this._vertexFormat=d.VertexFormat.clone(o),this._slices=r,this._offsetAttribute=t.offsetAttribute,this._workerName="createCylinderGeometry"}g.packedLength=d.VertexFormat.packedLength+5,g.pack=function(t,e,n){return n=s.defaultValue(n,0),d.VertexFormat.pack(t._vertexFormat,e,n),n+=d.VertexFormat.packedLength,e[n++]=t._length,e[n++]=t._topRadius,e[n++]=t._bottomRadius,e[n++]=t._slices,e[n]=s.defaultValue(t._offsetAttribute,-1),e};const _=new d.VertexFormat,h={vertexFormat:_,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};let C;g.unpack=function(t,e,n){e=s.defaultValue(e,0);const a=d.VertexFormat.unpack(t,e,_);e+=d.VertexFormat.packedLength;const o=t[e++],r=t[e++],i=t[e++],u=t[e++],m=t[e];return s.defined(n)?(n._vertexFormat=d.VertexFormat.clone(a,n._vertexFormat),n._length=o,n._topRadius=r,n._bottomRadius=i,n._slices=u,n._offsetAttribute=-1===m?void 0:m,n):(h.length=o,h.topRadius=r,h.bottomRadius=i,h.slices=u,h.offsetAttribute=-1===m?void 0:m,new g(h))},g.createGeometry=function(t){let u=t._length;const d=t._topRadius,g=t._bottomRadius,_=t._vertexFormat,h=t._slices;if(u<=0||d<0||g<0||0===d&&0===g)return;const C=h+h,F=h+C,v=C+C,w=i.CylinderGeometryLibrary.computePositions(u,d,g,h,!0),G=_.st?new Float32Array(2*v):void 0,V=_.normal?new Float32Array(3*v):void 0,D=_.tangent?new Float32Array(3*v):void 0,R=_.bitangent?new Float32Array(3*v):void 0;let T;const O=_.normal||_.tangent||_.bitangent;if(O){const t=_.tangent||_.bitangent;let e=0,n=0,a=0;const r=Math.atan2(g-d,u),i=y;i.z=Math.sin(r);const s=Math.cos(r);let m=A,c=b;for(T=0;T