qa-prevention-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/createCircleGeometry.js

2 lines
3.2 KiB
JavaScript
Raw Permalink Normal View History

2023-12-17 15:30:40 +08:00
define(["./Cartesian3-e0307675","./Check-741c5f3c","./defaultValue-81eec7ed","./EllipseGeometry-fe34b594","./Cartesian2-bd414876","./VertexFormat-d50a69ba","./Math-e73894ab","./GeometryOffsetAttribute-ed56ff58","./BoundingSphere-9a3b5656","./GeographicProjection-c931c7fb","./Matrix4-4c545f70","./RuntimeError-26acdd3b","./Rectangle-cf3e0e3e","./ComponentDatatype-aaeec80f","./WebGLConstants-508b9636","./EllipseGeometryLibrary-6649af71","./Transforms-5b829630","./when-422ea0ae","./Resource-8ae1a924","./combine-3c023bda","./GeometryAttribute-2b42a913","./Matrix2-dc0c61cc","./GeometryAttributes-32b29525","./GeometryInstance-1b39c9e8","./GeometryPipeline-e7083fea","./AttributeCompression-8f752c03","./EncodedCartesian3-aafcc30f","./IndexDatatype-3f3c99e8","./IntersectionTests-80510c7b","./Plane-bc8b6777"],(function(e,t,i,r,o,a,n,s,l,c,d,m,u,p,y,_,h,G,x,f,g,b,E,w,A,M,v,C,V,R){"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 j=new r.EllipseGeometry({center:new e.Cartesian3,semiMajorAxis:1,semiMinorAxis:1}),k={center:new e.Cartesian3,radius:void 0,ellipsoid:o.Ellipsoid.clone(o.Ellipsoid.UNIT_SPHERE),height:void 0,extrudedHeight:void 0,granularity:void 0,vertexFormat:new a.VertexFormat,stRotation:void 0,semiMajorAxis:void 0,semiMinorAxis:void 0,shadowVolume:void 0};return F.unpack=function(t,n,s){const l=r.EllipseGeometry.unpack(t,n,j);return k.center=e.Cartesian3.clone(l._center,k.center),k.ellipsoid=o.Ellipsoid.clone(l._ellipsoid,k.ellipsoid),k.height=l._height,k.extrudedHeight=l._extrudedHeight,k.granularity=l._granularity,k.vertexFormat=a.VertexFormat.clone(l._vertexFormat,k.vertexFormat),k.stRotation=l._stRotation,k.shadowVolume=l._shadowVolume,i.defined(s)?(k.semiMajorAxis=l._semiMajorAxis,k.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(k),s):(k.radius=l._semiMajorAxis,new F(k))},F.createGeometry=function(e){return r.EllipseGeometry.createGeometry(e._ellipseGeometry)},F.createShadowVolume=function(e,t,i){const r=e._ellipseGeometry._granularity,o=e._ellipseGeometry._ellipsoid,n=t(r,o),s=i(r,o);return new F({center:e._ellipseGeometry._center,radius:e._ellipseGeometry._semiMajorAxis,ellipsoid:o,stRotation:e._ellipseGeometry._stRotation,granularity:r,extrudedHeight:n,height:s,vertexFormat:a.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=o.Ellipsoid.clone(t._ellipseGeometry._ellipsoid),F.createGeometry(t)}}));