rayzee 5.9.2 → 5.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rayzee.es.js CHANGED
@@ -12816,7 +12816,7 @@ var hl = new Float32Array(3), gl = {
12816
12816
  }
12817
12817
  }, Cl = class {
12818
12818
  constructor() {
12819
- this.layer = "hud", this.visible = !1, this._tileBounds = null, this._imageWidth = 1, this._imageHeight = 1, this.enabled = !0, this._borderColor = "rgba(255, 0, 0, 0.6)", this._borderWidth = 2;
12819
+ this.layer = "hud", this.visible = !1, this._tileBounds = null, this._imageWidth = 1, this._imageHeight = 1, this.enabled = !0, this._borderColor = "rgba(255, 0, 0, 0.6)", this._borderWidthRatio = 1 / 540, this._borderWidthMin = 1.5, this._borderWidthMax = 4;
12820
12820
  }
12821
12821
  setActiveTile(e) {
12822
12822
  this._tileBounds = e;
@@ -12826,8 +12826,8 @@ var hl = new Float32Array(3), gl = {
12826
12826
  }
12827
12827
  render(e, t, n) {
12828
12828
  if (!this._tileBounds) return;
12829
- let r = this._tileBounds, i = t / this._imageWidth, a = n / this._imageHeight, o = r.x * i, s = r.y * a, c = r.width * i, l = r.height * a;
12830
- e.strokeStyle = this._borderColor, e.lineWidth = this._borderWidth, e.strokeRect(o, s, c, l);
12829
+ let r = this._tileBounds, i = t / this._imageWidth, a = n / this._imageHeight, o = r.x * i, s = r.y * a, c = r.width * i, l = r.height * a, u = Math.min(this._borderWidthMax, Math.max(this._borderWidthMin, Math.min(t, n) * this._borderWidthRatio));
12830
+ e.strokeStyle = this._borderColor, e.lineWidth = u, e.strokeRect(o, s, c, l);
12831
12831
  }
12832
12832
  show() {
12833
12833
  this.enabled && (this.visible = !0);