var t = require; var e = module; var i = exports; var s = (this && this.__decorate) || function(t, e, i, s) { var o, a = arguments.length, n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s); else for (var r = t.length - 1; 0 <= r; r--) (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n); return 3 < a && n && Object.defineProperty(e, i, n), n; }; Object.defineProperty(i, "__esModule", { value: !0 }); const { ccclass: o, property: a, playOnFocus: n, executeInEditMode: r, menu: l } = cc._decorator; e = class { constructor() { (this.draw = null), (this._RoundMax = 100), (this._radius = 10), (this.Pos_6 = []); } set roundMax(t) { (this._RoundMax = t), this.___Start(); } get roundMax() { return this._RoundMax; } set radius(t) { (this._radius = t), this.___Start(); } get radius() { return this._radius; } Instantiate(t) {} onLoad() { this.___Start(); } ___Start() { this.draw.clear(); let e = cc.v2(), o = this.Pos_6; this.Instantiate(e); var t = this._RoundMax, a = this._radius; for (let s = 1; s <= t; s++) { for (let t = 0; t < 6; t++) (o[t] = cc .v2(Math.sin((60 * t * Math.PI) / 180) * a * s, Math.cos((60 * t * Math.PI) / 180) * a * s) .addSelf(e)), this.Instantiate(o[t]); if (1 < s) for (let i = 0; i < 6; i++) { let e = o[(i + 1) % 6].sub(o[i]).normalize(); for (let t = 1; t < s; t++) { var n = e.mul(a * t).addSelf(o[i]); this.Instantiate(n); } } } this.draw.fill(); } * getNextPoint(e, i = -3) { yield e; let s = [], t = this._RoundMax; for (let t = 0; t < 6; t++) (s[t] = cc.v2( 124 * Math.sin(((60 * t + i) * Math.PI) / 180), 124 * Math.cos(((60 * t + i) * Math.PI) / 180) )), 2 <= t && t <= 5 && (yield s[t].add(e)); for (let i = 2; i <= t; i++) for (let t = 2; t <= 5; t++) { var o = (t + 1) % 6, a = s[t].mul(i).addSelf(e); if ((yield a, 5 != t)) { let e = s[o].sub(s[t]).normalizeSelf(); for (let t = 1; t < i; t++) yield e.mul(124 * t).addSelf(a); } } return null; } }; s([a(cc.Graphics)], e.prototype, "draw", void 0), s([a()], e.prototype, "roundMax", null), s([a()], e.prototype, "radius", null), (e = s([o, r, n], e)), (i.default = e);