qd-changjing/public/static/Build/CesiumUnminified/Workers/createPlaneOutlineGeometry....

1 line
6.9 KiB
Plaintext

{"version":3,"file":"createPlaneOutlineGeometry.js","sources":["../../../../Source/Core/PlaneOutlineGeometry.js","../../../../Source/WorkersES6/createPlaneOutlineGeometry.js"],"sourcesContent":["import BoundingSphere from \"./BoundingSphere.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport ComponentDatatype from \"./ComponentDatatype.js\";\nimport defined from \"./defined.js\";\nimport Geometry from \"./Geometry.js\";\nimport GeometryAttribute from \"./GeometryAttribute.js\";\nimport GeometryAttributes from \"./GeometryAttributes.js\";\nimport PrimitiveType from \"./PrimitiveType.js\";\n\n/**\n * Describes geometry representing the outline of a plane centered at the origin, with a unit width and length.\n *\n * @alias PlaneOutlineGeometry\n * @constructor\n *\n */\nfunction PlaneOutlineGeometry() {\n this._workerName = \"createPlaneOutlineGeometry\";\n}\n\n/**\n * The number of elements used to pack the object into an array.\n * @type {Number}\n */\nPlaneOutlineGeometry.packedLength = 0;\n\n/**\n * Stores the provided instance into the provided array.\n *\n * @param {PlaneOutlineGeometry} value The value to pack.\n * @param {Number[]} array The array to pack into.\n *\n * @returns {Number[]} The array that was packed into\n */\nPlaneOutlineGeometry.pack = function (value, array) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"value\", value);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n return array;\n};\n\n/**\n * Retrieves an instance from a packed array.\n *\n * @param {Number[]} array The packed array.\n * @param {Number} [startingIndex=0] The starting index of the element to be unpacked.\n * @param {PlaneOutlineGeometry} [result] The object into which to store the result.\n * @returns {PlaneOutlineGeometry} The modified result parameter or a new PlaneOutlineGeometry instance if one was not provided.\n */\nPlaneOutlineGeometry.unpack = function (array, startingIndex, result) {\n //>>includeStart('debug', pragmas.debug);\n Check.defined(\"array\", array);\n //>>includeEnd('debug');\n\n if (!defined(result)) {\n return new PlaneOutlineGeometry();\n }\n\n return result;\n};\n\nconst min = new Cartesian3(-0.5, -0.5, 0.0);\nconst max = new Cartesian3(0.5, 0.5, 0.0);\n\n/**\n * Computes the geometric representation of an outline of a plane, including its vertices, indices, and a bounding sphere.\n *\n * @returns {Geometry|undefined} The computed vertices and indices.\n */\nPlaneOutlineGeometry.createGeometry = function () {\n const attributes = new GeometryAttributes();\n const indices = new Uint16Array(4 * 2);\n const positions = new Float64Array(4 * 3);\n\n positions[0] = min.x;\n positions[1] = min.y;\n positions[2] = min.z;\n positions[3] = max.x;\n positions[4] = min.y;\n positions[5] = min.z;\n positions[6] = max.x;\n positions[7] = max.y;\n positions[8] = min.z;\n positions[9] = min.x;\n positions[10] = max.y;\n positions[11] = min.z;\n\n attributes.position = new GeometryAttribute({\n componentDatatype: ComponentDatatype.DOUBLE,\n componentsPerAttribute: 3,\n values: positions,\n });\n\n indices[0] = 0;\n indices[1] = 1;\n indices[2] = 1;\n indices[3] = 2;\n indices[4] = 2;\n indices[5] = 3;\n indices[6] = 3;\n indices[7] = 0;\n\n return new Geometry({\n attributes: attributes,\n indices: indices,\n primitiveType: PrimitiveType.LINES,\n boundingSphere: new BoundingSphere(Cartesian3.ZERO, Math.sqrt(2.0)),\n });\n};\nexport default PlaneOutlineGeometry;\n","import defined from \"../Core/defined.js\";\nimport PlaneOutlineGeometry from \"../Core/PlaneOutlineGeometry.js\";\n\nfunction createPlaneOutlineGeometry(planeGeometry, offset) {\n if (defined(offset)) {\n planeGeometry = PlaneOutlineGeometry.unpack(planeGeometry, offset);\n }\n return PlaneOutlineGeometry.createGeometry(planeGeometry);\n}\nexport default createPlaneOutlineGeometry;\n"],"names":["Check","defined","Cartesian3","GeometryAttributes","GeometryAttribute","ComponentDatatype","Geometry","PrimitiveType","BoundingSphere"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS,oBAAoB,GAAG;EAChC,EAAE,IAAI,CAAC,WAAW,GAAG,4BAA4B,CAAC;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