qd-changjing/public/static/Build/CesiumUnminified/Workers/Matrix2-265d9610.js.map

1 line
648 KiB
Plaintext
Raw Normal View History

2022-07-05 16:56:29 +08:00
{"version":3,"file":"Matrix2-265d9610.js","sources":["../../../../Source/Core/Cartesian3.js","../../../../Source/Core/scaleToGeodeticSurface.js","../../../../Source/Core/Cartographic.js","../../../../Source/Core/Ellipsoid.js","../../../../Source/Core/Matrix3.js","../../../../Source/Core/Cartesian4.js","../../../../Source/Core/Matrix4.js","../../../../Source/Core/Rectangle.js","../../../../Source/Core/Cartesian2.js","../../../../Source/Core/Matrix2.js"],"sourcesContent":["import Check from \"./Check.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport CesiumMath from \"./Math.js\";\n\n/**\n * A 3D Cartesian point.\n * @alias Cartesian3\n * @constructor\n *\n * @param {Number} [x=0.0] The X component.\n * @param {Number} [y=0.0] The Y component.\n * @param {Number} [z=0.0] The Z component.\n *\n * @see Cartesian2\n * @see Cartesian4\n * @see Packable\n */\nfunction Cartesian3(x, y, z) {\n /**\n * The X component.\n * @type {Number}\n * @default 0.0\n */\n this.x = defaultValue(x, 0.0);\n\n /**\n * The Y component.\n * @type {Number}\n * @default 0.0\n */\n this.y = defaultValue(y, 0.0);\n\n /**\n * The Z component.\n * @type {Number}\n * @default 0.0\n */\n this.z = defaultValue(z, 0.0);\n}\n\n/**\n * Converts the provided Spherical into Cartesian3 coordinates.\n *\n * @param {Spherical} spherical The Spherical to be converted to Cartesian3.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.\n */\nCartesian3.fromSpherical = function (spherical, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"spherical\", spherical);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n result = new Cartesian3();\n }\n\n const clock = spherical.clock;\n const cone = spherical.cone;\n const magnitude = defaultValue(spherical.magnitude, 1.0);\n const radial = magnitude * Math.sin(cone);\n result.x = radial * Math.cos(clock);\n result.y = radial * Math.sin(clock);\n result.z = magnitude * Math.cos(cone);\n return result;\n};\n\n/**\n * Creates a Cartesian3 instance from x, y and z coordinates.\n *\n * @param {Number} x The x coordinate.\n * @param {Number} y The y coordinate.\n * @param {Number} z The z coordinate.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.\n */\nCartesian3.fromElements = function (x, y, z, result) {\n if (!defined(result)) {\n return new Cartesian3(x, y, z);\n }\n\n result.x = x;\n result.y = y;\n result.z = z;\n return result;\n};\n\n/**\n * Duplicates a Cartesian3 instance.\n *\n * @param {Cartesian3} cartesian The Cartesian to duplicate.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)\n */\nCartesian3.clone = function (cartesian, result) {\n if (!defined(cartesian)) {\n return undefined;\n }\n if (!defined(result)) {\n return new Cartesian3(cartesian.x, cartesian.y, cartesian.z);\n }\n\n result.x = cartesian.x;\n result.y = cartesian.y;\n result.z = cartesian.z;\n return result;\n};\n\n/**\n * Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the\n * x, y, and z properties of the Cartesian4 and drops w.\n * @function\n *\n * @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian3 instance from.\n * @param {Cartesian3} [result] The object onto which to store the result.\n * @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.\n */\nCartesian3.fromCartesian4 = Cartesian3.clone;\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {Number}\n