qd-changjing/public/static/Build/CesiumUnminified/Workers/createCircleGeometry.js.map

1 line
13 KiB
Plaintext
Raw Normal View History

2022-07-05 16:56:29 +08:00
{"version":3,"file":"createCircleGeometry.js","sources":["../../../../Source/Core/CircleGeometry.js","../../../../Source/WorkersES6/createCircleGeometry.js"],"sourcesContent":["import Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport EllipseGeometry from \"./EllipseGeometry.js\";\nimport Ellipsoid from \"./Ellipsoid.js\";\nimport VertexFormat from \"./VertexFormat.js\";\n\n/**\n * A description of a circle on the ellipsoid. Circle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.\n *\n * @alias CircleGeometry\n * @constructor\n *\n * @param {Object} options Object with the following properties:\n * @param {Cartesian3} options.center The circle's center point in the fixed frame.\n * @param {Number} options.radius The radius in meters.\n * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the circle will be on.\n * @param {Number} [options.height=0.0] The distance in meters between the circle and the ellipsoid surface.\n * @param {Number} [options.granularity=0.02] The angular distance between points on the circle in radians.\n * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.\n * @param {Number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.\n * @param {Number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.\n *\n * @exception {DeveloperError} radius must be greater than zero.\n * @exception {DeveloperError} granularity must be greater than zero.\n *\n * @see CircleGeometry.createGeometry\n * @see Packable\n *\n * @example\n * // Create a circle.\n * const circle = new Cesium.CircleGeometry({\n * center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),\n * radius : 100000.0\n * });\n * const geometry = Cesium.CircleGeometry.createGeometry(circle);\n */\nfunction CircleGeometry(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n const radius = options.radius;\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.number(\"radius\", radius);\n //>>includeEnd('debug');\n\n const ellipseGeometryOptions = {\n center: options.center,\n semiMajorAxis: radius,\n semiMinorAxis: radius,\n ellipsoid: options.ellipsoid,\n height: options.height,\n extrudedHeight: options.extrudedHeight,\n granularity: options.granularity,\n vertexFormat: options.vertexFormat,\n stRotation: options.stRotation,\n shadowVolume: options.shadowVolume,\n };\n this._ellipseGeometry = new EllipseGeometry(ellipseGeometryOptions);\n this._workerName = \"createCircleGeometry\";\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {Number}\n */\nCircleGeometry.packedLength = EllipseGeometry.packedLength;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {CircleGeometry} value The value to pack.\n * @param {Number[]} array The array to pack into.\n * @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.\n *\n * @returns {Number[]} The array that was packed into\n */\nCircleGeometry.pack = function (value, array, startingIndex) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"value\", value);\n //>>includeEnd('debug');\n return EllipseGeometry.pack(value._ellipseGeometry, array, startingIndex);\n};\n\nconst scratchEllipseGeometry = new EllipseGeometry({\n center: new Cartesian3(),\n semiMajorAxis: 1.0,\n semiMinorAxis: 1.0,\n});\nconst scratchOptions = {\n center: new Cartesian3(),\n radius: undefined,\n ellipsoid: Ellipsoid.clone(Ellipsoid.UNIT_SPHERE),\n height: undefined,\n extrudedHeight: undefined,\n granularity: undefined,\n vertexFormat: new VertexFormat(),\n stRotation: undefined,\n semiMajorAxis: undefined,\n semiMinorAxis: undefined,\n shadowVolume: undefined,\n};\n\n/**\n * Re