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

1 line
85 KiB
Plaintext
Raw Normal View History

2022-07-05 16:56:29 +08:00
{"version":3,"file":"createPolygonGeometry.js","sources":["../../../../Source/Core/PolygonGeometry.js","../../../../Source/WorkersES6/createPolygonGeometry.js"],"sourcesContent":["import ArcType from \"./ArcType.js\";\nimport arrayFill from \"./arrayFill.js\";\nimport BoundingRectangle from \"./BoundingRectangle.js\";\nimport BoundingSphere from \"./BoundingSphere.js\";\nimport Cartesian2 from \"./Cartesian2.js\";\nimport Cartesian3 from \"./Cartesian3.js\";\nimport Cartographic from \"./Cartographic.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 Ellipsoid from \"./Ellipsoid.js\";\nimport EllipsoidGeodesic from \"./EllipsoidGeodesic.js\";\nimport EllipsoidTangentPlane from \"./EllipsoidTangentPlane.js\";\nimport Geometry from \"./Geometry.js\";\nimport GeometryAttribute from \"./GeometryAttribute.js\";\nimport GeometryInstance from \"./GeometryInstance.js\";\nimport GeometryOffsetAttribute from \"./GeometryOffsetAttribute.js\";\nimport GeometryPipeline from \"./GeometryPipeline.js\";\nimport IndexDatatype from \"./IndexDatatype.js\";\nimport CesiumMath from \"./Math.js\";\nimport Matrix3 from \"./Matrix3.js\";\nimport PolygonGeometryLibrary from \"./PolygonGeometryLibrary.js\";\nimport PolygonPipeline from \"./PolygonPipeline.js\";\nimport Quaternion from \"./Quaternion.js\";\nimport Rectangle from \"./Rectangle.js\";\nimport VertexFormat from \"./VertexFormat.js\";\nimport WindingOrder from \"./WindingOrder.js\";\n\nconst scratchCarto1 = new Cartographic();\nconst scratchCarto2 = new Cartographic();\nfunction adjustPosHeightsForNormal(position, p1, p2, ellipsoid) {\n const carto1 = ellipsoid.cartesianToCartographic(position, scratchCarto1);\n const height = carto1.height;\n const p1Carto = ellipsoid.cartesianToCartographic(p1, scratchCarto2);\n p1Carto.height = height;\n ellipsoid.cartographicToCartesian(p1Carto, p1);\n\n const p2Carto = ellipsoid.cartesianToCartographic(p2, scratchCarto2);\n p2Carto.height = height - 100;\n ellipsoid.cartographicToCartesian(p2Carto, p2);\n}\n\nconst scratchBoundingRectangle = new BoundingRectangle();\nconst scratchPosition = new Cartesian3();\nconst scratchNormal = new Cartesian3();\nconst scratchTangent = new Cartesian3();\nconst scratchBitangent = new Cartesian3();\nconst p1Scratch = new Cartesian3();\nconst p2Scratch = new Cartesian3();\nlet scratchPerPosNormal = new Cartesian3();\nlet scratchPerPosTangent = new Cartesian3();\nlet scratchPerPosBitangent = new Cartesian3();\n\nconst appendTextureCoordinatesOrigin = new Cartesian2();\nconst appendTextureCoordinatesCartesian2 = new Cartesian2();\nconst appendTextureCoordinatesCartesian3 = new Cartesian3();\nconst appendTextureCoordinatesQuaternion = new Quaternion();\nconst appendTextureCoordinatesMatrix3 = new Matrix3();\nconst tangentMatrixScratch = new Matrix3();\n\nfunction computeAttributes(options) {\n const vertexFormat = options.vertexFormat;\n const geometry = options.geometry;\n const shadowVolume = options.shadowVolume;\n const flatPositions = geometry.attributes.position.values;\n let length = flatPositions.length;\n const wall = options.wall;\n const top = options.top || wall;\n const bottom = options.bottom || wall;\n if (\n vertexFormat.st ||\n vertexFormat.normal ||\n vertexFormat.tangent ||\n vertexFormat.bitangent ||\n shadowVolume\n ) {\n // PERFORMANCE_IDEA: Compute before subdivision, then just interpolate during subdivision.\n // PERFORMANCE_IDEA: Compute with createGeometryFromPositions() for fast path when there's no holes.\n const boundingRectangle = options.boundingRectangle;\n const tangentPlane = options.tangentPlane;\n const ellipsoid = options.ellipsoid;\n const stRotation = options.stRotation;\n const perPositionHeight = options.perPositionHeight;\n\n const origin = appendTextureCoordinatesOrigin;\n origin.x = boundingRectangle.x;\n origin.y =