define(["./defaultValue-69ee94f4","./Transforms-b2d190a4","./Matrix2-671a840a","./RuntimeError-ac440aa5","./ComponentDatatype-a9820060","./GeometryAttribute-77f8362f","./GeometryAttributes-1b4134a9","./VertexFormat-e68722dd","./_commonjsHelpers-3aae1032-15991586","./combine-0259f56f","./PixelFormat-9ceadbf3","./WebGLConstants-f63312fc"],(function(e,t,n,a,r,o,i,m,u,c,p,s){"use strict";function y(t){t=e.defaultValue(t,e.defaultValue.EMPTY_OBJECT);const n=e.defaultValue(t.vertexFormat,m.VertexFormat.DEFAULT);this._vertexFormat=n,this._workerName="createPlaneGeometry"}y.packedLength=m.VertexFormat.packedLength,y.pack=function(t,n,a){return a=e.defaultValue(a,0),m.VertexFormat.pack(t._vertexFormat,n,a),n};const f=new m.VertexFormat,l={vertexFormat:f};y.unpack=function(t,n,a){n=e.defaultValue(n,0);const r=m.VertexFormat.unpack(t,n,f);return e.defined(a)?(a._vertexFormat=m.VertexFormat.clone(r,a._vertexFormat),a):new y(l)};const A=new n.Cartesian3(-.5,-.5,0),F=new n.Cartesian3(.5,.5,0);return y.createGeometry=function(e){const a=e._vertexFormat,m=new i.GeometryAttributes;let u,c;if(a.position){if(c=new Float64Array(12),c[0]=A.x,c[1]=A.y,c[2]=0,c[3]=F.x,c[4]=A.y,c[5]=0,c[6]=F.x,c[7]=F.y,c[8]=0,c[9]=A.x,c[10]=F.y,c[11]=0,m.position=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:c}),a.normal){const e=new Float32Array(12);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=1,e[9]=0,e[10]=0,e[11]=1,m.normal=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(a.st){const e=new Float32Array(8);e[0]=0,e[1]=0,e[2]=1,e[3]=0,e[4]=1,e[5]=1,e[6]=0,e[7]=1,m.st=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:e})}if(a.tangent){const e=new Float32Array(12);e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e[6]=1,e[7]=0,e[8]=0,e[9]=1,e[10]=0,e[11]=0,m.tangent=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}if(a.bitangent){const e=new Float32Array(12);e[0]=0,e[1]=1,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=1,e[8]=0,e[9]=0,e[10]=1,e[11]=0,m.bitangent=new o.GeometryAttribute({componentDatatype:r.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e})}u=new Uint16Array(6),u[0]=0,u[1]=1,u[2]=2,u[3]=0,u[4]=2,u[5]=3}return new o.Geometry({attributes:m,indices:u,primitiveType:o.PrimitiveType.TRIANGLES,boundingSphere:new t.BoundingSphere(n.Cartesian3.ZERO,Math.sqrt(2))})},function(t,n){return e.defined(n)&&(t=y.unpack(t,n)),y.createGeometry(t)}}));
|