UNPKG

@rickosborne/hexgrid

Version:

Rick Osborne's collection of hexagonal grid-related code.

55 lines (54 loc) 1.66 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var orientation_exports = {}; __export(orientation_exports, { FLAT: () => FLAT, ORIENTATION_FLAT: () => ORIENTATION_FLAT, ORIENTATION_POINTY: () => ORIENTATION_POINTY, POINTY: () => POINTY }); module.exports = __toCommonJS(orientation_exports); var import_hex_system = require("./hex-system.cjs"); const FLAT = "flat"; const POINTY = "pointy"; const ORIENTATION_POINTY = Object.freeze({ b0: import_hex_system.SQRT_3_3, b1: -1 / 3, b2: 0, b3: 2 / 3, f0: import_hex_system.SQRT_3, f1: import_hex_system.SQRT_3_2, f2: 0, f3: 3 / 2, start60Deg: 0.5, type: POINTY }); const ORIENTATION_FLAT = Object.freeze({ f0: 3 / 2, f1: 0, f2: import_hex_system.SQRT_3_2, f3: import_hex_system.SQRT_3, b0: 2 / 3, b1: 0, b2: -1 / 3, b3: import_hex_system.SQRT_3_3, start60Deg: 0, type: FLAT }); //# sourceMappingURL=orientation.cjs.map