@rickosborne/hexgrid
Version:
Rick Osborne's collection of hexagonal grid-related code.
21 lines (20 loc) • 762 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
import { axialAdd } from "./axial-add.mjs";
import { axialLerp } from "./axial-lerp.mjs";
import { axialRound } from "./axial-round.mjs";
import { AXIAL_EPSILON } from "./axial.mjs";
import { hexDistance } from "./hex-distance.mjs";
const axialLineDraw = /* @__PURE__ */ __name((left, right) => {
const points = [];
const distance = hexDistance(left, right);
const start = axialAdd(left, AXIAL_EPSILON);
for (let i = 0; i <= distance; i++) {
points.push(axialRound(axialLerp(start, right, i / distance)));
}
return points;
}, "axialLineDraw");
export {
axialLineDraw
};
//# sourceMappingURL=axial-line-draw.mjs.map