meface/docs/.vuepress/public/cesium/Workers/createCircleGeometry.js

2 lines
2.9 KiB
JavaScript

define(["./Matrix2-860854d4","./RuntimeError-1349fdaf","./when-4bbc8319","./EllipseGeometry-1686652b","./VertexFormat-b8b51b88","./ComponentDatatype-8f55628c","./WebGLConstants-508b9636","./GeometryOffsetAttribute-24539cee","./Transforms-0becfc64","./combine-e9466e32","./EllipseGeometryLibrary-dd7285d8","./GeometryAttribute-4590b388","./GeometryAttributes-7827a6c2","./GeometryInstance-ace7be43","./GeometryPipeline-8721156a","./AttributeCompression-5f6be9e6","./EncodedCartesian3-6e74751e","./IndexDatatype-1d853600","./IntersectionTests-1d677ce2","./Plane-0e4269ac"],(function(e,t,i,r,o,n,s,l,a,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 l=r.EllipseGeometry.unpack(t,n,b);return E.center=e.Cartesian3.clone(l._center,E.center),E.ellipsoid=e.Ellipsoid.clone(l._ellipsoid,E.ellipsoid),E.height=l._height,E.extrudedHeight=l._extrudedHeight,E.granularity=l._granularity,E.vertexFormat=o.VertexFormat.clone(l._vertexFormat,E.vertexFormat),E.stRotation=l._stRotation,E.shadowVolume=l._shadowVolume,i.defined(s)?(E.semiMajorAxis=l._semiMajorAxis,E.semiMinorAxis=l._semiMinorAxis,s._ellipseGeometry=new r.EllipseGeometry(E),s):(E.radius=l._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),l=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:l,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)}}));