Agriculture-front-end/public/Cesium/Workers/BoxGeometry-96a5dbc5.js

2 lines
7.7 KiB
JavaScript
Raw Normal View History

2023-04-16 22:33:44 +08:00
define(["exports","./arrayFill-4513d7ad","./buildModuleUrl-4e1b81e7","./Cartographic-3309dd0d","./Check-7b2a090c","./ComponentDatatype-c140a87d","./when-b60132fc","./GeometryAttribute-3a88ba31","./GeometryAttributes-252e9929","./GeometryOffsetAttribute-fbeb6f1a","./PrimitiveType-a54dc62f","./VertexFormat-6446fca0"],(function(e,t,a,n,r,i,o,m,u,s,y,p){"use strict";var x=new n.Cartesian3;function f(e){var t=(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).minimum,a=e.maximum,r=o.defaultValue(e.vertexFormat,p.VertexFormat.DEFAULT);this._minimum=n.Cartesian3.clone(t),this._maximum=n.Cartesian3.clone(a),this._vertexFormat=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}f.fromDimensions=function(e){var t=(e=o.defaultValue(e,o.defaultValue.EMPTY_OBJECT)).dimensions,a=n.Cartesian3.multiplyByScalar(t,.5,new n.Cartesian3);return new f({minimum:n.Cartesian3.negate(a,new n.Cartesian3),maximum:a,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},f.fromAxisAlignedBoundingBox=function(e){return new f({minimum:e.minimum,maximum:e.maximum})},f.packedLength=2*n.Cartesian3.packedLength+p.VertexFormat.packedLength+1,f.pack=function(e,t,a){return a=o.defaultValue(a,0),n.Cartesian3.pack(e._minimum,t,a),n.Cartesian3.pack(e._maximum,t,a+n.Cartesian3.packedLength),p.VertexFormat.pack(e._vertexFormat,t,a+2*n.Cartesian3.packedLength),t[a+2*n.Cartesian3.packedLength+p.VertexFormat.packedLength]=o.defaultValue(e._offsetAttribute,-1),t};var c,l=new n.Cartesian3,A=new n.Cartesian3,d=new p.VertexFormat,b={minimum:l,maximum:A,vertexFormat:d,offsetAttribute:void 0};f.unpack=function(e,t,a){t=o.defaultValue(t,0);var r=n.Cartesian3.unpack(e,t,l),i=n.Cartesian3.unpack(e,t+n.Cartesian3.packedLength,A),m=p.VertexFormat.unpack(e,t+2*n.Cartesian3.packedLength,d),u=e[t+2*n.Cartesian3.packedLength+p.VertexFormat.packedLength];return o.defined(a)?(a._minimum=n.Cartesian3.clone(r,a._minimum),a._maximum=n.Cartesian3.clone(i,a._maximum),a._vertexFormat=p.VertexFormat.clone(m,a._vertexFormat),a._offsetAttribute=-1===u?void 0:u,a):(b.offsetAttribute=-1===u?void 0:u,new f(b))},f.createGeometry=function(e){var r=e._minimum,p=e._maximum,f=e._vertexFormat;if(!n.Cartesian3.equals(r,p)){var c,l,A=new u.GeometryAttributes;if(f.position&&(f.st||f.normal||f.tangent||f.bitangent)){if(f.position&&((l=new Float64Array(72))[0]=r.x,l[1]=r.y,l[2]=p.z,l[3]=p.x,l[4]=r.y,l[5]=p.z,l[6]=p.x,l[7]=p.y,l[8]=p.z,l[9]=r.x,l[10]=p.y,l[11]=p.z,l[12]=r.x,l[13]=r.y,l[14]=r.z,l[15]=p.x,l[16]=r.y,l[17]=r.z,l[18]=p.x,l[19]=p.y,l[20]=r.z,l[21]=r.x,l[22]=p.y,l[23]=r.z,l[24]=p.x,l[25]=r.y,l[26]=r.z,l[27]=p.x,l[28]=p.y,l[29]=r.z,l[30]=p.x,l[31]=p.y,l[32]=p.z,l[33]=p.x,l[34]=r.y,l[35]=p.z,l[36]=r.x,l[37]=r.y,l[38]=r.z,l[39]=r.x,l[40]=p.y,l[41]=r.z,l[42]=r.x,l[43]=p.y,l[44]=p.z,l[45]=r.x,l[46]=r.y,l[47]=p.z,l[48]=r.x,l[49]=p.y,l[50]=r.z,l[51]=p.x,l[52]=p.y,l[53]=r.z,l[54]=p.x,l[55]=p.y,l[56]=p.z,l[57]=r.x,l[58]=p.y,l[59]=p.z,l[60]=r.x,l[61]=r.y,l[62]=r.z,l[63]=p.x,l[64]=r.y,l[65]=r.z,l[66]=p.x,l[67]=r.y,l[68]=p.z,l[69]=r.x,l[70]=r.y,l[71]=p.z,A.position=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:l})),f.normal){var d=new Float32Array(72);d[0]=0,d[1]=0,d[2]=1,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=1,d[9]=0,d[10]=0,d[11]=1,d[12]=0,d[13]=0,d[14]=-1,d[15]=0,d[16]=0,d[17]=-1,d[18]=0,d[19]=0,d[20]=-1,d[21]=0,d[22]=0,d[23]=-1,d[24]=1,d[25]=0,d[26]=0,d[27]=1,d[28]=0,d[29]=0,d[30]=1,d[31]=0,d[32]=0,d[33]=1,d[34]=0,d[35]=0,d[36]=-1,d[37]=0,d[38]=0,d[39]=-1,d[40]=0,d[41]=0,d[42]=-1,d[43]=0,d[44]=0,d[45]=-1,d[46]=0,d[47]=0,d[48]=0,d[49]=1,d[50]=0,d[51]=0,d[52]=1,d[53]=0,d[54]=0,d[55]=1,d[56]=0,d[57]=0,d[58]=1,d[59]=0,d[60]=0,d[61]=-1,d[62]=0,d[63]=0,d[64]=-1,d[65]=0,d[66]=0,d[67]=-1,d[68]=0,d[69]=0,d[70]=-1,d[71]=0,A.normal=new m.GeometryAttribute({componentDatatype:i.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:d})}if(f.st){var b=new Float32Array(72),C=0;b[C++]=0,b[C++]=0,b[C++]=-1,b[C++]=1,b[C++]=0,b[C++]=-1,b[C++]=1,b[C++]=1,b[C++]=-1,b[C++]=0,b[C++]=1,b[C++]=-1,b[C++]=1,b[C++]=0,b[C++]=-1,b[C++]=0,b[