Files
il/resources/public/js/cljs-runtime/module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArc.js
2026-07-01 22:38:29 -06:00

15 lines
831 B
JavaScript

shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArc = function(global, require, module, exports) {
exports.buildArc = function(points, x, y, radius, start, end, clockwise, steps) {
var dist = Math.abs(start - end);
!clockwise && start > end ? dist = 2 * Math.PI - dist : clockwise && end > start && (dist = 2 * Math.PI - dist);
steps || (steps = Math.max(6, Math.floor(dist / Math.PI * Math.pow(radius, 1 / 3) * 6)));
steps = Math.max(steps, 3);
clockwise = dist / steps * (clockwise ? -1 : 1);
for (dist = 0; dist < steps + 1; dist++) {
points.push(x + Math.cos(start) * radius, y + Math.sin(start) * radius), start += clockwise;
}
};
};
//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArc.js.map