qd-changjing/public/static/Build/Cesium/Workers/createCircleGeometry.js

2 lines
2.9 KiB
JavaScript

define(["./Matrix2-c6c16658","./RuntimeError-5b082e8f","./when-4bbc8319","./EllipseGeometry-5510aad8","./VertexFormat-7b982b01","./ComponentDatatype-3d0a0aac","./WebGLConstants-508b9636","./GeometryOffsetAttribute-821af768","./Transforms-f15de320","./combine-e9466e32","./EllipseGeometryLibrary-a4ac7ccc","./GeometryAttribute-8350368e","./GeometryAttributes-7827a6c2","./GeometryInstance-0b07c761","./GeometryPipeline-0fb7cb2c","./AttributeCompression-f7a901f9","./EncodedCartesian3-b1495e46","./IndexDatatype-ddbc25a7","./IntersectionTests-a4e54d9a","./Plane-26e67b94"],(function(e,t,i,r,o,n,s,a,l,m,d,c,u,p,y,_,G,x,h,g){"use strict";function f(e){const t=(e=i.defaultValue(e,i.defaultValue.EMPTY_OBJECT)).radius,o={center:e.center,semiMajorAxis:t,semiMinorAxis:t,ellipsoid:e.ellipsoid,height:e.height,extrudedHeight:e.extrudedHeight,granularity:e.granularity,vertexFormat:e.vertexFormat,stRotation:e.stRotation,shadowVolume:e.shadowVolume};this._ellipseGeometry=new r.EllipseGeometry(o),this._workerName="createCircleGeometry"}f.packedLength=r.EllipseGeometry.packedLength,f.pack=function(e,t,i){return r.EllipseGeometry.pack(e._ellipseGeometry,t,i)};const b=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),E={center:new e.Cartesian3,radius:void 0,ellipsoid:e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new o.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return f.unpack=function(t,n,s){const a=r.EllipseGeometry.unpack(t,n,b);return E.center=e.Cartesian3.clone(a._center,E.center),E.ellipsoid=e.Ellipsoid.clone(a._ellipsoid,E.ellipsoid),E.height=a._height,E.extrudedHeight=a._extrudedHeight,E.granularity=a._granularity,E.vertexFormat=o.VertexFormat.clone(a._vertexFormat,E.vertexFormat),E.stRotation=a._stRotation,E.shadowVolume=a._shadowVolume,i.defined(s)?(E.semiMajorAxis=a._semiMajorAxis,E.semiMinorAxis=a._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(E),s):(E.radius=a._semiMajorAxis,new f(E))},f.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},f.createShadowVolume=function(e,t,i){const r=e._ellipseGeometry._granularity,n=e._ellipseGeometry._ellipsoid,s=t(r,n),a=i(r,n);return new f({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:n,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:s,height:a,vertexFormat:o.VertexFormat.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(f.prototype,{rectangle:{get:function(){return this._ellipseGeometry.rectangle}},textureCoordinateRotationPoints:{get:function(){return this._ellipseGeometry.textureCoordinateRotationPoints}}}),function(t,r){return i.defined(r)&&(t=f.unpack(t,r)),t._ellipseGeometry._center=e.Cartesian3.clone(t._ellipseGeometry._center),t._ellipseGeometry._ellipsoid=e.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),f.createGeometry(t)}}));