CylinderGeometryLibrary-8580810e.js.map 3.6 KB

1
  1. {"version":3,"file":"CylinderGeometryLibrary-8580810e.js","sources":["../../../../Source/Core/CylinderGeometryLibrary.js"],"sourcesContent":["import CesiumMath from \"./Math.js\";\n\n/**\n * @private\n */\nvar CylinderGeometryLibrary = {};\n\n/**\n * @private\n */\nCylinderGeometryLibrary.computePositions = function (\n length,\n topRadius,\n bottomRadius,\n slices,\n fill\n) {\n var topZ = length * 0.5;\n var bottomZ = -topZ;\n\n var twoSlice = slices + slices;\n var size = fill ? 2 * twoSlice : twoSlice;\n var positions = new Float64Array(size * 3);\n var i;\n var index = 0;\n var tbIndex = 0;\n var bottomOffset = fill ? twoSlice * 3 : 0;\n var topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;\n\n for (i = 0; i < slices; i++) {\n var angle = (i / slices) * CesiumMath.TWO_PI;\n var x = Math.cos(angle);\n var y = Math.sin(angle);\n var bottomX = x * bottomRadius;\n var bottomY = y * bottomRadius;\n var topX = x * topRadius;\n var 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;AACG,MAAC,uBAAuB,GAAG,GAAG;AACjC;EACA;EACA;EACA;EACA,uBAAuB,CAAC,gBAAgB,GAAG;EAC3C,EAAE,MAAM;EACR,EAAE,SAAS;EACX,EAAE,YAAY;EACd,EAAE,MAAM;EACR,EAAE,IAAI;EACN,EAAE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