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

1 line
54 KiB
Plaintext
Raw Normal View History

2022-07-05 16:56:29 +08:00
{"version":3,"file":"BoxGeometry-14396797.js","sources":["../../../../Source/Core/BoxGeometry.js"],"sourcesContent":["import arrayFill from \"./arrayFill.js\";\nimport BoundingSphere from \"./BoundingSphere.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Check from \"./Check.js\";\nimport ComponentDatatype from \"./ComponentDatatype.js\";\nimport defaultValue from \"./defaultValue.js\";\nimport defined from \"./defined.js\";\nimport DeveloperError from \"./DeveloperError.js\";\nimport Geometry from \"./Geometry.js\";\nimport GeometryAttribute from \"./GeometryAttribute.js\";\nimport GeometryAttributes from \"./GeometryAttributes.js\";\nimport GeometryOffsetAttribute from \"./GeometryOffsetAttribute.js\";\nimport PrimitiveType from \"./PrimitiveType.js\";\nimport VertexFormat from \"./VertexFormat.js\";\n\nconst diffScratch = new Cartesian3();\n\n/**\n * Describes a cube centered at the origin.\n *\n * @alias BoxGeometry\n * @constructor\n *\n * @param {Object} options Object with the following properties:\n * @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.\n * @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.\n * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.\n *\n * @see BoxGeometry.fromDimensions\n * @see BoxGeometry.createGeometry\n * @see Packable\n *\n * @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}\n *\n * @example\n * const box = new Cesium.BoxGeometry({\n * vertexFormat : Cesium.VertexFormat.POSITION_ONLY,\n * maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),\n * minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)\n * });\n * const geometry = Cesium.BoxGeometry.createGeometry(box);\n */\nfunction BoxGeometry(options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n\n const min = options.minimum;\n const max = options.maximum;\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"min\", min);\n Check.typeOf.object(\"max\", max);\n if (\n defined(options.offsetAttribute) &&\n options.offsetAttribute === GeometryOffsetAttribute.TOP\n ) {\n throw new DeveloperError(\n \"GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.\"\n );\n }\n //>>includeEnd('debug');\n\n const vertexFormat = defaultValue(options.vertexFormat, VertexFormat.DEFAULT);\n\n this._minimum = Cartesian3.clone(min);\n this._maximum = Cartesian3.clone(max);\n this._vertexFormat = vertexFormat;\n this._offsetAttribute = options.offsetAttribute;\n this._workerName = \"createBoxGeometry\";\n}\n\n/**\n * Creates a cube centered at the origin given its dimensions.\n *\n * @param {Object} options Object with the following properties:\n * @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the <code>Cartesian3</code>, respectively.\n * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.\n * @returns {BoxGeometry}\n *\n * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.\n *\n *\n * @example\n * const box = Cesium.BoxGeometry.fromDimensions({\n * vertexFormat : Cesium.VertexFormat.POSITION_ONLY,\n * dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)\n * });\n * const geometry = Cesium.BoxGeometry.createGeometry(box);\n *\n * @see BoxGeometry.createGeometry\n */\nBoxGeometry.fromDimensions = function (options) {\n options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n const dimensions = options.dimensions;\n\n //>>includeStart('debug', pragmas.debug);\n Check.typeOf.object(\"dimensions\", dimensions);\n Check.typeOf.number.greaterThanOrEquals(\"dimensions.x\", dimensions.x, 0);\n Check.typeOf.number.greaterThanOrEquals(\"dimensions.y\", dimensions.y, 0);\n Check.typeOf.number.greaterThanOrEquals(\"dimensions.z\", dimensions.z, 0);\n //>>includeEnd('de