qd-changjing/public/static/Build/CesiumUnminified/Workers/CylinderGeometryLibrary-bed...

1 line
3.6 KiB
Plaintext

{"version":3,"file":"CylinderGeometryLibrary-bedde1c3.js","sources":["../../../../Source/Core/CylinderGeometryLibrary.js"],"sourcesContent":["import CesiumMath from \"./Math.js\";\n\n/**\n * @private\n */\nconst CylinderGeometryLibrary = {};\n\n/**\n * @private\n */\nCylinderGeometryLibrary.computePositions = function (\n length,\n topRadius,\n bottomRadius,\n slices,\n fill\n) {\n const topZ = length * 0.5;\n const bottomZ = -topZ;\n\n const twoSlice = slices + slices;\n const size = fill ? 2 * twoSlice : twoSlice;\n const positions = new Float64Array(size * 3);\n let i;\n let index = 0;\n let tbIndex = 0;\n const bottomOffset = fill ? twoSlice * 3 : 0;\n const topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;\n\n for (i = 0; i < slices; i++) {\n const angle = (i / slices) * CesiumMath.TWO_PI;\n const x = Math.cos(angle);\n const y = Math.sin(angle);\n const bottomX = x * bottomRadius;\n const bottomY = y * bottomRadius;\n const topX = x * topRadius;\n const topY = y * topRadius;\n\n positions[tbIndex + bottomOffset] = bottomX;\n positions[tbIndex + bottomOffset + 1] = bottomY;\n positions[tbIndex + bottomOffset + 2] = bottomZ;\n\n positions[tbIndex + topOffset] = topX;\n positions[tbIndex + topOffset + 1] = topY;\n positions[tbIndex + topOffset + 2] = topZ;\n tbIndex += 3;\n if (fill) {\n positions[index++] = bottomX;\n positions[index++] = bottomY;\n positions[index++] = bottomZ;\n positions[index++] = topX;\n positions[index++] = topY;\n positions[index++] = topZ;\n }\n }\n\n return positions;\n};\nexport default CylinderGeometryLibrary;\n"],"names":["CesiumMath"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAEA;EACA;EACA;AACK,QAAC,uBAAuB,GAAG,GAAG;AACnC;EACA;EACA;EACA;EACA,uBAAuB,CAAC,gBAAgB,GAAG;EAC3C,EAAE,MAAM;EACR,EAAE,SAAS;EACX,EAAE,YAAY;EACd,EA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