sdrangel/plugins/feature/map/Cesium/Workers/createSphereGeometry.js

2 lines
1.5 KiB
JavaScript

define(["./when-229515d6","./Matrix2-46444433","./RuntimeError-608565a6","./EllipsoidGeometry-375a9e5a","./VertexFormat-7272aabd","./ComponentDatatype-692a36d3","./WebGLConstants-f63312fc","./GeometryOffsetAttribute-4f901209","./Transforms-ab7258fe","./combine-35b6d9cb","./GeometryAttribute-d3bef603","./GeometryAttributes-b253752a","./IndexDatatype-7c683b18"],(function(e,t,i,r,o,a,n,s,c,d,l,m,u){"use strict";function p(i){const o=e.defaultValue(i.radius,1),a={radii:new t.Cartesian3(o,o,o),stackPartitions:i.stackPartitions,slicePartitions:i.slicePartitions,vertexFormat:i.vertexFormat};this._ellipsoidGeometry=new r.EllipsoidGeometry(a),this._workerName="createSphereGeometry"}p.packedLength=r.EllipsoidGeometry.packedLength,p.pack=function(e,t,i){return r.EllipsoidGeometry.pack(e._ellipsoidGeometry,t,i)};const y=new r.EllipsoidGeometry,G={radius:void 0,radii:new t.Cartesian3,vertexFormat:new o.VertexFormat,stackPartitions:void 0,slicePartitions:void 0};return p.unpack=function(i,a,n){const s=r.EllipsoidGeometry.unpack(i,a,y);return G.vertexFormat=o.VertexFormat.clone(s._vertexFormat,G.vertexFormat),G.stackPartitions=s._stackPartitions,G.slicePartitions=s._slicePartitions,e.defined(n)?(t.Cartesian3.clone(s._radii,G.radii),n._ellipsoidGeometry=new r.EllipsoidGeometry(G),n):(G.radius=s._radii.x,new p(G))},p.createGeometry=function(e){return r.EllipsoidGeometry.createGeometry(e._ellipsoidGeometry)},function(t,i){return e.defined(i)&&(t=p.unpack(t,i)),p.createGeometry(t)}}));