数字孪生Web 后台dt( digital twin)2.0版本 统一命名格式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
7.3 KiB

12 months ago
define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Cartesian2-c451a606","./Transforms-e4be2a30","./ComponentDatatype-7ee14e67","./GeometryAttribute-6f280ece","./GeometryAttributes-90846c5f","./GeometryOffsetAttribute-84f7eff3","./VertexFormat-cc24f342"],function(e,l,t,b,d,C,v,z,F,m){"use strict";var w=new b.Cartesian3;function u(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).minimum,a=e.maximum,n=l.defaultValue(e.vertexFormat,m.VertexFormat.DEFAULT);this._minimum=b.Cartesian3.clone(t),this._maximum=b.Cartesian3.clone(a),this._vertexFormat=n,this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxGeometry"}u.fromDimensions=function(e){var t=(e=l.defaultValue(e,l.defaultValue.EMPTY_OBJECT)).dimensions,a=b.Cartesian3.multiplyByScalar(t,.5,new b.Cartesian3);return new u({minimum:b.Cartesian3.negate(a,new b.Cartesian3),maximum:a,vertexFormat:e.vertexFormat,offsetAttribute:e.offsetAttribute})},u.fromAxisAlignedBoundingBox=function(e){return new u({minimum:e.minimum,maximum:e.maximum})},u.packedLength=2*b.Cartesian3.packedLength+m.VertexFormat.packedLength+1,u.pack=function(e,t,a){return a=l.defaultValue(a,0),b.Cartesian3.pack(e._minimum,t,a),b.Cartesian3.pack(e._maximum,t,a+b.Cartesian3.packedLength),m.VertexFormat.pack(e._vertexFormat,t,a+2*b.Cartesian3.packedLength),t[a+2*b.Cartesian3.packedLength+m.VertexFormat.packedLength]=l.defaultValue(e._offsetAttribute,-1),t};var a,s=new b.Cartesian3,y=new b.Cartesian3,p=new m.VertexFormat,f={minimum:s,maximum:y,vertexFormat:p,offsetAttribute:void 0};u.unpack=function(e,t,a){t=l.defaultValue(t,0);var n=b.Cartesian3.unpack(e,t,s),r=b.Cartesian3.unpack(e,t+b.Cartesian3.packedLength,y),i=m.VertexFormat.unpack(e,t+2*b.Cartesian3.packedLength,p),o=e[t+2*b.Cartesian3.packedLength+m.VertexFormat.packedLength];return l.defined(a)?(a._minimum=b.Cartesian3.clone(n,a._minimum),a._maximum=b.Cartesian3.clone(r,a._maximum),a._vertexFormat=m.VertexFormat.clone(i,a._vertexFormat),a._offsetAttribute=-1===o?void 0:o,a):(f.offsetAttribute=-1===o?void 0:o,new u(f))},u.createGeometry=function(e){var t=e._minimum,a=e._maximum,n=e._vertexFormat;if(!b.Cartesian3.equals(t,a)){var r,i,o=new z.GeometryAttributes;if(n.position&&(n.st||n.normal||n.tangent||n.bitangent)){if(n.position&&((i=new Float64Array(72))[0]=t.x,i[1]=t.y,i[2]=a.z,i[3]=a.x,i[4]=t.y,i[5]=a.z,i[6]=a.x,i[7]=a.y,i[8]=a.z,i[9]=t.x,i[10]=a.y,i[11]=a.z,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=a.x,i[16]=t.y,i[17]=t.z,i[18]=a.x,i[19]=a.y,i[20]=t.z,i[21]=t.x,i[22]=a.y,i[23]=t.z,i[24]=a.x,i[25]=t.y,i[26]=t.z,i[27]=a.x,i[28]=a.y,i[29]=t.z,i[30]=a.x,i[31]=a.y,i[32]=a.z,i[33]=a.x,i[34]=t.y,i[35]=a.z,i[36]=t.x,i[37]=t.y,i[38]=t.z,i[39]=t.x,i[40]=a.y,i[41]=t.z,i[42]=t.x,i[43]=a.y,i[44]=a.z,i[45]=t.x,i[46]=t.y,i[47]=a.z,i[48]=t.x,i[49]=a.y,i[50]=t.z,i[51]=a.x,i[52]=a.y,i[53]=t.z,i[54]=a.x,i[55]=a.y,i[56]=a.z,i[57]=t.x,i[58]=a.y,i[59]=a.z,i[60]=t.x,i[61]=t.y,i[62]=t.z,i[63]=a.x,i[64]=t.y,i[65]=t.z,i[66]=a.x,i[67]=t.y,i[68]=a.z,i[69]=t.x,i[70]=t.y,i[71]=a.z,o.position=new v.GeometryAttribute({componentDatatype:C.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:i})),n.normal){var m=new Float32Array(72);m[0]=0,m[1]=0,m[2]=1,m[3]=0,m[4]=0,m[5]=1,m[6]=0,m[7]=0,m[8]=1,m[9]=0,m[10]=0,m[11]=1,m[12]=0,m[13]=0,m[14]=-1,m[15]=0,m[16]=0,m[17]=-1,m[18]=0,m[19]=0,m[20]=-1,m[21]=0,m[22]=0,m[23]=-1,m[24]=1,m[25]=0,m[26]=0,m[27]=1,m[28]=0,m[29]=0,m[30]=1,m[31]=0,m[32]=0,m[33]=1,m[34]=0,m[35]=0,m[36]=-1,m[37]=0,m[38]=0,m[39]=-1,m[40]=0,m[41]=0,m[42]=-1,m[43]=0,m[44]=0,m[45]=-1,m[46]=0,m[47]=0,m[48]=0,m[49]=1,m[50]=0,m[51]=0,m[52]=1,m[53]=0,m[54]=0,m[55]=1,m[56]=0,m[57]=0,m[58]=1,m[59]=0,m[60]=0,m[61]=-1,m[62]=0,m[63]=0,m[64]=-1,m[65]=0,m[66]=0,m[67]=-1,m[68]=0,m[69]=0,m[70]=-1,m[71]=0,o.normal=new v.GeometryAttribute({componentDatatype:C.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:m})}if(n.st){var u=new Float32Array(48);u[0]=0,u[1]=0,u[2]=1,u[3]=0,u[4]=1,u[5]=1,u[6]=0,u[7]=1,u[8]=1,u[9]=0,u[10]=0,u[11]=0,u[12]=0,u[13]=1,u[14]=1,u[15]=1,u[16]=0,u[17]=0,u[18]=1,u[19]=0,u[20]=1,u[21]=1,u[22]=0,u[23]=1,u[24]=1,u[25]=0,u[26]=0,u[27]=0,u[